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.datalabeling.v1beta1.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
 Annotation for Example. Each example may have one or more annotations. For
 example in image classification problem, each image might have one or more
 labels. We call labels binded with this image an Annotation.
 
Protobuf type google.cloud.datalabeling.v1beta1.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()
       Output only. Unique name of this annotation, format is:
      
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
       
      string name = 1;
      Specified by:
      getName in interface AnnotationOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. Unique name of this annotation, format is:
      
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
       
      string name = 1;
      Specified by:
      getNameBytes in interface AnnotationOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Annotation.Builder setName(String value)
       Output only. Unique name of this annotation, format is:
      
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Annotation.Builder clearName()
       Output only. Unique name of this annotation, format is:
      
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public Annotation.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. Unique name of this annotation, format is:
      
       projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getAnnotationSourceValue

      public int getAnnotationSourceValue()
       Output only. The source of the annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
      Specified by:
      getAnnotationSourceValue in interface AnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for annotationSource.
    • setAnnotationSourceValue

      public Annotation.Builder setAnnotationSourceValue(int value)
       Output only. The source of the annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
      Parameters:
      value - The enum numeric value on the wire for annotationSource to set.
      Returns:
      This builder for chaining.
    • getAnnotationSource

      public AnnotationSource getAnnotationSource()
       Output only. The source of the annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
      Specified by:
      getAnnotationSource in interface AnnotationOrBuilder
      Returns:
      The annotationSource.
    • setAnnotationSource

      public Annotation.Builder setAnnotationSource(AnnotationSource value)
       Output only. The source of the annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
      Parameters:
      value - The annotationSource to set.
      Returns:
      This builder for chaining.
    • clearAnnotationSource

      public Annotation.Builder clearAnnotationSource()
       Output only. The source of the annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
      Returns:
      This builder for chaining.
    • hasAnnotationValue

      public boolean hasAnnotationValue()
       Output only. This is the actual annotation value, e.g classification,
       bounding box values are stored here.
       
      .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
      Specified by:
      hasAnnotationValue in interface AnnotationOrBuilder
      Returns:
      Whether the annotationValue field is set.
    • getAnnotationValue

      public AnnotationValue getAnnotationValue()
       Output only. This is the actual annotation value, e.g classification,
       bounding box values are stored here.
       
      .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
      Specified by:
      getAnnotationValue in interface AnnotationOrBuilder
      Returns:
      The annotationValue.
    • setAnnotationValue

      public Annotation.Builder setAnnotationValue(AnnotationValue value)
       Output only. This is the actual annotation value, e.g classification,
       bounding box values are stored here.
       
      .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
    • setAnnotationValue

      public Annotation.Builder setAnnotationValue(AnnotationValue.Builder builderForValue)
       Output only. This is the actual annotation value, e.g classification,
       bounding box values are stored here.
       
      .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
    • mergeAnnotationValue

      public Annotation.Builder mergeAnnotationValue(AnnotationValue value)
       Output only. This is the actual annotation value, e.g classification,
       bounding box values are stored here.
       
      .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
    • clearAnnotationValue

      public Annotation.Builder clearAnnotationValue()
       Output only. This is the actual annotation value, e.g classification,
       bounding box values are stored here.
       
      .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
    • getAnnotationValueBuilder

      public AnnotationValue.Builder getAnnotationValueBuilder()
       Output only. This is the actual annotation value, e.g classification,
       bounding box values are stored here.
       
      .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
    • getAnnotationValueOrBuilder

      public AnnotationValueOrBuilder getAnnotationValueOrBuilder()
       Output only. This is the actual annotation value, e.g classification,
       bounding box values are stored here.
       
      .google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
      Specified by:
      getAnnotationValueOrBuilder in interface AnnotationOrBuilder
    • hasAnnotationMetadata

      public boolean hasAnnotationMetadata()
       Output only. Annotation metadata, including information like votes
       for labels.
       
      .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
      Specified by:
      hasAnnotationMetadata in interface AnnotationOrBuilder
      Returns:
      Whether the annotationMetadata field is set.
    • getAnnotationMetadata

      public AnnotationMetadata getAnnotationMetadata()
       Output only. Annotation metadata, including information like votes
       for labels.
       
      .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
      Specified by:
      getAnnotationMetadata in interface AnnotationOrBuilder
      Returns:
      The annotationMetadata.
    • setAnnotationMetadata

      public Annotation.Builder setAnnotationMetadata(AnnotationMetadata value)
       Output only. Annotation metadata, including information like votes
       for labels.
       
      .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
    • setAnnotationMetadata

      public Annotation.Builder setAnnotationMetadata(AnnotationMetadata.Builder builderForValue)
       Output only. Annotation metadata, including information like votes
       for labels.
       
      .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
    • mergeAnnotationMetadata

      public Annotation.Builder mergeAnnotationMetadata(AnnotationMetadata value)
       Output only. Annotation metadata, including information like votes
       for labels.
       
      .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
    • clearAnnotationMetadata

      public Annotation.Builder clearAnnotationMetadata()
       Output only. Annotation metadata, including information like votes
       for labels.
       
      .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
    • getAnnotationMetadataBuilder

      public AnnotationMetadata.Builder getAnnotationMetadataBuilder()
       Output only. Annotation metadata, including information like votes
       for labels.
       
      .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
    • getAnnotationMetadataOrBuilder

      public AnnotationMetadataOrBuilder getAnnotationMetadataOrBuilder()
       Output only. Annotation metadata, including information like votes
       for labels.
       
      .google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
      Specified by:
      getAnnotationMetadataOrBuilder in interface AnnotationOrBuilder
    • getAnnotationSentimentValue

      public int getAnnotationSentimentValue()
       Output only. Sentiment for this annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
      Specified by:
      getAnnotationSentimentValue in interface AnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for annotationSentiment.
    • setAnnotationSentimentValue

      public Annotation.Builder setAnnotationSentimentValue(int value)
       Output only. Sentiment for this annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
      Parameters:
      value - The enum numeric value on the wire for annotationSentiment to set.
      Returns:
      This builder for chaining.
    • getAnnotationSentiment

      public AnnotationSentiment getAnnotationSentiment()
       Output only. Sentiment for this annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
      Specified by:
      getAnnotationSentiment in interface AnnotationOrBuilder
      Returns:
      The annotationSentiment.
    • setAnnotationSentiment

      public Annotation.Builder setAnnotationSentiment(AnnotationSentiment value)
       Output only. Sentiment for this annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
      Parameters:
      value - The annotationSentiment to set.
      Returns:
      This builder for chaining.
    • clearAnnotationSentiment

      public Annotation.Builder clearAnnotationSentiment()
       Output only. Sentiment for this annotation.
       
      .google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
      Returns:
      This builder for chaining.