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
-
#numbers ⇒ Array<Float>
The numerical values of this custom attribute.
-
#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.
393 394 395 |
# File 'lib/google/apis/retail_v2/classes.rb', line 393 def initialize(**args) update!(**args) end |
Instance Attribute Details
#numbers ⇒ Array<Float>
The numerical values of this custom attribute. For example, [2.3, 15.4] when
the key is "lengths_cm". At most 400 values are 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 numbers
381 382 383 |
# File 'lib/google/apis/retail_v2/classes.rb', line 381 def numbers @numbers end |
#text ⇒ Array<String>
The textual values of this custom attribute. For example, ["yellow", "green"]
when the key is "color". At most 400 values are allowed. Empty values are not
allowed. Each value must be a UTF-8 encoded string with a length limit of 256
characters. 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
391 392 393 |
# File 'lib/google/apis/retail_v2/classes.rb', line 391 def text @text end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
398 399 400 401 |
# File 'lib/google/apis/retail_v2/classes.rb', line 398 def update!(**args) @numbers = args[:numbers] if args.key?(:numbers) @text = args[:text] if args.key?(:text) end |