Class 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.GeneratedMessageV3.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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public Annotation.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
      • setField

        public Annotation.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                           Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
      • clearField

        public Annotation.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
      • clearOneof

        public Annotation.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
      • setRepeatedField

        public Annotation.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   int index,
                                                   Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
      • addRepeatedField

        public Annotation.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Annotation.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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;
      • 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.
      • setUnknownFields

        public final Annotation.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
      • mergeUnknownFields

        public final Annotation.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>