Class: Google::Apis::MybusinessV3::Attribute

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

Overview

A location attribute. Attributes provide additional, information about a location. The attributes that can be set on a location may vary based on the properties of that location (e.g. category). Available attributes are determined by Google and may be added and removed without API changes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Attribute

Returns a new instance of Attribute



313
314
315
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 313

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

Instance Attribute Details

#attribute_idString

The id of the attribute. Attribute ids are provided by Google. Corresponds to the JSON property attributeId

Returns:

  • (String)


295
296
297
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 295

def attribute_id
  @attribute_id
end

#value_typeString

The type of value that this attribute contains. This should be used to determine how to interpret the value. Corresponds to the JSON property valueType

Returns:

  • (String)


302
303
304
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 302

def value_type
  @value_type
end

#valuesArray<Object>

The values for this attribute. The type of the values supplied must match that expected for that attribute, see AttributeValueType. This is a repeated field where multiple attribute values may be provided. Current attribute types only support one value, but future types may support multiple values. Corresponds to the JSON property values

Returns:

  • (Array<Object>)


311
312
313
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 311

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



318
319
320
321
322
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 318

def update!(**args)
  @attribute_id = args[:attribute_id] if args.key?(:attribute_id)
  @value_type = args[:value_type] if args.key?(:value_type)
  @values = args[:values] if args.key?(:values)
end