Class CustomAttribute.Builder

  • All Implemented Interfaces:
    com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, CustomAttributeOrBuilder, java.lang.Cloneable
    Enclosing class:
    CustomAttribute

    public static final class CustomAttribute.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
    implements CustomAttributeOrBuilder
     A message that represents custom attributes. Exactly one of `value` or
     `group_values` must not be empty.
     
    Protobuf type google.shopping.type.CustomAttribute
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Overrides:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
      • clear

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

        public CustomAttribute getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

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

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

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

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

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

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

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

        public CustomAttribute.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CustomAttribute.Builder>
      • mergeFrom

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

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

        public CustomAttribute.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws java.io.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<CustomAttribute.Builder>
        Throws:
        java.io.IOException
      • hasName

        public boolean hasName()
         The name of the attribute.
         
        optional string name = 1;
        Specified by:
        hasName in interface CustomAttributeOrBuilder
        Returns:
        Whether the name field is set.
      • getName

        public java.lang.String getName()
         The name of the attribute.
         
        optional string name = 1;
        Specified by:
        getName in interface CustomAttributeOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         The name of the attribute.
         
        optional string name = 1;
        Specified by:
        getNameBytes in interface CustomAttributeOrBuilder
        Returns:
        The bytes for name.
      • setName

        public CustomAttribute.Builder setName​(java.lang.String value)
         The name of the attribute.
         
        optional string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public CustomAttribute.Builder clearName()
         The name of the attribute.
         
        optional string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public CustomAttribute.Builder setNameBytes​(com.google.protobuf.ByteString value)
         The name of the attribute.
         
        optional string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • hasValue

        public boolean hasValue()
         The value of the attribute. If `value` is not empty, `group_values` must be
         empty.
         
        optional string value = 2;
        Specified by:
        hasValue in interface CustomAttributeOrBuilder
        Returns:
        Whether the value field is set.
      • getValue

        public java.lang.String getValue()
         The value of the attribute. If `value` is not empty, `group_values` must be
         empty.
         
        optional string value = 2;
        Specified by:
        getValue in interface CustomAttributeOrBuilder
        Returns:
        The value.
      • getValueBytes

        public com.google.protobuf.ByteString getValueBytes()
         The value of the attribute. If `value` is not empty, `group_values` must be
         empty.
         
        optional string value = 2;
        Specified by:
        getValueBytes in interface CustomAttributeOrBuilder
        Returns:
        The bytes for value.
      • setValue

        public CustomAttribute.Builder setValue​(java.lang.String value)
         The value of the attribute. If `value` is not empty, `group_values` must be
         empty.
         
        optional string value = 2;
        Parameters:
        value - The value to set.
        Returns:
        This builder for chaining.
      • clearValue

        public CustomAttribute.Builder clearValue()
         The value of the attribute. If `value` is not empty, `group_values` must be
         empty.
         
        optional string value = 2;
        Returns:
        This builder for chaining.
      • setValueBytes

        public CustomAttribute.Builder setValueBytes​(com.google.protobuf.ByteString value)
         The value of the attribute. If `value` is not empty, `group_values` must be
         empty.
         
        optional string value = 2;
        Parameters:
        value - The bytes for value to set.
        Returns:
        This builder for chaining.
      • getGroupValuesList

        public java.util.List<CustomAttribute> getGroupValuesList()
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
        Specified by:
        getGroupValuesList in interface CustomAttributeOrBuilder
      • getGroupValuesCount

        public int getGroupValuesCount()
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
        Specified by:
        getGroupValuesCount in interface CustomAttributeOrBuilder
      • getGroupValues

        public CustomAttribute getGroupValues​(int index)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
        Specified by:
        getGroupValues in interface CustomAttributeOrBuilder
      • setGroupValues

        public CustomAttribute.Builder setGroupValues​(int index,
                                                      CustomAttribute value)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • setGroupValues

        public CustomAttribute.Builder setGroupValues​(int index,
                                                      CustomAttribute.Builder builderForValue)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • addGroupValues

        public CustomAttribute.Builder addGroupValues​(CustomAttribute value)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • addGroupValues

        public CustomAttribute.Builder addGroupValues​(int index,
                                                      CustomAttribute value)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • addGroupValues

        public CustomAttribute.Builder addGroupValues​(CustomAttribute.Builder builderForValue)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • addGroupValues

        public CustomAttribute.Builder addGroupValues​(int index,
                                                      CustomAttribute.Builder builderForValue)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • addAllGroupValues

        public CustomAttribute.Builder addAllGroupValues​(java.lang.Iterable<? extends CustomAttribute> values)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • clearGroupValues

        public CustomAttribute.Builder clearGroupValues()
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • removeGroupValues

        public CustomAttribute.Builder removeGroupValues​(int index)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • getGroupValuesBuilder

        public CustomAttribute.Builder getGroupValuesBuilder​(int index)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • addGroupValuesBuilder

        public CustomAttribute.Builder addGroupValuesBuilder()
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • addGroupValuesBuilder

        public CustomAttribute.Builder addGroupValuesBuilder​(int index)
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • getGroupValuesBuilderList

        public java.util.List<CustomAttribute.Builder> getGroupValuesBuilderList()
         Subattributes within this attribute group.  If
         `group_values` is not empty, `value` must be empty.
         
        repeated .google.shopping.type.CustomAttribute group_values = 3;
      • setUnknownFields

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

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