Class Annotation.Builder

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

public static final class Annotation.Builder extends com.google.protobuf.GeneratedMessage.Builder<Annotation.Builder> implements AnnotationOrBuilder
 An annotation is a resource in asset. It represents a key-value mapping of
 content in asset.
 
Protobuf type google.cloud.visionai.v1.Annotation
  • 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<Annotation.Builder>
    • clear

      public Annotation.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<Annotation.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<Annotation.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public Annotation.Builder mergeFrom(Annotation other)
    • isInitialized

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

      public Annotation.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<Annotation.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Resource name of the annotation.
       Format:
       `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
       
      string name = 1;
      Specified by:
      getName in interface AnnotationOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Resource name of the annotation.
       Format:
       `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
       
      string name = 1;
      Specified by:
      getNameBytes in interface AnnotationOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Annotation.Builder setName(String value)
       Resource name of the annotation.
       Format:
       `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Annotation.Builder clearName()
       Resource name of the annotation.
       Format:
       `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Annotation.Builder setNameBytes(com.google.protobuf.ByteString value)
       Resource name of the annotation.
       Format:
       `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}`
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasUserSpecifiedAnnotation

      public boolean hasUserSpecifiedAnnotation()
       User provided annotation.
       
      .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;
      Specified by:
      hasUserSpecifiedAnnotation in interface AnnotationOrBuilder
      Returns:
      Whether the userSpecifiedAnnotation field is set.
    • getUserSpecifiedAnnotation

      public UserSpecifiedAnnotation getUserSpecifiedAnnotation()
       User provided annotation.
       
      .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;
      Specified by:
      getUserSpecifiedAnnotation in interface AnnotationOrBuilder
      Returns:
      The userSpecifiedAnnotation.
    • setUserSpecifiedAnnotation

      public Annotation.Builder setUserSpecifiedAnnotation(UserSpecifiedAnnotation value)
       User provided annotation.
       
      .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;
    • setUserSpecifiedAnnotation

      public Annotation.Builder setUserSpecifiedAnnotation(UserSpecifiedAnnotation.Builder builderForValue)
       User provided annotation.
       
      .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;
    • mergeUserSpecifiedAnnotation

      public Annotation.Builder mergeUserSpecifiedAnnotation(UserSpecifiedAnnotation value)
       User provided annotation.
       
      .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;
    • clearUserSpecifiedAnnotation

      public Annotation.Builder clearUserSpecifiedAnnotation()
       User provided annotation.
       
      .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;
    • getUserSpecifiedAnnotationBuilder

      public UserSpecifiedAnnotation.Builder getUserSpecifiedAnnotationBuilder()
       User provided annotation.
       
      .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;
    • getUserSpecifiedAnnotationOrBuilder

      public UserSpecifiedAnnotationOrBuilder getUserSpecifiedAnnotationOrBuilder()
       User provided annotation.
       
      .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2;
      Specified by:
      getUserSpecifiedAnnotationOrBuilder in interface AnnotationOrBuilder