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
A card interface displayed in a Google Chat message or Google Workspace Add-on.
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.
1073 1074 1075 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1073 def initialize(**args) update!(**args) end |
Instance Attribute Details
#body ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Card
A card interface displayed in a Google Chat message or Google Workspace Add-on.
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. Card builder To learn how to build cards,
see the following documentation: * For Google Chat apps, see Design the
components of a card or dialog. * For Google Workspace Add-ons, see Card-
based interfaces. Note: You can add up to 100 widgets per card. Any widgets beyond this
limit are ignored. This limit applies to both card messages and dialogs in
Google Chat apps, and to cards in Google Workspace Add-ons. Example: Card
message for a Google Chat app
To create the sample
card message in Google Chat, use the following JSON: ` "cardsV2": [ ` "
cardId": "unique-card-id", "card": ` "header": ` "title": "Sasha", "subtitle":
"Software Engineer", "imageUrl": "https://developers.google.com/workspace/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
1071 1072 1073 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1071 def body @body end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1078 1079 1080 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1078 def update!(**args) @body = args[:body] if args.key?(:body) end |