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

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

Overview

A button with text and onclick action.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TextButton

Returns a new instance of TextButton.



3977
3978
3979
# File 'lib/google/apis/chat_v1/classes.rb', line 3977

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

Instance Attribute Details

#on_clickGoogle::Apis::ChatV1::OnClick

An onclick action (for example, open a link). Corresponds to the JSON property onClick



3970
3971
3972
# File 'lib/google/apis/chat_v1/classes.rb', line 3970

def on_click
  @on_click
end

#textString

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

Returns:

  • (String)


3975
3976
3977
# File 'lib/google/apis/chat_v1/classes.rb', line 3975

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3982
3983
3984
3985
# File 'lib/google/apis/chat_v1/classes.rb', line 3982

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