Class Product.KeyValue.Builder

  • All Implemented Interfaces:
    Product.KeyValueOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Product.KeyValue

    public static final class Product.KeyValue.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Product.KeyValue.Builder>
    implements Product.KeyValueOrBuilder
     A product label represented as a key-value pair.
     
    Protobuf type google.cloud.vision.v1.Product.KeyValue
    • 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<Product.KeyValue.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public Product.KeyValue.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<Product.KeyValue.Builder>
        Throws:
        IOException
      • getKey

        public String getKey()
         The key of the label attached to the product. Cannot be empty and cannot
         exceed 128 bytes.
         
        string key = 1;
        Specified by:
        getKey in interface Product.KeyValueOrBuilder
        Returns:
        The key.
      • getKeyBytes

        public com.google.protobuf.ByteString getKeyBytes()
         The key of the label attached to the product. Cannot be empty and cannot
         exceed 128 bytes.
         
        string key = 1;
        Specified by:
        getKeyBytes in interface Product.KeyValueOrBuilder
        Returns:
        The bytes for key.
      • setKey

        public Product.KeyValue.Builder setKey​(String value)
         The key of the label attached to the product. Cannot be empty and cannot
         exceed 128 bytes.
         
        string key = 1;
        Parameters:
        value - The key to set.
        Returns:
        This builder for chaining.
      • clearKey

        public Product.KeyValue.Builder clearKey()
         The key of the label attached to the product. Cannot be empty and cannot
         exceed 128 bytes.
         
        string key = 1;
        Returns:
        This builder for chaining.
      • setKeyBytes

        public Product.KeyValue.Builder setKeyBytes​(com.google.protobuf.ByteString value)
         The key of the label attached to the product. Cannot be empty and cannot
         exceed 128 bytes.
         
        string key = 1;
        Parameters:
        value - The bytes for key to set.
        Returns:
        This builder for chaining.
      • getValue

        public String getValue()
         The value of the label attached to the product. Cannot be empty and
         cannot exceed 128 bytes.
         
        string value = 2;
        Specified by:
        getValue in interface Product.KeyValueOrBuilder
        Returns:
        The value.
      • getValueBytes

        public com.google.protobuf.ByteString getValueBytes()
         The value of the label attached to the product. Cannot be empty and
         cannot exceed 128 bytes.
         
        string value = 2;
        Specified by:
        getValueBytes in interface Product.KeyValueOrBuilder
        Returns:
        The bytes for value.
      • setValue

        public Product.KeyValue.Builder setValue​(String value)
         The value of the label attached to the product. Cannot be empty and
         cannot exceed 128 bytes.
         
        string value = 2;
        Parameters:
        value - The value to set.
        Returns:
        This builder for chaining.
      • clearValue

        public Product.KeyValue.Builder clearValue()
         The value of the label attached to the product. Cannot be empty and
         cannot exceed 128 bytes.
         
        string value = 2;
        Returns:
        This builder for chaining.
      • setValueBytes

        public Product.KeyValue.Builder setValueBytes​(com.google.protobuf.ByteString value)
         The value of the label attached to the product. Cannot be empty and
         cannot exceed 128 bytes.
         
        string value = 2;
        Parameters:
        value - The bytes for value to set.
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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