Class: Google::Apis::ChatV1::TextButton

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

Overview

A button with text and onclick action.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TextButton

Returns a new instance of TextButton.



829
830
831
# File 'generated/google/apis/chat_v1/classes.rb', line 829

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

Instance Attribute Details

#on_clickGoogle::Apis::ChatV1::OnClick

An onclick action (e.g. open a link). Corresponds to the JSON property onClick



822
823
824
# File 'generated/google/apis/chat_v1/classes.rb', line 822

def on_click
  @on_click
end

#textString

The text of the button. Corresponds to the JSON property text

Returns:

  • (String)


827
828
829
# File 'generated/google/apis/chat_v1/classes.rb', line 827

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



834
835
836
837
# File 'generated/google/apis/chat_v1/classes.rb', line 834

def update!(**args)
  @on_click = args[:on_click] if args.key?(:on_click)
  @text = args[:text] if args.key?(:text)
end