blob: 5c77218bc59d173af8bb9a2917104cf67afb0fd7 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="chat_v1.html">Hangouts Chat API</a> . <a href="chat_v1.spaces.html">spaces</a> . <a href="chat_v1.spaces.messages.html">messages</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, threadKey=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a message.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a message.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Returns a message.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#update">update(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Updates a message.</p>
89<h3>Method Details</h3>
90<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070091 <code class="details" id="create">create(parent, body=None, threadKey=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070092 <pre>Creates a message.
93
94Args:
Bu Sun Kim65020912020-05-20 12:08:20 -070095 parent: string, Required. Space resource name, in the form &quot;spaces/*&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096Example: spaces/AAAAMpdlehY (required)
Dan O'Mearadd494642020-05-01 07:42:23 -070097 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098 The object takes the form of:
99
100{ # A message in Hangouts Chat.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700101 &quot;argumentText&quot;: &quot;A String&quot;, # Plain-text body of the message with all bot mentions stripped out.
102 &quot;fallbackText&quot;: &quot;A String&quot;, # A plain-text description of the message&#x27;s cards, used when the actual cards
103 # cannot be displayed (e.g. mobile notifications).
104 &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
105 # posted.
106 &quot;url&quot;: &quot;A String&quot;, # URL for users to auth or config. (Only for REQUEST_CONFIG response types.)
107 &quot;type&quot;: &quot;A String&quot;, # The type of bot response.
108 },
109 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was created in Hangouts Chat
110 # server.
111 &quot;sender&quot;: { # A user in Hangouts Chat. # The user who created the message.
112 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
113 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
114 &quot;type&quot;: &quot;A String&quot;, # User type.
115 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
116 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700117 &quot;cards&quot;: [ # Rich, formatted and interactive cards that can be used to display UI
118 # elements such as: formatted texts, buttons, clickable images. Cards are
119 # normally displayed below the plain-text body of the message.
120 { # A card is a UI element that can contain UI widgets such as texts, images.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700121 &quot;name&quot;: &quot;A String&quot;, # Name of the card.
Bu Sun Kim65020912020-05-20 12:08:20 -0700122 &quot;sections&quot;: [ # Sections are separated by a line divider.
123 { # A section contains a collection of widgets that are rendered
124 # (vertically) in the order that they are specified. Across all platforms,
125 # cards have a narrow fixed width, so
126 # there is currently no need for layout properties (e.g. float).
127 &quot;header&quot;: &quot;A String&quot;, # The header of the section, text formatted supported.
128 &quot;widgets&quot;: [ # A section must contain at least 1 widget.
129 { # A widget is a UI element that presents texts, images, etc.
130 &quot;textParagraph&quot;: { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget.
131 &quot;text&quot;: &quot;A String&quot;,
132 },
133 &quot;keyValue&quot;: { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget.
134 # element may also contain some actions such as onclick button.
135 &quot;topLabel&quot;: &quot;A String&quot;, # The text of the top label. Formatted text supported.
136 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
Bu Sun Kim65020912020-05-20 12:08:20 -0700137 &quot;button&quot;: { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action.
138 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700139 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
140 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
141 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
142 },
143 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
144 # For example, an Apps Script can be invoked to handle the form.
145 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
146 # form submission. This information is echoed back to the bot as part of
147 # the card click event. The same method name can be used for several
148 # elements that trigger a common behavior if desired.
149 &quot;parameters&quot;: [ # List of action parameters.
150 { # List of string parameters to supply when the action method is invoked.
151 # For example, consider three snooze buttons: snooze now, snooze 1 day,
152 # snooze next week. You might use action method = snooze(), passing the
153 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700155 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700156 },
157 ],
158 },
159 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700160 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Dan O'Mearadd494642020-05-01 07:42:23 -0700161 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700162 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
163 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
164 # API.
165 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
166 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
167 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
168 },
169 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
170 # For example, an Apps Script can be invoked to handle the form.
171 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
172 # form submission. This information is echoed back to the bot as part of
173 # the card click event. The same method name can be used for several
174 # elements that trigger a common behavior if desired.
175 &quot;parameters&quot;: [ # List of action parameters.
176 { # List of string parameters to supply when the action method is invoked.
177 # For example, consider three snooze buttons: snooze now, snooze 1 day,
178 # snooze next week. You might use action method = snooze(), passing the
179 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700180 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700181 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 },
183 ],
184 },
185 },
186 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
187 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
188 # Default value will be provided if developers don&#x27;t specify.
189 },
190 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700191 &quot;content&quot;: &quot;A String&quot;, # The text of the content. Formatted text supported and always required.
Bu Sun Kim65020912020-05-20 12:08:20 -0700192 &quot;bottomLabel&quot;: &quot;A String&quot;, # The text of the bottom label. Formatted text supported.
193 &quot;icon&quot;: &quot;A String&quot;, # An enum value that will be replaced by the Chat API with the
194 # corresponding icon image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700195 &quot;contentMultiline&quot;: True or False, # If the content should be multiline.
Bu Sun Kim65020912020-05-20 12:08:20 -0700196 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region
197 # are clickable.
198 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
199 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
200 },
201 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
202 # For example, an Apps Script can be invoked to handle the form.
203 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
204 # form submission. This information is echoed back to the bot as part of
205 # the card click event. The same method name can be used for several
206 # elements that trigger a common behavior if desired.
207 &quot;parameters&quot;: [ # List of action parameters.
208 { # List of string parameters to supply when the action method is invoked.
209 # For example, consider three snooze buttons: snooze now, snooze 1 day,
210 # snooze next week. You might use action method = snooze(), passing the
211 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700213 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700214 },
215 ],
216 },
217 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700218 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;image&quot;: { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget.
Bu Sun Kim65020912020-05-20 12:08:20 -0700220 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
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. # A form action will be trigger by this onclick if specified.
225 # For example, an Apps Script can be invoked to handle the form.
226 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
227 # form submission. This information is echoed back to the bot as part of
228 # the card click event. The same method name can be used for several
229 # elements that trigger a common behavior if desired.
230 &quot;parameters&quot;: [ # List of action parameters.
231 { # List of string parameters to supply when the action method is invoked.
232 # For example, consider three snooze buttons: snooze now, snooze 1 day,
233 # snooze next week. You might use action method = snooze(), passing the
234 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700235 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700236 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 },
238 ],
239 },
240 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700241 &quot;aspectRatio&quot;: 3.14, # The aspect ratio of this image (width/height). This field allows clients
242 # to reserve the right height for the image while waiting for it to load.
243 # It&#x27;s not meant to override the native aspect ratio of the image.
244 # If unset, the server fills it by prefetching the image.
245 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image.
Dan O'Mearadd494642020-05-01 07:42:23 -0700246 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 &quot;buttons&quot;: [ # A list of buttons. Buttons is also oneof data and only one of these
248 # fields should be set.
249 { # A button. Can be a text button or an image button.
250 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
252 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
253 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
254 },
255 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
256 # For example, an Apps Script can be invoked to handle the form.
257 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
258 # form submission. This information is echoed back to the bot as part of
259 # the card click event. The same method name can be used for several
260 # 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.
263 # For example, consider three snooze buttons: snooze now, snooze 1 day,
264 # snooze next week. You might use action method = snooze(), passing the
265 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700266 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700267 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700268 },
269 ],
270 },
271 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700272 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Bu Sun Kim65020912020-05-20 12:08:20 -0700273 },
274 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
275 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
276 # API.
277 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
278 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
279 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
280 },
281 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
282 # For example, an Apps Script can be invoked to handle the form.
283 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
284 # form submission. This information is echoed back to the bot as part of
285 # the card click event. The same method name can be used for several
286 # elements that trigger a common behavior if desired.
287 &quot;parameters&quot;: [ # List of action parameters.
288 { # List of string parameters to supply when the action method is invoked.
289 # For example, consider three snooze buttons: snooze now, snooze 1 day,
290 # snooze next week. You might use action method = snooze(), passing the
291 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700292 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700293 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700294 },
295 ],
296 },
297 },
298 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
299 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
300 # Default value will be provided if developers don&#x27;t specify.
301 },
302 },
303 ],
304 },
305 ],
306 },
307 ],
308 &quot;cardActions&quot;: [ # The actions of this card.
309 { # A card action is
310 # the action associated with the card. For an invoice card, a
311 # typical action would be: delete invoice, email invoice or open the
312 # invoice in browser.
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action for this action item.
314 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
315 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
316 },
317 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
318 # For example, an Apps Script can be invoked to handle the form.
319 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
320 # form submission. This information is echoed back to the bot as part of
321 # the card click event. The same method name can be used for several
322 # elements that trigger a common behavior if desired.
323 &quot;parameters&quot;: [ # List of action parameters.
324 { # List of string parameters to supply when the action method is invoked.
325 # For example, consider three snooze buttons: snooze now, snooze 1 day,
326 # snooze next week. You might use action method = snooze(), passing the
327 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700328 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700329 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700330 },
331 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700332 },
333 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700334 &quot;actionLabel&quot;: &quot;A String&quot;, # The label used to be displayed in the action menu item.
Dan O'Mearadd494642020-05-01 07:42:23 -0700335 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700336 ],
337 &quot;header&quot;: { # The header of the card. A header usually contains a title and an image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700338 &quot;imageStyle&quot;: &quot;A String&quot;, # The image&#x27;s type (e.g. square border or circular border).
339 &quot;title&quot;: &quot;A String&quot;, # The title must be specified. The header has a fixed height: if both a
340 # title and subtitle is specified, each will take up 1 line. If only the
341 # title is specified, it will take up both lines.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700342 &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header.
343 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image in the card header.
Dan O'Mearadd494642020-05-01 07:42:23 -0700344 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700345 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700346 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700347 &quot;thread&quot;: { # A thread in Hangouts Chat. # The thread the message belongs to.
348 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/threads/*&quot;.
349 #
350 # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4
351 },
352 &quot;annotations&quot;: [ # Output only. Annotations associated with the text in this message.
353 { # Annotations associated with the plain-text body of the message.
354 #
355 # Example plain-text message body:
356 # ```
357 # Hello @FooBot how are you!&quot;
358 # ```
359 #
360 # The corresponding annotations metadata:
361 # ```
362 # &quot;annotations&quot;:[{
363 # &quot;type&quot;:&quot;USER_MENTION&quot;,
364 # &quot;startIndex&quot;:6,
365 # &quot;length&quot;:7,
366 # &quot;userMention&quot;: {
367 # &quot;user&quot;: {
368 # &quot;name&quot;:&quot;users/107946847022116401880&quot;,
369 # &quot;displayName&quot;:&quot;FooBot&quot;,
370 # &quot;avatarUrl&quot;:&quot;https://goo.gl/aeDtrS&quot;,
371 # &quot;type&quot;:&quot;BOT&quot;
372 # },
373 # &quot;type&quot;:&quot;MENTION&quot;
374 # }
375 # }]
376 # ```
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700377 &quot;userMention&quot;: { # Annotation metadata for user mentions (@). # The metadata of user mention.
378 &quot;user&quot;: { # A user in Hangouts Chat. # The user mentioned.
379 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
380 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
381 &quot;type&quot;: &quot;A String&quot;, # User type.
382 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
383 },
384 &quot;type&quot;: &quot;A String&quot;, # The type of user mention.
385 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700386 &quot;type&quot;: &quot;A String&quot;, # The type of this annotation.
387 &quot;length&quot;: 42, # Length of the substring in the plain-text message body this annotation
388 # corresponds to.
389 &quot;startIndex&quot;: 42, # Start index (0-based, inclusive) in the plain-text message body this
390 # annotation corresponds to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700391 },
392 ],
393 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/messages/*&quot;.
394 #
395 # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4
396 &quot;previewText&quot;: &quot;A String&quot;, # Text for generating preview chips. This text will not be displayed to the
397 # user, but any links to images, web pages, videos, etc. included here will
398 # generate preview chips.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700399 &quot;text&quot;: &quot;A String&quot;, # Plain-text body of the message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700400 &quot;space&quot;: { # A room or DM in Hangouts Chat. # The space the message belongs to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700401 &quot;name&quot;: &quot;A String&quot;, # Resource name of the space, in the form &quot;spaces/*&quot;.
402 #
403 # Example: spaces/AAAAMpdlehYs
404 &quot;threaded&quot;: True or False, # Whether the messages are threaded in this space.
405 &quot;displayName&quot;: &quot;A String&quot;, # Output only. The display name (only if the space is a room).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700406 &quot;type&quot;: &quot;A String&quot;, # Output only. The type of a space.
407 # This is deprecated. Use `single_user_bot_dm` instead.
408 &quot;singleUserBotDm&quot;: True or False, # Whether the space is a DM between a bot and a single human.
Bu Sun Kim65020912020-05-20 12:08:20 -0700409 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700410}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411
412 threadKey: string, Opaque thread identifier string that can be specified to group messages
413into a single thread. If this is the first message with a given thread
414identifier, a new thread is created. Subsequent messages with the same
415thread identifier will be posted into the same thread. This relieves bots
416and webhooks from having to store the Hangouts Chat thread ID of a thread (created earlier by them) to post
417further updates to it.
418
419Has no effect if thread field,
420corresponding to an existing thread, is set in message.
421 x__xgafv: string, V1 error format.
422 Allowed values
423 1 - v1 error format
424 2 - v2 error format
425
426Returns:
427 An object of the form:
428
429 { # A message in Hangouts Chat.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700430 &quot;argumentText&quot;: &quot;A String&quot;, # Plain-text body of the message with all bot mentions stripped out.
431 &quot;fallbackText&quot;: &quot;A String&quot;, # A plain-text description of the message&#x27;s cards, used when the actual cards
432 # cannot be displayed (e.g. mobile notifications).
433 &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
434 # posted.
435 &quot;url&quot;: &quot;A String&quot;, # URL for users to auth or config. (Only for REQUEST_CONFIG response types.)
436 &quot;type&quot;: &quot;A String&quot;, # The type of bot response.
437 },
438 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was created in Hangouts Chat
439 # server.
440 &quot;sender&quot;: { # A user in Hangouts Chat. # The user who created the message.
441 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
442 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
443 &quot;type&quot;: &quot;A String&quot;, # User type.
444 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
445 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &quot;cards&quot;: [ # Rich, formatted and interactive cards that can be used to display UI
447 # elements such as: formatted texts, buttons, clickable images. Cards are
448 # normally displayed below the plain-text body of the message.
449 { # A card is a UI element that can contain UI widgets such as texts, images.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700450 &quot;name&quot;: &quot;A String&quot;, # Name of the card.
Bu Sun Kim65020912020-05-20 12:08:20 -0700451 &quot;sections&quot;: [ # Sections are separated by a line divider.
452 { # A section contains a collection of widgets that are rendered
453 # (vertically) in the order that they are specified. Across all platforms,
454 # cards have a narrow fixed width, so
455 # there is currently no need for layout properties (e.g. float).
456 &quot;header&quot;: &quot;A String&quot;, # The header of the section, text formatted supported.
457 &quot;widgets&quot;: [ # A section must contain at least 1 widget.
458 { # A widget is a UI element that presents texts, images, etc.
459 &quot;textParagraph&quot;: { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget.
460 &quot;text&quot;: &quot;A String&quot;,
461 },
462 &quot;keyValue&quot;: { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget.
463 # element may also contain some actions such as onclick button.
464 &quot;topLabel&quot;: &quot;A String&quot;, # The text of the top label. Formatted text supported.
465 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
Bu Sun Kim65020912020-05-20 12:08:20 -0700466 &quot;button&quot;: { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action.
467 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700468 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
469 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
470 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
471 },
472 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
473 # For example, an Apps Script can be invoked to handle the form.
474 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
475 # form submission. This information is echoed back to the bot as part of
476 # the card click event. The same method name can be used for several
477 # elements that trigger a common behavior if desired.
478 &quot;parameters&quot;: [ # List of action parameters.
479 { # List of string parameters to supply when the action method is invoked.
480 # For example, consider three snooze buttons: snooze now, snooze 1 day,
481 # snooze next week. You might use action method = snooze(), passing the
482 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700483 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700484 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700485 },
486 ],
487 },
488 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700489 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Dan O'Mearadd494642020-05-01 07:42:23 -0700490 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700491 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
492 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
493 # API.
494 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
495 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
496 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
497 },
498 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
499 # For example, an Apps Script can be invoked to handle the form.
500 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
501 # form submission. This information is echoed back to the bot as part of
502 # the card click event. The same method name can be used for several
503 # elements that trigger a common behavior if desired.
504 &quot;parameters&quot;: [ # List of action parameters.
505 { # List of string parameters to supply when the action method is invoked.
506 # For example, consider three snooze buttons: snooze now, snooze 1 day,
507 # snooze next week. You might use action method = snooze(), passing the
508 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700510 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 },
512 ],
513 },
514 },
515 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
516 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
517 # Default value will be provided if developers don&#x27;t specify.
518 },
519 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700520 &quot;content&quot;: &quot;A String&quot;, # The text of the content. Formatted text supported and always required.
Bu Sun Kim65020912020-05-20 12:08:20 -0700521 &quot;bottomLabel&quot;: &quot;A String&quot;, # The text of the bottom label. Formatted text supported.
522 &quot;icon&quot;: &quot;A String&quot;, # An enum value that will be replaced by the Chat API with the
523 # corresponding icon image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700524 &quot;contentMultiline&quot;: True or False, # If the content should be multiline.
Bu Sun Kim65020912020-05-20 12:08:20 -0700525 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region
526 # are clickable.
527 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
528 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
529 },
530 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
531 # For example, an Apps Script can be invoked to handle the form.
532 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
533 # form submission. This information is echoed back to the bot as part of
534 # the card click event. The same method name can be used for several
535 # elements that trigger a common behavior if desired.
536 &quot;parameters&quot;: [ # List of action parameters.
537 { # List of string parameters to supply when the action method is invoked.
538 # For example, consider three snooze buttons: snooze now, snooze 1 day,
539 # snooze next week. You might use action method = snooze(), passing the
540 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700541 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700542 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700543 },
544 ],
545 },
546 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700547 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 &quot;image&quot;: { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget.
Bu Sun Kim65020912020-05-20 12:08:20 -0700549 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
550 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
551 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
552 },
553 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
554 # For example, an Apps Script can be invoked to handle the form.
555 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
556 # form submission. This information is echoed back to the bot as part of
557 # the card click event. The same method name can be used for several
558 # elements that trigger a common behavior if desired.
559 &quot;parameters&quot;: [ # List of action parameters.
560 { # List of string parameters to supply when the action method is invoked.
561 # For example, consider three snooze buttons: snooze now, snooze 1 day,
562 # snooze next week. You might use action method = snooze(), passing the
563 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700565 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700566 },
567 ],
568 },
569 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700570 &quot;aspectRatio&quot;: 3.14, # The aspect ratio of this image (width/height). This field allows clients
571 # to reserve the right height for the image while waiting for it to load.
572 # It&#x27;s not meant to override the native aspect ratio of the image.
573 # If unset, the server fills it by prefetching the image.
574 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image.
Dan O'Mearadd494642020-05-01 07:42:23 -0700575 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700576 &quot;buttons&quot;: [ # A list of buttons. Buttons is also oneof data and only one of these
577 # fields should be set.
578 { # A button. Can be a text button or an image button.
579 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700580 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
581 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
582 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
583 },
584 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
585 # For example, an Apps Script can be invoked to handle the form.
586 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
587 # form submission. This information is echoed back to the bot as part of
588 # the card click event. The same method name can be used for several
589 # elements that trigger a common behavior if desired.
590 &quot;parameters&quot;: [ # List of action parameters.
591 { # List of string parameters to supply when the action method is invoked.
592 # For example, consider three snooze buttons: snooze now, snooze 1 day,
593 # snooze next week. You might use action method = snooze(), passing the
594 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700595 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700596 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700597 },
598 ],
599 },
600 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700601 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Bu Sun Kim65020912020-05-20 12:08:20 -0700602 },
603 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
604 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
605 # API.
606 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
607 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
608 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
609 },
610 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
611 # For example, an Apps Script can be invoked to handle the form.
612 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
613 # form submission. This information is echoed back to the bot as part of
614 # the card click event. The same method name can be used for several
615 # elements that trigger a common behavior if desired.
616 &quot;parameters&quot;: [ # List of action parameters.
617 { # List of string parameters to supply when the action method is invoked.
618 # For example, consider three snooze buttons: snooze now, snooze 1 day,
619 # snooze next week. You might use action method = snooze(), passing the
620 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700622 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700623 },
624 ],
625 },
626 },
627 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
628 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
629 # Default value will be provided if developers don&#x27;t specify.
630 },
631 },
632 ],
633 },
634 ],
635 },
636 ],
637 &quot;cardActions&quot;: [ # The actions of this card.
638 { # A card action is
639 # the action associated with the card. For an invoice card, a
640 # typical action would be: delete invoice, email invoice or open the
641 # invoice in browser.
Bu Sun Kim65020912020-05-20 12:08:20 -0700642 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action for this action item.
643 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
644 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
645 },
646 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
647 # For example, an Apps Script can be invoked to handle the form.
648 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
649 # form submission. This information is echoed back to the bot as part of
650 # the card click event. The same method name can be used for several
651 # elements that trigger a common behavior if desired.
652 &quot;parameters&quot;: [ # List of action parameters.
653 { # List of string parameters to supply when the action method is invoked.
654 # For example, consider three snooze buttons: snooze now, snooze 1 day,
655 # snooze next week. You might use action method = snooze(), passing the
656 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700657 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700658 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700659 },
660 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700661 },
662 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700663 &quot;actionLabel&quot;: &quot;A String&quot;, # The label used to be displayed in the action menu item.
Dan O'Mearadd494642020-05-01 07:42:23 -0700664 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700665 ],
666 &quot;header&quot;: { # The header of the card. A header usually contains a title and an image.
Bu Sun Kim65020912020-05-20 12:08:20 -0700667 &quot;imageStyle&quot;: &quot;A String&quot;, # The image&#x27;s type (e.g. square border or circular border).
668 &quot;title&quot;: &quot;A String&quot;, # The title must be specified. The header has a fixed height: if both a
669 # title and subtitle is specified, each will take up 1 line. If only the
670 # title is specified, it will take up both lines.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700671 &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header.
672 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image in the card header.
Dan O'Mearadd494642020-05-01 07:42:23 -0700673 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700675 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 &quot;thread&quot;: { # A thread in Hangouts Chat. # The thread the message belongs to.
677 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/threads/*&quot;.
678 #
679 # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4
680 },
681 &quot;annotations&quot;: [ # Output only. Annotations associated with the text in this message.
682 { # Annotations associated with the plain-text body of the message.
683 #
684 # Example plain-text message body:
685 # ```
686 # Hello @FooBot how are you!&quot;
687 # ```
688 #
689 # The corresponding annotations metadata:
690 # ```
691 # &quot;annotations&quot;:[{
692 # &quot;type&quot;:&quot;USER_MENTION&quot;,
693 # &quot;startIndex&quot;:6,
694 # &quot;length&quot;:7,
695 # &quot;userMention&quot;: {
696 # &quot;user&quot;: {
697 # &quot;name&quot;:&quot;users/107946847022116401880&quot;,
698 # &quot;displayName&quot;:&quot;FooBot&quot;,
699 # &quot;avatarUrl&quot;:&quot;https://goo.gl/aeDtrS&quot;,
700 # &quot;type&quot;:&quot;BOT&quot;
701 # },
702 # &quot;type&quot;:&quot;MENTION&quot;
703 # }
704 # }]
705 # ```
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700706 &quot;userMention&quot;: { # Annotation metadata for user mentions (@). # The metadata of user mention.
707 &quot;user&quot;: { # A user in Hangouts Chat. # The user mentioned.
708 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
709 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
710 &quot;type&quot;: &quot;A String&quot;, # User type.
711 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
712 },
713 &quot;type&quot;: &quot;A String&quot;, # The type of user mention.
714 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700715 &quot;type&quot;: &quot;A String&quot;, # The type of this annotation.
716 &quot;length&quot;: 42, # Length of the substring in the plain-text message body this annotation
717 # corresponds to.
718 &quot;startIndex&quot;: 42, # Start index (0-based, inclusive) in the plain-text message body this
719 # annotation corresponds to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 },
721 ],
722 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/messages/*&quot;.
723 #
724 # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4
725 &quot;previewText&quot;: &quot;A String&quot;, # Text for generating preview chips. This text will not be displayed to the
726 # user, but any links to images, web pages, videos, etc. included here will
727 # generate preview chips.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700728 &quot;text&quot;: &quot;A String&quot;, # Plain-text body of the message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700729 &quot;space&quot;: { # A room or DM in Hangouts Chat. # The space the message belongs to.
Bu Sun Kim65020912020-05-20 12:08:20 -0700730 &quot;name&quot;: &quot;A String&quot;, # Resource name of the space, in the form &quot;spaces/*&quot;.
731 #
732 # Example: spaces/AAAAMpdlehYs
733 &quot;threaded&quot;: True or False, # Whether the messages are threaded in this space.
734 &quot;displayName&quot;: &quot;A String&quot;, # Output only. The display name (only if the space is a room).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700735 &quot;type&quot;: &quot;A String&quot;, # Output only. The type of a space.
736 # This is deprecated. Use `single_user_bot_dm` instead.
737 &quot;singleUserBotDm&quot;: True or False, # Whether the space is a DM between a bot and a single human.
Bu Sun Kim65020912020-05-20 12:08:20 -0700738 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700740</div>
741
742<div class="method">
743 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
744 <pre>Deletes a message.
745
746Args:
747 name: string, Required. Resource name of the message to be deleted, in the form
Bu Sun Kim65020912020-05-20 12:08:20 -0700748&quot;spaces/*/messages/*&quot;
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749
750Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required)
751 x__xgafv: string, V1 error format.
752 Allowed values
753 1 - v1 error format
754 2 - v2 error format
755
756Returns:
757 An object of the form:
758
759 { # A generic empty message that you can re-use to avoid defining duplicated
760 # empty messages in your APIs. A typical example is to use it as the request
761 # or the response type of an API method. For instance:
762 #
763 # service Foo {
764 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
765 # }
766 #
767 # The JSON representation for `Empty` is empty JSON object `{}`.
768 }</pre>
769</div>
770
771<div class="method">
772 <code class="details" id="get">get(name, x__xgafv=None)</code>
773 <pre>Returns a message.
774
775Args:
776 name: string, Required. Resource name of the message to be retrieved, in the form
Bu Sun Kim65020912020-05-20 12:08:20 -0700777&quot;spaces/*/messages/*&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700778
779Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required)
780 x__xgafv: string, V1 error format.
781 Allowed values
782 1 - v1 error format
783 2 - v2 error format
784
785Returns:
786 An object of the form:
787
788 { # A message in Hangouts Chat.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700789 &quot;argumentText&quot;: &quot;A String&quot;, # Plain-text body of the message with all bot mentions stripped out.
790 &quot;fallbackText&quot;: &quot;A String&quot;, # A plain-text description of the message&#x27;s cards, used when the actual cards
791 # cannot be displayed (e.g. mobile notifications).
792 &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
793 # posted.
794 &quot;url&quot;: &quot;A String&quot;, # URL for users to auth or config. (Only for REQUEST_CONFIG response types.)
795 &quot;type&quot;: &quot;A String&quot;, # The type of bot response.
796 },
797 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was created in Hangouts Chat
798 # server.
799 &quot;sender&quot;: { # A user in Hangouts Chat. # The user who created the message.
800 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
801 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
802 &quot;type&quot;: &quot;A String&quot;, # User type.
803 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
804 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700805 &quot;cards&quot;: [ # Rich, formatted and interactive cards that can be used to display UI
806 # elements such as: formatted texts, buttons, clickable images. Cards are
807 # normally displayed below the plain-text body of the message.
808 { # A card is a UI element that can contain UI widgets such as texts, images.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700809 &quot;name&quot;: &quot;A String&quot;, # Name of the card.
Bu Sun Kim65020912020-05-20 12:08:20 -0700810 &quot;sections&quot;: [ # Sections are separated by a line divider.
811 { # A section contains a collection of widgets that are rendered
812 # (vertically) in the order that they are specified. Across all platforms,
813 # cards have a narrow fixed width, so
814 # there is currently no need for layout properties (e.g. float).
815 &quot;header&quot;: &quot;A String&quot;, # The header of the section, text formatted supported.
816 &quot;widgets&quot;: [ # A section must contain at least 1 widget.
817 { # A widget is a UI element that presents texts, images, etc.
818 &quot;textParagraph&quot;: { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget.
819 &quot;text&quot;: &quot;A String&quot;,
820 },
821 &quot;keyValue&quot;: { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget.
822 # element may also contain some actions such as onclick button.
823 &quot;topLabel&quot;: &quot;A String&quot;, # The text of the top label. Formatted text supported.
824 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
Bu Sun Kim65020912020-05-20 12:08:20 -0700825 &quot;button&quot;: { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action.
826 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700827 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
828 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
829 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
830 },
831 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
832 # For example, an Apps Script can be invoked to handle the form.
833 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
834 # form submission. This information is echoed back to the bot as part of
835 # the card click event. The same method name can be used for several
836 # elements that trigger a common behavior if desired.
837 &quot;parameters&quot;: [ # List of action parameters.
838 { # List of string parameters to supply when the action method is invoked.
839 # For example, consider three snooze buttons: snooze now, snooze 1 day,
840 # snooze next week. You might use action method = snooze(), passing the
841 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700842 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700843 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700844 },
845 ],
846 },
847 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700848 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Dan O'Mearadd494642020-05-01 07:42:23 -0700849 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700850 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
851 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
852 # API.
853 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
854 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
855 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
856 },
857 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
858 # For example, an Apps Script can be invoked to handle the form.
859 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
860 # form submission. This information is echoed back to the bot as part of
861 # the card click event. The same method name can be used for several
862 # elements that trigger a common behavior if desired.
863 &quot;parameters&quot;: [ # List of action parameters.
864 { # List of string parameters to supply when the action method is invoked.
865 # For example, consider three snooze buttons: snooze now, snooze 1 day,
866 # snooze next week. You might use action method = snooze(), passing the
867 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700868 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700869 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700870 },
871 ],
872 },
873 },
874 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
875 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
876 # Default value will be provided if developers don&#x27;t specify.
877 },
878 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700879 &quot;content&quot;: &quot;A String&quot;, # The text of the content. Formatted text supported and always required.
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 &quot;bottomLabel&quot;: &quot;A String&quot;, # The text of the bottom label. Formatted text supported.
881 &quot;icon&quot;: &quot;A String&quot;, # An enum value that will be replaced by the Chat API with the
882 # corresponding icon image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700883 &quot;contentMultiline&quot;: True or False, # If the content should be multiline.
Bu Sun Kim65020912020-05-20 12:08:20 -0700884 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region
885 # are clickable.
886 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
887 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
888 },
889 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
890 # For example, an Apps Script can be invoked to handle the form.
891 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
892 # form submission. This information is echoed back to the bot as part of
893 # the card click event. The same method name can be used for several
894 # elements that trigger a common behavior if desired.
895 &quot;parameters&quot;: [ # List of action parameters.
896 { # List of string parameters to supply when the action method is invoked.
897 # For example, consider three snooze buttons: snooze now, snooze 1 day,
898 # snooze next week. You might use action method = snooze(), passing the
899 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700900 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700901 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700902 },
903 ],
904 },
905 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700906 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700907 &quot;image&quot;: { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget.
Bu Sun Kim65020912020-05-20 12:08:20 -0700908 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
909 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
910 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
911 },
912 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
913 # For example, an Apps Script can be invoked to handle the form.
914 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
915 # form submission. This information is echoed back to the bot as part of
916 # the card click event. The same method name can be used for several
917 # elements that trigger a common behavior if desired.
918 &quot;parameters&quot;: [ # List of action parameters.
919 { # List of string parameters to supply when the action method is invoked.
920 # For example, consider three snooze buttons: snooze now, snooze 1 day,
921 # snooze next week. You might use action method = snooze(), passing the
922 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700923 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700924 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700925 },
926 ],
927 },
928 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700929 &quot;aspectRatio&quot;: 3.14, # The aspect ratio of this image (width/height). This field allows clients
930 # to reserve the right height for the image while waiting for it to load.
931 # It&#x27;s not meant to override the native aspect ratio of the image.
932 # If unset, the server fills it by prefetching the image.
933 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image.
Dan O'Mearadd494642020-05-01 07:42:23 -0700934 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 &quot;buttons&quot;: [ # A list of buttons. Buttons is also oneof data and only one of these
936 # fields should be set.
937 { # A button. Can be a text button or an image button.
938 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -0700939 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
940 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
941 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
942 },
943 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
944 # For example, an Apps Script can be invoked to handle the form.
945 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
946 # form submission. This information is echoed back to the bot as part of
947 # the card click event. The same method name can be used for several
948 # elements that trigger a common behavior if desired.
949 &quot;parameters&quot;: [ # List of action parameters.
950 { # List of string parameters to supply when the action method is invoked.
951 # For example, consider three snooze buttons: snooze now, snooze 1 day,
952 # snooze next week. You might use action method = snooze(), passing the
953 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700954 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700955 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 },
957 ],
958 },
959 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700960 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Bu Sun Kim65020912020-05-20 12:08:20 -0700961 },
962 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
963 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
964 # API.
965 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
966 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
967 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
968 },
969 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
970 # For example, an Apps Script can be invoked to handle the form.
971 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
972 # form submission. This information is echoed back to the bot as part of
973 # the card click event. The same method name can be used for several
974 # elements that trigger a common behavior if desired.
975 &quot;parameters&quot;: [ # List of action parameters.
976 { # List of string parameters to supply when the action method is invoked.
977 # For example, consider three snooze buttons: snooze now, snooze 1 day,
978 # snooze next week. You might use action method = snooze(), passing the
979 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700980 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700981 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 },
983 ],
984 },
985 },
986 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
987 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
988 # Default value will be provided if developers don&#x27;t specify.
989 },
990 },
991 ],
992 },
993 ],
994 },
995 ],
996 &quot;cardActions&quot;: [ # The actions of this card.
997 { # A card action is
998 # the action associated with the card. For an invoice card, a
999 # typical action would be: delete invoice, email invoice or open the
1000 # invoice in browser.
Bu Sun Kim65020912020-05-20 12:08:20 -07001001 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action for this action item.
1002 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1003 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1004 },
1005 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1006 # For example, an Apps Script can be invoked to handle the form.
1007 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1008 # form submission. This information is echoed back to the bot as part of
1009 # the card click event. The same method name can be used for several
1010 # elements that trigger a common behavior if desired.
1011 &quot;parameters&quot;: [ # List of action parameters.
1012 { # List of string parameters to supply when the action method is invoked.
1013 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1014 # snooze next week. You might use action method = snooze(), passing the
1015 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001016 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001017 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001018 },
1019 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001020 },
1021 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001022 &quot;actionLabel&quot;: &quot;A String&quot;, # The label used to be displayed in the action menu item.
Dan O'Mearadd494642020-05-01 07:42:23 -07001023 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 ],
1025 &quot;header&quot;: { # The header of the card. A header usually contains a title and an image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001026 &quot;imageStyle&quot;: &quot;A String&quot;, # The image&#x27;s type (e.g. square border or circular border).
1027 &quot;title&quot;: &quot;A String&quot;, # The title must be specified. The header has a fixed height: if both a
1028 # title and subtitle is specified, each will take up 1 line. If only the
1029 # title is specified, it will take up both lines.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001030 &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header.
1031 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image in the card header.
Dan O'Mearadd494642020-05-01 07:42:23 -07001032 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001033 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001034 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001035 &quot;thread&quot;: { # A thread in Hangouts Chat. # The thread the message belongs to.
1036 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/threads/*&quot;.
1037 #
1038 # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4
1039 },
1040 &quot;annotations&quot;: [ # Output only. Annotations associated with the text in this message.
1041 { # Annotations associated with the plain-text body of the message.
1042 #
1043 # Example plain-text message body:
1044 # ```
1045 # Hello @FooBot how are you!&quot;
1046 # ```
1047 #
1048 # The corresponding annotations metadata:
1049 # ```
1050 # &quot;annotations&quot;:[{
1051 # &quot;type&quot;:&quot;USER_MENTION&quot;,
1052 # &quot;startIndex&quot;:6,
1053 # &quot;length&quot;:7,
1054 # &quot;userMention&quot;: {
1055 # &quot;user&quot;: {
1056 # &quot;name&quot;:&quot;users/107946847022116401880&quot;,
1057 # &quot;displayName&quot;:&quot;FooBot&quot;,
1058 # &quot;avatarUrl&quot;:&quot;https://goo.gl/aeDtrS&quot;,
1059 # &quot;type&quot;:&quot;BOT&quot;
1060 # },
1061 # &quot;type&quot;:&quot;MENTION&quot;
1062 # }
1063 # }]
1064 # ```
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001065 &quot;userMention&quot;: { # Annotation metadata for user mentions (@). # The metadata of user mention.
1066 &quot;user&quot;: { # A user in Hangouts Chat. # The user mentioned.
1067 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
1068 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
1069 &quot;type&quot;: &quot;A String&quot;, # User type.
1070 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
1071 },
1072 &quot;type&quot;: &quot;A String&quot;, # The type of user mention.
1073 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001074 &quot;type&quot;: &quot;A String&quot;, # The type of this annotation.
1075 &quot;length&quot;: 42, # Length of the substring in the plain-text message body this annotation
1076 # corresponds to.
1077 &quot;startIndex&quot;: 42, # Start index (0-based, inclusive) in the plain-text message body this
1078 # annotation corresponds to.
Bu Sun Kim65020912020-05-20 12:08:20 -07001079 },
1080 ],
1081 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/messages/*&quot;.
1082 #
1083 # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4
1084 &quot;previewText&quot;: &quot;A String&quot;, # Text for generating preview chips. This text will not be displayed to the
1085 # user, but any links to images, web pages, videos, etc. included here will
1086 # generate preview chips.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001087 &quot;text&quot;: &quot;A String&quot;, # Plain-text body of the message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001088 &quot;space&quot;: { # A room or DM in Hangouts Chat. # The space the message belongs to.
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 &quot;name&quot;: &quot;A String&quot;, # Resource name of the space, in the form &quot;spaces/*&quot;.
1090 #
1091 # Example: spaces/AAAAMpdlehYs
1092 &quot;threaded&quot;: True or False, # Whether the messages are threaded in this space.
1093 &quot;displayName&quot;: &quot;A String&quot;, # Output only. The display name (only if the space is a room).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001094 &quot;type&quot;: &quot;A String&quot;, # Output only. The type of a space.
1095 # This is deprecated. Use `single_user_bot_dm` instead.
1096 &quot;singleUserBotDm&quot;: True or False, # Whether the space is a DM between a bot and a single human.
Bu Sun Kim65020912020-05-20 12:08:20 -07001097 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001098 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001099</div>
1100
1101<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001102 <code class="details" id="update">update(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001103 <pre>Updates a message.
1104
1105Args:
Bu Sun Kim65020912020-05-20 12:08:20 -07001106 name: string, Resource name, in the form &quot;spaces/*/messages/*&quot;.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001107
1108Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4 (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001109 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001110 The object takes the form of:
1111
1112{ # A message in Hangouts Chat.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001113 &quot;argumentText&quot;: &quot;A String&quot;, # Plain-text body of the message with all bot mentions stripped out.
1114 &quot;fallbackText&quot;: &quot;A String&quot;, # A plain-text description of the message&#x27;s cards, used when the actual cards
1115 # cannot be displayed (e.g. mobile notifications).
1116 &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
1117 # posted.
1118 &quot;url&quot;: &quot;A String&quot;, # URL for users to auth or config. (Only for REQUEST_CONFIG response types.)
1119 &quot;type&quot;: &quot;A String&quot;, # The type of bot response.
1120 },
1121 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was created in Hangouts Chat
1122 # server.
1123 &quot;sender&quot;: { # A user in Hangouts Chat. # The user who created the message.
1124 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
1125 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
1126 &quot;type&quot;: &quot;A String&quot;, # User type.
1127 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
1128 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001129 &quot;cards&quot;: [ # Rich, formatted and interactive cards that can be used to display UI
1130 # elements such as: formatted texts, buttons, clickable images. Cards are
1131 # normally displayed below the plain-text body of the message.
1132 { # A card is a UI element that can contain UI widgets such as texts, images.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001133 &quot;name&quot;: &quot;A String&quot;, # Name of the card.
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 &quot;sections&quot;: [ # Sections are separated by a line divider.
1135 { # A section contains a collection of widgets that are rendered
1136 # (vertically) in the order that they are specified. Across all platforms,
1137 # cards have a narrow fixed width, so
1138 # there is currently no need for layout properties (e.g. float).
1139 &quot;header&quot;: &quot;A String&quot;, # The header of the section, text formatted supported.
1140 &quot;widgets&quot;: [ # A section must contain at least 1 widget.
1141 { # A widget is a UI element that presents texts, images, etc.
1142 &quot;textParagraph&quot;: { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget.
1143 &quot;text&quot;: &quot;A String&quot;,
1144 },
1145 &quot;keyValue&quot;: { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget.
1146 # element may also contain some actions such as onclick button.
1147 &quot;topLabel&quot;: &quot;A String&quot;, # The text of the top label. Formatted text supported.
1148 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001149 &quot;button&quot;: { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action.
1150 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -07001151 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
1152 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1153 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1154 },
1155 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1156 # For example, an Apps Script can be invoked to handle the form.
1157 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1158 # form submission. This information is echoed back to the bot as part of
1159 # the card click event. The same method name can be used for several
1160 # elements that trigger a common behavior if desired.
1161 &quot;parameters&quot;: [ # List of action parameters.
1162 { # List of string parameters to supply when the action method is invoked.
1163 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1164 # snooze next week. You might use action method = snooze(), passing the
1165 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001166 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001167 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001168 },
1169 ],
1170 },
1171 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001172 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Dan O'Mearadd494642020-05-01 07:42:23 -07001173 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001174 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
1175 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
1176 # API.
1177 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
1178 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1179 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1180 },
1181 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1182 # For example, an Apps Script can be invoked to handle the form.
1183 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1184 # form submission. This information is echoed back to the bot as part of
1185 # the card click event. The same method name can be used for several
1186 # 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.
1189 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1190 # snooze next week. You might use action method = snooze(), passing the
1191 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001192 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001193 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 },
1195 ],
1196 },
1197 },
1198 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
1199 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
1200 # Default value will be provided if developers don&#x27;t specify.
1201 },
1202 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001203 &quot;content&quot;: &quot;A String&quot;, # The text of the content. Formatted text supported and always required.
Bu Sun Kim65020912020-05-20 12:08:20 -07001204 &quot;bottomLabel&quot;: &quot;A String&quot;, # The text of the bottom label. Formatted text supported.
1205 &quot;icon&quot;: &quot;A String&quot;, # An enum value that will be replaced by the Chat API with the
1206 # corresponding icon image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001207 &quot;contentMultiline&quot;: True or False, # If the content should be multiline.
Bu Sun Kim65020912020-05-20 12:08:20 -07001208 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region
1209 # are clickable.
1210 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1211 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1212 },
1213 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1214 # For example, an Apps Script can be invoked to handle the form.
1215 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1216 # form submission. This information is echoed back to the bot as part of
1217 # the card click event. The same method name can be used for several
1218 # elements that trigger a common behavior if desired.
1219 &quot;parameters&quot;: [ # List of action parameters.
1220 { # List of string parameters to supply when the action method is invoked.
1221 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1222 # snooze next week. You might use action method = snooze(), passing the
1223 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001224 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001225 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001226 },
1227 ],
1228 },
1229 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001230 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001231 &quot;image&quot;: { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget.
Bu Sun Kim65020912020-05-20 12:08:20 -07001232 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
1233 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1234 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1235 },
1236 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1237 # For example, an Apps Script can be invoked to handle the form.
1238 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1239 # form submission. This information is echoed back to the bot as part of
1240 # the card click event. The same method name can be used for several
1241 # elements that trigger a common behavior if desired.
1242 &quot;parameters&quot;: [ # List of action parameters.
1243 { # List of string parameters to supply when the action method is invoked.
1244 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1245 # snooze next week. You might use action method = snooze(), passing the
1246 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001247 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001248 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001249 },
1250 ],
1251 },
1252 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001253 &quot;aspectRatio&quot;: 3.14, # The aspect ratio of this image (width/height). This field allows clients
1254 # to reserve the right height for the image while waiting for it to load.
1255 # It&#x27;s not meant to override the native aspect ratio of the image.
1256 # If unset, the server fills it by prefetching the image.
1257 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image.
Dan O'Mearadd494642020-05-01 07:42:23 -07001258 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001259 &quot;buttons&quot;: [ # A list of buttons. Buttons is also oneof data and only one of these
1260 # fields should be set.
1261 { # A button. Can be a text button or an image button.
1262 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -07001263 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
1264 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1265 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1266 },
1267 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1268 # For example, an Apps Script can be invoked to handle the form.
1269 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1270 # form submission. This information is echoed back to the bot as part of
1271 # the card click event. The same method name can be used for several
1272 # elements that trigger a common behavior if desired.
1273 &quot;parameters&quot;: [ # List of action parameters.
1274 { # List of string parameters to supply when the action method is invoked.
1275 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1276 # snooze next week. You might use action method = snooze(), passing the
1277 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001278 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001279 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001280 },
1281 ],
1282 },
1283 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001284 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Bu Sun Kim65020912020-05-20 12:08:20 -07001285 },
1286 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
1287 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
1288 # API.
1289 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
1290 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1291 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1292 },
1293 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1294 # For example, an Apps Script can be invoked to handle the form.
1295 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1296 # form submission. This information is echoed back to the bot as part of
1297 # the card click event. The same method name can be used for several
1298 # elements that trigger a common behavior if desired.
1299 &quot;parameters&quot;: [ # List of action parameters.
1300 { # List of string parameters to supply when the action method is invoked.
1301 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1302 # snooze next week. You might use action method = snooze(), passing the
1303 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001304 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001305 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001306 },
1307 ],
1308 },
1309 },
1310 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
1311 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
1312 # Default value will be provided if developers don&#x27;t specify.
1313 },
1314 },
1315 ],
1316 },
1317 ],
1318 },
1319 ],
1320 &quot;cardActions&quot;: [ # The actions of this card.
1321 { # A card action is
1322 # the action associated with the card. For an invoice card, a
1323 # typical action would be: delete invoice, email invoice or open the
1324 # invoice in browser.
Bu Sun Kim65020912020-05-20 12:08:20 -07001325 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action for this action item.
1326 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1327 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1328 },
1329 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1330 # For example, an Apps Script can be invoked to handle the form.
1331 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1332 # form submission. This information is echoed back to the bot as part of
1333 # the card click event. The same method name can be used for several
1334 # elements that trigger a common behavior if desired.
1335 &quot;parameters&quot;: [ # List of action parameters.
1336 { # List of string parameters to supply when the action method is invoked.
1337 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1338 # snooze next week. You might use action method = snooze(), passing the
1339 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001340 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001341 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001342 },
1343 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001344 },
1345 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001346 &quot;actionLabel&quot;: &quot;A String&quot;, # The label used to be displayed in the action menu item.
Dan O'Mearadd494642020-05-01 07:42:23 -07001347 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001348 ],
1349 &quot;header&quot;: { # The header of the card. A header usually contains a title and an image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001350 &quot;imageStyle&quot;: &quot;A String&quot;, # The image&#x27;s type (e.g. square border or circular border).
1351 &quot;title&quot;: &quot;A String&quot;, # The title must be specified. The header has a fixed height: if both a
1352 # title and subtitle is specified, each will take up 1 line. If only the
1353 # title is specified, it will take up both lines.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001354 &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header.
1355 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image in the card header.
Dan O'Mearadd494642020-05-01 07:42:23 -07001356 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001357 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001359 &quot;thread&quot;: { # A thread in Hangouts Chat. # The thread the message belongs to.
1360 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/threads/*&quot;.
1361 #
1362 # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4
1363 },
1364 &quot;annotations&quot;: [ # Output only. Annotations associated with the text in this message.
1365 { # Annotations associated with the plain-text body of the message.
1366 #
1367 # Example plain-text message body:
1368 # ```
1369 # Hello @FooBot how are you!&quot;
1370 # ```
1371 #
1372 # The corresponding annotations metadata:
1373 # ```
1374 # &quot;annotations&quot;:[{
1375 # &quot;type&quot;:&quot;USER_MENTION&quot;,
1376 # &quot;startIndex&quot;:6,
1377 # &quot;length&quot;:7,
1378 # &quot;userMention&quot;: {
1379 # &quot;user&quot;: {
1380 # &quot;name&quot;:&quot;users/107946847022116401880&quot;,
1381 # &quot;displayName&quot;:&quot;FooBot&quot;,
1382 # &quot;avatarUrl&quot;:&quot;https://goo.gl/aeDtrS&quot;,
1383 # &quot;type&quot;:&quot;BOT&quot;
1384 # },
1385 # &quot;type&quot;:&quot;MENTION&quot;
1386 # }
1387 # }]
1388 # ```
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001389 &quot;userMention&quot;: { # Annotation metadata for user mentions (@). # The metadata of user mention.
1390 &quot;user&quot;: { # A user in Hangouts Chat. # The user mentioned.
1391 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
1392 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
1393 &quot;type&quot;: &quot;A String&quot;, # User type.
1394 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
1395 },
1396 &quot;type&quot;: &quot;A String&quot;, # The type of user mention.
1397 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001398 &quot;type&quot;: &quot;A String&quot;, # The type of this annotation.
1399 &quot;length&quot;: 42, # Length of the substring in the plain-text message body this annotation
1400 # corresponds to.
1401 &quot;startIndex&quot;: 42, # Start index (0-based, inclusive) in the plain-text message body this
1402 # annotation corresponds to.
Bu Sun Kim65020912020-05-20 12:08:20 -07001403 },
1404 ],
1405 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/messages/*&quot;.
1406 #
1407 # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4
1408 &quot;previewText&quot;: &quot;A String&quot;, # Text for generating preview chips. This text will not be displayed to the
1409 # user, but any links to images, web pages, videos, etc. included here will
1410 # generate preview chips.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001411 &quot;text&quot;: &quot;A String&quot;, # Plain-text body of the message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001412 &quot;space&quot;: { # A room or DM in Hangouts Chat. # The space the message belongs to.
Bu Sun Kim65020912020-05-20 12:08:20 -07001413 &quot;name&quot;: &quot;A String&quot;, # Resource name of the space, in the form &quot;spaces/*&quot;.
1414 #
1415 # Example: spaces/AAAAMpdlehYs
1416 &quot;threaded&quot;: True or False, # Whether the messages are threaded in this space.
1417 &quot;displayName&quot;: &quot;A String&quot;, # Output only. The display name (only if the space is a room).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001418 &quot;type&quot;: &quot;A String&quot;, # Output only. The type of a space.
1419 # This is deprecated. Use `single_user_bot_dm` instead.
1420 &quot;singleUserBotDm&quot;: True or False, # Whether the space is a DM between a bot and a single human.
Bu Sun Kim65020912020-05-20 12:08:20 -07001421 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001422}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001423
Dan O'Mearadd494642020-05-01 07:42:23 -07001424 updateMask: string, Required. The field paths to be updated, comma separated if there are
1425multiple.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001426
Dan O'Mearadd494642020-05-01 07:42:23 -07001427Currently supported field paths:
1428* text
1429* cards
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001430 x__xgafv: string, V1 error format.
1431 Allowed values
1432 1 - v1 error format
1433 2 - v2 error format
1434
1435Returns:
1436 An object of the form:
1437
1438 { # A message in Hangouts Chat.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001439 &quot;argumentText&quot;: &quot;A String&quot;, # Plain-text body of the message with all bot mentions stripped out.
1440 &quot;fallbackText&quot;: &quot;A String&quot;, # A plain-text description of the message&#x27;s cards, used when the actual cards
1441 # cannot be displayed (e.g. mobile notifications).
1442 &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
1443 # posted.
1444 &quot;url&quot;: &quot;A String&quot;, # URL for users to auth or config. (Only for REQUEST_CONFIG response types.)
1445 &quot;type&quot;: &quot;A String&quot;, # The type of bot response.
1446 },
1447 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time at which the message was created in Hangouts Chat
1448 # server.
1449 &quot;sender&quot;: { # A user in Hangouts Chat. # The user who created the message.
1450 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
1451 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
1452 &quot;type&quot;: &quot;A String&quot;, # User type.
1453 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
1454 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001455 &quot;cards&quot;: [ # Rich, formatted and interactive cards that can be used to display UI
1456 # elements such as: formatted texts, buttons, clickable images. Cards are
1457 # normally displayed below the plain-text body of the message.
1458 { # A card is a UI element that can contain UI widgets such as texts, images.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001459 &quot;name&quot;: &quot;A String&quot;, # Name of the card.
Bu Sun Kim65020912020-05-20 12:08:20 -07001460 &quot;sections&quot;: [ # Sections are separated by a line divider.
1461 { # A section contains a collection of widgets that are rendered
1462 # (vertically) in the order that they are specified. Across all platforms,
1463 # cards have a narrow fixed width, so
1464 # there is currently no need for layout properties (e.g. float).
1465 &quot;header&quot;: &quot;A String&quot;, # The header of the section, text formatted supported.
1466 &quot;widgets&quot;: [ # A section must contain at least 1 widget.
1467 { # A widget is a UI element that presents texts, images, etc.
1468 &quot;textParagraph&quot;: { # A paragraph of text. Formatted text supported. # Display a text paragraph in this widget.
1469 &quot;text&quot;: &quot;A String&quot;,
1470 },
1471 &quot;keyValue&quot;: { # A UI element contains a key (label) and a value (content). And this # Display a key value item in this widget.
1472 # element may also contain some actions such as onclick button.
1473 &quot;topLabel&quot;: &quot;A String&quot;, # The text of the top label. Formatted text supported.
1474 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
Bu Sun Kim65020912020-05-20 12:08:20 -07001475 &quot;button&quot;: { # A button. Can be a text button or an image button. # A button that can be clicked to trigger an action.
1476 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -07001477 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
1478 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1479 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1480 },
1481 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1482 # For example, an Apps Script can be invoked to handle the form.
1483 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1484 # form submission. This information is echoed back to the bot as part of
1485 # the card click event. The same method name can be used for several
1486 # elements that trigger a common behavior if desired.
1487 &quot;parameters&quot;: [ # List of action parameters.
1488 { # List of string parameters to supply when the action method is invoked.
1489 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1490 # snooze next week. You might use action method = snooze(), passing the
1491 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001492 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001493 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001494 },
1495 ],
1496 },
1497 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001498 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Dan O'Mearadd494642020-05-01 07:42:23 -07001499 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001500 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
1501 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
1502 # API.
1503 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
1504 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1505 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1506 },
1507 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1508 # For example, an Apps Script can be invoked to handle the form.
1509 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1510 # form submission. This information is echoed back to the bot as part of
1511 # the card click event. The same method name can be used for several
1512 # elements that trigger a common behavior if desired.
1513 &quot;parameters&quot;: [ # List of action parameters.
1514 { # List of string parameters to supply when the action method is invoked.
1515 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1516 # snooze next week. You might use action method = snooze(), passing the
1517 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001518 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001519 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001520 },
1521 ],
1522 },
1523 },
1524 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
1525 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
1526 # Default value will be provided if developers don&#x27;t specify.
1527 },
1528 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001529 &quot;content&quot;: &quot;A String&quot;, # The text of the content. Formatted text supported and always required.
Bu Sun Kim65020912020-05-20 12:08:20 -07001530 &quot;bottomLabel&quot;: &quot;A String&quot;, # The text of the bottom label. Formatted text supported.
1531 &quot;icon&quot;: &quot;A String&quot;, # An enum value that will be replaced by the Chat API with the
1532 # corresponding icon image.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001533 &quot;contentMultiline&quot;: True or False, # If the content should be multiline.
Bu Sun Kim65020912020-05-20 12:08:20 -07001534 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action. Only the top label, bottom label and content region
1535 # are clickable.
1536 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1537 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1538 },
1539 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1540 # For example, an Apps Script can be invoked to handle the form.
1541 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1542 # form submission. This information is echoed back to the bot as part of
1543 # the card click event. The same method name can be used for several
1544 # elements that trigger a common behavior if desired.
1545 &quot;parameters&quot;: [ # List of action parameters.
1546 { # List of string parameters to supply when the action method is invoked.
1547 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1548 # snooze next week. You might use action method = snooze(), passing the
1549 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001550 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001551 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001552 },
1553 ],
1554 },
1555 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001556 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &quot;image&quot;: { # An image that is specified by a URL and can have an onclick action. # Display an image in this widget.
Bu Sun Kim65020912020-05-20 12:08:20 -07001558 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
1559 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1560 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1561 },
1562 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1563 # For example, an Apps Script can be invoked to handle the form.
1564 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1565 # form submission. This information is echoed back to the bot as part of
1566 # the card click event. The same method name can be used for several
1567 # elements that trigger a common behavior if desired.
1568 &quot;parameters&quot;: [ # List of action parameters.
1569 { # List of string parameters to supply when the action method is invoked.
1570 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1571 # snooze next week. You might use action method = snooze(), passing the
1572 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001573 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001574 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001575 },
1576 ],
1577 },
1578 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001579 &quot;aspectRatio&quot;: 3.14, # The aspect ratio of this image (width/height). This field allows clients
1580 # to reserve the right height for the image while waiting for it to load.
1581 # It&#x27;s not meant to override the native aspect ratio of the image.
1582 # If unset, the server fills it by prefetching the image.
1583 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image.
Dan O'Mearadd494642020-05-01 07:42:23 -07001584 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001585 &quot;buttons&quot;: [ # A list of buttons. Buttons is also oneof data and only one of these
1586 # fields should be set.
1587 { # A button. Can be a text button or an image button.
1588 &quot;textButton&quot;: { # A button with text and onclick action. # A button with text and onclick action.
Bu Sun Kim65020912020-05-20 12:08:20 -07001589 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action of the button.
1590 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1591 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1592 },
1593 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1594 # For example, an Apps Script can be invoked to handle the form.
1595 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1596 # form submission. This information is echoed back to the bot as part of
1597 # the card click event. The same method name can be used for several
1598 # elements that trigger a common behavior if desired.
1599 &quot;parameters&quot;: [ # List of action parameters.
1600 { # List of string parameters to supply when the action method is invoked.
1601 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1602 # snooze next week. You might use action method = snooze(), passing the
1603 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001604 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001605 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001606 },
1607 ],
1608 },
1609 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001610 &quot;text&quot;: &quot;A String&quot;, # The text of the button.
Bu Sun Kim65020912020-05-20 12:08:20 -07001611 },
1612 &quot;imageButton&quot;: { # An image button with an onclick action. # A button with image and onclick action.
1613 &quot;icon&quot;: &quot;A String&quot;, # The icon specified by an enum that indices to an icon provided by Chat
1614 # API.
1615 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action.
1616 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1617 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1618 },
1619 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1620 # For example, an Apps Script can be invoked to handle the form.
1621 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1622 # form submission. This information is echoed back to the bot as part of
1623 # the card click event. The same method name can be used for several
1624 # elements that trigger a common behavior if desired.
1625 &quot;parameters&quot;: [ # List of action parameters.
1626 { # List of string parameters to supply when the action method is invoked.
1627 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1628 # snooze next week. You might use action method = snooze(), passing the
1629 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001630 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001631 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001632 },
1633 ],
1634 },
1635 },
1636 &quot;iconUrl&quot;: &quot;A String&quot;, # The icon specified by a URL.
1637 &quot;name&quot;: &quot;A String&quot;, # The name of this image_button which will be used for accessibility.
1638 # Default value will be provided if developers don&#x27;t specify.
1639 },
1640 },
1641 ],
1642 },
1643 ],
1644 },
1645 ],
1646 &quot;cardActions&quot;: [ # The actions of this card.
1647 { # A card action is
1648 # the action associated with the card. For an invoice card, a
1649 # typical action would be: delete invoice, email invoice or open the
1650 # invoice in browser.
Bu Sun Kim65020912020-05-20 12:08:20 -07001651 &quot;onClick&quot;: { # An onclick action (e.g. open a link). # The onclick action for this action item.
1652 &quot;openLink&quot;: { # A link that opens a new window. # This onclick triggers an open link action if specified.
1653 &quot;url&quot;: &quot;A String&quot;, # The URL to open.
1654 },
1655 &quot;action&quot;: { # A form action describes the behavior when the form is submitted. # A form action will be trigger by this onclick if specified.
1656 # For example, an Apps Script can be invoked to handle the form.
1657 &quot;actionMethodName&quot;: &quot;A String&quot;, # The method name is used to identify which part of the form triggered the
1658 # form submission. This information is echoed back to the bot as part of
1659 # the card click event. The same method name can be used for several
1660 # elements that trigger a common behavior if desired.
1661 &quot;parameters&quot;: [ # List of action parameters.
1662 { # List of string parameters to supply when the action method is invoked.
1663 # For example, consider three snooze buttons: snooze now, snooze 1 day,
1664 # snooze next week. You might use action method = snooze(), passing the
1665 # snooze type and snooze time in the list of string parameters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001666 &quot;value&quot;: &quot;A String&quot;, # The value of the parameter.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001667 &quot;key&quot;: &quot;A String&quot;, # The name of the parameter for the action script.
Bu Sun Kim65020912020-05-20 12:08:20 -07001668 },
1669 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001670 },
1671 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001672 &quot;actionLabel&quot;: &quot;A String&quot;, # The label used to be displayed in the action menu item.
Dan O'Mearadd494642020-05-01 07:42:23 -07001673 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001674 ],
1675 &quot;header&quot;: { # The header of the card. A header usually contains a title and an image.
Bu Sun Kim65020912020-05-20 12:08:20 -07001676 &quot;imageStyle&quot;: &quot;A String&quot;, # The image&#x27;s type (e.g. square border or circular border).
1677 &quot;title&quot;: &quot;A String&quot;, # The title must be specified. The header has a fixed height: if both a
1678 # title and subtitle is specified, each will take up 1 line. If only the
1679 # title is specified, it will take up both lines.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001680 &quot;subtitle&quot;: &quot;A String&quot;, # The subtitle of the card header.
1681 &quot;imageUrl&quot;: &quot;A String&quot;, # The URL of the image in the card header.
Dan O'Mearadd494642020-05-01 07:42:23 -07001682 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001683 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001684 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001685 &quot;thread&quot;: { # A thread in Hangouts Chat. # The thread the message belongs to.
1686 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/threads/*&quot;.
1687 #
1688 # Example: spaces/AAAAMpdlehY/threads/UMxbHmzDlr4
1689 },
1690 &quot;annotations&quot;: [ # Output only. Annotations associated with the text in this message.
1691 { # Annotations associated with the plain-text body of the message.
1692 #
1693 # Example plain-text message body:
1694 # ```
1695 # Hello @FooBot how are you!&quot;
1696 # ```
1697 #
1698 # The corresponding annotations metadata:
1699 # ```
1700 # &quot;annotations&quot;:[{
1701 # &quot;type&quot;:&quot;USER_MENTION&quot;,
1702 # &quot;startIndex&quot;:6,
1703 # &quot;length&quot;:7,
1704 # &quot;userMention&quot;: {
1705 # &quot;user&quot;: {
1706 # &quot;name&quot;:&quot;users/107946847022116401880&quot;,
1707 # &quot;displayName&quot;:&quot;FooBot&quot;,
1708 # &quot;avatarUrl&quot;:&quot;https://goo.gl/aeDtrS&quot;,
1709 # &quot;type&quot;:&quot;BOT&quot;
1710 # },
1711 # &quot;type&quot;:&quot;MENTION&quot;
1712 # }
1713 # }]
1714 # ```
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001715 &quot;userMention&quot;: { # Annotation metadata for user mentions (@). # The metadata of user mention.
1716 &quot;user&quot;: { # A user in Hangouts Chat. # The user mentioned.
1717 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the format &quot;users/*&quot;.
1718 &quot;displayName&quot;: &quot;A String&quot;, # The user&#x27;s display name.
1719 &quot;type&quot;: &quot;A String&quot;, # User type.
1720 &quot;domainId&quot;: &quot;A String&quot;, # Obfuscated domain information.
1721 },
1722 &quot;type&quot;: &quot;A String&quot;, # The type of user mention.
1723 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001724 &quot;type&quot;: &quot;A String&quot;, # The type of this annotation.
1725 &quot;length&quot;: 42, # Length of the substring in the plain-text message body this annotation
1726 # corresponds to.
1727 &quot;startIndex&quot;: 42, # Start index (0-based, inclusive) in the plain-text message body this
1728 # annotation corresponds to.
Bu Sun Kim65020912020-05-20 12:08:20 -07001729 },
1730 ],
1731 &quot;name&quot;: &quot;A String&quot;, # Resource name, in the form &quot;spaces/*/messages/*&quot;.
1732 #
1733 # Example: spaces/AAAAMpdlehY/messages/UMxbHmzDlr4.UMxbHmzDlr4
1734 &quot;previewText&quot;: &quot;A String&quot;, # Text for generating preview chips. This text will not be displayed to the
1735 # user, but any links to images, web pages, videos, etc. included here will
1736 # generate preview chips.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001737 &quot;text&quot;: &quot;A String&quot;, # Plain-text body of the message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001738 &quot;space&quot;: { # A room or DM in Hangouts Chat. # The space the message belongs to.
Bu Sun Kim65020912020-05-20 12:08:20 -07001739 &quot;name&quot;: &quot;A String&quot;, # Resource name of the space, in the form &quot;spaces/*&quot;.
1740 #
1741 # Example: spaces/AAAAMpdlehYs
1742 &quot;threaded&quot;: True or False, # Whether the messages are threaded in this space.
1743 &quot;displayName&quot;: &quot;A String&quot;, # Output only. The display name (only if the space is a room).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001744 &quot;type&quot;: &quot;A String&quot;, # Output only. The type of a space.
1745 # This is deprecated. Use `single_user_bot_dm` instead.
1746 &quot;singleUserBotDm&quot;: True or False, # Whether the space is a DM between a bot and a single human.
Bu Sun Kim65020912020-05-20 12:08:20 -07001747 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001748 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001749</div>
1750
1751</body></html>