Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalogAttribute
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCatalogAttribute
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2beta/classes.rb,
lib/google/apis/retail_v2beta/representations.rb,
lib/google/apis/retail_v2beta/representations.rb
Overview
Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.
Instance Attribute Summary collapse
-
#dynamic_facetable_option ⇒ String
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet.
-
#in_use ⇒ Boolean
(also: #in_use?)
Output only.
-
#indexable_option ⇒ String
When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search.
-
#key ⇒ String
Required.
-
#searchable_option ⇒ String
When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search.
-
#type ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2betaCatalogAttribute
constructor
A new instance of GoogleCloudRetailV2betaCatalogAttribute.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2betaCatalogAttribute
Returns a new instance of GoogleCloudRetailV2betaCatalogAttribute.
1476 1477 1478 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1476 def initialize(**args) update!(**args) end |
Instance Attribute Details
#dynamic_facetable_option ⇒ String
If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet.
Could only be DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option
is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned.
Corresponds to the JSON property dynamicFacetableOption
1435 1436 1437 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1435 def dynamic_facetable_option @dynamic_facetable_option end |
#in_use ⇒ Boolean Also known as: in_use?
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
AddCatalogAttribute, ImportCatalogAttributes, or UpdateAttributesConfig APIs.
This field is False for pre-loaded CatalogAttributes. After catalog changes,
it takes about 10 minutes for this field to update.
Corresponds to the JSON property inUse
1445 1446 1447 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1445 def in_use @in_use end |
#indexable_option ⇒ String
When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG,
if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered,
faceted, or boosted in SearchService.Search.
Corresponds to the JSON property indexableOption
1453 1454 1455 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1453 def indexable_option @indexable_option end |
#key ⇒ String
Required. Attribute name. For example: color, brands, attributes.
custom_attribute, such as attributes.xyz.
Corresponds to the JSON property key
1459 1460 1461 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1459 def key @key end |
#searchable_option ⇒ String
When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG,
if SEARCHABLE_ENABLED, attribute values are searchable by text queries in
SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical,
attribute values will not be searchable by text queries in SearchService.
Search, as there are no text values associated to numerical attributes.
Corresponds to the JSON property searchableOption
1468 1469 1470 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1468 def searchable_option @searchable_option end |
#type ⇒ String
Output only. The type of this attribute. This is derived from the attribute in
Product.attributes.
Corresponds to the JSON property type
1474 1475 1476 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1474 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1481 1482 1483 1484 1485 1486 1487 1488 |
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1481 def update!(**args) @dynamic_facetable_option = args[:dynamic_facetable_option] if args.key?(:dynamic_facetable_option) @in_use = args[:in_use] if args.key?(:in_use) @indexable_option = args[:indexable_option] if args.key?(:indexable_option) @key = args[:key] if args.key?(:key) @searchable_option = args[:searchable_option] if args.key?(:searchable_option) @type = args[:type] if args.key?(:type) end |