Class AttributesConfig.Builder

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

    public static final class AttributesConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<AttributesConfig.Builder>
    implements AttributesConfigOrBuilder
     Catalog level attribute config.
     
    Protobuf type google.cloud.retail.v2.AttributesConfig
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributesConfig.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributesConfig.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AttributesConfig.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

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

        public String getName()
         Required. Immutable. The fully qualified resource name of the attribute
         config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getName in interface AttributesConfigOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. Immutable. The fully qualified resource name of the attribute
         config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Specified by:
        getNameBytes in interface AttributesConfigOrBuilder
        Returns:
        The bytes for name.
      • setName

        public AttributesConfig.Builder setName​(String value)
         Required. Immutable. The fully qualified resource name of the attribute
         config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public AttributesConfig.Builder clearName()
         Required. Immutable. The fully qualified resource name of the attribute
         config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Returns:
        This builder for chaining.
      • setNameBytes

        public AttributesConfig.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Required. Immutable. The fully qualified resource name of the attribute
         config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getCatalogAttributesCount

        public int getCatalogAttributesCount()
        Description copied from interface: AttributesConfigOrBuilder
         Enable attribute(s) config at catalog level.
         For example, indexable, dynamic_facetable, or searchable for each
         attribute.
        
         The key is catalog attribute's name.
         For example: `color`, `brands`, `attributes.custom_attribute`, such as
         `attributes.xyz`.
        
         The maximum number of catalog attributes allowed in a request is 1000.
         
        map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;
        Specified by:
        getCatalogAttributesCount in interface AttributesConfigOrBuilder
      • containsCatalogAttributes

        public boolean containsCatalogAttributes​(String key)
         Enable attribute(s) config at catalog level.
         For example, indexable, dynamic_facetable, or searchable for each
         attribute.
        
         The key is catalog attribute's name.
         For example: `color`, `brands`, `attributes.custom_attribute`, such as
         `attributes.xyz`.
        
         The maximum number of catalog attributes allowed in a request is 1000.
         
        map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;
        Specified by:
        containsCatalogAttributes in interface AttributesConfigOrBuilder
      • getCatalogAttributesMap

        public Map<String,​CatalogAttribute> getCatalogAttributesMap()
         Enable attribute(s) config at catalog level.
         For example, indexable, dynamic_facetable, or searchable for each
         attribute.
        
         The key is catalog attribute's name.
         For example: `color`, `brands`, `attributes.custom_attribute`, such as
         `attributes.xyz`.
        
         The maximum number of catalog attributes allowed in a request is 1000.
         
        map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;
        Specified by:
        getCatalogAttributesMap in interface AttributesConfigOrBuilder
      • getCatalogAttributesOrDefault

        public CatalogAttribute getCatalogAttributesOrDefault​(String key,
                                                              CatalogAttribute defaultValue)
         Enable attribute(s) config at catalog level.
         For example, indexable, dynamic_facetable, or searchable for each
         attribute.
        
         The key is catalog attribute's name.
         For example: `color`, `brands`, `attributes.custom_attribute`, such as
         `attributes.xyz`.
        
         The maximum number of catalog attributes allowed in a request is 1000.
         
        map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;
        Specified by:
        getCatalogAttributesOrDefault in interface AttributesConfigOrBuilder
      • getCatalogAttributesOrThrow

        public CatalogAttribute getCatalogAttributesOrThrow​(String key)
         Enable attribute(s) config at catalog level.
         For example, indexable, dynamic_facetable, or searchable for each
         attribute.
        
         The key is catalog attribute's name.
         For example: `color`, `brands`, `attributes.custom_attribute`, such as
         `attributes.xyz`.
        
         The maximum number of catalog attributes allowed in a request is 1000.
         
        map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;
        Specified by:
        getCatalogAttributesOrThrow in interface AttributesConfigOrBuilder
      • removeCatalogAttributes

        public AttributesConfig.Builder removeCatalogAttributes​(String key)
         Enable attribute(s) config at catalog level.
         For example, indexable, dynamic_facetable, or searchable for each
         attribute.
        
         The key is catalog attribute's name.
         For example: `color`, `brands`, `attributes.custom_attribute`, such as
         `attributes.xyz`.
        
         The maximum number of catalog attributes allowed in a request is 1000.
         
        map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;
      • putCatalogAttributes

        public AttributesConfig.Builder putCatalogAttributes​(String key,
                                                             CatalogAttribute value)
         Enable attribute(s) config at catalog level.
         For example, indexable, dynamic_facetable, or searchable for each
         attribute.
        
         The key is catalog attribute's name.
         For example: `color`, `brands`, `attributes.custom_attribute`, such as
         `attributes.xyz`.
        
         The maximum number of catalog attributes allowed in a request is 1000.
         
        map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;
      • putAllCatalogAttributes

        public AttributesConfig.Builder putAllCatalogAttributes​(Map<String,​CatalogAttribute> values)
         Enable attribute(s) config at catalog level.
         For example, indexable, dynamic_facetable, or searchable for each
         attribute.
        
         The key is catalog attribute's name.
         For example: `color`, `brands`, `attributes.custom_attribute`, such as
         `attributes.xyz`.
        
         The maximum number of catalog attributes allowed in a request is 1000.
         
        map<string, .google.cloud.retail.v2.CatalogAttribute> catalog_attributes = 2;
      • getAttributeConfigLevelValue

        public int getAttributeConfigLevelValue()
         Output only. The
         [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
         for this catalog.
         
        .google.cloud.retail.v2.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getAttributeConfigLevelValue in interface AttributesConfigOrBuilder
        Returns:
        The enum numeric value on the wire for attributeConfigLevel.
      • setAttributeConfigLevelValue

        public AttributesConfig.Builder setAttributeConfigLevelValue​(int value)
         Output only. The
         [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
         for this catalog.
         
        .google.cloud.retail.v2.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The enum numeric value on the wire for attributeConfigLevel to set.
        Returns:
        This builder for chaining.
      • getAttributeConfigLevel

        public AttributeConfigLevel getAttributeConfigLevel()
         Output only. The
         [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
         for this catalog.
         
        .google.cloud.retail.v2.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getAttributeConfigLevel in interface AttributesConfigOrBuilder
        Returns:
        The attributeConfigLevel.
      • setAttributeConfigLevel

        public AttributesConfig.Builder setAttributeConfigLevel​(AttributeConfigLevel value)
         Output only. The
         [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
         for this catalog.
         
        .google.cloud.retail.v2.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The attributeConfigLevel to set.
        Returns:
        This builder for chaining.
      • clearAttributeConfigLevel

        public AttributesConfig.Builder clearAttributeConfigLevel()
         Output only. The
         [AttributeConfigLevel][google.cloud.retail.v2.AttributeConfigLevel] used
         for this catalog.
         
        .google.cloud.retail.v2.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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