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