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