Class: Google::Apis::RetailV2::GoogleCloudRetailV2ColorInfo

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

The color information of a Product.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2ColorInfo

Returns a new instance of GoogleCloudRetailV2ColorInfo.



536
537
538
# File 'lib/google/apis/retail_v2/classes.rb', line 536

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

Instance Attribute Details

#color_familiesArray<String>

The standard color families. Strongly recommended to use the following standard color groups: "Red", "Pink", "Orange", "Yellow", "Purple", "Green", " Cyan", "Blue", "Brown", "White", "Gray", "Black" and "Mixed". Normally it is expected to have only 1 color family. May consider using single "Mixed" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property color. Schema.org property Product.color. Corresponds to the JSON property colorFamilies

Returns:

  • (Array<String>)


522
523
524
# File 'lib/google/apis/retail_v2/classes.rb', line 522

def color_families
  @color_families
end

#colorsArray<String>

The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single "Mixed" instead of multiple values. A maximum of 25 colors are allowed. Each value must be a UTF- 8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property color. Schema.org property Product.color. Corresponds to the JSON property colors

Returns:

  • (Array<String>)


534
535
536
# File 'lib/google/apis/retail_v2/classes.rb', line 534

def colors
  @colors
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



541
542
543
544
# File 'lib/google/apis/retail_v2/classes.rb', line 541

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