Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaProductAttributeValue

Inherits:
Object
  • Object
show all
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

Product attribute which structured by an attribute name and value. This structure is used in conversational search filters and answers. For example, if we have name=color and value=red, this means that the color is red.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaProductAttributeValue

Returns a new instance of GoogleCloudRetailV2betaProductAttributeValue.



6252
6253
6254
# File 'lib/google/apis/retail_v2beta/classes.rb', line 6252

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#nameString

The attribute name. Corresponds to the JSON property name

Returns:

  • (String)


6245
6246
6247
# File 'lib/google/apis/retail_v2beta/classes.rb', line 6245

def name
  @name
end

#valueString

The attribute value. Corresponds to the JSON property value

Returns:

  • (String)


6250
6251
6252
# File 'lib/google/apis/retail_v2beta/classes.rb', line 6250

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6257
6258
6259
6260
# File 'lib/google/apis/retail_v2beta/classes.rb', line 6257

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @value = args[:value] if args.key?(:value)
end