Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="chat_v1.html">Hangouts Chat API</a> . <a href="chat_v1.spaces.html">spaces</a> . <a href="chat_v1.spaces.messages.html">messages</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 78 | <code><a href="chat_v1.spaces.messages.attachments.html">attachments()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the attachments Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 83 | <code><a href="#create">create(parent, body=None, threadKey=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 84 | <p class="firstline">Creates a message.</p> |
| 85 | <p class="toc_element"> |
| 86 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 87 | <p class="firstline">Deletes a message.</p> |
| 88 | <p class="toc_element"> |
| 89 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 90 | <p class="firstline">Returns a message.</p> |
| 91 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 92 | <code><a href="#update">update(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 93 | <p class="firstline">Updates a message.</p> |
| 94 | <h3>Method Details</h3> |
| 95 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 96 | <code class="details" id="create">create(parent, body=None, threadKey=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 97 | <pre>Creates a message. |
| 98 | |
| 99 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 100 | parent: string, Required. Space resource name, in the form "spaces/*". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 101 | Example: spaces/AAAAMpdlehY (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 102 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 103 | The object takes the form of: |
| 104 | |
| 105 | { # A message in Hangouts Chat. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 106 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". |
| 107 | # |
| 108 | # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 109 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 110 | { # Annotations associated with the plain-text body of the message. |
| 111 | # |
| 112 | # Example plain-text message body: |
| 113 | # ``` |
| 114 | # Hello @FooBot how are you!" |
| 115 | # ``` |
| 116 | # |
| 117 | # The corresponding annotations metadata: |
| 118 | # ``` |
| 119 | # "annotations":[{ |
| 120 | # "type":"USER_MENTION", |
| 121 | # "startIndex":6, |
| 122 | # "length":7, |
| 123 | # "userMention": { |
| 124 | # "user": { |
| 125 | # "name":"users/107946847022116401880", |
| 126 | # "displayName":"FooBot", |
| 127 | # "avatarUrl":"https://goo.gl/aeDtrS", |
| 128 | # "type":"BOT" |
| 129 | # }, |
| 130 | # "type":"MENTION" |
| 131 | # } |
| 132 | # }] |
| 133 | # ``` |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 134 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this |
| 135 | # annotation corresponds to. |
| 136 | "type": "A String", # The type of this annotation. |
| 137 | "length": 42, # Length of the substring in the plain-text message body this annotation |
| 138 | # corresponds to. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 139 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 140 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 141 | "name": "A String", # Resource name, in the format "users/*". |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 142 | "type": "A String", # User type. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 143 | "displayName": "A String", # The user's display name. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 144 | "domainId": "A String", # Obfuscated domain information. |
| 145 | }, |
| 146 | "type": "A String", # The type of user mention. |
| 147 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 148 | }, |
| 149 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 150 | "actionResponse": { # Parameters that a bot can use to configure how it's response is posted. # Input only. Parameters that a bot can use to configure how its response is |
| 151 | # posted. |
| 152 | "type": "A String", # The type of bot response. |
| 153 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 154 | }, |
| 155 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 156 | "name": "A String", # Resource name, in the format "users/*". |
| 157 | "type": "A String", # User type. |
| 158 | "displayName": "A String", # The user's display name. |
| 159 | "domainId": "A String", # Obfuscated domain information. |
| 160 | }, |
| 161 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat |
| 162 | # server. |
| 163 | "text": "A String", # Plain-text body of the message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 164 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the |
| 165 | # user, but any links to images, web pages, videos, etc. included here will |
| 166 | # generate preview chips. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 167 | "attachment": [ # User uploaded attachment. |
| 168 | { # An attachment in Hangouts Chat. |
| 169 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the |
| 170 | # attachment to a human user. Bots should not use this URL to download |
| 171 | # attachment content. |
| 172 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 173 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 174 | }, |
| 175 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to |
| 176 | # download the attachment. Bots should not use this URL to download |
| 177 | # attachment content. |
| 178 | "contentType": "A String", # The content type (MIME type) of the file. |
| 179 | "name": "A String", # Resource name of the attachment, in the form |
| 180 | # "spaces/*/messages/*/attachments/*". |
| 181 | "source": "A String", # The source of the attachment. |
| 182 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to |
| 183 | # download the attachment data. |
| 184 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API |
| 185 | # to download the attachment data. |
| 186 | }, |
| 187 | "contentName": "A String", # The original file name for the content, not the full path. |
| 188 | }, |
| 189 | ], |
| 190 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 191 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI |
| 192 | # elements such as: formatted texts, buttons, clickable images. Cards are |
| 193 | # normally displayed below the plain-text body of the message. |
| 194 | { # A card is a UI element that can contain UI widgets such as texts, images. |
| 195 | "name": "A String", # Name of the card. |
| 196 | "cardActions": [ # The actions of this card. |
| 197 | { # A card action is |
| 198 | # the action associated with the card. For an invoice card, a |
| 199 | # typical action would be: delete invoice, email invoice or open the |
| 200 | # invoice in browser. |
| 201 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 202 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 203 | # For example, an Apps Script can be invoked to handle the form. |
| 204 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 205 | # form submission. This information is echoed back to the bot as part of |
| 206 | # the card click event. The same method name can be used for several |
| 207 | # elements that trigger a common behavior if desired. |
| 208 | "parameters": [ # List of action parameters. |
| 209 | { # List of string parameters to supply when the action method is invoked. |
| 210 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 211 | # snooze next week. You might use action method = snooze(), passing the |
| 212 | # snooze type and snooze time in the list of string parameters. |
| 213 | "value": "A String", # The value of the parameter. |
| 214 | "key": "A String", # The name of the parameter for the action script. |
| 215 | }, |
| 216 | ], |
| 217 | }, |
| 218 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 219 | "url": "A String", # The URL to open. |
| 220 | }, |
| 221 | }, |
| 222 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 223 | }, |
| 224 | ], |
| 225 | "sections": [ # Sections are separated by a line divider. |
| 226 | { # A section contains a collection of widgets that are rendered |
| 227 | # (vertically) in the order that they are specified. Across all platforms, |
| 228 | # cards have a narrow fixed width, so |
| 229 | # there is currently no need for layout properties (e.g. float). |
| 230 | "widgets": [ # A section must contain at least 1 widget. |
| 231 | { # A widget is a UI element that presents texts, images, etc. |
| 232 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 233 | "text": "A String", |
| 234 | }, |
| 235 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these |
| 236 | # fields should be set. |
| 237 | { # A button. Can be a text button or an image button. |
| 238 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 239 | "iconUrl": "A String", # The icon specified by a URL. |
| 240 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 241 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 242 | # For example, an Apps Script can be invoked to handle the form. |
| 243 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 244 | # form submission. This information is echoed back to the bot as part of |
| 245 | # the card click event. The same method name can be used for several |
| 246 | # elements that trigger a common behavior if desired. |
| 247 | "parameters": [ # List of action parameters. |
| 248 | { # List of string parameters to supply when the action method is invoked. |
| 249 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 250 | # snooze next week. You might use action method = snooze(), passing the |
| 251 | # snooze type and snooze time in the list of string parameters. |
| 252 | "value": "A String", # The value of the parameter. |
| 253 | "key": "A String", # The name of the parameter for the action script. |
| 254 | }, |
| 255 | ], |
| 256 | }, |
| 257 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 258 | "url": "A String", # The URL to open. |
| 259 | }, |
| 260 | }, |
| 261 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 262 | # Default value will be provided if developers don't specify. |
| 263 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 264 | # API. |
| 265 | }, |
| 266 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 267 | "text": "A String", # The text of the button. |
| 268 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 269 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 270 | # For example, an Apps Script can be invoked to handle the form. |
| 271 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 272 | # form submission. This information is echoed back to the bot as part of |
| 273 | # the card click event. The same method name can be used for several |
| 274 | # elements that trigger a common behavior if desired. |
| 275 | "parameters": [ # List of action parameters. |
| 276 | { # List of string parameters to supply when the action method is invoked. |
| 277 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 278 | # snooze next week. You might use action method = snooze(), passing the |
| 279 | # snooze type and snooze time in the list of string parameters. |
| 280 | "value": "A String", # The value of the parameter. |
| 281 | "key": "A String", # The name of the parameter for the action script. |
| 282 | }, |
| 283 | ], |
| 284 | }, |
| 285 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 286 | "url": "A String", # The URL to open. |
| 287 | }, |
| 288 | }, |
| 289 | }, |
| 290 | }, |
| 291 | ], |
| 292 | "keyValue": { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget. |
| 293 | # element may also contain some actions such as onclick button. |
| 294 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 295 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 296 | "iconUrl": "A String", # The icon specified by a URL. |
| 297 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 298 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 299 | # For example, an Apps Script can be invoked to handle the form. |
| 300 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 301 | # form submission. This information is echoed back to the bot as part of |
| 302 | # the card click event. The same method name can be used for several |
| 303 | # elements that trigger a common behavior if desired. |
| 304 | "parameters": [ # List of action parameters. |
| 305 | { # List of string parameters to supply when the action method is invoked. |
| 306 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 307 | # snooze next week. You might use action method = snooze(), passing the |
| 308 | # snooze type and snooze time in the list of string parameters. |
| 309 | "value": "A String", # The value of the parameter. |
| 310 | "key": "A String", # The name of the parameter for the action script. |
| 311 | }, |
| 312 | ], |
| 313 | }, |
| 314 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 315 | "url": "A String", # The URL to open. |
| 316 | }, |
| 317 | }, |
| 318 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 319 | # Default value will be provided if developers don't specify. |
| 320 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 321 | # API. |
| 322 | }, |
| 323 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 324 | "text": "A String", # The text of the button. |
| 325 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 326 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 327 | # For example, an Apps Script can be invoked to handle the form. |
| 328 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 329 | # form submission. This information is echoed back to the bot as part of |
| 330 | # the card click event. The same method name can be used for several |
| 331 | # elements that trigger a common behavior if desired. |
| 332 | "parameters": [ # List of action parameters. |
| 333 | { # List of string parameters to supply when the action method is invoked. |
| 334 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 335 | # snooze next week. You might use action method = snooze(), passing the |
| 336 | # snooze type and snooze time in the list of string parameters. |
| 337 | "value": "A String", # The value of the parameter. |
| 338 | "key": "A String", # The name of the parameter for the action script. |
| 339 | }, |
| 340 | ], |
| 341 | }, |
| 342 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 343 | "url": "A String", # The URL to open. |
| 344 | }, |
| 345 | }, |
| 346 | }, |
| 347 | }, |
| 348 | "icon": "A String", # An enum value that will be replaced by the Chat API with the |
| 349 | # corresponding icon image. |
| 350 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 351 | "contentMultiline": True or False, # If the content should be multiline. |
| 352 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 353 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 354 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region |
| 355 | # are clickable. |
| 356 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 357 | # For example, an Apps Script can be invoked to handle the form. |
| 358 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 359 | # form submission. This information is echoed back to the bot as part of |
| 360 | # the card click event. The same method name can be used for several |
| 361 | # elements that trigger a common behavior if desired. |
| 362 | "parameters": [ # List of action parameters. |
| 363 | { # List of string parameters to supply when the action method is invoked. |
| 364 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 365 | # snooze next week. You might use action method = snooze(), passing the |
| 366 | # snooze type and snooze time in the list of string parameters. |
| 367 | "value": "A String", # The value of the parameter. |
| 368 | "key": "A String", # The name of the parameter for the action script. |
| 369 | }, |
| 370 | ], |
| 371 | }, |
| 372 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 373 | "url": "A String", # The URL to open. |
| 374 | }, |
| 375 | }, |
| 376 | "iconUrl": "A String", # The icon specified by a URL. |
| 377 | }, |
| 378 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 379 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 380 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 381 | # For example, an Apps Script can be invoked to handle the form. |
| 382 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 383 | # form submission. This information is echoed back to the bot as part of |
| 384 | # the card click event. The same method name can be used for several |
| 385 | # elements that trigger a common behavior if desired. |
| 386 | "parameters": [ # List of action parameters. |
| 387 | { # List of string parameters to supply when the action method is invoked. |
| 388 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 389 | # snooze next week. You might use action method = snooze(), passing the |
| 390 | # snooze type and snooze time in the list of string parameters. |
| 391 | "value": "A String", # The value of the parameter. |
| 392 | "key": "A String", # The name of the parameter for the action script. |
| 393 | }, |
| 394 | ], |
| 395 | }, |
| 396 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 397 | "url": "A String", # The URL to open. |
| 398 | }, |
| 399 | }, |
| 400 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients |
| 401 | # to reserve the right height for the image while waiting for it to load. |
| 402 | # It's not meant to override the native aspect ratio of the image. |
| 403 | # If unset, the server fills it by prefetching the image. |
| 404 | "imageUrl": "A String", # The URL of the image. |
| 405 | }, |
| 406 | }, |
| 407 | ], |
| 408 | "header": "A String", # The header of the section, text formatted supported. |
| 409 | }, |
| 410 | ], |
| 411 | "header": { # The header of the card. A header usually contains a title and an image. |
| 412 | "imageUrl": "A String", # The URL of the image in the card header. |
| 413 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 414 | "title": "A String", # The title must be specified. The header has a fixed height: if both a |
| 415 | # title and subtitle is specified, each will take up 1 line. If only the |
| 416 | # title is specified, it will take up both lines. |
| 417 | "subtitle": "A String", # The subtitle of the card header. |
| 418 | }, |
| 419 | }, |
| 420 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 421 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 422 | "displayName": "A String", # Output only. The display name (only if the space is a room). |
| 423 | # Please note that this field might not be populated in direct messages |
| 424 | # between humans. |
| 425 | "threaded": True or False, # Whether the messages are threaded in this space. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 426 | "name": "A String", # Resource name of the space, in the form "spaces/*". |
| 427 | # |
| 428 | # Example: spaces/AAAAMpdlehYs |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 429 | "type": "A String", # Output only. The type of a space. |
| 430 | # This is deprecated. Use `single_user_bot_dm` instead. |
| 431 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 432 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 433 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 434 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". |
| 435 | # |
| 436 | # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 437 | }, |
| 438 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards |
| 439 | # cannot be displayed (e.g. mobile notifications). |
| 440 | } |
| 441 | |
| 442 | threadKey: string, Opaque thread identifier string that can be specified to group messages |
| 443 | into a single thread. If this is the first message with a given thread |
| 444 | identifier, a new thread is created. Subsequent messages with the same |
| 445 | thread identifier will be posted into the same thread. This relieves bots |
| 446 | and webhooks from having to store the Hangouts Chat thread ID of a thread (created earlier by them) to post |
| 447 | further updates to it. |
| 448 | |
| 449 | Has no effect if thread field, |
| 450 | corresponding to an existing thread, is set in message. |
| 451 | x__xgafv: string, V1 error format. |
| 452 | Allowed values |
| 453 | 1 - v1 error format |
| 454 | 2 - v2 error format |
| 455 | |
| 456 | Returns: |
| 457 | An object of the form: |
| 458 | |
| 459 | { # A message in Hangouts Chat. |
| 460 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". |
| 461 | # |
| 462 | # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
| 463 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 464 | { # Annotations associated with the plain-text body of the message. |
| 465 | # |
| 466 | # Example plain-text message body: |
| 467 | # ``` |
| 468 | # Hello @FooBot how are you!" |
| 469 | # ``` |
| 470 | # |
| 471 | # The corresponding annotations metadata: |
| 472 | # ``` |
| 473 | # "annotations":[{ |
| 474 | # "type":"USER_MENTION", |
| 475 | # "startIndex":6, |
| 476 | # "length":7, |
| 477 | # "userMention": { |
| 478 | # "user": { |
| 479 | # "name":"users/107946847022116401880", |
| 480 | # "displayName":"FooBot", |
| 481 | # "avatarUrl":"https://goo.gl/aeDtrS", |
| 482 | # "type":"BOT" |
| 483 | # }, |
| 484 | # "type":"MENTION" |
| 485 | # } |
| 486 | # }] |
| 487 | # ``` |
| 488 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this |
| 489 | # annotation corresponds to. |
| 490 | "type": "A String", # The type of this annotation. |
| 491 | "length": 42, # Length of the substring in the plain-text message body this annotation |
| 492 | # corresponds to. |
| 493 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 494 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 495 | "name": "A String", # Resource name, in the format "users/*". |
| 496 | "type": "A String", # User type. |
| 497 | "displayName": "A String", # The user's display name. |
| 498 | "domainId": "A String", # Obfuscated domain information. |
| 499 | }, |
| 500 | "type": "A String", # The type of user mention. |
| 501 | }, |
| 502 | }, |
| 503 | ], |
| 504 | "actionResponse": { # Parameters that a bot can use to configure how it's response is posted. # Input only. Parameters that a bot can use to configure how its response is |
| 505 | # posted. |
| 506 | "type": "A String", # The type of bot response. |
| 507 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 508 | }, |
| 509 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 510 | "name": "A String", # Resource name, in the format "users/*". |
| 511 | "type": "A String", # User type. |
| 512 | "displayName": "A String", # The user's display name. |
| 513 | "domainId": "A String", # Obfuscated domain information. |
| 514 | }, |
| 515 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat |
| 516 | # server. |
| 517 | "text": "A String", # Plain-text body of the message. |
| 518 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the |
| 519 | # user, but any links to images, web pages, videos, etc. included here will |
| 520 | # generate preview chips. |
| 521 | "attachment": [ # User uploaded attachment. |
| 522 | { # An attachment in Hangouts Chat. |
| 523 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the |
| 524 | # attachment to a human user. Bots should not use this URL to download |
| 525 | # attachment content. |
| 526 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 527 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 528 | }, |
| 529 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to |
| 530 | # download the attachment. Bots should not use this URL to download |
| 531 | # attachment content. |
| 532 | "contentType": "A String", # The content type (MIME type) of the file. |
| 533 | "name": "A String", # Resource name of the attachment, in the form |
| 534 | # "spaces/*/messages/*/attachments/*". |
| 535 | "source": "A String", # The source of the attachment. |
| 536 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to |
| 537 | # download the attachment data. |
| 538 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API |
| 539 | # to download the attachment data. |
| 540 | }, |
| 541 | "contentName": "A String", # The original file name for the content, not the full path. |
| 542 | }, |
| 543 | ], |
| 544 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 545 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI |
| 546 | # elements such as: formatted texts, buttons, clickable images. Cards are |
| 547 | # normally displayed below the plain-text body of the message. |
| 548 | { # A card is a UI element that can contain UI widgets such as texts, images. |
| 549 | "name": "A String", # Name of the card. |
| 550 | "cardActions": [ # The actions of this card. |
| 551 | { # A card action is |
| 552 | # the action associated with the card. For an invoice card, a |
| 553 | # typical action would be: delete invoice, email invoice or open the |
| 554 | # invoice in browser. |
| 555 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 556 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 557 | # For example, an Apps Script can be invoked to handle the form. |
| 558 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 559 | # form submission. This information is echoed back to the bot as part of |
| 560 | # the card click event. The same method name can be used for several |
| 561 | # elements that trigger a common behavior if desired. |
| 562 | "parameters": [ # List of action parameters. |
| 563 | { # List of string parameters to supply when the action method is invoked. |
| 564 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 565 | # snooze next week. You might use action method = snooze(), passing the |
| 566 | # snooze type and snooze time in the list of string parameters. |
| 567 | "value": "A String", # The value of the parameter. |
| 568 | "key": "A String", # The name of the parameter for the action script. |
| 569 | }, |
| 570 | ], |
| 571 | }, |
| 572 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 573 | "url": "A String", # The URL to open. |
| 574 | }, |
| 575 | }, |
| 576 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 577 | }, |
| 578 | ], |
| 579 | "sections": [ # Sections are separated by a line divider. |
| 580 | { # A section contains a collection of widgets that are rendered |
| 581 | # (vertically) in the order that they are specified. Across all platforms, |
| 582 | # cards have a narrow fixed width, so |
| 583 | # there is currently no need for layout properties (e.g. float). |
| 584 | "widgets": [ # A section must contain at least 1 widget. |
| 585 | { # A widget is a UI element that presents texts, images, etc. |
| 586 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 587 | "text": "A String", |
| 588 | }, |
| 589 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these |
| 590 | # fields should be set. |
| 591 | { # A button. Can be a text button or an image button. |
| 592 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 593 | "iconUrl": "A String", # The icon specified by a URL. |
| 594 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 595 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 596 | # For example, an Apps Script can be invoked to handle the form. |
| 597 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 598 | # form submission. This information is echoed back to the bot as part of |
| 599 | # the card click event. The same method name can be used for several |
| 600 | # elements that trigger a common behavior if desired. |
| 601 | "parameters": [ # List of action parameters. |
| 602 | { # List of string parameters to supply when the action method is invoked. |
| 603 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 604 | # snooze next week. You might use action method = snooze(), passing the |
| 605 | # snooze type and snooze time in the list of string parameters. |
| 606 | "value": "A String", # The value of the parameter. |
| 607 | "key": "A String", # The name of the parameter for the action script. |
| 608 | }, |
| 609 | ], |
| 610 | }, |
| 611 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 612 | "url": "A String", # The URL to open. |
| 613 | }, |
| 614 | }, |
| 615 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 616 | # Default value will be provided if developers don't specify. |
| 617 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 618 | # API. |
| 619 | }, |
| 620 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 621 | "text": "A String", # The text of the button. |
| 622 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 623 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 624 | # For example, an Apps Script can be invoked to handle the form. |
| 625 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 626 | # form submission. This information is echoed back to the bot as part of |
| 627 | # the card click event. The same method name can be used for several |
| 628 | # elements that trigger a common behavior if desired. |
| 629 | "parameters": [ # List of action parameters. |
| 630 | { # List of string parameters to supply when the action method is invoked. |
| 631 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 632 | # snooze next week. You might use action method = snooze(), passing the |
| 633 | # snooze type and snooze time in the list of string parameters. |
| 634 | "value": "A String", # The value of the parameter. |
| 635 | "key": "A String", # The name of the parameter for the action script. |
| 636 | }, |
| 637 | ], |
| 638 | }, |
| 639 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 640 | "url": "A String", # The URL to open. |
| 641 | }, |
| 642 | }, |
| 643 | }, |
| 644 | }, |
| 645 | ], |
| 646 | "keyValue": { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget. |
| 647 | # element may also contain some actions such as onclick button. |
| 648 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 649 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 650 | "iconUrl": "A String", # The icon specified by a URL. |
| 651 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 652 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 653 | # For example, an Apps Script can be invoked to handle the form. |
| 654 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 655 | # form submission. This information is echoed back to the bot as part of |
| 656 | # the card click event. The same method name can be used for several |
| 657 | # elements that trigger a common behavior if desired. |
| 658 | "parameters": [ # List of action parameters. |
| 659 | { # List of string parameters to supply when the action method is invoked. |
| 660 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 661 | # snooze next week. You might use action method = snooze(), passing the |
| 662 | # snooze type and snooze time in the list of string parameters. |
| 663 | "value": "A String", # The value of the parameter. |
| 664 | "key": "A String", # The name of the parameter for the action script. |
| 665 | }, |
| 666 | ], |
| 667 | }, |
| 668 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 669 | "url": "A String", # The URL to open. |
| 670 | }, |
| 671 | }, |
| 672 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 673 | # Default value will be provided if developers don't specify. |
| 674 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 675 | # API. |
| 676 | }, |
| 677 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 678 | "text": "A String", # The text of the button. |
| 679 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 680 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 681 | # For example, an Apps Script can be invoked to handle the form. |
| 682 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 683 | # form submission. This information is echoed back to the bot as part of |
| 684 | # the card click event. The same method name can be used for several |
| 685 | # elements that trigger a common behavior if desired. |
| 686 | "parameters": [ # List of action parameters. |
| 687 | { # List of string parameters to supply when the action method is invoked. |
| 688 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 689 | # snooze next week. You might use action method = snooze(), passing the |
| 690 | # snooze type and snooze time in the list of string parameters. |
| 691 | "value": "A String", # The value of the parameter. |
| 692 | "key": "A String", # The name of the parameter for the action script. |
| 693 | }, |
| 694 | ], |
| 695 | }, |
| 696 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 697 | "url": "A String", # The URL to open. |
| 698 | }, |
| 699 | }, |
| 700 | }, |
| 701 | }, |
| 702 | "icon": "A String", # An enum value that will be replaced by the Chat API with the |
| 703 | # corresponding icon image. |
| 704 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 705 | "contentMultiline": True or False, # If the content should be multiline. |
| 706 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 707 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 708 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region |
| 709 | # are clickable. |
| 710 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 711 | # For example, an Apps Script can be invoked to handle the form. |
| 712 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 713 | # form submission. This information is echoed back to the bot as part of |
| 714 | # the card click event. The same method name can be used for several |
| 715 | # elements that trigger a common behavior if desired. |
| 716 | "parameters": [ # List of action parameters. |
| 717 | { # List of string parameters to supply when the action method is invoked. |
| 718 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 719 | # snooze next week. You might use action method = snooze(), passing the |
| 720 | # snooze type and snooze time in the list of string parameters. |
| 721 | "value": "A String", # The value of the parameter. |
| 722 | "key": "A String", # The name of the parameter for the action script. |
| 723 | }, |
| 724 | ], |
| 725 | }, |
| 726 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 727 | "url": "A String", # The URL to open. |
| 728 | }, |
| 729 | }, |
| 730 | "iconUrl": "A String", # The icon specified by a URL. |
| 731 | }, |
| 732 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 733 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 734 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 735 | # For example, an Apps Script can be invoked to handle the form. |
| 736 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 737 | # form submission. This information is echoed back to the bot as part of |
| 738 | # the card click event. The same method name can be used for several |
| 739 | # elements that trigger a common behavior if desired. |
| 740 | "parameters": [ # List of action parameters. |
| 741 | { # List of string parameters to supply when the action method is invoked. |
| 742 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 743 | # snooze next week. You might use action method = snooze(), passing the |
| 744 | # snooze type and snooze time in the list of string parameters. |
| 745 | "value": "A String", # The value of the parameter. |
| 746 | "key": "A String", # The name of the parameter for the action script. |
| 747 | }, |
| 748 | ], |
| 749 | }, |
| 750 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 751 | "url": "A String", # The URL to open. |
| 752 | }, |
| 753 | }, |
| 754 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients |
| 755 | # to reserve the right height for the image while waiting for it to load. |
| 756 | # It's not meant to override the native aspect ratio of the image. |
| 757 | # If unset, the server fills it by prefetching the image. |
| 758 | "imageUrl": "A String", # The URL of the image. |
| 759 | }, |
| 760 | }, |
| 761 | ], |
| 762 | "header": "A String", # The header of the section, text formatted supported. |
| 763 | }, |
| 764 | ], |
| 765 | "header": { # The header of the card. A header usually contains a title and an image. |
| 766 | "imageUrl": "A String", # The URL of the image in the card header. |
| 767 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 768 | "title": "A String", # The title must be specified. The header has a fixed height: if both a |
| 769 | # title and subtitle is specified, each will take up 1 line. If only the |
| 770 | # title is specified, it will take up both lines. |
| 771 | "subtitle": "A String", # The subtitle of the card header. |
| 772 | }, |
| 773 | }, |
| 774 | ], |
| 775 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
| 776 | "displayName": "A String", # Output only. The display name (only if the space is a room). |
| 777 | # Please note that this field might not be populated in direct messages |
| 778 | # between humans. |
| 779 | "threaded": True or False, # Whether the messages are threaded in this space. |
| 780 | "name": "A String", # Resource name of the space, in the form "spaces/*". |
| 781 | # |
| 782 | # Example: spaces/AAAAMpdlehYs |
| 783 | "type": "A String", # Output only. The type of a space. |
| 784 | # This is deprecated. Use `single_user_bot_dm` instead. |
| 785 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
| 786 | }, |
| 787 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 788 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". |
| 789 | # |
| 790 | # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 791 | }, |
| 792 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards |
| 793 | # cannot be displayed (e.g. mobile notifications). |
| 794 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 795 | </div> |
| 796 | |
| 797 | <div class="method"> |
| 798 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 799 | <pre>Deletes a message. |
| 800 | |
| 801 | Args: |
| 802 | name: string, Required. Resource name of the message to be deleted, in the form |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 803 | "spaces/*/messages/*" |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 804 | |
| 805 | Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required) |
| 806 | x__xgafv: string, V1 error format. |
| 807 | Allowed values |
| 808 | 1 - v1 error format |
| 809 | 2 - v2 error format |
| 810 | |
| 811 | Returns: |
| 812 | An object of the form: |
| 813 | |
| 814 | { # A generic empty message that you can re-use to avoid defining duplicated |
| 815 | # empty messages in your APIs. A typical example is to use it as the request |
| 816 | # or the response type of an API method. For instance: |
| 817 | # |
| 818 | # service Foo { |
| 819 | # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
| 820 | # } |
| 821 | # |
| 822 | # The JSON representation for `Empty` is empty JSON object `{}`. |
| 823 | }</pre> |
| 824 | </div> |
| 825 | |
| 826 | <div class="method"> |
| 827 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 828 | <pre>Returns a message. |
| 829 | |
| 830 | Args: |
| 831 | name: string, Required. Resource name of the message to be retrieved, in the form |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 832 | "spaces/*/messages/*". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 833 | |
| 834 | Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required) |
| 835 | x__xgafv: string, V1 error format. |
| 836 | Allowed values |
| 837 | 1 - v1 error format |
| 838 | 2 - v2 error format |
| 839 | |
| 840 | Returns: |
| 841 | An object of the form: |
| 842 | |
| 843 | { # A message in Hangouts Chat. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 844 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 845 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 846 | # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
| 847 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 848 | { # Annotations associated with the plain-text body of the message. |
| 849 | # |
| 850 | # Example plain-text message body: |
| 851 | # ``` |
| 852 | # Hello @FooBot how are you!" |
| 853 | # ``` |
| 854 | # |
| 855 | # The corresponding annotations metadata: |
| 856 | # ``` |
| 857 | # "annotations":[{ |
| 858 | # "type":"USER_MENTION", |
| 859 | # "startIndex":6, |
| 860 | # "length":7, |
| 861 | # "userMention": { |
| 862 | # "user": { |
| 863 | # "name":"users/107946847022116401880", |
| 864 | # "displayName":"FooBot", |
| 865 | # "avatarUrl":"https://goo.gl/aeDtrS", |
| 866 | # "type":"BOT" |
| 867 | # }, |
| 868 | # "type":"MENTION" |
| 869 | # } |
| 870 | # }] |
| 871 | # ``` |
| 872 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this |
| 873 | # annotation corresponds to. |
| 874 | "type": "A String", # The type of this annotation. |
| 875 | "length": 42, # Length of the substring in the plain-text message body this annotation |
| 876 | # corresponds to. |
| 877 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 878 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 879 | "name": "A String", # Resource name, in the format "users/*". |
| 880 | "type": "A String", # User type. |
| 881 | "displayName": "A String", # The user's display name. |
| 882 | "domainId": "A String", # Obfuscated domain information. |
| 883 | }, |
| 884 | "type": "A String", # The type of user mention. |
| 885 | }, |
| 886 | }, |
| 887 | ], |
| 888 | "actionResponse": { # Parameters that a bot can use to configure how it's response is posted. # Input only. Parameters that a bot can use to configure how its response is |
| 889 | # posted. |
| 890 | "type": "A String", # The type of bot response. |
| 891 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 892 | }, |
| 893 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 894 | "name": "A String", # Resource name, in the format "users/*". |
| 895 | "type": "A String", # User type. |
| 896 | "displayName": "A String", # The user's display name. |
| 897 | "domainId": "A String", # Obfuscated domain information. |
| 898 | }, |
| 899 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat |
| 900 | # server. |
| 901 | "text": "A String", # Plain-text body of the message. |
| 902 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the |
| 903 | # user, but any links to images, web pages, videos, etc. included here will |
| 904 | # generate preview chips. |
| 905 | "attachment": [ # User uploaded attachment. |
| 906 | { # An attachment in Hangouts Chat. |
| 907 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the |
| 908 | # attachment to a human user. Bots should not use this URL to download |
| 909 | # attachment content. |
| 910 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 911 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 912 | }, |
| 913 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to |
| 914 | # download the attachment. Bots should not use this URL to download |
| 915 | # attachment content. |
| 916 | "contentType": "A String", # The content type (MIME type) of the file. |
| 917 | "name": "A String", # Resource name of the attachment, in the form |
| 918 | # "spaces/*/messages/*/attachments/*". |
| 919 | "source": "A String", # The source of the attachment. |
| 920 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to |
| 921 | # download the attachment data. |
| 922 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API |
| 923 | # to download the attachment data. |
| 924 | }, |
| 925 | "contentName": "A String", # The original file name for the content, not the full path. |
| 926 | }, |
| 927 | ], |
| 928 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 929 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI |
| 930 | # elements such as: formatted texts, buttons, clickable images. Cards are |
| 931 | # normally displayed below the plain-text body of the message. |
| 932 | { # A card is a UI element that can contain UI widgets such as texts, images. |
| 933 | "name": "A String", # Name of the card. |
| 934 | "cardActions": [ # The actions of this card. |
| 935 | { # A card action is |
| 936 | # the action associated with the card. For an invoice card, a |
| 937 | # typical action would be: delete invoice, email invoice or open the |
| 938 | # invoice in browser. |
| 939 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 940 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 941 | # For example, an Apps Script can be invoked to handle the form. |
| 942 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 943 | # form submission. This information is echoed back to the bot as part of |
| 944 | # the card click event. The same method name can be used for several |
| 945 | # elements that trigger a common behavior if desired. |
| 946 | "parameters": [ # List of action parameters. |
| 947 | { # List of string parameters to supply when the action method is invoked. |
| 948 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 949 | # snooze next week. You might use action method = snooze(), passing the |
| 950 | # snooze type and snooze time in the list of string parameters. |
| 951 | "value": "A String", # The value of the parameter. |
| 952 | "key": "A String", # The name of the parameter for the action script. |
| 953 | }, |
| 954 | ], |
| 955 | }, |
| 956 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 957 | "url": "A String", # The URL to open. |
| 958 | }, |
| 959 | }, |
| 960 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 961 | }, |
| 962 | ], |
| 963 | "sections": [ # Sections are separated by a line divider. |
| 964 | { # A section contains a collection of widgets that are rendered |
| 965 | # (vertically) in the order that they are specified. Across all platforms, |
| 966 | # cards have a narrow fixed width, so |
| 967 | # there is currently no need for layout properties (e.g. float). |
| 968 | "widgets": [ # A section must contain at least 1 widget. |
| 969 | { # A widget is a UI element that presents texts, images, etc. |
| 970 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 971 | "text": "A String", |
| 972 | }, |
| 973 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these |
| 974 | # fields should be set. |
| 975 | { # A button. Can be a text button or an image button. |
| 976 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 977 | "iconUrl": "A String", # The icon specified by a URL. |
| 978 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 979 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 980 | # For example, an Apps Script can be invoked to handle the form. |
| 981 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 982 | # form submission. This information is echoed back to the bot as part of |
| 983 | # the card click event. The same method name can be used for several |
| 984 | # elements that trigger a common behavior if desired. |
| 985 | "parameters": [ # List of action parameters. |
| 986 | { # List of string parameters to supply when the action method is invoked. |
| 987 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 988 | # snooze next week. You might use action method = snooze(), passing the |
| 989 | # snooze type and snooze time in the list of string parameters. |
| 990 | "value": "A String", # The value of the parameter. |
| 991 | "key": "A String", # The name of the parameter for the action script. |
| 992 | }, |
| 993 | ], |
| 994 | }, |
| 995 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 996 | "url": "A String", # The URL to open. |
| 997 | }, |
| 998 | }, |
| 999 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 1000 | # Default value will be provided if developers don't specify. |
| 1001 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 1002 | # API. |
| 1003 | }, |
| 1004 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 1005 | "text": "A String", # The text of the button. |
| 1006 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 1007 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1008 | # For example, an Apps Script can be invoked to handle the form. |
| 1009 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1010 | # form submission. This information is echoed back to the bot as part of |
| 1011 | # the card click event. The same method name can be used for several |
| 1012 | # elements that trigger a common behavior if desired. |
| 1013 | "parameters": [ # List of action parameters. |
| 1014 | { # List of string parameters to supply when the action method is invoked. |
| 1015 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1016 | # snooze next week. You might use action method = snooze(), passing the |
| 1017 | # snooze type and snooze time in the list of string parameters. |
| 1018 | "value": "A String", # The value of the parameter. |
| 1019 | "key": "A String", # The name of the parameter for the action script. |
| 1020 | }, |
| 1021 | ], |
| 1022 | }, |
| 1023 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1024 | "url": "A String", # The URL to open. |
| 1025 | }, |
| 1026 | }, |
| 1027 | }, |
| 1028 | }, |
| 1029 | ], |
| 1030 | "keyValue": { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget. |
| 1031 | # element may also contain some actions such as onclick button. |
| 1032 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 1033 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 1034 | "iconUrl": "A String", # The icon specified by a URL. |
| 1035 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1036 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1037 | # For example, an Apps Script can be invoked to handle the form. |
| 1038 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1039 | # form submission. This information is echoed back to the bot as part of |
| 1040 | # the card click event. The same method name can be used for several |
| 1041 | # elements that trigger a common behavior if desired. |
| 1042 | "parameters": [ # List of action parameters. |
| 1043 | { # List of string parameters to supply when the action method is invoked. |
| 1044 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1045 | # snooze next week. You might use action method = snooze(), passing the |
| 1046 | # snooze type and snooze time in the list of string parameters. |
| 1047 | "value": "A String", # The value of the parameter. |
| 1048 | "key": "A String", # The name of the parameter for the action script. |
| 1049 | }, |
| 1050 | ], |
| 1051 | }, |
| 1052 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1053 | "url": "A String", # The URL to open. |
| 1054 | }, |
| 1055 | }, |
| 1056 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 1057 | # Default value will be provided if developers don't specify. |
| 1058 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 1059 | # API. |
| 1060 | }, |
| 1061 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 1062 | "text": "A String", # The text of the button. |
| 1063 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 1064 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1065 | # For example, an Apps Script can be invoked to handle the form. |
| 1066 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1067 | # form submission. This information is echoed back to the bot as part of |
| 1068 | # the card click event. The same method name can be used for several |
| 1069 | # elements that trigger a common behavior if desired. |
| 1070 | "parameters": [ # List of action parameters. |
| 1071 | { # List of string parameters to supply when the action method is invoked. |
| 1072 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1073 | # snooze next week. You might use action method = snooze(), passing the |
| 1074 | # snooze type and snooze time in the list of string parameters. |
| 1075 | "value": "A String", # The value of the parameter. |
| 1076 | "key": "A String", # The name of the parameter for the action script. |
| 1077 | }, |
| 1078 | ], |
| 1079 | }, |
| 1080 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1081 | "url": "A String", # The URL to open. |
| 1082 | }, |
| 1083 | }, |
| 1084 | }, |
| 1085 | }, |
| 1086 | "icon": "A String", # An enum value that will be replaced by the Chat API with the |
| 1087 | # corresponding icon image. |
| 1088 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 1089 | "contentMultiline": True or False, # If the content should be multiline. |
| 1090 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 1091 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 1092 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region |
| 1093 | # are clickable. |
| 1094 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1095 | # For example, an Apps Script can be invoked to handle the form. |
| 1096 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1097 | # form submission. This information is echoed back to the bot as part of |
| 1098 | # the card click event. The same method name can be used for several |
| 1099 | # elements that trigger a common behavior if desired. |
| 1100 | "parameters": [ # List of action parameters. |
| 1101 | { # List of string parameters to supply when the action method is invoked. |
| 1102 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1103 | # snooze next week. You might use action method = snooze(), passing the |
| 1104 | # snooze type and snooze time in the list of string parameters. |
| 1105 | "value": "A String", # The value of the parameter. |
| 1106 | "key": "A String", # The name of the parameter for the action script. |
| 1107 | }, |
| 1108 | ], |
| 1109 | }, |
| 1110 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1111 | "url": "A String", # The URL to open. |
| 1112 | }, |
| 1113 | }, |
| 1114 | "iconUrl": "A String", # The icon specified by a URL. |
| 1115 | }, |
| 1116 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 1117 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1118 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1119 | # For example, an Apps Script can be invoked to handle the form. |
| 1120 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1121 | # form submission. This information is echoed back to the bot as part of |
| 1122 | # the card click event. The same method name can be used for several |
| 1123 | # elements that trigger a common behavior if desired. |
| 1124 | "parameters": [ # List of action parameters. |
| 1125 | { # List of string parameters to supply when the action method is invoked. |
| 1126 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1127 | # snooze next week. You might use action method = snooze(), passing the |
| 1128 | # snooze type and snooze time in the list of string parameters. |
| 1129 | "value": "A String", # The value of the parameter. |
| 1130 | "key": "A String", # The name of the parameter for the action script. |
| 1131 | }, |
| 1132 | ], |
| 1133 | }, |
| 1134 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1135 | "url": "A String", # The URL to open. |
| 1136 | }, |
| 1137 | }, |
| 1138 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients |
| 1139 | # to reserve the right height for the image while waiting for it to load. |
| 1140 | # It's not meant to override the native aspect ratio of the image. |
| 1141 | # If unset, the server fills it by prefetching the image. |
| 1142 | "imageUrl": "A String", # The URL of the image. |
| 1143 | }, |
| 1144 | }, |
| 1145 | ], |
| 1146 | "header": "A String", # The header of the section, text formatted supported. |
| 1147 | }, |
| 1148 | ], |
| 1149 | "header": { # The header of the card. A header usually contains a title and an image. |
| 1150 | "imageUrl": "A String", # The URL of the image in the card header. |
| 1151 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 1152 | "title": "A String", # The title must be specified. The header has a fixed height: if both a |
| 1153 | # title and subtitle is specified, each will take up 1 line. If only the |
| 1154 | # title is specified, it will take up both lines. |
| 1155 | "subtitle": "A String", # The subtitle of the card header. |
| 1156 | }, |
| 1157 | }, |
| 1158 | ], |
| 1159 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
| 1160 | "displayName": "A String", # Output only. The display name (only if the space is a room). |
| 1161 | # Please note that this field might not be populated in direct messages |
| 1162 | # between humans. |
| 1163 | "threaded": True or False, # Whether the messages are threaded in this space. |
| 1164 | "name": "A String", # Resource name of the space, in the form "spaces/*". |
| 1165 | # |
| 1166 | # Example: spaces/AAAAMpdlehYs |
| 1167 | "type": "A String", # Output only. The type of a space. |
| 1168 | # This is deprecated. Use `single_user_bot_dm` instead. |
| 1169 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
| 1170 | }, |
| 1171 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 1172 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". |
| 1173 | # |
| 1174 | # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 1175 | }, |
| 1176 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards |
| 1177 | # cannot be displayed (e.g. mobile notifications). |
| 1178 | }</pre> |
| 1179 | </div> |
| 1180 | |
| 1181 | <div class="method"> |
| 1182 | <code class="details" id="update">update(name, body=None, updateMask=None, x__xgafv=None)</code> |
| 1183 | <pre>Updates a message. |
| 1184 | |
| 1185 | Args: |
| 1186 | name: string, Resource name, in the form "spaces/*/messages/*". |
| 1187 | |
| 1188 | Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required) |
| 1189 | body: object, The request body. |
| 1190 | The object takes the form of: |
| 1191 | |
| 1192 | { # A message in Hangouts Chat. |
| 1193 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". |
| 1194 | # |
| 1195 | # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1196 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 1197 | { # Annotations associated with the plain-text body of the message. |
| 1198 | # |
| 1199 | # Example plain-text message body: |
| 1200 | # ``` |
| 1201 | # Hello @FooBot how are you!" |
| 1202 | # ``` |
| 1203 | # |
| 1204 | # The corresponding annotations metadata: |
| 1205 | # ``` |
| 1206 | # "annotations":[{ |
| 1207 | # "type":"USER_MENTION", |
| 1208 | # "startIndex":6, |
| 1209 | # "length":7, |
| 1210 | # "userMention": { |
| 1211 | # "user": { |
| 1212 | # "name":"users/107946847022116401880", |
| 1213 | # "displayName":"FooBot", |
| 1214 | # "avatarUrl":"https://goo.gl/aeDtrS", |
| 1215 | # "type":"BOT" |
| 1216 | # }, |
| 1217 | # "type":"MENTION" |
| 1218 | # } |
| 1219 | # }] |
| 1220 | # ``` |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1221 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this |
| 1222 | # annotation corresponds to. |
| 1223 | "type": "A String", # The type of this annotation. |
| 1224 | "length": 42, # Length of the substring in the plain-text message body this annotation |
| 1225 | # corresponds to. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1226 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 1227 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 1228 | "name": "A String", # Resource name, in the format "users/*". |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1229 | "type": "A String", # User type. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1230 | "displayName": "A String", # The user's display name. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1231 | "domainId": "A String", # Obfuscated domain information. |
| 1232 | }, |
| 1233 | "type": "A String", # The type of user mention. |
| 1234 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1235 | }, |
| 1236 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1237 | "actionResponse": { # Parameters that a bot can use to configure how it's response is posted. # Input only. Parameters that a bot can use to configure how its response is |
| 1238 | # posted. |
| 1239 | "type": "A String", # The type of bot response. |
| 1240 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 1241 | }, |
| 1242 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 1243 | "name": "A String", # Resource name, in the format "users/*". |
| 1244 | "type": "A String", # User type. |
| 1245 | "displayName": "A String", # The user's display name. |
| 1246 | "domainId": "A String", # Obfuscated domain information. |
| 1247 | }, |
| 1248 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat |
| 1249 | # server. |
| 1250 | "text": "A String", # Plain-text body of the message. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1251 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the |
| 1252 | # user, but any links to images, web pages, videos, etc. included here will |
| 1253 | # generate preview chips. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1254 | "attachment": [ # User uploaded attachment. |
| 1255 | { # An attachment in Hangouts Chat. |
| 1256 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the |
| 1257 | # attachment to a human user. Bots should not use this URL to download |
| 1258 | # attachment content. |
| 1259 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 1260 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 1261 | }, |
| 1262 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to |
| 1263 | # download the attachment. Bots should not use this URL to download |
| 1264 | # attachment content. |
| 1265 | "contentType": "A String", # The content type (MIME type) of the file. |
| 1266 | "name": "A String", # Resource name of the attachment, in the form |
| 1267 | # "spaces/*/messages/*/attachments/*". |
| 1268 | "source": "A String", # The source of the attachment. |
| 1269 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to |
| 1270 | # download the attachment data. |
| 1271 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API |
| 1272 | # to download the attachment data. |
| 1273 | }, |
| 1274 | "contentName": "A String", # The original file name for the content, not the full path. |
| 1275 | }, |
| 1276 | ], |
| 1277 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 1278 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI |
| 1279 | # elements such as: formatted texts, buttons, clickable images. Cards are |
| 1280 | # normally displayed below the plain-text body of the message. |
| 1281 | { # A card is a UI element that can contain UI widgets such as texts, images. |
| 1282 | "name": "A String", # Name of the card. |
| 1283 | "cardActions": [ # The actions of this card. |
| 1284 | { # A card action is |
| 1285 | # the action associated with the card. For an invoice card, a |
| 1286 | # typical action would be: delete invoice, email invoice or open the |
| 1287 | # invoice in browser. |
| 1288 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 1289 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1290 | # For example, an Apps Script can be invoked to handle the form. |
| 1291 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1292 | # form submission. This information is echoed back to the bot as part of |
| 1293 | # the card click event. The same method name can be used for several |
| 1294 | # elements that trigger a common behavior if desired. |
| 1295 | "parameters": [ # List of action parameters. |
| 1296 | { # List of string parameters to supply when the action method is invoked. |
| 1297 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1298 | # snooze next week. You might use action method = snooze(), passing the |
| 1299 | # snooze type and snooze time in the list of string parameters. |
| 1300 | "value": "A String", # The value of the parameter. |
| 1301 | "key": "A String", # The name of the parameter for the action script. |
| 1302 | }, |
| 1303 | ], |
| 1304 | }, |
| 1305 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1306 | "url": "A String", # The URL to open. |
| 1307 | }, |
| 1308 | }, |
| 1309 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 1310 | }, |
| 1311 | ], |
| 1312 | "sections": [ # Sections are separated by a line divider. |
| 1313 | { # A section contains a collection of widgets that are rendered |
| 1314 | # (vertically) in the order that they are specified. Across all platforms, |
| 1315 | # cards have a narrow fixed width, so |
| 1316 | # there is currently no need for layout properties (e.g. float). |
| 1317 | "widgets": [ # A section must contain at least 1 widget. |
| 1318 | { # A widget is a UI element that presents texts, images, etc. |
| 1319 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 1320 | "text": "A String", |
| 1321 | }, |
| 1322 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these |
| 1323 | # fields should be set. |
| 1324 | { # A button. Can be a text button or an image button. |
| 1325 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 1326 | "iconUrl": "A String", # The icon specified by a URL. |
| 1327 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1328 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1329 | # For example, an Apps Script can be invoked to handle the form. |
| 1330 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1331 | # form submission. This information is echoed back to the bot as part of |
| 1332 | # the card click event. The same method name can be used for several |
| 1333 | # elements that trigger a common behavior if desired. |
| 1334 | "parameters": [ # List of action parameters. |
| 1335 | { # List of string parameters to supply when the action method is invoked. |
| 1336 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1337 | # snooze next week. You might use action method = snooze(), passing the |
| 1338 | # snooze type and snooze time in the list of string parameters. |
| 1339 | "value": "A String", # The value of the parameter. |
| 1340 | "key": "A String", # The name of the parameter for the action script. |
| 1341 | }, |
| 1342 | ], |
| 1343 | }, |
| 1344 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1345 | "url": "A String", # The URL to open. |
| 1346 | }, |
| 1347 | }, |
| 1348 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 1349 | # Default value will be provided if developers don't specify. |
| 1350 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 1351 | # API. |
| 1352 | }, |
| 1353 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 1354 | "text": "A String", # The text of the button. |
| 1355 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 1356 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1357 | # For example, an Apps Script can be invoked to handle the form. |
| 1358 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1359 | # form submission. This information is echoed back to the bot as part of |
| 1360 | # the card click event. The same method name can be used for several |
| 1361 | # elements that trigger a common behavior if desired. |
| 1362 | "parameters": [ # List of action parameters. |
| 1363 | { # List of string parameters to supply when the action method is invoked. |
| 1364 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1365 | # snooze next week. You might use action method = snooze(), passing the |
| 1366 | # snooze type and snooze time in the list of string parameters. |
| 1367 | "value": "A String", # The value of the parameter. |
| 1368 | "key": "A String", # The name of the parameter for the action script. |
| 1369 | }, |
| 1370 | ], |
| 1371 | }, |
| 1372 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1373 | "url": "A String", # The URL to open. |
| 1374 | }, |
| 1375 | }, |
| 1376 | }, |
| 1377 | }, |
| 1378 | ], |
| 1379 | "keyValue": { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget. |
| 1380 | # element may also contain some actions such as onclick button. |
| 1381 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 1382 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 1383 | "iconUrl": "A String", # The icon specified by a URL. |
| 1384 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1385 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1386 | # For example, an Apps Script can be invoked to handle the form. |
| 1387 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1388 | # form submission. This information is echoed back to the bot as part of |
| 1389 | # the card click event. The same method name can be used for several |
| 1390 | # elements that trigger a common behavior if desired. |
| 1391 | "parameters": [ # List of action parameters. |
| 1392 | { # List of string parameters to supply when the action method is invoked. |
| 1393 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1394 | # snooze next week. You might use action method = snooze(), passing the |
| 1395 | # snooze type and snooze time in the list of string parameters. |
| 1396 | "value": "A String", # The value of the parameter. |
| 1397 | "key": "A String", # The name of the parameter for the action script. |
| 1398 | }, |
| 1399 | ], |
| 1400 | }, |
| 1401 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1402 | "url": "A String", # The URL to open. |
| 1403 | }, |
| 1404 | }, |
| 1405 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 1406 | # Default value will be provided if developers don't specify. |
| 1407 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 1408 | # API. |
| 1409 | }, |
| 1410 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 1411 | "text": "A String", # The text of the button. |
| 1412 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 1413 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1414 | # For example, an Apps Script can be invoked to handle the form. |
| 1415 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1416 | # form submission. This information is echoed back to the bot as part of |
| 1417 | # the card click event. The same method name can be used for several |
| 1418 | # elements that trigger a common behavior if desired. |
| 1419 | "parameters": [ # List of action parameters. |
| 1420 | { # List of string parameters to supply when the action method is invoked. |
| 1421 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1422 | # snooze next week. You might use action method = snooze(), passing the |
| 1423 | # snooze type and snooze time in the list of string parameters. |
| 1424 | "value": "A String", # The value of the parameter. |
| 1425 | "key": "A String", # The name of the parameter for the action script. |
| 1426 | }, |
| 1427 | ], |
| 1428 | }, |
| 1429 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1430 | "url": "A String", # The URL to open. |
| 1431 | }, |
| 1432 | }, |
| 1433 | }, |
| 1434 | }, |
| 1435 | "icon": "A String", # An enum value that will be replaced by the Chat API with the |
| 1436 | # corresponding icon image. |
| 1437 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 1438 | "contentMultiline": True or False, # If the content should be multiline. |
| 1439 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 1440 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 1441 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region |
| 1442 | # are clickable. |
| 1443 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1444 | # For example, an Apps Script can be invoked to handle the form. |
| 1445 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1446 | # form submission. This information is echoed back to the bot as part of |
| 1447 | # the card click event. The same method name can be used for several |
| 1448 | # elements that trigger a common behavior if desired. |
| 1449 | "parameters": [ # List of action parameters. |
| 1450 | { # List of string parameters to supply when the action method is invoked. |
| 1451 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1452 | # snooze next week. You might use action method = snooze(), passing the |
| 1453 | # snooze type and snooze time in the list of string parameters. |
| 1454 | "value": "A String", # The value of the parameter. |
| 1455 | "key": "A String", # The name of the parameter for the action script. |
| 1456 | }, |
| 1457 | ], |
| 1458 | }, |
| 1459 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1460 | "url": "A String", # The URL to open. |
| 1461 | }, |
| 1462 | }, |
| 1463 | "iconUrl": "A String", # The icon specified by a URL. |
| 1464 | }, |
| 1465 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 1466 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1467 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1468 | # For example, an Apps Script can be invoked to handle the form. |
| 1469 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1470 | # form submission. This information is echoed back to the bot as part of |
| 1471 | # the card click event. The same method name can be used for several |
| 1472 | # elements that trigger a common behavior if desired. |
| 1473 | "parameters": [ # List of action parameters. |
| 1474 | { # List of string parameters to supply when the action method is invoked. |
| 1475 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1476 | # snooze next week. You might use action method = snooze(), passing the |
| 1477 | # snooze type and snooze time in the list of string parameters. |
| 1478 | "value": "A String", # The value of the parameter. |
| 1479 | "key": "A String", # The name of the parameter for the action script. |
| 1480 | }, |
| 1481 | ], |
| 1482 | }, |
| 1483 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1484 | "url": "A String", # The URL to open. |
| 1485 | }, |
| 1486 | }, |
| 1487 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients |
| 1488 | # to reserve the right height for the image while waiting for it to load. |
| 1489 | # It's not meant to override the native aspect ratio of the image. |
| 1490 | # If unset, the server fills it by prefetching the image. |
| 1491 | "imageUrl": "A String", # The URL of the image. |
| 1492 | }, |
| 1493 | }, |
| 1494 | ], |
| 1495 | "header": "A String", # The header of the section, text formatted supported. |
| 1496 | }, |
| 1497 | ], |
| 1498 | "header": { # The header of the card. A header usually contains a title and an image. |
| 1499 | "imageUrl": "A String", # The URL of the image in the card header. |
| 1500 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 1501 | "title": "A String", # The title must be specified. The header has a fixed height: if both a |
| 1502 | # title and subtitle is specified, each will take up 1 line. If only the |
| 1503 | # title is specified, it will take up both lines. |
| 1504 | "subtitle": "A String", # The subtitle of the card header. |
| 1505 | }, |
| 1506 | }, |
| 1507 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1508 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1509 | "displayName": "A String", # Output only. The display name (only if the space is a room). |
| 1510 | # Please note that this field might not be populated in direct messages |
| 1511 | # between humans. |
| 1512 | "threaded": True or False, # Whether the messages are threaded in this space. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1513 | "name": "A String", # Resource name of the space, in the form "spaces/*". |
| 1514 | # |
| 1515 | # Example: spaces/AAAAMpdlehYs |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1516 | "type": "A String", # Output only. The type of a space. |
| 1517 | # This is deprecated. Use `single_user_bot_dm` instead. |
| 1518 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1519 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1520 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 1521 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". |
| 1522 | # |
| 1523 | # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1524 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1525 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards |
| 1526 | # cannot be displayed (e.g. mobile notifications). |
| 1527 | } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1528 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1529 | updateMask: string, Required. The field paths to be updated, comma separated if there are |
| 1530 | multiple. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1531 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1532 | Currently supported field paths: |
| 1533 | * text |
| 1534 | * cards |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1535 | x__xgafv: string, V1 error format. |
| 1536 | Allowed values |
| 1537 | 1 - v1 error format |
| 1538 | 2 - v2 error format |
| 1539 | |
| 1540 | Returns: |
| 1541 | An object of the form: |
| 1542 | |
| 1543 | { # A message in Hangouts Chat. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1544 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". |
| 1545 | # |
| 1546 | # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
| 1547 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 1548 | { # Annotations associated with the plain-text body of the message. |
| 1549 | # |
| 1550 | # Example plain-text message body: |
| 1551 | # ``` |
| 1552 | # Hello @FooBot how are you!" |
| 1553 | # ``` |
| 1554 | # |
| 1555 | # The corresponding annotations metadata: |
| 1556 | # ``` |
| 1557 | # "annotations":[{ |
| 1558 | # "type":"USER_MENTION", |
| 1559 | # "startIndex":6, |
| 1560 | # "length":7, |
| 1561 | # "userMention": { |
| 1562 | # "user": { |
| 1563 | # "name":"users/107946847022116401880", |
| 1564 | # "displayName":"FooBot", |
| 1565 | # "avatarUrl":"https://goo.gl/aeDtrS", |
| 1566 | # "type":"BOT" |
| 1567 | # }, |
| 1568 | # "type":"MENTION" |
| 1569 | # } |
| 1570 | # }] |
| 1571 | # ``` |
| 1572 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this |
| 1573 | # annotation corresponds to. |
| 1574 | "type": "A String", # The type of this annotation. |
| 1575 | "length": 42, # Length of the substring in the plain-text message body this annotation |
| 1576 | # corresponds to. |
| 1577 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 1578 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 1579 | "name": "A String", # Resource name, in the format "users/*". |
| 1580 | "type": "A String", # User type. |
| 1581 | "displayName": "A String", # The user's display name. |
| 1582 | "domainId": "A String", # Obfuscated domain information. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1583 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1584 | "type": "A String", # The type of user mention. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 1585 | }, |
| 1586 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1587 | ], |
| 1588 | "actionResponse": { # Parameters that a bot can use to configure how it's response is posted. # Input only. Parameters that a bot can use to configure how its response is |
| 1589 | # posted. |
| 1590 | "type": "A String", # The type of bot response. |
| 1591 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1592 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1593 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 1594 | "name": "A String", # Resource name, in the format "users/*". |
| 1595 | "type": "A String", # User type. |
| 1596 | "displayName": "A String", # The user's display name. |
| 1597 | "domainId": "A String", # Obfuscated domain information. |
| 1598 | }, |
| 1599 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat |
| 1600 | # server. |
| 1601 | "text": "A String", # Plain-text body of the message. |
| 1602 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the |
| 1603 | # user, but any links to images, web pages, videos, etc. included here will |
| 1604 | # generate preview chips. |
| 1605 | "attachment": [ # User uploaded attachment. |
| 1606 | { # An attachment in Hangouts Chat. |
| 1607 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the |
| 1608 | # attachment to a human user. Bots should not use this URL to download |
| 1609 | # attachment content. |
| 1610 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 1611 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1612 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1613 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to |
| 1614 | # download the attachment. Bots should not use this URL to download |
| 1615 | # attachment content. |
| 1616 | "contentType": "A String", # The content type (MIME type) of the file. |
| 1617 | "name": "A String", # Resource name of the attachment, in the form |
| 1618 | # "spaces/*/messages/*/attachments/*". |
| 1619 | "source": "A String", # The source of the attachment. |
| 1620 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to |
| 1621 | # download the attachment data. |
| 1622 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API |
| 1623 | # to download the attachment data. |
| 1624 | }, |
| 1625 | "contentName": "A String", # The original file name for the content, not the full path. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1626 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1627 | ], |
| 1628 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 1629 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI |
| 1630 | # elements such as: formatted texts, buttons, clickable images. Cards are |
| 1631 | # normally displayed below the plain-text body of the message. |
| 1632 | { # A card is a UI element that can contain UI widgets such as texts, images. |
| 1633 | "name": "A String", # Name of the card. |
| 1634 | "cardActions": [ # The actions of this card. |
| 1635 | { # A card action is |
| 1636 | # the action associated with the card. For an invoice card, a |
| 1637 | # typical action would be: delete invoice, email invoice or open the |
| 1638 | # invoice in browser. |
| 1639 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 1640 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1641 | # For example, an Apps Script can be invoked to handle the form. |
| 1642 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1643 | # form submission. This information is echoed back to the bot as part of |
| 1644 | # the card click event. The same method name can be used for several |
| 1645 | # elements that trigger a common behavior if desired. |
| 1646 | "parameters": [ # List of action parameters. |
| 1647 | { # List of string parameters to supply when the action method is invoked. |
| 1648 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1649 | # snooze next week. You might use action method = snooze(), passing the |
| 1650 | # snooze type and snooze time in the list of string parameters. |
| 1651 | "value": "A String", # The value of the parameter. |
| 1652 | "key": "A String", # The name of the parameter for the action script. |
| 1653 | }, |
| 1654 | ], |
| 1655 | }, |
| 1656 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1657 | "url": "A String", # The URL to open. |
| 1658 | }, |
| 1659 | }, |
| 1660 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 1661 | }, |
| 1662 | ], |
| 1663 | "sections": [ # Sections are separated by a line divider. |
| 1664 | { # A section contains a collection of widgets that are rendered |
| 1665 | # (vertically) in the order that they are specified. Across all platforms, |
| 1666 | # cards have a narrow fixed width, so |
| 1667 | # there is currently no need for layout properties (e.g. float). |
| 1668 | "widgets": [ # A section must contain at least 1 widget. |
| 1669 | { # A widget is a UI element that presents texts, images, etc. |
| 1670 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 1671 | "text": "A String", |
| 1672 | }, |
| 1673 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these |
| 1674 | # fields should be set. |
| 1675 | { # A button. Can be a text button or an image button. |
| 1676 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 1677 | "iconUrl": "A String", # The icon specified by a URL. |
| 1678 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1679 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1680 | # For example, an Apps Script can be invoked to handle the form. |
| 1681 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1682 | # form submission. This information is echoed back to the bot as part of |
| 1683 | # the card click event. The same method name can be used for several |
| 1684 | # elements that trigger a common behavior if desired. |
| 1685 | "parameters": [ # List of action parameters. |
| 1686 | { # List of string parameters to supply when the action method is invoked. |
| 1687 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1688 | # snooze next week. You might use action method = snooze(), passing the |
| 1689 | # snooze type and snooze time in the list of string parameters. |
| 1690 | "value": "A String", # The value of the parameter. |
| 1691 | "key": "A String", # The name of the parameter for the action script. |
| 1692 | }, |
| 1693 | ], |
| 1694 | }, |
| 1695 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1696 | "url": "A String", # The URL to open. |
| 1697 | }, |
| 1698 | }, |
| 1699 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 1700 | # Default value will be provided if developers don't specify. |
| 1701 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 1702 | # API. |
| 1703 | }, |
| 1704 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 1705 | "text": "A String", # The text of the button. |
| 1706 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 1707 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1708 | # For example, an Apps Script can be invoked to handle the form. |
| 1709 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1710 | # form submission. This information is echoed back to the bot as part of |
| 1711 | # the card click event. The same method name can be used for several |
| 1712 | # elements that trigger a common behavior if desired. |
| 1713 | "parameters": [ # List of action parameters. |
| 1714 | { # List of string parameters to supply when the action method is invoked. |
| 1715 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1716 | # snooze next week. You might use action method = snooze(), passing the |
| 1717 | # snooze type and snooze time in the list of string parameters. |
| 1718 | "value": "A String", # The value of the parameter. |
| 1719 | "key": "A String", # The name of the parameter for the action script. |
| 1720 | }, |
| 1721 | ], |
| 1722 | }, |
| 1723 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1724 | "url": "A String", # The URL to open. |
| 1725 | }, |
| 1726 | }, |
| 1727 | }, |
| 1728 | }, |
| 1729 | ], |
| 1730 | "keyValue": { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget. |
| 1731 | # element may also contain some actions such as onclick button. |
| 1732 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 1733 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 1734 | "iconUrl": "A String", # The icon specified by a URL. |
| 1735 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1736 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1737 | # For example, an Apps Script can be invoked to handle the form. |
| 1738 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1739 | # form submission. This information is echoed back to the bot as part of |
| 1740 | # the card click event. The same method name can be used for several |
| 1741 | # elements that trigger a common behavior if desired. |
| 1742 | "parameters": [ # List of action parameters. |
| 1743 | { # List of string parameters to supply when the action method is invoked. |
| 1744 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1745 | # snooze next week. You might use action method = snooze(), passing the |
| 1746 | # snooze type and snooze time in the list of string parameters. |
| 1747 | "value": "A String", # The value of the parameter. |
| 1748 | "key": "A String", # The name of the parameter for the action script. |
| 1749 | }, |
| 1750 | ], |
| 1751 | }, |
| 1752 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1753 | "url": "A String", # The URL to open. |
| 1754 | }, |
| 1755 | }, |
| 1756 | "name": "A String", # The name of this image_button which will be used for accessibility. |
| 1757 | # Default value will be provided if developers don't specify. |
| 1758 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat |
| 1759 | # API. |
| 1760 | }, |
| 1761 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 1762 | "text": "A String", # The text of the button. |
| 1763 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 1764 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1765 | # For example, an Apps Script can be invoked to handle the form. |
| 1766 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1767 | # form submission. This information is echoed back to the bot as part of |
| 1768 | # the card click event. The same method name can be used for several |
| 1769 | # elements that trigger a common behavior if desired. |
| 1770 | "parameters": [ # List of action parameters. |
| 1771 | { # List of string parameters to supply when the action method is invoked. |
| 1772 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1773 | # snooze next week. You might use action method = snooze(), passing the |
| 1774 | # snooze type and snooze time in the list of string parameters. |
| 1775 | "value": "A String", # The value of the parameter. |
| 1776 | "key": "A String", # The name of the parameter for the action script. |
| 1777 | }, |
| 1778 | ], |
| 1779 | }, |
| 1780 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1781 | "url": "A String", # The URL to open. |
| 1782 | }, |
| 1783 | }, |
| 1784 | }, |
| 1785 | }, |
| 1786 | "icon": "A String", # An enum value that will be replaced by the Chat API with the |
| 1787 | # corresponding icon image. |
| 1788 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 1789 | "contentMultiline": True or False, # If the content should be multiline. |
| 1790 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 1791 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 1792 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region |
| 1793 | # are clickable. |
| 1794 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1795 | # For example, an Apps Script can be invoked to handle the form. |
| 1796 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1797 | # form submission. This information is echoed back to the bot as part of |
| 1798 | # the card click event. The same method name can be used for several |
| 1799 | # elements that trigger a common behavior if desired. |
| 1800 | "parameters": [ # List of action parameters. |
| 1801 | { # List of string parameters to supply when the action method is invoked. |
| 1802 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1803 | # snooze next week. You might use action method = snooze(), passing the |
| 1804 | # snooze type and snooze time in the list of string parameters. |
| 1805 | "value": "A String", # The value of the parameter. |
| 1806 | "key": "A String", # The name of the parameter for the action script. |
| 1807 | }, |
| 1808 | ], |
| 1809 | }, |
| 1810 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1811 | "url": "A String", # The URL to open. |
| 1812 | }, |
| 1813 | }, |
| 1814 | "iconUrl": "A String", # The icon specified by a URL. |
| 1815 | }, |
| 1816 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 1817 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1818 | "action": { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified. |
| 1819 | # For example, an Apps Script can be invoked to handle the form. |
| 1820 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the |
| 1821 | # form submission. This information is echoed back to the bot as part of |
| 1822 | # the card click event. The same method name can be used for several |
| 1823 | # elements that trigger a common behavior if desired. |
| 1824 | "parameters": [ # List of action parameters. |
| 1825 | { # List of string parameters to supply when the action method is invoked. |
| 1826 | # For example, consider three snooze buttons: snooze now, snooze 1 day, |
| 1827 | # snooze next week. You might use action method = snooze(), passing the |
| 1828 | # snooze type and snooze time in the list of string parameters. |
| 1829 | "value": "A String", # The value of the parameter. |
| 1830 | "key": "A String", # The name of the parameter for the action script. |
| 1831 | }, |
| 1832 | ], |
| 1833 | }, |
| 1834 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1835 | "url": "A String", # The URL to open. |
| 1836 | }, |
| 1837 | }, |
| 1838 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients |
| 1839 | # to reserve the right height for the image while waiting for it to load. |
| 1840 | # It's not meant to override the native aspect ratio of the image. |
| 1841 | # If unset, the server fills it by prefetching the image. |
| 1842 | "imageUrl": "A String", # The URL of the image. |
| 1843 | }, |
| 1844 | }, |
| 1845 | ], |
| 1846 | "header": "A String", # The header of the section, text formatted supported. |
| 1847 | }, |
| 1848 | ], |
| 1849 | "header": { # The header of the card. A header usually contains a title and an image. |
| 1850 | "imageUrl": "A String", # The URL of the image in the card header. |
| 1851 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 1852 | "title": "A String", # The title must be specified. The header has a fixed height: if both a |
| 1853 | # title and subtitle is specified, each will take up 1 line. If only the |
| 1854 | # title is specified, it will take up both lines. |
| 1855 | "subtitle": "A String", # The subtitle of the card header. |
| 1856 | }, |
| 1857 | }, |
| 1858 | ], |
| 1859 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
| 1860 | "displayName": "A String", # Output only. The display name (only if the space is a room). |
| 1861 | # Please note that this field might not be populated in direct messages |
| 1862 | # between humans. |
| 1863 | "threaded": True or False, # Whether the messages are threaded in this space. |
| 1864 | "name": "A String", # Resource name of the space, in the form "spaces/*". |
| 1865 | # |
| 1866 | # Example: spaces/AAAAMpdlehYs |
| 1867 | "type": "A String", # Output only. The type of a space. |
| 1868 | # This is deprecated. Use `single_user_bot_dm` instead. |
| 1869 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1870 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1871 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 1872 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". |
| 1873 | # |
| 1874 | # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 1875 | }, |
| 1876 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards |
| 1877 | # cannot be displayed (e.g. mobile notifications). |
| 1878 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1879 | </div> |
| 1880 | |
| 1881 | </body></html> |