Class: Google::Apis::MirrorV1::MenuValue

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

Overview

A single value that is part of a MenuItem.

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

Returns a new instance of MenuValue.



512
513
514
# File 'generated/google/apis/mirror_v1/classes.rb', line 512

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

Instance Attribute Details

#display_nameString

The name to display for the menu item. If you specify this property for a built-in menu item, the default contextual voice command for that menu item is not shown. Corresponds to the JSON property displayName

Returns:

  • (String)


495
496
497
# File 'generated/google/apis/mirror_v1/classes.rb', line 495

def display_name
  @display_name
end

#icon_urlString

URL of an icon to display with the menu item. Corresponds to the JSON property iconUrl

Returns:

  • (String)


500
501
502
# File 'generated/google/apis/mirror_v1/classes.rb', line 500

def icon_url
  @icon_url
end

#stateString

The state that this value applies to. Allowed values are:

  • DEFAULT - Default value shown when displayed in the menuItems list.
  • PENDING - Value shown when the menuItem has been selected by the user but can still be cancelled.
  • CONFIRMED - Value shown when the menuItem has been selected by the user and can no longer be cancelled. Corresponds to the JSON property state

Returns:

  • (String)


510
511
512
# File 'generated/google/apis/mirror_v1/classes.rb', line 510

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



517
518
519
520
521
# File 'generated/google/apis/mirror_v1/classes.rb', line 517

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @icon_url = args[:icon_url] if args.key?(:icon_url)
  @state = args[:state] if args.key?(:state)
end