Class: Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2::GoogleCloudRetailV2CustomAttribute
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/retail_v2/classes.rb,
lib/google/apis/retail_v2/representations.rb,
lib/google/apis/retail_v2/representations.rb
Overview
A custom attribute that is not explicitly modeled in Product.
Instance Attribute Summary collapse
-
#indexable ⇒ Boolean
(also: #indexable?)
This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode.
-
#numbers ⇒ Array<Float>
The numerical values of this custom attribute.
-
#searchable ⇒ Boolean
(also: #searchable?)
This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode.
-
#text ⇒ Array<String>
The textual values of this custom attribute.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2CustomAttribute
constructor
A new instance of GoogleCloudRetailV2CustomAttribute.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2CustomAttribute
Returns a new instance of GoogleCloudRetailV2CustomAttribute.
1567 1568 1569 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1567 def initialize(**args) update!(**args) end |
Instance Attribute Details
#indexable ⇒ Boolean Also known as: indexable?
This field is normally ignored unless AttributesConfig.attribute_config_level
of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode.
For information about product-level attribute configuration, see
Configuration modes. If true, custom attribute values are indexed, so that they can
be filtered, faceted or boosted in SearchService.Search. This field is ignored
in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and
SearchRequest.boost_spec for more details.
Corresponds to the JSON property indexable
1537 1538 1539 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1537 def indexable @indexable end |
#numbers ⇒ Array<Float>
The numerical values of this custom attribute. For example, [2.3, 15.4]
when
the key is "lengths_cm". Exactly one of text or numbers should be set.
Otherwise, an INVALID_ARGUMENT error is returned.
Corresponds to the JSON property numbers
1545 1546 1547 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1545 def numbers @numbers end |
#searchable ⇒ Boolean Also known as: searchable?
This field is normally ignored unless AttributesConfig.attribute_config_level
of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode.
For information about product-level attribute configuration, see
Configuration modes. If true, custom attribute values are searchable by text queries
in SearchService.Search. This field is ignored in a UserEvent. Only set if
type text is set. Otherwise, a INVALID_ARGUMENT error is returned.
Corresponds to the JSON property searchable
1556 1557 1558 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1556 def searchable @searchable end |
#text ⇒ Array<String>
The textual values of this custom attribute. For example, ["yellow", "green"]
when the key is "color". Empty string is not allowed. Otherwise, an
INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be
set. Otherwise, an INVALID_ARGUMENT error is returned.
Corresponds to the JSON property text
1565 1566 1567 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1565 def text @text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1572 1573 1574 1575 1576 1577 |
# File 'lib/google/apis/retail_v2/classes.rb', line 1572 def update!(**args) @indexable = args[:indexable] if args.key?(:indexable) @numbers = args[:numbers] if args.key?(:numbers) @searchable = args[:searchable] if args.key?(:searchable) @text = args[:text] if args.key?(:text) end |