Class: Google::Apis::ChatV1::GoogleAppsCardV1OnClick
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleAppsCardV1OnClick
- 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
Represents the response to an onClick event.
Instance Attribute Summary collapse
-
#action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted.
-
#card ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Card
A card is a UI element that can contain UI widgets such as text and images.
-
#open_dynamic_link_action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted.
-
#open_link ⇒ Google::Apis::ChatV1::GoogleAppsCardV1OpenLink
Represents an
onClickevent that opens a hyperlink.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAppsCardV1OnClick
constructor
A new instance of GoogleAppsCardV1OnClick.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAppsCardV1OnClick
Returns a new instance of GoogleAppsCardV1OnClick.
1805 1806 1807 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1805 def initialize(**args) update!(**args) end |
Instance Attribute Details
#action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted. For example,
an Apps Script can be invoked to handle the form.
Corresponds to the JSON property action
1770 1771 1772 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1770 def action @action end |
#card ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Card
A card is a UI element that can contain UI widgets such as text and images.
For more information, see Cards . For example, the following JSON creates a
card that has a header with the name, position, icons, and link for a contact,
followed by a section with contact information like email and phone number.
` "header": ` "title": "Sasha", "subtitle": "Software Engineer", "imageStyle":
"ImageStyle.AVATAR", "imageUrl": "https://example.com/sasha.png", "
imageAltText": "Avatar for Sasha" `, "sections" : [ ` "header": "Contact Info",
"widgets": [ ` "decorated_text": ` "icon": ` "knownIcon": "EMAIL" `, "content"
: "sasha@example.com" ` `, ` "decoratedText": ` "icon": ` "knownIcon": "PERSON"
`, "content": "Online" ` `, ` "decoratedText": ` "icon": ` "knownIcon": "
PHONE" `, "content": "+1 (555) 555-1234" ` `, ` "buttons": [ ` "textButton": `
"text": "Share", `, "onClick": ` "openLink": ` "url": "https://example.com/
share" ` ` `, ` "textButton": ` "text": "Edit", `, "onClick": ` "action": ` "
function": "goToView", "parameters": [ ` "key": "viewType", "value": "EDIT" ` ]
, "loadIndicator": "LoadIndicator.SPINNER" ` ` ` ] ` ], "collapsible": true, "
uncollapsibleWidgetsCount": 3 ` ], "cardActions": [ ` "actionLabel": "Send
Feedback", "onClick": ` "openLink": ` "url": "https://example.com/feedback" ` `
` ], "name": "contact-card-K3wB6arF2H9L" `
Corresponds to the JSON property card
1792 1793 1794 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1792 def card @card end |
#open_dynamic_link_action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted. For example,
an Apps Script can be invoked to handle the form.
Corresponds to the JSON property openDynamicLinkAction
1798 1799 1800 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1798 def open_dynamic_link_action @open_dynamic_link_action end |
#open_link ⇒ Google::Apis::ChatV1::GoogleAppsCardV1OpenLink
Represents an onClick event that opens a hyperlink.
Corresponds to the JSON property openLink
1803 1804 1805 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1803 def open_link @open_link end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1810 1811 1812 1813 1814 1815 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1810 def update!(**args) @action = args[:action] if args.key?(:action) @card = args[:card] if args.key?(:card) @open_dynamic_link_action = args[:open_dynamic_link_action] if args.key?(:open_dynamic_link_action) @open_link = args[:open_link] if args.key?(:open_link) end |