Class: Google::Apis::MybusinessV3::AttributeMetadata

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

Metadata for an attribute. Contains display information for the attribute, including a localised name and a heading for grouping related attributes together.

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

Returns a new instance of AttributeMetadata



369
370
371
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 369

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

Instance Attribute Details

#attribute_idString

The id of the attribute. Corresponds to the JSON property attributeId

Returns:

  • (String)


334
335
336
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 334

def attribute_id
  @attribute_id
end

#display_nameString

The localised display name for the attribute, if available, otherwise the English display name. Corresponds to the JSON property displayName

Returns:

  • (String)


340
341
342
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 340

def display_name
  @display_name
end

#group_display_nameString

The localised display name of the group that contains this attribute, if available, otherwise the English group name. Related attributes are collected into group and should be displayed together under the heading given here. Corresponds to the JSON property groupDisplayName

Returns:

  • (String)


348
349
350
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 348

def group_display_name
  @group_display_name
end

#is_repeatableBoolean Also known as: is_repeatable?

If true, the attribute supports multiple values. If false only a single value should be provided. Corresponds to the JSON property isRepeatable

Returns:

  • (Boolean)


354
355
356
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 354

def is_repeatable
  @is_repeatable
end

#value_metadataArray<Google::Apis::MybusinessV3::AttributeValueMetadata>

For some types of attributes (e.g. enums) a list of supported values and corresponding display names for those values is provided. Corresponds to the JSON property valueMetadata



361
362
363
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 361

def 
  @value_metadata
end

#value_typeString

The value type for the attribute. Values set and retrieved should be expected to be of this type. Corresponds to the JSON property valueType

Returns:

  • (String)


367
368
369
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 367

def value_type
  @value_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



374
375
376
377
378
379
380
381
# File 'generated/google/apis/mybusiness_v3/classes.rb', line 374

def update!(**args)
  @attribute_id = args[:attribute_id] if args.key?(:attribute_id)
  @display_name = args[:display_name] if args.key?(:display_name)
  @group_display_name = args[:group_display_name] if args.key?(:group_display_name)
  @is_repeatable = args[:is_repeatable] if args.key?(:is_repeatable)
  @value_metadata = args[:value_metadata] if args.key?(:value_metadata)
  @value_type = args[:value_type] if args.key?(:value_type)
end