Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalogAttribute
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalogAttribute
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2alpha/classes.rb,
lib/google/apis/retail_v2alpha/representations.rb,
lib/google/apis/retail_v2alpha/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.
-
#exact_searchable_option ⇒ String
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
-
#facet_intervals ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval>
Set manually for numerical attributes only.
-
#ignored_facet_values ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalogAttributeIgnoredFacetValues>
Each instance represents a list of attribute values to ignore as facet values for a specific time range.
-
#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.
-
#recommendations_filtering_option ⇒ String
When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, attribute values are filterable for recommendations.
-
#retrievable_option ⇒ String
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results.
-
#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) ⇒ GoogleCloudRetailV2alphaCatalogAttribute
constructor
A new instance of GoogleCloudRetailV2alphaCatalogAttribute.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaCatalogAttribute
Returns a new instance of GoogleCloudRetailV2alphaCatalogAttribute.
1516 1517 1518 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1516 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. Must
be specified, otherwise throws INVALID_FORMAT error.
Corresponds to the JSON property dynamicFacetableOption
1422 1423 1424 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1422 def dynamic_facetable_option @dynamic_facetable_option end |
#exact_searchable_option ⇒ String
If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This
property only applies to textual custom attributes and requires indexable set
to enabled to enable exact-searchable. If unset, the server behavior defaults
to EXACT_SEARCHABLE_DISABLED.
Corresponds to the JSON property exactSearchableOption
1430 1431 1432 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1430 def exact_searchable_option @exact_searchable_option end |
#facet_intervals ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaInterval>
Set manually for numerical attributes only. If the facet SearchResponse.
FacetSpec.intervals are not set by the customer for a numerical attribute,
then a weekly pipeline will calculate some intervals using some percentiles on
the distribution of all its product numerical attribute values. The latter
computed intervals might not be ideal for the use case of that attribute. For
this reason, the customer can set them manually. As another option, for any
numerical attribute that is passed as a facet key in the request along with
some given intervals, then these given intervals will be the facet intervals
returned in the response.
Corresponds to the JSON property facetIntervals
1443 1444 1445 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1443 def facet_intervals @facet_intervals end |
#ignored_facet_values ⇒ Array<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCatalogAttributeIgnoredFacetValues>
Each instance represents a list of attribute values to ignore as facet values
for a specific time range.
Corresponds to the JSON property ignoredFacetValues
1449 1450 1451 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1449 def ignored_facet_values @ignored_facet_values 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
CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or
CatalogService.UpdateAttributesConfig APIs. This field is False for pre-
loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither
in use by products nor predefined can be deleted. Catalog attributes 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.
Corresponds to the JSON property inUse
1464 1465 1466 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1464 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. Must be specified, otherwise
throws INVALID_FORMAT error.
Corresponds to the JSON property indexableOption
1473 1474 1475 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1473 def indexable_option @indexable_option end |
#key ⇒ 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.
Corresponds to the JSON property key
1484 1485 1486 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1484 def key @key end |
#recommendations_filtering_option ⇒ String
When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG,
if RECOMMENDATIONS_FILTERING_ENABLED, attribute values are filterable for
recommendations. This option works for categorical features only, does not
work for numerical features, inventory filtering.
Corresponds to the JSON property recommendationsFilteringOption
1492 1493 1494 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1492 def recommendations_filtering_option @recommendations_filtering_option end |
#retrievable_option ⇒ String
If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results.
If unset, the server behavior defaults to RETRIEVABLE_DISABLED.
Corresponds to the JSON property retrievableOption
1498 1499 1500 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1498 def retrievable_option @retrievable_option 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. Must
be specified, otherwise throws INVALID_FORMAT error.
Corresponds to the JSON property searchableOption
1508 1509 1510 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1508 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
1514 1515 1516 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1514 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1521 def update!(**args) @dynamic_facetable_option = args[:dynamic_facetable_option] if args.key?(:dynamic_facetable_option) @exact_searchable_option = args[:exact_searchable_option] if args.key?(:exact_searchable_option) @facet_intervals = args[:facet_intervals] if args.key?(:facet_intervals) @ignored_facet_values = args[:ignored_facet_values] if args.key?(:ignored_facet_values) @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) @recommendations_filtering_option = args[:recommendations_filtering_option] if args.key?(:recommendations_filtering_option) @retrievable_option = args[:retrievable_option] if args.key?(:retrievable_option) @searchable_option = args[:searchable_option] if args.key?(:searchable_option) @type = args[:type] if args.key?(:type) end |