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