Class: Google::Apis::MybusinessbusinessinformationV1::Attribute

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/mybusinessbusinessinformation_v1/classes.rb,
lib/google/apis/mybusinessbusinessinformation_v1/representations.rb,
lib/google/apis/mybusinessbusinessinformation_v1/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 (for example, category). Available attributes are determined by Google and may be added and removed without API changes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Attribute

Returns a new instance of Attribute.



84
85
86
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 84

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

Instance Attribute Details

#nameString

Required. The resource name for this attribute. Corresponds to the JSON property name

Returns:

  • (String)


55
56
57
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 55

def name
  @name
end

#repeated_enum_valueGoogle::Apis::MybusinessbusinessinformationV1::RepeatedEnumAttributeValue

Values for an attribute with a value_type of REPEATED_ENUM. This consists of two lists of value IDs: those that are set (true) and those that are unset ( false). Values absent are considered unknown. At least one value must be specified. Corresponds to the JSON property repeatedEnumValue



63
64
65
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 63

def repeated_enum_value
  @repeated_enum_value
end

#uri_valuesArray<Google::Apis::MybusinessbusinessinformationV1::UriAttributeValue>

When the attribute value type is URL, this field contains the value(s) for this attribute, and the other values fields must be empty. Corresponds to the JSON property uriValues



69
70
71
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 69

def uri_values
  @uri_values
end

#value_typeString

Output only. 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)


75
76
77
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 75

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. This is a repeated field where multiple attribute values may be provided. Attribute types only support one value. Corresponds to the JSON property values

Returns:

  • (Array<Object>)


82
83
84
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 82

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



89
90
91
92
93
94
95
# File 'lib/google/apis/mybusinessbusinessinformation_v1/classes.rb', line 89

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