Retail V2 API - Class Google::Cloud::Retail::V2::CatalogAttribute (v1.0.0)

Reference documentation and code samples for the Retail V2 API class Google::Cloud::Retail::V2::CatalogAttribute.

Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#dynamic_facetable_option

def dynamic_facetable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption
Returns

#dynamic_facetable_option=

def dynamic_facetable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::DynamicFacetableOption
Parameter
Returns

#exact_searchable_option

def exact_searchable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption
Returns

#exact_searchable_option=

def exact_searchable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::ExactSearchableOption
Parameter
Returns

#facet_config

def facet_config() -> ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig
Returns

#facet_config=

def facet_config=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::FacetConfig
Parameter
Returns

#in_use

def in_use() -> ::Boolean
Returns
  • (::Boolean) — Output only. Indicates whether this attribute has been used by any products. True if at least one Product is using this attribute in Product.attributes. Otherwise, this field is False.

    CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, [CatalogService.ImportCatalogAttributes][], or CatalogService.UpdateAttributesConfig APIs. This field is False for pre-loaded CatalogAttributes.

    Only pre-loaded [catalog attributes][google.cloud.retail.v2.CatalogAttribute] that are neither in use by products nor predefined can be deleted. [Catalog attributes][google.cloud.retail.v2.CatalogAttribute] that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request.

    After catalog changes, it takes about 10 minutes for this field to update.

#indexable_option

def indexable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption
Returns

#indexable_option=

def indexable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::IndexableOption
Parameter
Returns

#key

def key() -> ::String
Returns
  • (::String) — Required. Attribute name. For example: color, brands, attributes.custom_attribute, such as attributes.xyz. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named attributes.abc_xyz can be indexed, but an attribute named attributes.abc-xyz cannot be indexed.

    If the attribute key starts with attributes., then the attribute is a custom attribute. Attributes such as brands, patterns, and title are built-in and called system attributes.

#key=

def key=(value) -> ::String
Parameter
  • value (::String) — Required. Attribute name. For example: color, brands, attributes.custom_attribute, such as attributes.xyz. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named attributes.abc_xyz can be indexed, but an attribute named attributes.abc-xyz cannot be indexed.

    If the attribute key starts with attributes., then the attribute is a custom attribute. Attributes such as brands, patterns, and title are built-in and called system attributes.

Returns
  • (::String) — Required. Attribute name. For example: color, brands, attributes.custom_attribute, such as attributes.xyz. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named attributes.abc_xyz can be indexed, but an attribute named attributes.abc-xyz cannot be indexed.

    If the attribute key starts with attributes., then the attribute is a custom attribute. Attributes such as brands, patterns, and title are built-in and called system attributes.

#retrievable_option

def retrievable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption
Returns

#retrievable_option=

def retrievable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::RetrievableOption
Parameter
Returns

#searchable_option

def searchable_option() -> ::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption
Returns

#searchable_option=

def searchable_option=(value) -> ::Google::Cloud::Retail::V2::CatalogAttribute::SearchableOption
Parameter
Returns

#type

def type() -> ::Google::Cloud::Retail::V2::CatalogAttribute::AttributeType
Returns