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"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 83 | <code><a href="#close">close()</a></code></p> |
| 84 | <p class="firstline">Close httplib2 connections.</p> |
| 85 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 86 | <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] | 87 | <p class="firstline">Creates a message.</p> |
| 88 | <p class="toc_element"> |
| 89 | <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 90 | <p class="firstline">Deletes a message.</p> |
| 91 | <p class="toc_element"> |
| 92 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 93 | <p class="firstline">Returns a message.</p> |
| 94 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 95 | <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] | 96 | <p class="firstline">Updates a message.</p> |
| 97 | <h3>Method Details</h3> |
| 98 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 99 | <code class="details" id="close">close()</code> |
| 100 | <pre>Close httplib2 connections.</pre> |
| 101 | </div> |
| 102 | |
| 103 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 104 | <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] | 105 | <pre>Creates a message. |
| 106 | |
| 107 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 108 | parent: string, Required. Space resource name, in the form "spaces/*". Example: spaces/AAAAMpdlehY (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 109 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 110 | The object takes the form of: |
| 111 | |
| 112 | { # A message in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 113 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat server. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 114 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 115 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 116 | "displayName": "A String", # Output only. The display name (only if the space is a room). Please note that this field might not be populated in direct messages between humans. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 117 | "type": "A String", # Output only. The type of a space. This is deprecated. Use `single_user_bot_dm` instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 118 | "name": "A String", # Resource name of the space, in the form "spaces/*". Example: spaces/AAAAMpdlehYs |
| 119 | "threaded": True or False, # Whether the messages are threaded in this space. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 120 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 121 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 122 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message. |
| 123 | { # A card is a UI element that can contain UI widgets such as texts, images. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 124 | "sections": [ # Sections are separated by a line divider. |
| 125 | { # A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there is currently no need for layout properties (e.g. float). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 126 | "widgets": [ # A section must contain at least 1 widget. |
| 127 | { # A widget is a UI element that presents texts, images, etc. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 128 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these fields should be set. |
| 129 | { # A button. Can be a text button or an image button. |
| 130 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 131 | "text": "A String", # The text of the button. |
| 132 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 133 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 134 | "url": "A String", # The URL to open. |
| 135 | }, |
| 136 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 137 | "parameters": [ # List of action parameters. |
| 138 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 139 | "value": "A String", # The value of the parameter. |
| 140 | "key": "A String", # The name of the parameter for the action script. |
| 141 | }, |
| 142 | ], |
| 143 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 144 | }, |
| 145 | }, |
| 146 | }, |
| 147 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 148 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 149 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 150 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 151 | "url": "A String", # The URL to open. |
| 152 | }, |
| 153 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 154 | "parameters": [ # List of action parameters. |
| 155 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 156 | "value": "A String", # The value of the parameter. |
| 157 | "key": "A String", # The name of the parameter for the action script. |
| 158 | }, |
| 159 | ], |
| 160 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 161 | }, |
| 162 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 163 | "iconUrl": "A String", # The icon specified by a URL. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 164 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 165 | }, |
| 166 | }, |
| 167 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 168 | "keyValue": { # A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button. # Display a key value item in this widget. |
| 169 | "icon": "A String", # An enum value that will be replaced by the Chat API with the corresponding icon image. |
| 170 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 171 | "contentMultiline": True or False, # If the content should be multiline. |
| 172 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 173 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 174 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 175 | "text": "A String", # The text of the button. |
| 176 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 177 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 178 | "url": "A String", # The URL to open. |
| 179 | }, |
| 180 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 181 | "parameters": [ # List of action parameters. |
| 182 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 183 | "value": "A String", # The value of the parameter. |
| 184 | "key": "A String", # The name of the parameter for the action script. |
| 185 | }, |
| 186 | ], |
| 187 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 188 | }, |
| 189 | }, |
| 190 | }, |
| 191 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 192 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
| 193 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 194 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 195 | "url": "A String", # The URL to open. |
| 196 | }, |
| 197 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 198 | "parameters": [ # List of action parameters. |
| 199 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 200 | "value": "A String", # The value of the parameter. |
| 201 | "key": "A String", # The name of the parameter for the action script. |
| 202 | }, |
| 203 | ], |
| 204 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 205 | }, |
| 206 | }, |
| 207 | "iconUrl": "A String", # The icon specified by a URL. |
| 208 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 209 | }, |
| 210 | }, |
| 211 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region are clickable. |
| 212 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 213 | "url": "A String", # The URL to open. |
| 214 | }, |
| 215 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 216 | "parameters": [ # List of action parameters. |
| 217 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 218 | "value": "A String", # The value of the parameter. |
| 219 | "key": "A String", # The name of the parameter for the action script. |
| 220 | }, |
| 221 | ], |
| 222 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 223 | }, |
| 224 | }, |
| 225 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 226 | "iconUrl": "A String", # The icon specified by a URL. |
| 227 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 228 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 229 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 230 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 231 | "url": "A String", # The URL to open. |
| 232 | }, |
| 233 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 234 | "parameters": [ # List of action parameters. |
| 235 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 236 | "value": "A String", # The value of the parameter. |
| 237 | "key": "A String", # The name of the parameter for the action script. |
| 238 | }, |
| 239 | ], |
| 240 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 241 | }, |
| 242 | }, |
| 243 | "imageUrl": "A String", # The URL of the image. |
| 244 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It's not meant to override the native aspect ratio of the image. If unset, the server fills it by prefetching the image. |
| 245 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 246 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 247 | "text": "A String", |
| 248 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 249 | }, |
| 250 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 251 | "header": "A String", # The header of the section, text formatted supported. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 252 | }, |
| 253 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 254 | "header": { # The header of the card. A header usually contains a title and an image. |
| 255 | "imageUrl": "A String", # The URL of the image in the card header. |
| 256 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 257 | "subtitle": "A String", # The subtitle of the card header. |
| 258 | "title": "A String", # The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both lines. |
| 259 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 260 | "name": "A String", # Name of the card. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 261 | "cardActions": [ # The actions of this card. |
| 262 | { # A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. |
| 263 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 264 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 265 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 266 | "url": "A String", # The URL to open. |
| 267 | }, |
| 268 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 269 | "parameters": [ # List of action parameters. |
| 270 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 271 | "value": "A String", # The value of the parameter. |
| 272 | "key": "A String", # The name of the parameter for the action script. |
| 273 | }, |
| 274 | ], |
| 275 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 276 | }, |
| 277 | }, |
| 278 | }, |
| 279 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 280 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 281 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 282 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 283 | "displayName": "A String", # The user's display name. |
| 284 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 285 | "name": "A String", # Resource name, in the format "users/*". |
| 286 | "type": "A String", # User type. |
| 287 | "domainId": "A String", # Obfuscated domain information. |
| 288 | }, |
| 289 | "text": "A String", # Plain-text body of the message. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 290 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 291 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 292 | { # Annotations associated with the plain-text body of the message. Example plain-text message body: ``` Hello @FooBot how are you!" ``` The corresponding annotations metadata: ``` "annotations":[{ "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user": { "name":"users/107946847022116401880", "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }] ``` |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 293 | "length": 42, # Length of the substring in the plain-text message body this annotation corresponds to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 294 | "slashCommand": { # Annotation metadata for slash commands (/). # The metadata for a slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 295 | "triggersDialog": True or False, # Indicating whether the slash command is for a dialog. |
| 296 | "commandId": "A String", # The command id of the invoked slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 297 | "commandName": "A String", # The name of the invoked slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 298 | "type": "A String", # The type of slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 299 | "bot": { # A user in Hangouts Chat. # The bot whose command was invoked. |
| 300 | "displayName": "A String", # The user's display name. |
| 301 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 302 | "name": "A String", # Resource name, in the format "users/*". |
| 303 | "type": "A String", # User type. |
| 304 | "domainId": "A String", # Obfuscated domain information. |
| 305 | }, |
| 306 | }, |
| 307 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 308 | "type": "A String", # The type of user mention. |
| 309 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 310 | "displayName": "A String", # The user's display name. |
| 311 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 312 | "name": "A String", # Resource name, in the format "users/*". |
| 313 | "type": "A String", # User type. |
| 314 | "domainId": "A String", # Obfuscated domain information. |
| 315 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 316 | }, |
| 317 | "type": "A String", # The type of this annotation. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 318 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 319 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 320 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 321 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 322 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 323 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 324 | "attachment": [ # User uploaded attachment. |
| 325 | { # An attachment in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 326 | "source": "A String", # The source of the attachment. |
| 327 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content. |
| 328 | "contentType": "A String", # The content type (MIME type) of the file. |
| 329 | "contentName": "A String", # The original file name for the content, not the full path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 330 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to download the attachment data. |
| 331 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API to download the attachment data. |
| 332 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 333 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to download the attachment. Bots should not use this URL to download attachment content. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 334 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 335 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 336 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 337 | "name": "A String", # Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*". |
| 338 | }, |
| 339 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 340 | "slashCommand": { # A Slash Command in Hangouts Chat. # Slash command information, if applicable. |
| 341 | "commandId": "A String", # The id of the slash command invoked. |
| 342 | }, |
| 343 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips. |
| 344 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 345 | "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 posted. |
| 346 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 347 | "type": "A String", # The type of bot response. |
| 348 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 349 | } |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 350 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 351 | threadKey: string, Opaque thread identifier string that can be specified to group messages into a single thread. If this is the first message with a given thread identifier, a new thread is created. Subsequent messages with the same thread identifier will be posted into the same thread. This relieves bots and webhooks from having to store the Hangouts Chat thread ID of a thread (created earlier by them) to post further updates to it. Has no effect if thread field, corresponding to an existing thread, is set in message. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 352 | x__xgafv: string, V1 error format. |
| 353 | Allowed values |
| 354 | 1 - v1 error format |
| 355 | 2 - v2 error format |
| 356 | |
| 357 | Returns: |
| 358 | An object of the form: |
| 359 | |
| 360 | { # A message in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 361 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat server. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 362 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 363 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 364 | "displayName": "A String", # Output only. The display name (only if the space is a room). Please note that this field might not be populated in direct messages between humans. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 365 | "type": "A String", # Output only. The type of a space. This is deprecated. Use `single_user_bot_dm` instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 366 | "name": "A String", # Resource name of the space, in the form "spaces/*". Example: spaces/AAAAMpdlehYs |
| 367 | "threaded": True or False, # Whether the messages are threaded in this space. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 368 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 369 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 370 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message. |
| 371 | { # A card is a UI element that can contain UI widgets such as texts, images. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 372 | "sections": [ # Sections are separated by a line divider. |
| 373 | { # A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there is currently no need for layout properties (e.g. float). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 374 | "widgets": [ # A section must contain at least 1 widget. |
| 375 | { # A widget is a UI element that presents texts, images, etc. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 376 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these fields should be set. |
| 377 | { # A button. Can be a text button or an image button. |
| 378 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 379 | "text": "A String", # The text of the button. |
| 380 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 381 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 382 | "url": "A String", # The URL to open. |
| 383 | }, |
| 384 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 385 | "parameters": [ # List of action parameters. |
| 386 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 387 | "value": "A String", # The value of the parameter. |
| 388 | "key": "A String", # The name of the parameter for the action script. |
| 389 | }, |
| 390 | ], |
| 391 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 392 | }, |
| 393 | }, |
| 394 | }, |
| 395 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 396 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 397 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 398 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 399 | "url": "A String", # The URL to open. |
| 400 | }, |
| 401 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 402 | "parameters": [ # List of action parameters. |
| 403 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 404 | "value": "A String", # The value of the parameter. |
| 405 | "key": "A String", # The name of the parameter for the action script. |
| 406 | }, |
| 407 | ], |
| 408 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 409 | }, |
| 410 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 411 | "iconUrl": "A String", # The icon specified by a URL. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 412 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 413 | }, |
| 414 | }, |
| 415 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 416 | "keyValue": { # A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button. # Display a key value item in this widget. |
| 417 | "icon": "A String", # An enum value that will be replaced by the Chat API with the corresponding icon image. |
| 418 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 419 | "contentMultiline": True or False, # If the content should be multiline. |
| 420 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 421 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 422 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 423 | "text": "A String", # The text of the button. |
| 424 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 425 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 426 | "url": "A String", # The URL to open. |
| 427 | }, |
| 428 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 429 | "parameters": [ # List of action parameters. |
| 430 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 431 | "value": "A String", # The value of the parameter. |
| 432 | "key": "A String", # The name of the parameter for the action script. |
| 433 | }, |
| 434 | ], |
| 435 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 436 | }, |
| 437 | }, |
| 438 | }, |
| 439 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 440 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
| 441 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 442 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 443 | "url": "A String", # The URL to open. |
| 444 | }, |
| 445 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 446 | "parameters": [ # List of action parameters. |
| 447 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 448 | "value": "A String", # The value of the parameter. |
| 449 | "key": "A String", # The name of the parameter for the action script. |
| 450 | }, |
| 451 | ], |
| 452 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 453 | }, |
| 454 | }, |
| 455 | "iconUrl": "A String", # The icon specified by a URL. |
| 456 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 457 | }, |
| 458 | }, |
| 459 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region are clickable. |
| 460 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 461 | "url": "A String", # The URL to open. |
| 462 | }, |
| 463 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 464 | "parameters": [ # List of action parameters. |
| 465 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 466 | "value": "A String", # The value of the parameter. |
| 467 | "key": "A String", # The name of the parameter for the action script. |
| 468 | }, |
| 469 | ], |
| 470 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 471 | }, |
| 472 | }, |
| 473 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 474 | "iconUrl": "A String", # The icon specified by a URL. |
| 475 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 476 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 477 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 478 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 479 | "url": "A String", # The URL to open. |
| 480 | }, |
| 481 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 482 | "parameters": [ # List of action parameters. |
| 483 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 484 | "value": "A String", # The value of the parameter. |
| 485 | "key": "A String", # The name of the parameter for the action script. |
| 486 | }, |
| 487 | ], |
| 488 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 489 | }, |
| 490 | }, |
| 491 | "imageUrl": "A String", # The URL of the image. |
| 492 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It's not meant to override the native aspect ratio of the image. If unset, the server fills it by prefetching the image. |
| 493 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 494 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 495 | "text": "A String", |
| 496 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 497 | }, |
| 498 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 499 | "header": "A String", # The header of the section, text formatted supported. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 500 | }, |
| 501 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 502 | "header": { # The header of the card. A header usually contains a title and an image. |
| 503 | "imageUrl": "A String", # The URL of the image in the card header. |
| 504 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 505 | "subtitle": "A String", # The subtitle of the card header. |
| 506 | "title": "A String", # The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both lines. |
| 507 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 508 | "name": "A String", # Name of the card. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 509 | "cardActions": [ # The actions of this card. |
| 510 | { # A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. |
| 511 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 512 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 513 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 514 | "url": "A String", # The URL to open. |
| 515 | }, |
| 516 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 517 | "parameters": [ # List of action parameters. |
| 518 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 519 | "value": "A String", # The value of the parameter. |
| 520 | "key": "A String", # The name of the parameter for the action script. |
| 521 | }, |
| 522 | ], |
| 523 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 524 | }, |
| 525 | }, |
| 526 | }, |
| 527 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 528 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 529 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 530 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 531 | "displayName": "A String", # The user's display name. |
| 532 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 533 | "name": "A String", # Resource name, in the format "users/*". |
| 534 | "type": "A String", # User type. |
| 535 | "domainId": "A String", # Obfuscated domain information. |
| 536 | }, |
| 537 | "text": "A String", # Plain-text body of the message. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 538 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 539 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 540 | { # Annotations associated with the plain-text body of the message. Example plain-text message body: ``` Hello @FooBot how are you!" ``` The corresponding annotations metadata: ``` "annotations":[{ "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user": { "name":"users/107946847022116401880", "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }] ``` |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 541 | "length": 42, # Length of the substring in the plain-text message body this annotation corresponds to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 542 | "slashCommand": { # Annotation metadata for slash commands (/). # The metadata for a slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 543 | "triggersDialog": True or False, # Indicating whether the slash command is for a dialog. |
| 544 | "commandId": "A String", # The command id of the invoked slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 545 | "commandName": "A String", # The name of the invoked slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 546 | "type": "A String", # The type of slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 547 | "bot": { # A user in Hangouts Chat. # The bot whose command was invoked. |
| 548 | "displayName": "A String", # The user's display name. |
| 549 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 550 | "name": "A String", # Resource name, in the format "users/*". |
| 551 | "type": "A String", # User type. |
| 552 | "domainId": "A String", # Obfuscated domain information. |
| 553 | }, |
| 554 | }, |
| 555 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 556 | "type": "A String", # The type of user mention. |
| 557 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 558 | "displayName": "A String", # The user's display name. |
| 559 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 560 | "name": "A String", # Resource name, in the format "users/*". |
| 561 | "type": "A String", # User type. |
| 562 | "domainId": "A String", # Obfuscated domain information. |
| 563 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 564 | }, |
| 565 | "type": "A String", # The type of this annotation. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 566 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 567 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 568 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 569 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 570 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 571 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 572 | "attachment": [ # User uploaded attachment. |
| 573 | { # An attachment in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 574 | "source": "A String", # The source of the attachment. |
| 575 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content. |
| 576 | "contentType": "A String", # The content type (MIME type) of the file. |
| 577 | "contentName": "A String", # The original file name for the content, not the full path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 578 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to download the attachment data. |
| 579 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API to download the attachment data. |
| 580 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 581 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to download the attachment. Bots should not use this URL to download attachment content. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 582 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 583 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 584 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 585 | "name": "A String", # Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*". |
| 586 | }, |
| 587 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 588 | "slashCommand": { # A Slash Command in Hangouts Chat. # Slash command information, if applicable. |
| 589 | "commandId": "A String", # The id of the slash command invoked. |
| 590 | }, |
| 591 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips. |
| 592 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 593 | "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 posted. |
| 594 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 595 | "type": "A String", # The type of bot response. |
| 596 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 597 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 598 | </div> |
| 599 | |
| 600 | <div class="method"> |
| 601 | <code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 602 | <pre>Deletes a message. |
| 603 | |
| 604 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 605 | name: string, Required. Resource name of the message to be deleted, in the form "spaces/*/messages/*" Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 606 | x__xgafv: string, V1 error format. |
| 607 | Allowed values |
| 608 | 1 - v1 error format |
| 609 | 2 - v2 error format |
| 610 | |
| 611 | Returns: |
| 612 | An object of the form: |
| 613 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 614 | { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 615 | }</pre> |
| 616 | </div> |
| 617 | |
| 618 | <div class="method"> |
| 619 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 620 | <pre>Returns a message. |
| 621 | |
| 622 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 623 | name: string, Required. Resource name of the message to be retrieved, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 624 | x__xgafv: string, V1 error format. |
| 625 | Allowed values |
| 626 | 1 - v1 error format |
| 627 | 2 - v2 error format |
| 628 | |
| 629 | Returns: |
| 630 | An object of the form: |
| 631 | |
| 632 | { # A message in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 633 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat server. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 634 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 635 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 636 | "displayName": "A String", # Output only. The display name (only if the space is a room). Please note that this field might not be populated in direct messages between humans. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 637 | "type": "A String", # Output only. The type of a space. This is deprecated. Use `single_user_bot_dm` instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 638 | "name": "A String", # Resource name of the space, in the form "spaces/*". Example: spaces/AAAAMpdlehYs |
| 639 | "threaded": True or False, # Whether the messages are threaded in this space. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 640 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 641 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 642 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message. |
| 643 | { # A card is a UI element that can contain UI widgets such as texts, images. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 644 | "sections": [ # Sections are separated by a line divider. |
| 645 | { # A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there is currently no need for layout properties (e.g. float). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 646 | "widgets": [ # A section must contain at least 1 widget. |
| 647 | { # A widget is a UI element that presents texts, images, etc. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 648 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these fields should be set. |
| 649 | { # A button. Can be a text button or an image button. |
| 650 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 651 | "text": "A String", # The text of the button. |
| 652 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 653 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 654 | "url": "A String", # The URL to open. |
| 655 | }, |
| 656 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 657 | "parameters": [ # List of action parameters. |
| 658 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 659 | "value": "A String", # The value of the parameter. |
| 660 | "key": "A String", # The name of the parameter for the action script. |
| 661 | }, |
| 662 | ], |
| 663 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 664 | }, |
| 665 | }, |
| 666 | }, |
| 667 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 668 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 669 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 670 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 671 | "url": "A String", # The URL to open. |
| 672 | }, |
| 673 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 674 | "parameters": [ # List of action parameters. |
| 675 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 676 | "value": "A String", # The value of the parameter. |
| 677 | "key": "A String", # The name of the parameter for the action script. |
| 678 | }, |
| 679 | ], |
| 680 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 681 | }, |
| 682 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 683 | "iconUrl": "A String", # The icon specified by a URL. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 684 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 685 | }, |
| 686 | }, |
| 687 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 688 | "keyValue": { # A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button. # Display a key value item in this widget. |
| 689 | "icon": "A String", # An enum value that will be replaced by the Chat API with the corresponding icon image. |
| 690 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 691 | "contentMultiline": True or False, # If the content should be multiline. |
| 692 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 693 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 694 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 695 | "text": "A String", # The text of the button. |
| 696 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 697 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 698 | "url": "A String", # The URL to open. |
| 699 | }, |
| 700 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 701 | "parameters": [ # List of action parameters. |
| 702 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 703 | "value": "A String", # The value of the parameter. |
| 704 | "key": "A String", # The name of the parameter for the action script. |
| 705 | }, |
| 706 | ], |
| 707 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 708 | }, |
| 709 | }, |
| 710 | }, |
| 711 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 712 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
| 713 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 714 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 715 | "url": "A String", # The URL to open. |
| 716 | }, |
| 717 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 718 | "parameters": [ # List of action parameters. |
| 719 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 720 | "value": "A String", # The value of the parameter. |
| 721 | "key": "A String", # The name of the parameter for the action script. |
| 722 | }, |
| 723 | ], |
| 724 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 725 | }, |
| 726 | }, |
| 727 | "iconUrl": "A String", # The icon specified by a URL. |
| 728 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 729 | }, |
| 730 | }, |
| 731 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region are clickable. |
| 732 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 733 | "url": "A String", # The URL to open. |
| 734 | }, |
| 735 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 736 | "parameters": [ # List of action parameters. |
| 737 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 738 | "value": "A String", # The value of the parameter. |
| 739 | "key": "A String", # The name of the parameter for the action script. |
| 740 | }, |
| 741 | ], |
| 742 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 743 | }, |
| 744 | }, |
| 745 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 746 | "iconUrl": "A String", # The icon specified by a URL. |
| 747 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 748 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 749 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 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 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 754 | "parameters": [ # List of action parameters. |
| 755 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 756 | "value": "A String", # The value of the parameter. |
| 757 | "key": "A String", # The name of the parameter for the action script. |
| 758 | }, |
| 759 | ], |
| 760 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 761 | }, |
| 762 | }, |
| 763 | "imageUrl": "A String", # The URL of the image. |
| 764 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It's not meant to override the native aspect ratio of the image. If unset, the server fills it by prefetching the image. |
| 765 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 766 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 767 | "text": "A String", |
| 768 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 769 | }, |
| 770 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 771 | "header": "A String", # The header of the section, text formatted supported. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 772 | }, |
| 773 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 774 | "header": { # The header of the card. A header usually contains a title and an image. |
| 775 | "imageUrl": "A String", # The URL of the image in the card header. |
| 776 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 777 | "subtitle": "A String", # The subtitle of the card header. |
| 778 | "title": "A String", # The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both lines. |
| 779 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 780 | "name": "A String", # Name of the card. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 781 | "cardActions": [ # The actions of this card. |
| 782 | { # A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. |
| 783 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 784 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 785 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 786 | "url": "A String", # The URL to open. |
| 787 | }, |
| 788 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 789 | "parameters": [ # List of action parameters. |
| 790 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 791 | "value": "A String", # The value of the parameter. |
| 792 | "key": "A String", # The name of the parameter for the action script. |
| 793 | }, |
| 794 | ], |
| 795 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 796 | }, |
| 797 | }, |
| 798 | }, |
| 799 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 800 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 801 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 802 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 803 | "displayName": "A String", # The user's display name. |
| 804 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 805 | "name": "A String", # Resource name, in the format "users/*". |
| 806 | "type": "A String", # User type. |
| 807 | "domainId": "A String", # Obfuscated domain information. |
| 808 | }, |
| 809 | "text": "A String", # Plain-text body of the message. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 810 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 811 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 812 | { # Annotations associated with the plain-text body of the message. Example plain-text message body: ``` Hello @FooBot how are you!" ``` The corresponding annotations metadata: ``` "annotations":[{ "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user": { "name":"users/107946847022116401880", "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }] ``` |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 813 | "length": 42, # Length of the substring in the plain-text message body this annotation corresponds to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 814 | "slashCommand": { # Annotation metadata for slash commands (/). # The metadata for a slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 815 | "triggersDialog": True or False, # Indicating whether the slash command is for a dialog. |
| 816 | "commandId": "A String", # The command id of the invoked slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 817 | "commandName": "A String", # The name of the invoked slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 818 | "type": "A String", # The type of slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 819 | "bot": { # A user in Hangouts Chat. # The bot whose command was invoked. |
| 820 | "displayName": "A String", # The user's display name. |
| 821 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 822 | "name": "A String", # Resource name, in the format "users/*". |
| 823 | "type": "A String", # User type. |
| 824 | "domainId": "A String", # Obfuscated domain information. |
| 825 | }, |
| 826 | }, |
| 827 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 828 | "type": "A String", # The type of user mention. |
| 829 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 830 | "displayName": "A String", # The user's display name. |
| 831 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 832 | "name": "A String", # Resource name, in the format "users/*". |
| 833 | "type": "A String", # User type. |
| 834 | "domainId": "A String", # Obfuscated domain information. |
| 835 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 836 | }, |
| 837 | "type": "A String", # The type of this annotation. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 838 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 839 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 840 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 841 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 842 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 843 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 844 | "attachment": [ # User uploaded attachment. |
| 845 | { # An attachment in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 846 | "source": "A String", # The source of the attachment. |
| 847 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content. |
| 848 | "contentType": "A String", # The content type (MIME type) of the file. |
| 849 | "contentName": "A String", # The original file name for the content, not the full path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 850 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to download the attachment data. |
| 851 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API to download the attachment data. |
| 852 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 853 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to download the attachment. Bots should not use this URL to download attachment content. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 854 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 855 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 856 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 857 | "name": "A String", # Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*". |
| 858 | }, |
| 859 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 860 | "slashCommand": { # A Slash Command in Hangouts Chat. # Slash command information, if applicable. |
| 861 | "commandId": "A String", # The id of the slash command invoked. |
| 862 | }, |
| 863 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips. |
| 864 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 865 | "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 posted. |
| 866 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 867 | "type": "A String", # The type of bot response. |
| 868 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 869 | }</pre> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 870 | </div> |
| 871 | |
| 872 | <div class="method"> |
| 873 | <code class="details" id="update">update(name, body=None, updateMask=None, x__xgafv=None)</code> |
| 874 | <pre>Updates a message. |
| 875 | |
| 876 | Args: |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 877 | name: string, Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 878 | body: object, The request body. |
| 879 | The object takes the form of: |
| 880 | |
| 881 | { # A message in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 882 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat server. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 883 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 884 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 885 | "displayName": "A String", # Output only. The display name (only if the space is a room). Please note that this field might not be populated in direct messages between humans. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 886 | "type": "A String", # Output only. The type of a space. This is deprecated. Use `single_user_bot_dm` instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 887 | "name": "A String", # Resource name of the space, in the form "spaces/*". Example: spaces/AAAAMpdlehYs |
| 888 | "threaded": True or False, # Whether the messages are threaded in this space. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 889 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 890 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 891 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message. |
| 892 | { # A card is a UI element that can contain UI widgets such as texts, images. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 893 | "sections": [ # Sections are separated by a line divider. |
| 894 | { # A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there is currently no need for layout properties (e.g. float). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 895 | "widgets": [ # A section must contain at least 1 widget. |
| 896 | { # A widget is a UI element that presents texts, images, etc. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 897 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these fields should be set. |
| 898 | { # A button. Can be a text button or an image button. |
| 899 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 900 | "text": "A String", # The text of the button. |
| 901 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 902 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 903 | "url": "A String", # The URL to open. |
| 904 | }, |
| 905 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 906 | "parameters": [ # List of action parameters. |
| 907 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 908 | "value": "A String", # The value of the parameter. |
| 909 | "key": "A String", # The name of the parameter for the action script. |
| 910 | }, |
| 911 | ], |
| 912 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 913 | }, |
| 914 | }, |
| 915 | }, |
| 916 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 917 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 918 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 919 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 920 | "url": "A String", # The URL to open. |
| 921 | }, |
| 922 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 923 | "parameters": [ # List of action parameters. |
| 924 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 925 | "value": "A String", # The value of the parameter. |
| 926 | "key": "A String", # The name of the parameter for the action script. |
| 927 | }, |
| 928 | ], |
| 929 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 930 | }, |
| 931 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 932 | "iconUrl": "A String", # The icon specified by a URL. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 933 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 934 | }, |
| 935 | }, |
| 936 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 937 | "keyValue": { # A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button. # Display a key value item in this widget. |
| 938 | "icon": "A String", # An enum value that will be replaced by the Chat API with the corresponding icon image. |
| 939 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 940 | "contentMultiline": True or False, # If the content should be multiline. |
| 941 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 942 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 943 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 944 | "text": "A String", # The text of the button. |
| 945 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 946 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 947 | "url": "A String", # The URL to open. |
| 948 | }, |
| 949 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 950 | "parameters": [ # List of action parameters. |
| 951 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 952 | "value": "A String", # The value of the parameter. |
| 953 | "key": "A String", # The name of the parameter for the action script. |
| 954 | }, |
| 955 | ], |
| 956 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 957 | }, |
| 958 | }, |
| 959 | }, |
| 960 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 961 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
| 962 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 963 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 964 | "url": "A String", # The URL to open. |
| 965 | }, |
| 966 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 967 | "parameters": [ # List of action parameters. |
| 968 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 969 | "value": "A String", # The value of the parameter. |
| 970 | "key": "A String", # The name of the parameter for the action script. |
| 971 | }, |
| 972 | ], |
| 973 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 974 | }, |
| 975 | }, |
| 976 | "iconUrl": "A String", # The icon specified by a URL. |
| 977 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 978 | }, |
| 979 | }, |
| 980 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region are clickable. |
| 981 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 982 | "url": "A String", # The URL to open. |
| 983 | }, |
| 984 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 985 | "parameters": [ # List of action parameters. |
| 986 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 987 | "value": "A String", # The value of the parameter. |
| 988 | "key": "A String", # The name of the parameter for the action script. |
| 989 | }, |
| 990 | ], |
| 991 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 992 | }, |
| 993 | }, |
| 994 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 995 | "iconUrl": "A String", # The icon specified by a URL. |
| 996 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 997 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 998 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 999 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1000 | "url": "A String", # The URL to open. |
| 1001 | }, |
| 1002 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1003 | "parameters": [ # List of action parameters. |
| 1004 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1005 | "value": "A String", # The value of the parameter. |
| 1006 | "key": "A String", # The name of the parameter for the action script. |
| 1007 | }, |
| 1008 | ], |
| 1009 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1010 | }, |
| 1011 | }, |
| 1012 | "imageUrl": "A String", # The URL of the image. |
| 1013 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It's not meant to override the native aspect ratio of the image. If unset, the server fills it by prefetching the image. |
| 1014 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1015 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 1016 | "text": "A String", |
| 1017 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1018 | }, |
| 1019 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1020 | "header": "A String", # The header of the section, text formatted supported. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1021 | }, |
| 1022 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1023 | "header": { # The header of the card. A header usually contains a title and an image. |
| 1024 | "imageUrl": "A String", # The URL of the image in the card header. |
| 1025 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 1026 | "subtitle": "A String", # The subtitle of the card header. |
| 1027 | "title": "A String", # The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both lines. |
| 1028 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1029 | "name": "A String", # Name of the card. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1030 | "cardActions": [ # The actions of this card. |
| 1031 | { # A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. |
| 1032 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 1033 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 1034 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1035 | "url": "A String", # The URL to open. |
| 1036 | }, |
| 1037 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1038 | "parameters": [ # List of action parameters. |
| 1039 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1040 | "value": "A String", # The value of the parameter. |
| 1041 | "key": "A String", # The name of the parameter for the action script. |
| 1042 | }, |
| 1043 | ], |
| 1044 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1045 | }, |
| 1046 | }, |
| 1047 | }, |
| 1048 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1049 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1050 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1051 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 1052 | "displayName": "A String", # The user's display name. |
| 1053 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 1054 | "name": "A String", # Resource name, in the format "users/*". |
| 1055 | "type": "A String", # User type. |
| 1056 | "domainId": "A String", # Obfuscated domain information. |
| 1057 | }, |
| 1058 | "text": "A String", # Plain-text body of the message. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1059 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1060 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 1061 | { # Annotations associated with the plain-text body of the message. Example plain-text message body: ``` Hello @FooBot how are you!" ``` The corresponding annotations metadata: ``` "annotations":[{ "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user": { "name":"users/107946847022116401880", "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }] ``` |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1062 | "length": 42, # Length of the substring in the plain-text message body this annotation corresponds to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1063 | "slashCommand": { # Annotation metadata for slash commands (/). # The metadata for a slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1064 | "triggersDialog": True or False, # Indicating whether the slash command is for a dialog. |
| 1065 | "commandId": "A String", # The command id of the invoked slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1066 | "commandName": "A String", # The name of the invoked slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1067 | "type": "A String", # The type of slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1068 | "bot": { # A user in Hangouts Chat. # The bot whose command was invoked. |
| 1069 | "displayName": "A String", # The user's display name. |
| 1070 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 1071 | "name": "A String", # Resource name, in the format "users/*". |
| 1072 | "type": "A String", # User type. |
| 1073 | "domainId": "A String", # Obfuscated domain information. |
| 1074 | }, |
| 1075 | }, |
| 1076 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 1077 | "type": "A String", # The type of user mention. |
| 1078 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 1079 | "displayName": "A String", # The user's display name. |
| 1080 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 1081 | "name": "A String", # Resource name, in the format "users/*". |
| 1082 | "type": "A String", # User type. |
| 1083 | "domainId": "A String", # Obfuscated domain information. |
| 1084 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1085 | }, |
| 1086 | "type": "A String", # The type of this annotation. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1087 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1088 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1089 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1090 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 1091 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 1092 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1093 | "attachment": [ # User uploaded attachment. |
| 1094 | { # An attachment in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1095 | "source": "A String", # The source of the attachment. |
| 1096 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content. |
| 1097 | "contentType": "A String", # The content type (MIME type) of the file. |
| 1098 | "contentName": "A String", # The original file name for the content, not the full path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1099 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to download the attachment data. |
| 1100 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API to download the attachment data. |
| 1101 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1102 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to download the attachment. Bots should not use this URL to download attachment content. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1103 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 1104 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 1105 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1106 | "name": "A String", # Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*". |
| 1107 | }, |
| 1108 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1109 | "slashCommand": { # A Slash Command in Hangouts Chat. # Slash command information, if applicable. |
| 1110 | "commandId": "A String", # The id of the slash command invoked. |
| 1111 | }, |
| 1112 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips. |
| 1113 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 1114 | "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 posted. |
| 1115 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 1116 | "type": "A String", # The type of bot response. |
| 1117 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1118 | } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1119 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1120 | updateMask: string, Required. The field paths to be updated, comma separated if there are multiple. Currently supported field paths: * text * cards |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1121 | x__xgafv: string, V1 error format. |
| 1122 | Allowed values |
| 1123 | 1 - v1 error format |
| 1124 | 2 - v2 error format |
| 1125 | |
| 1126 | Returns: |
| 1127 | An object of the form: |
| 1128 | |
| 1129 | { # A message in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1130 | "createTime": "A String", # Output only. The time at which the message was created in Hangouts Chat server. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1131 | "name": "A String", # Resource name, in the form "spaces/*/messages/*". Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1132 | "space": { # A room or DM in Hangouts Chat. # The space the message belongs to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1133 | "displayName": "A String", # Output only. The display name (only if the space is a room). Please note that this field might not be populated in direct messages between humans. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1134 | "type": "A String", # Output only. The type of a space. This is deprecated. Use `single_user_bot_dm` instead. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1135 | "name": "A String", # Resource name of the space, in the form "spaces/*". Example: spaces/AAAAMpdlehYs |
| 1136 | "threaded": True or False, # Whether the messages are threaded in this space. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1137 | "singleUserBotDm": True or False, # Whether the space is a DM between a bot and a single human. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1138 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1139 | "cards": [ # Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are normally displayed below the plain-text body of the message. |
| 1140 | { # A card is a UI element that can contain UI widgets such as texts, images. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1141 | "sections": [ # Sections are separated by a line divider. |
| 1142 | { # A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there is currently no need for layout properties (e.g. float). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1143 | "widgets": [ # A section must contain at least 1 widget. |
| 1144 | { # A widget is a UI element that presents texts, images, etc. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1145 | "buttons": [ # A list of buttons. Buttons is also oneof data and only one of these fields should be set. |
| 1146 | { # A button. Can be a text button or an image button. |
| 1147 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 1148 | "text": "A String", # The text of the button. |
| 1149 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 1150 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1151 | "url": "A String", # The URL to open. |
| 1152 | }, |
| 1153 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1154 | "parameters": [ # List of action parameters. |
| 1155 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1156 | "value": "A String", # The value of the parameter. |
| 1157 | "key": "A String", # The name of the parameter for the action script. |
| 1158 | }, |
| 1159 | ], |
| 1160 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1161 | }, |
| 1162 | }, |
| 1163 | }, |
| 1164 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 1165 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1166 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1167 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1168 | "url": "A String", # The URL to open. |
| 1169 | }, |
| 1170 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1171 | "parameters": [ # List of action parameters. |
| 1172 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1173 | "value": "A String", # The value of the parameter. |
| 1174 | "key": "A String", # The name of the parameter for the action script. |
| 1175 | }, |
| 1176 | ], |
| 1177 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1178 | }, |
| 1179 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1180 | "iconUrl": "A String", # The icon specified by a URL. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1181 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 1182 | }, |
| 1183 | }, |
| 1184 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1185 | "keyValue": { # A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button. # Display a key value item in this widget. |
| 1186 | "icon": "A String", # An enum value that will be replaced by the Chat API with the corresponding icon image. |
| 1187 | "topLabel": "A String", # The text of the top label. Formatted text supported. |
| 1188 | "contentMultiline": True or False, # If the content should be multiline. |
| 1189 | "content": "A String", # The text of the content. Formatted text supported and always required. |
| 1190 | "button": { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action. |
| 1191 | "textButton": { # A button with text and onclick action. # A button with text and onclick action. |
| 1192 | "text": "A String", # The text of the button. |
| 1193 | "onClick": { # An onclick action (e.g. open a link). # The onclick action of the button. |
| 1194 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1195 | "url": "A String", # The URL to open. |
| 1196 | }, |
| 1197 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1198 | "parameters": [ # List of action parameters. |
| 1199 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1200 | "value": "A String", # The value of the parameter. |
| 1201 | "key": "A String", # The name of the parameter for the action script. |
| 1202 | }, |
| 1203 | ], |
| 1204 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1205 | }, |
| 1206 | }, |
| 1207 | }, |
| 1208 | "imageButton": { # An image button with an onclick action. # A button with image and onclick action. |
| 1209 | "icon": "A String", # The icon specified by an enum that indices to an icon provided by Chat API. |
| 1210 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1211 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1212 | "url": "A String", # The URL to open. |
| 1213 | }, |
| 1214 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1215 | "parameters": [ # List of action parameters. |
| 1216 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1217 | "value": "A String", # The value of the parameter. |
| 1218 | "key": "A String", # The name of the parameter for the action script. |
| 1219 | }, |
| 1220 | ], |
| 1221 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1222 | }, |
| 1223 | }, |
| 1224 | "iconUrl": "A String", # The icon specified by a URL. |
| 1225 | "name": "A String", # The name of this image_button which will be used for accessibility. Default value will be provided if developers don't specify. |
| 1226 | }, |
| 1227 | }, |
| 1228 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region are clickable. |
| 1229 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1230 | "url": "A String", # The URL to open. |
| 1231 | }, |
| 1232 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1233 | "parameters": [ # List of action parameters. |
| 1234 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1235 | "value": "A String", # The value of the parameter. |
| 1236 | "key": "A String", # The name of the parameter for the action script. |
| 1237 | }, |
| 1238 | ], |
| 1239 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1240 | }, |
| 1241 | }, |
| 1242 | "bottomLabel": "A String", # The text of the bottom label. Formatted text supported. |
| 1243 | "iconUrl": "A String", # The icon specified by a URL. |
| 1244 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1245 | "image": { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget. |
| 1246 | "onClick": { # An onclick action (e.g. open a link). # The onclick action. |
| 1247 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1248 | "url": "A String", # The URL to open. |
| 1249 | }, |
| 1250 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1251 | "parameters": [ # List of action parameters. |
| 1252 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1253 | "value": "A String", # The value of the parameter. |
| 1254 | "key": "A String", # The name of the parameter for the action script. |
| 1255 | }, |
| 1256 | ], |
| 1257 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1258 | }, |
| 1259 | }, |
| 1260 | "imageUrl": "A String", # The URL of the image. |
| 1261 | "aspectRatio": 3.14, # The aspect ratio of this image (width/height). This field allows clients to reserve the right height for the image while waiting for it to load. It's not meant to override the native aspect ratio of the image. If unset, the server fills it by prefetching the image. |
| 1262 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1263 | "textParagraph": { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget. |
| 1264 | "text": "A String", |
| 1265 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1266 | }, |
| 1267 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1268 | "header": "A String", # The header of the section, text formatted supported. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1269 | }, |
| 1270 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1271 | "header": { # The header of the card. A header usually contains a title and an image. |
| 1272 | "imageUrl": "A String", # The URL of the image in the card header. |
| 1273 | "imageStyle": "A String", # The image's type (e.g. square border or circular border). |
| 1274 | "subtitle": "A String", # The subtitle of the card header. |
| 1275 | "title": "A String", # The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each will take up 1 line. If only the title is specified, it will take up both lines. |
| 1276 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1277 | "name": "A String", # Name of the card. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1278 | "cardActions": [ # The actions of this card. |
| 1279 | { # A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. |
| 1280 | "actionLabel": "A String", # The label used to be displayed in the action menu item. |
| 1281 | "onClick": { # An onclick action (e.g. open a link). # The onclick action for this action item. |
| 1282 | "openLink": { # A link that opens a new window. # This onclick triggers an open link action if specified. |
| 1283 | "url": "A String", # The URL to open. |
| 1284 | }, |
| 1285 | "action": { # A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. # A form action will be triggered by this onclick if specified. |
| 1286 | "parameters": [ # List of action parameters. |
| 1287 | { # List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze 1 day, snooze next week. You might use action method = snooze(), passing the snooze type and snooze time in the list of string parameters. |
| 1288 | "value": "A String", # The value of the parameter. |
| 1289 | "key": "A String", # The name of the parameter for the action script. |
| 1290 | }, |
| 1291 | ], |
| 1292 | "actionMethodName": "A String", # The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. |
| 1293 | }, |
| 1294 | }, |
| 1295 | }, |
| 1296 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 1297 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1298 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1299 | "sender": { # A user in Hangouts Chat. # The user who created the message. |
| 1300 | "displayName": "A String", # The user's display name. |
| 1301 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 1302 | "name": "A String", # Resource name, in the format "users/*". |
| 1303 | "type": "A String", # User type. |
| 1304 | "domainId": "A String", # Obfuscated domain information. |
| 1305 | }, |
| 1306 | "text": "A String", # Plain-text body of the message. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1307 | "fallbackText": "A String", # A plain-text description of the message's cards, used when the actual cards cannot be displayed (e.g. mobile notifications). |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1308 | "annotations": [ # Output only. Annotations associated with the text in this message. |
| 1309 | { # Annotations associated with the plain-text body of the message. Example plain-text message body: ``` Hello @FooBot how are you!" ``` The corresponding annotations metadata: ``` "annotations":[{ "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user": { "name":"users/107946847022116401880", "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }] ``` |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1310 | "length": 42, # Length of the substring in the plain-text message body this annotation corresponds to. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1311 | "slashCommand": { # Annotation metadata for slash commands (/). # The metadata for a slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1312 | "triggersDialog": True or False, # Indicating whether the slash command is for a dialog. |
| 1313 | "commandId": "A String", # The command id of the invoked slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1314 | "commandName": "A String", # The name of the invoked slash command. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1315 | "type": "A String", # The type of slash command. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1316 | "bot": { # A user in Hangouts Chat. # The bot whose command was invoked. |
| 1317 | "displayName": "A String", # The user's display name. |
| 1318 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 1319 | "name": "A String", # Resource name, in the format "users/*". |
| 1320 | "type": "A String", # User type. |
| 1321 | "domainId": "A String", # Obfuscated domain information. |
| 1322 | }, |
| 1323 | }, |
| 1324 | "userMention": { # Annotation metadata for user mentions (@). # The metadata of user mention. |
| 1325 | "type": "A String", # The type of user mention. |
| 1326 | "user": { # A user in Hangouts Chat. # The user mentioned. |
| 1327 | "displayName": "A String", # The user's display name. |
| 1328 | "isAnonymous": True or False, # True when the user is deleted or the user's proifle is not visible. |
| 1329 | "name": "A String", # Resource name, in the format "users/*". |
| 1330 | "type": "A String", # User type. |
| 1331 | "domainId": "A String", # Obfuscated domain information. |
| 1332 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1333 | }, |
| 1334 | "type": "A String", # The type of this annotation. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1335 | "startIndex": 42, # Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 1336 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1337 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1338 | "thread": { # A thread in Hangouts Chat. # The thread the message belongs to. |
| 1339 | "name": "A String", # Resource name, in the form "spaces/*/threads/*". Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4 |
| 1340 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1341 | "attachment": [ # User uploaded attachment. |
| 1342 | { # An attachment in Hangouts Chat. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1343 | "source": "A String", # The source of the attachment. |
| 1344 | "thumbnailUri": "A String", # Output only. The thumbnail URL which should be used to preview the attachment to a human user. Bots should not use this URL to download attachment content. |
| 1345 | "contentType": "A String", # The content type (MIME type) of the file. |
| 1346 | "contentName": "A String", # The original file name for the content, not the full path. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1347 | "attachmentDataRef": { # A reference to the data of an attachment. # A reference to the attachment data. This is used with the media API to download the attachment data. |
| 1348 | "resourceName": "A String", # The resource name of the attachment data. This is used with the media API to download the attachment data. |
| 1349 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1350 | "downloadUri": "A String", # Output only. The download URL which should be used to allow a human user to download the attachment. Bots should not use this URL to download attachment content. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1351 | "driveDataRef": { # A reference to the data of a drive attachment. # A reference to the drive attachment. This is used with the Drive API. |
| 1352 | "driveFileId": "A String", # The id for the drive file, for use with the Drive API. |
| 1353 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1354 | "name": "A String", # Resource name of the attachment, in the form "spaces/*/messages/*/attachments/*". |
| 1355 | }, |
| 1356 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame^] | 1357 | "slashCommand": { # A Slash Command in Hangouts Chat. # Slash command information, if applicable. |
| 1358 | "commandId": "A String", # The id of the slash command invoked. |
| 1359 | }, |
| 1360 | "previewText": "A String", # Text for generating preview chips. This text will not be displayed to the user, but any links to images, web pages, videos, etc. included here will generate preview chips. |
| 1361 | "argumentText": "A String", # Plain-text body of the message with all bot mentions stripped out. |
| 1362 | "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 posted. |
| 1363 | "url": "A String", # URL for users to auth or config. (Only for REQUEST_CONFIG response types.) |
| 1364 | "type": "A String", # The type of bot response. |
| 1365 | }, |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 1366 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1367 | </div> |
| 1368 | |
| 1369 | </body></html> |