Class ImageContext.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder>
com.google.cloud.vision.v1.ImageContext.Builder
All Implemented Interfaces:
ImageContextOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ImageContext

public static final class ImageContext.Builder extends com.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder> implements ImageContextOrBuilder
 Image context and/or feature-specific parameters.
 
Protobuf type google.cloud.vision.v1.ImageContext
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder>
    • clear

      public ImageContext.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder>
    • getDefaultInstanceForType

      public ImageContext getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ImageContext build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ImageContext buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ImageContext.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ImageContext.Builder>
    • mergeFrom

      public ImageContext.Builder mergeFrom(ImageContext other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ImageContext.Builder>
    • mergeFrom

      public ImageContext.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ImageContext.Builder>
      Throws:
      IOException
    • hasLatLongRect

      public boolean hasLatLongRect()
       Not used.
       
      .google.cloud.vision.v1.LatLongRect lat_long_rect = 1;
      Specified by:
      hasLatLongRect in interface ImageContextOrBuilder
      Returns:
      Whether the latLongRect field is set.
    • getLatLongRect

      public LatLongRect getLatLongRect()
       Not used.
       
      .google.cloud.vision.v1.LatLongRect lat_long_rect = 1;
      Specified by:
      getLatLongRect in interface ImageContextOrBuilder
      Returns:
      The latLongRect.
    • setLatLongRect

      public ImageContext.Builder setLatLongRect(LatLongRect value)
       Not used.
       
      .google.cloud.vision.v1.LatLongRect lat_long_rect = 1;
    • setLatLongRect

      public ImageContext.Builder setLatLongRect(LatLongRect.Builder builderForValue)
       Not used.
       
      .google.cloud.vision.v1.LatLongRect lat_long_rect = 1;
    • mergeLatLongRect

      public ImageContext.Builder mergeLatLongRect(LatLongRect value)
       Not used.
       
      .google.cloud.vision.v1.LatLongRect lat_long_rect = 1;
    • clearLatLongRect

      public ImageContext.Builder clearLatLongRect()
       Not used.
       
      .google.cloud.vision.v1.LatLongRect lat_long_rect = 1;
    • getLatLongRectBuilder

      public LatLongRect.Builder getLatLongRectBuilder()
       Not used.
       
      .google.cloud.vision.v1.LatLongRect lat_long_rect = 1;
    • getLatLongRectOrBuilder

      public LatLongRectOrBuilder getLatLongRectOrBuilder()
       Not used.
       
      .google.cloud.vision.v1.LatLongRect lat_long_rect = 1;
      Specified by:
      getLatLongRectOrBuilder in interface ImageContextOrBuilder
    • getLanguageHintsList

      public com.google.protobuf.ProtocolStringList getLanguageHintsList()
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Specified by:
      getLanguageHintsList in interface ImageContextOrBuilder
      Returns:
      A list containing the languageHints.
    • getLanguageHintsCount

      public int getLanguageHintsCount()
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Specified by:
      getLanguageHintsCount in interface ImageContextOrBuilder
      Returns:
      The count of languageHints.
    • getLanguageHints

      public String getLanguageHints(int index)
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Specified by:
      getLanguageHints in interface ImageContextOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The languageHints at the given index.
    • getLanguageHintsBytes

      public com.google.protobuf.ByteString getLanguageHintsBytes(int index)
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Specified by:
      getLanguageHintsBytes in interface ImageContextOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the languageHints at the given index.
    • setLanguageHints

      public ImageContext.Builder setLanguageHints(int index, String value)
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Parameters:
      index - The index to set the value at.
      value - The languageHints to set.
      Returns:
      This builder for chaining.
    • addLanguageHints

      public ImageContext.Builder addLanguageHints(String value)
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Parameters:
      value - The languageHints to add.
      Returns:
      This builder for chaining.
    • addAllLanguageHints

      public ImageContext.Builder addAllLanguageHints(Iterable<String> values)
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Parameters:
      values - The languageHints to add.
      Returns:
      This builder for chaining.
    • clearLanguageHints

      public ImageContext.Builder clearLanguageHints()
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Returns:
      This builder for chaining.
    • addLanguageHintsBytes

      public ImageContext.Builder addLanguageHintsBytes(com.google.protobuf.ByteString value)
       List of languages to use for TEXT_DETECTION. In most cases, an empty value
       yields the best results since it enables automatic language detection. For
       languages based on the Latin alphabet, setting `language_hints` is not
       needed. In rare cases, when the language of the text in the image is known,
       setting a hint will help get better results (although it will be a
       significant hindrance if the hint is wrong). Text detection returns an
       error if one or more of the specified languages is not one of the
       [supported languages](https://cloud.google.com/vision/docs/languages).
       
      repeated string language_hints = 2;
      Parameters:
      value - The bytes of the languageHints to add.
      Returns:
      This builder for chaining.
    • hasCropHintsParams

      public boolean hasCropHintsParams()
       Parameters for crop hints annotation request.
       
      .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;
      Specified by:
      hasCropHintsParams in interface ImageContextOrBuilder
      Returns:
      Whether the cropHintsParams field is set.
    • getCropHintsParams

      public CropHintsParams getCropHintsParams()
       Parameters for crop hints annotation request.
       
      .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;
      Specified by:
      getCropHintsParams in interface ImageContextOrBuilder
      Returns:
      The cropHintsParams.
    • setCropHintsParams

      public ImageContext.Builder setCropHintsParams(CropHintsParams value)
       Parameters for crop hints annotation request.
       
      .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;
    • setCropHintsParams

      public ImageContext.Builder setCropHintsParams(CropHintsParams.Builder builderForValue)
       Parameters for crop hints annotation request.
       
      .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;
    • mergeCropHintsParams

      public ImageContext.Builder mergeCropHintsParams(CropHintsParams value)
       Parameters for crop hints annotation request.
       
      .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;
    • clearCropHintsParams

      public ImageContext.Builder clearCropHintsParams()
       Parameters for crop hints annotation request.
       
      .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;
    • getCropHintsParamsBuilder

      public CropHintsParams.Builder getCropHintsParamsBuilder()
       Parameters for crop hints annotation request.
       
      .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;
    • getCropHintsParamsOrBuilder

      public CropHintsParamsOrBuilder getCropHintsParamsOrBuilder()
       Parameters for crop hints annotation request.
       
      .google.cloud.vision.v1.CropHintsParams crop_hints_params = 4;
      Specified by:
      getCropHintsParamsOrBuilder in interface ImageContextOrBuilder
    • hasProductSearchParams

      public boolean hasProductSearchParams()
       Parameters for product search.
       
      .google.cloud.vision.v1.ProductSearchParams product_search_params = 5;
      Specified by:
      hasProductSearchParams in interface ImageContextOrBuilder
      Returns:
      Whether the productSearchParams field is set.
    • getProductSearchParams

      public ProductSearchParams getProductSearchParams()
       Parameters for product search.
       
      .google.cloud.vision.v1.ProductSearchParams product_search_params = 5;
      Specified by:
      getProductSearchParams in interface ImageContextOrBuilder
      Returns:
      The productSearchParams.
    • setProductSearchParams

      public ImageContext.Builder setProductSearchParams(ProductSearchParams value)
       Parameters for product search.
       
      .google.cloud.vision.v1.ProductSearchParams product_search_params = 5;
    • setProductSearchParams

      public ImageContext.Builder setProductSearchParams(ProductSearchParams.Builder builderForValue)
       Parameters for product search.
       
      .google.cloud.vision.v1.ProductSearchParams product_search_params = 5;
    • mergeProductSearchParams

      public ImageContext.Builder mergeProductSearchParams(ProductSearchParams value)
       Parameters for product search.
       
      .google.cloud.vision.v1.ProductSearchParams product_search_params = 5;
    • clearProductSearchParams

      public ImageContext.Builder clearProductSearchParams()
       Parameters for product search.
       
      .google.cloud.vision.v1.ProductSearchParams product_search_params = 5;
    • getProductSearchParamsBuilder

      public ProductSearchParams.Builder getProductSearchParamsBuilder()
       Parameters for product search.
       
      .google.cloud.vision.v1.ProductSearchParams product_search_params = 5;
    • getProductSearchParamsOrBuilder

      public ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder()
       Parameters for product search.
       
      .google.cloud.vision.v1.ProductSearchParams product_search_params = 5;
      Specified by:
      getProductSearchParamsOrBuilder in interface ImageContextOrBuilder
    • hasWebDetectionParams

      public boolean hasWebDetectionParams()
       Parameters for web detection.
       
      .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;
      Specified by:
      hasWebDetectionParams in interface ImageContextOrBuilder
      Returns:
      Whether the webDetectionParams field is set.
    • getWebDetectionParams

      public WebDetectionParams getWebDetectionParams()
       Parameters for web detection.
       
      .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;
      Specified by:
      getWebDetectionParams in interface ImageContextOrBuilder
      Returns:
      The webDetectionParams.
    • setWebDetectionParams

      public ImageContext.Builder setWebDetectionParams(WebDetectionParams value)
       Parameters for web detection.
       
      .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;
    • setWebDetectionParams

      public ImageContext.Builder setWebDetectionParams(WebDetectionParams.Builder builderForValue)
       Parameters for web detection.
       
      .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;
    • mergeWebDetectionParams

      public ImageContext.Builder mergeWebDetectionParams(WebDetectionParams value)
       Parameters for web detection.
       
      .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;
    • clearWebDetectionParams

      public ImageContext.Builder clearWebDetectionParams()
       Parameters for web detection.
       
      .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;
    • getWebDetectionParamsBuilder

      public WebDetectionParams.Builder getWebDetectionParamsBuilder()
       Parameters for web detection.
       
      .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;
    • getWebDetectionParamsOrBuilder

      public WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder()
       Parameters for web detection.
       
      .google.cloud.vision.v1.WebDetectionParams web_detection_params = 6;
      Specified by:
      getWebDetectionParamsOrBuilder in interface ImageContextOrBuilder
    • hasTextDetectionParams

      public boolean hasTextDetectionParams()
       Parameters for text detection and document text detection.
       
      .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;
      Specified by:
      hasTextDetectionParams in interface ImageContextOrBuilder
      Returns:
      Whether the textDetectionParams field is set.
    • getTextDetectionParams

      public TextDetectionParams getTextDetectionParams()
       Parameters for text detection and document text detection.
       
      .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;
      Specified by:
      getTextDetectionParams in interface ImageContextOrBuilder
      Returns:
      The textDetectionParams.
    • setTextDetectionParams

      public ImageContext.Builder setTextDetectionParams(TextDetectionParams value)
       Parameters for text detection and document text detection.
       
      .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;
    • setTextDetectionParams

      public ImageContext.Builder setTextDetectionParams(TextDetectionParams.Builder builderForValue)
       Parameters for text detection and document text detection.
       
      .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;
    • mergeTextDetectionParams

      public ImageContext.Builder mergeTextDetectionParams(TextDetectionParams value)
       Parameters for text detection and document text detection.
       
      .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;
    • clearTextDetectionParams

      public ImageContext.Builder clearTextDetectionParams()
       Parameters for text detection and document text detection.
       
      .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;
    • getTextDetectionParamsBuilder

      public TextDetectionParams.Builder getTextDetectionParamsBuilder()
       Parameters for text detection and document text detection.
       
      .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;
    • getTextDetectionParamsOrBuilder

      public TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder()
       Parameters for text detection and document text detection.
       
      .google.cloud.vision.v1.TextDetectionParams text_detection_params = 12;
      Specified by:
      getTextDetectionParamsOrBuilder in interface ImageContextOrBuilder