Class AttributesConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AttributesConfig.Builder>
com.google.cloud.retail.v2alpha.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.GeneratedMessage.Builder<AttributesConfig.Builder> implements AttributesConfigOrBuilder
 Catalog level attribute config.
 
Protobuf type google.cloud.retail.v2alpha.AttributesConfig
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<AttributesConfig.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<AttributesConfig.Builder>
    • internalGetFieldAccessorTable

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

      public AttributesConfig.Builder mergeFrom(AttributesConfig other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.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.v2alpha.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.v2alpha.CatalogAttribute> catalog_attributes = 2;
      Specified by:
      containsCatalogAttributes in interface AttributesConfigOrBuilder
    • getCatalogAttributes

      @Deprecated public Map<String,CatalogAttribute> getCatalogAttributes()
      Deprecated.
      Specified by:
      getCatalogAttributes 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.v2alpha.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.v2alpha.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.v2alpha.CatalogAttribute> catalog_attributes = 2;
      Specified by:
      getCatalogAttributesOrThrow in interface AttributesConfigOrBuilder
    • clearCatalogAttributes

      public AttributesConfig.Builder clearCatalogAttributes()
    • 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.v2alpha.CatalogAttribute> catalog_attributes = 2;
    • getMutableCatalogAttributes

      @Deprecated public Map<String,CatalogAttribute> getMutableCatalogAttributes()
      Deprecated.
      Use alternate mutation accessors instead.
    • 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.v2alpha.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.v2alpha.CatalogAttribute> catalog_attributes = 2;
    • putCatalogAttributesBuilderIfAbsent

      public CatalogAttribute.Builder putCatalogAttributesBuilderIfAbsent(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.v2alpha.CatalogAttribute> catalog_attributes = 2;
    • getAttributeConfigLevelValue

      public int getAttributeConfigLevelValue()
       Output only. The
       [AttributeConfigLevel][google.cloud.retail.v2alpha.AttributeConfigLevel]
       used for this catalog.
       
      .google.cloud.retail.v2alpha.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.v2alpha.AttributeConfigLevel]
       used for this catalog.
       
      .google.cloud.retail.v2alpha.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.v2alpha.AttributeConfigLevel]
       used for this catalog.
       
      .google.cloud.retail.v2alpha.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.v2alpha.AttributeConfigLevel]
       used for this catalog.
       
      .google.cloud.retail.v2alpha.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.v2alpha.AttributeConfigLevel]
       used for this catalog.
       
      .google.cloud.retail.v2alpha.AttributeConfigLevel attribute_config_level = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.