Class AnnotationSpec.Builder

  • All Implemented Interfaces:
    AnnotationSpecOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    AnnotationSpec

    public static final class AnnotationSpec.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<AnnotationSpec.Builder>
    implements AnnotationSpecOrBuilder
     A definition of an annotation spec.
     
    Protobuf type google.cloud.automl.v1beta1.AnnotationSpec
    • 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<AnnotationSpec.Builder>
      • clear

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

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

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

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

        public AnnotationSpec.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<AnnotationSpec.Builder>
      • setField

        public AnnotationSpec.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<AnnotationSpec.Builder>
      • clearField

        public AnnotationSpec.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<AnnotationSpec.Builder>
      • clearOneof

        public AnnotationSpec.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<AnnotationSpec.Builder>
      • setRepeatedField

        public AnnotationSpec.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<AnnotationSpec.Builder>
      • addRepeatedField

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

        public AnnotationSpec.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<AnnotationSpec.Builder>
      • isInitialized

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

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

        public String getName()
         Output only. Resource name of the annotation spec.
         Form:
        
         'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
         
        string name = 1;
        Specified by:
        getName in interface AnnotationSpecOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Output only. Resource name of the annotation spec.
         Form:
        
         'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
         
        string name = 1;
        Specified by:
        getNameBytes in interface AnnotationSpecOrBuilder
        Returns:
        The bytes for name.
      • setName

        public AnnotationSpec.Builder setName​(String value)
         Output only. Resource name of the annotation spec.
         Form:
        
         'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public AnnotationSpec.Builder clearName()
         Output only. Resource name of the annotation spec.
         Form:
        
         'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public AnnotationSpec.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Output only. Resource name of the annotation spec.
         Form:
        
         'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getDisplayName

        public String getDisplayName()
         Required. The name of the annotation spec to show in the interface. The name can be
         up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
         
        string display_name = 2;
        Specified by:
        getDisplayName in interface AnnotationSpecOrBuilder
        Returns:
        The displayName.
      • getDisplayNameBytes

        public com.google.protobuf.ByteString getDisplayNameBytes()
         Required. The name of the annotation spec to show in the interface. The name can be
         up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
         
        string display_name = 2;
        Specified by:
        getDisplayNameBytes in interface AnnotationSpecOrBuilder
        Returns:
        The bytes for displayName.
      • setDisplayName

        public AnnotationSpec.Builder setDisplayName​(String value)
         Required. The name of the annotation spec to show in the interface. The name can be
         up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
         
        string display_name = 2;
        Parameters:
        value - The displayName to set.
        Returns:
        This builder for chaining.
      • clearDisplayName

        public AnnotationSpec.Builder clearDisplayName()
         Required. The name of the annotation spec to show in the interface. The name can be
         up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
         
        string display_name = 2;
        Returns:
        This builder for chaining.
      • setDisplayNameBytes

        public AnnotationSpec.Builder setDisplayNameBytes​(com.google.protobuf.ByteString value)
         Required. The name of the annotation spec to show in the interface. The name can be
         up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
         
        string display_name = 2;
        Parameters:
        value - The bytes for displayName to set.
        Returns:
        This builder for chaining.
      • getExampleCount

        public int getExampleCount()
         Output only. The number of examples in the parent dataset
         labeled by the annotation spec.
         
        int32 example_count = 9;
        Specified by:
        getExampleCount in interface AnnotationSpecOrBuilder
        Returns:
        The exampleCount.
      • setExampleCount

        public AnnotationSpec.Builder setExampleCount​(int value)
         Output only. The number of examples in the parent dataset
         labeled by the annotation spec.
         
        int32 example_count = 9;
        Parameters:
        value - The exampleCount to set.
        Returns:
        This builder for chaining.
      • clearExampleCount

        public AnnotationSpec.Builder clearExampleCount()
         Output only. The number of examples in the parent dataset
         labeled by the annotation spec.
         
        int32 example_count = 9;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final AnnotationSpec.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<AnnotationSpec.Builder>
      • mergeUnknownFields

        public final AnnotationSpec.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<AnnotationSpec.Builder>