Class LocalizedObjectAnnotation.Builder

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

public static final class LocalizedObjectAnnotation.Builder extends com.google.protobuf.GeneratedMessage.Builder<LocalizedObjectAnnotation.Builder> implements LocalizedObjectAnnotationOrBuilder
 Set of detected objects with bounding boxes.
 
Protobuf type google.cloud.vision.v1.LocalizedObjectAnnotation
  • 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<LocalizedObjectAnnotation.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<LocalizedObjectAnnotation.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<LocalizedObjectAnnotation.Builder>
    • getDefaultInstanceForType

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

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

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

      public LocalizedObjectAnnotation.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<LocalizedObjectAnnotation.Builder>
    • mergeFrom

    • isInitialized

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

      public LocalizedObjectAnnotation.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<LocalizedObjectAnnotation.Builder>
      Throws:
      IOException
    • getMid

      public String getMid()
       Object ID that should align with EntityAnnotation mid.
       
      string mid = 1;
      Specified by:
      getMid in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      The mid.
    • getMidBytes

      public com.google.protobuf.ByteString getMidBytes()
       Object ID that should align with EntityAnnotation mid.
       
      string mid = 1;
      Specified by:
      getMidBytes in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      The bytes for mid.
    • setMid

       Object ID that should align with EntityAnnotation mid.
       
      string mid = 1;
      Parameters:
      value - The mid to set.
      Returns:
      This builder for chaining.
    • clearMid

       Object ID that should align with EntityAnnotation mid.
       
      string mid = 1;
      Returns:
      This builder for chaining.
    • setMidBytes

      public LocalizedObjectAnnotation.Builder setMidBytes(com.google.protobuf.ByteString value)
       Object ID that should align with EntityAnnotation mid.
       
      string mid = 1;
      Parameters:
      value - The bytes for mid to set.
      Returns:
      This builder for chaining.
    • getLanguageCode

      public String getLanguageCode()
       The BCP-47 language code, such as "en-US" or "sr-Latn". For more
       information, see
       http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       
      string language_code = 2;
      Specified by:
      getLanguageCode in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      The languageCode.
    • getLanguageCodeBytes

      public com.google.protobuf.ByteString getLanguageCodeBytes()
       The BCP-47 language code, such as "en-US" or "sr-Latn". For more
       information, see
       http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       
      string language_code = 2;
      Specified by:
      getLanguageCodeBytes in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      The bytes for languageCode.
    • setLanguageCode

      public LocalizedObjectAnnotation.Builder setLanguageCode(String value)
       The BCP-47 language code, such as "en-US" or "sr-Latn". For more
       information, see
       http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       
      string language_code = 2;
      Parameters:
      value - The languageCode to set.
      Returns:
      This builder for chaining.
    • clearLanguageCode

      public LocalizedObjectAnnotation.Builder clearLanguageCode()
       The BCP-47 language code, such as "en-US" or "sr-Latn". For more
       information, see
       http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       
      string language_code = 2;
      Returns:
      This builder for chaining.
    • setLanguageCodeBytes

      public LocalizedObjectAnnotation.Builder setLanguageCodeBytes(com.google.protobuf.ByteString value)
       The BCP-47 language code, such as "en-US" or "sr-Latn". For more
       information, see
       http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       
      string language_code = 2;
      Parameters:
      value - The bytes for languageCode to set.
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       Object name, expressed in its `language_code` language.
       
      string name = 3;
      Specified by:
      getName in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Object name, expressed in its `language_code` language.
       
      string name = 3;
      Specified by:
      getNameBytes in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      The bytes for name.
    • setName

      public LocalizedObjectAnnotation.Builder setName(String value)
       Object name, expressed in its `language_code` language.
       
      string name = 3;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       Object name, expressed in its `language_code` language.
       
      string name = 3;
      Returns:
      This builder for chaining.
    • setNameBytes

      public LocalizedObjectAnnotation.Builder setNameBytes(com.google.protobuf.ByteString value)
       Object name, expressed in its `language_code` language.
       
      string name = 3;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getScore

      public float getScore()
       Score of the result. Range [0, 1].
       
      float score = 4;
      Specified by:
      getScore in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      The score.
    • setScore

      public LocalizedObjectAnnotation.Builder setScore(float value)
       Score of the result. Range [0, 1].
       
      float score = 4;
      Parameters:
      value - The score to set.
      Returns:
      This builder for chaining.
    • clearScore

      public LocalizedObjectAnnotation.Builder clearScore()
       Score of the result. Range [0, 1].
       
      float score = 4;
      Returns:
      This builder for chaining.
    • hasBoundingPoly

      public boolean hasBoundingPoly()
       Image region to which this object belongs. This must be populated.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 5;
      Specified by:
      hasBoundingPoly in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      Whether the boundingPoly field is set.
    • getBoundingPoly

      public BoundingPoly getBoundingPoly()
       Image region to which this object belongs. This must be populated.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 5;
      Specified by:
      getBoundingPoly in interface LocalizedObjectAnnotationOrBuilder
      Returns:
      The boundingPoly.
    • setBoundingPoly

      public LocalizedObjectAnnotation.Builder setBoundingPoly(BoundingPoly value)
       Image region to which this object belongs. This must be populated.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 5;
    • setBoundingPoly

      public LocalizedObjectAnnotation.Builder setBoundingPoly(BoundingPoly.Builder builderForValue)
       Image region to which this object belongs. This must be populated.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 5;
    • mergeBoundingPoly

      public LocalizedObjectAnnotation.Builder mergeBoundingPoly(BoundingPoly value)
       Image region to which this object belongs. This must be populated.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 5;
    • clearBoundingPoly

      public LocalizedObjectAnnotation.Builder clearBoundingPoly()
       Image region to which this object belongs. This must be populated.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 5;
    • getBoundingPolyBuilder

      public BoundingPoly.Builder getBoundingPolyBuilder()
       Image region to which this object belongs. This must be populated.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 5;
    • getBoundingPolyOrBuilder

      public BoundingPolyOrBuilder getBoundingPolyOrBuilder()
       Image region to which this object belongs. This must be populated.
       
      .google.cloud.vision.v1.BoundingPoly bounding_poly = 5;
      Specified by:
      getBoundingPolyOrBuilder in interface LocalizedObjectAnnotationOrBuilder