Class: Google::Apis::MerchantapiProductsV1beta::CustomAttribute

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/merchantapi_products_v1beta/classes.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb,
lib/google/apis/merchantapi_products_v1beta/representations.rb

Overview

A message that represents custom attributes. Exactly one of value or group_values must not be empty.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CustomAttribute

Returns a new instance of CustomAttribute.



861
862
863
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 861

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

Instance Attribute Details

#group_valuesArray<Google::Apis::MerchantapiProductsV1beta::CustomAttribute>

Subattributes within this attribute group. If group_values is not empty, value must be empty. Corresponds to the JSON property groupValues



848
849
850
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 848

def group_values
  @group_values
end

#nameString

The name of the attribute. Corresponds to the JSON property name

Returns:

  • (String)


853
854
855
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 853

def name
  @name
end

#valueString

The value of the attribute. If value is not empty, group_values must be empty. Corresponds to the JSON property value

Returns:

  • (String)


859
860
861
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 859

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



866
867
868
869
870
# File 'lib/google/apis/merchantapi_products_v1beta/classes.rb', line 866

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