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.



1313
1314
1315
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1313

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)


1295
1296
1297
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1295

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)


1302
1303
1304
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1302

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>)


1311
1312
1313
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1311

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1318
1319
1320
1321
1322
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 1318

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