Class: Google::Apis::ChatV1::Dialog
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::Dialog
- 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
Wrapper around the card body of the dialog.
Instance Attribute Summary collapse
-
#body ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Card
Cards support a defined layout, interactive UI elements like buttons, and rich media like images.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Dialog
constructor
A new instance of Dialog.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Dialog
Returns a new instance of Dialog.
810 811 812 |
# File 'lib/google/apis/chat_v1/classes.rb', line 810 def initialize(**args) update!(**args) end |
Instance Attribute Details
#body ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Card
Cards support a defined layout, interactive UI elements like buttons, and rich
media like images. Use cards to present detailed information, gather
information from users, and guide users to take a next step. In Google Chat,
cards appear in several places: - As stand-alone messages. - Accompanying a
text message, just beneath the text message. - As a dialog. The following example JSON
creates a "contact card" that features: - A header with the contact's name,
job title, avatar picture. - A section with the contact information, including
formatted text. - Buttons that users can click to share the contact or see
more or less info.
` "cardsV2": [ ` "cardId": "unique-card-id", "card": ` "header": ` "title"
: "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.
google.com/chat/images/quickstart-app-avatar.png", "imageType": "CIRCLE", "
imageAltText": "Avatar for Sasha", `, "sections": [ ` "header": "Contact Info",
"collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ ` "
decoratedText": ` "startIcon": ` "knownIcon": "EMAIL", `, "text": "sasha@
example.com", ` `, ` "decoratedText": ` "startIcon": ` "knownIcon": "PERSON", `
, "text": "Online", `, `, ` "decoratedText": ` "startIcon": ` "knownIcon": "
PHONE", `, "text": "+1 (555) 555-1234", ` `, ` "buttonList": ` "buttons": [ ` "
text": "Share", "onClick": ` "openLink": ` "url": "https://example.com/share",
` ` `, ` "text": "Edit", "onClick": ` "action": ` "function": "goToView", "
parameters": [ ` "key": "viewType", "value": "EDIT", ` ], ` ` `, ], ` `, ], `,
], `, ` ], `
Corresponds to the JSON property body
808 809 810 |
# File 'lib/google/apis/chat_v1/classes.rb', line 808 def body @body end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
815 816 817 |
# File 'lib/google/apis/chat_v1/classes.rb', line 815 def update!(**args) @body = args[:body] if args.key?(:body) end |