blob: 64f03fe96d4143ee2b94287ce408b8f9c19bf019 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -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="gmail_v1.html">Gmail API</a> . <a href="gmail_v1.users.html">users</a> . <a href="gmail_v1.users.threads.html">threads</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070081 <code><a href="#delete">delete(userId, id, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070082<p class="firstline">Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer `threads.trash` instead.</p>
Craig Citro065b5302014-08-14 00:47:23 -070083<p class="toc_element">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -080084 <code><a href="#get">get(userId, id, format=None, metadataHeaders=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070085<p class="firstline">Gets the specified thread.</p>
86<p class="toc_element">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -080087 <code><a href="#list">list(userId, includeSpamTrash=None, labelIds=None, maxResults=None, pageToken=None, q=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070088<p class="firstline">Lists the threads in the user's mailbox.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070093 <code><a href="#modify">modify(userId, id, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070094<p class="firstline">Modifies the labels applied to the thread. This applies to all messages in the thread.</p>
Craig Citro065b5302014-08-14 00:47:23 -070095<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070096 <code><a href="#trash">trash(userId, id, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070097<p class="firstline">Moves the specified thread to the trash.</p>
98<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070099 <code><a href="#untrash">untrash(userId, id, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700100<p class="firstline">Removes the specified thread from the trash.</p>
101<h3>Method Details</h3>
102<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <code class="details" id="close">close()</code>
104 <pre>Close httplib2 connections.</pre>
105</div>
106
107<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700108 <code class="details" id="delete">delete(userId, id, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700109 <pre>Immediately and permanently deletes the specified thread. This operation cannot be undone. Prefer `threads.trash` instead.
Craig Citro065b5302014-08-14 00:47:23 -0700110
111Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700112 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700113 id: string, ID of the Thread to delete. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700114 x__xgafv: string, V1 error format.
115 Allowed values
116 1 - v1 error format
117 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700118</pre>
119</div>
120
121<div class="method">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800122 <code class="details" id="get">get(userId, id, format=None, metadataHeaders=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700123 <pre>Gets the specified thread.
124
125Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700126 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700127 id: string, The ID of the thread to retrieve. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800128 format: string, The format to return the messages in.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700129 Allowed values
130 full - Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.
131 metadata - Returns only email message IDs, labels, and email headers.
132 minimal - Returns only email message IDs and labels; does not return the email headers, body, or payload.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800133 metadataHeaders: string, When given and format is METADATA, only include headers specified. (repeated)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700134 x__xgafv: string, V1 error format.
135 Allowed values
136 1 - v1 error format
137 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700138
139Returns:
140 An object of the form:
141
142 { # A collection of messages representing a conversation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800143 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this thread.
144 &quot;id&quot;: &quot;A String&quot;, # The unique ID of the thread.
145 &quot;messages&quot;: [ # The list of messages in the thread.
146 { # An email message.
147 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
148 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
149 &quot;internalDate&quot;: &quot;A String&quot;, # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the `Date` header. However, for API-migrated mail, it can be configured by client to be based on the `Date` header.
150 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
151 &quot;A String&quot;,
152 ],
153 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
154 &quot;body&quot;: { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
155 &quot;attachmentId&quot;: &quot;A String&quot;, # When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field.
156 &quot;data&quot;: &quot;A String&quot;, # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
157 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800158 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800159 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
160 &quot;headers&quot;: [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as `To`, `From`, and `Subject`.
161 {
162 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
163 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
164 },
165 ],
166 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
167 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
168 &quot;parts&quot;: [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example `multipart/*`. For non- container MIME message part types, such as `text/plain`, this field is empty. For more information, see RFC 1521.
169 # Object with schema name: MessagePart
170 ],
Craig Citro065b5302014-08-14 00:47:23 -0700171 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800172 &quot;raw&quot;: &quot;A String&quot;, # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in `messages.get` and `drafts.get` responses when the `format=RAW` parameter is supplied.
173 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
174 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
175 &quot;threadId&quot;: &quot;A String&quot;, # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested `threadId` must be specified on the `Message` or `Draft.Message` you supply with your request. 2. The `References` and `In-Reply-To` headers must be set in compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822) standard. 3. The `Subject` headers must match.
176 },
177 ],
178 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
179}</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700180</div>
181
182<div class="method">
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800183 <code class="details" id="list">list(userId, includeSpamTrash=None, labelIds=None, maxResults=None, pageToken=None, q=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 <pre>Lists the threads in the user&#x27;s mailbox.
Craig Citro065b5302014-08-14 00:47:23 -0700185
186Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700187 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800188 includeSpamTrash: boolean, Include threads from `SPAM` and `TRASH` in the results.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800189 labelIds: string, Only return threads with labels that match all of the specified label IDs. (repeated)
yoshi-code-bot04bafe12021-06-29 00:20:25 -0700190 maxResults: integer, Maximum number of threads to return. This field defaults to 100. The maximum allowed value for this field is 500.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800191 pageToken: string, Page token to retrieve a specific page of results in the list.
192 q: string, Only return threads matching the specified query. Supports the same query format as the Gmail search box. For example, `&quot;from:someuser@example.com rfc822msgid: is:unread&quot;`. Parameter cannot be used when accessing the api using the gmail.metadata scope.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700193 x__xgafv: string, V1 error format.
194 Allowed values
195 1 - v1 error format
196 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700197
198Returns:
199 An object of the form:
200
201 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800202 &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token to retrieve the next page of results in the list.
203 &quot;resultSizeEstimate&quot;: 42, # Estimated total number of results.
204 &quot;threads&quot;: [ # List of threads. Note that each thread resource does not contain a list of `messages`. The list of `messages` for a given thread can be fetched using the threads.get method.
205 { # A collection of messages representing a conversation.
206 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this thread.
207 &quot;id&quot;: &quot;A String&quot;, # The unique ID of the thread.
208 &quot;messages&quot;: [ # The list of messages in the thread.
209 { # An email message.
210 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
211 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
212 &quot;internalDate&quot;: &quot;A String&quot;, # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the `Date` header. However, for API-migrated mail, it can be configured by client to be based on the `Date` header.
213 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
214 &quot;A String&quot;,
215 ],
216 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
217 &quot;body&quot;: { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
218 &quot;attachmentId&quot;: &quot;A String&quot;, # When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field.
219 &quot;data&quot;: &quot;A String&quot;, # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
220 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800221 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800222 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
223 &quot;headers&quot;: [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as `To`, `From`, and `Subject`.
224 {
225 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
226 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
227 },
228 ],
229 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
230 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
231 &quot;parts&quot;: [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example `multipart/*`. For non- container MIME message part types, such as `text/plain`, this field is empty. For more information, see RFC 1521.
232 # Object with schema name: MessagePart
233 ],
Craig Citro065b5302014-08-14 00:47:23 -0700234 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800235 &quot;raw&quot;: &quot;A String&quot;, # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in `messages.get` and `drafts.get` responses when the `format=RAW` parameter is supplied.
236 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
237 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
238 &quot;threadId&quot;: &quot;A String&quot;, # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested `threadId` must be specified on the `Message` or `Draft.Message` you supply with your request. 2. The `References` and `In-Reply-To` headers must be set in compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822) standard. 3. The `Subject` headers must match.
239 },
240 ],
241 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
242 },
243 ],
244}</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700245</div>
246
247<div class="method">
248 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
249 <pre>Retrieves the next page of results.
250
251Args:
252 previous_request: The request for the previous page. (required)
253 previous_response: The response from the request for the previous page. (required)
254
255Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700256 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citro065b5302014-08-14 00:47:23 -0700257 page. Returns None if there are no more items in the collection.
258 </pre>
259</div>
260
261<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700262 <code class="details" id="modify">modify(userId, id, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700263 <pre>Modifies the labels applied to the thread. This applies to all messages in the thread.
Craig Citro065b5302014-08-14 00:47:23 -0700264
265Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700266 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700267 id: string, The ID of the thread to modify. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700268 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700269 The object takes the form of:
270
271{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800272 &quot;addLabelIds&quot;: [ # A list of IDs of labels to add to this thread.
273 &quot;A String&quot;,
274 ],
275 &quot;removeLabelIds&quot;: [ # A list of IDs of labels to remove from this thread.
276 &quot;A String&quot;,
277 ],
278}
Craig Citro065b5302014-08-14 00:47:23 -0700279
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700280 x__xgafv: string, V1 error format.
281 Allowed values
282 1 - v1 error format
283 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700284
285Returns:
286 An object of the form:
287
288 { # A collection of messages representing a conversation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800289 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this thread.
290 &quot;id&quot;: &quot;A String&quot;, # The unique ID of the thread.
291 &quot;messages&quot;: [ # The list of messages in the thread.
292 { # An email message.
293 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
294 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
295 &quot;internalDate&quot;: &quot;A String&quot;, # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the `Date` header. However, for API-migrated mail, it can be configured by client to be based on the `Date` header.
296 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
297 &quot;A String&quot;,
298 ],
299 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
300 &quot;body&quot;: { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
301 &quot;attachmentId&quot;: &quot;A String&quot;, # When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field.
302 &quot;data&quot;: &quot;A String&quot;, # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
303 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800304 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800305 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
306 &quot;headers&quot;: [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as `To`, `From`, and `Subject`.
307 {
308 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
309 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
310 },
311 ],
312 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
313 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
314 &quot;parts&quot;: [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example `multipart/*`. For non- container MIME message part types, such as `text/plain`, this field is empty. For more information, see RFC 1521.
315 # Object with schema name: MessagePart
316 ],
Craig Citro065b5302014-08-14 00:47:23 -0700317 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800318 &quot;raw&quot;: &quot;A String&quot;, # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in `messages.get` and `drafts.get` responses when the `format=RAW` parameter is supplied.
319 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
320 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
321 &quot;threadId&quot;: &quot;A String&quot;, # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested `threadId` must be specified on the `Message` or `Draft.Message` you supply with your request. 2. The `References` and `In-Reply-To` headers must be set in compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822) standard. 3. The `Subject` headers must match.
322 },
323 ],
324 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
325}</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700326</div>
327
328<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700329 <code class="details" id="trash">trash(userId, id, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700330 <pre>Moves the specified thread to the trash.
331
332Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700333 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700334 id: string, The ID of the thread to Trash. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700335 x__xgafv: string, V1 error format.
336 Allowed values
337 1 - v1 error format
338 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700339
340Returns:
341 An object of the form:
342
343 { # A collection of messages representing a conversation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800344 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this thread.
345 &quot;id&quot;: &quot;A String&quot;, # The unique ID of the thread.
346 &quot;messages&quot;: [ # The list of messages in the thread.
347 { # An email message.
348 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
349 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
350 &quot;internalDate&quot;: &quot;A String&quot;, # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the `Date` header. However, for API-migrated mail, it can be configured by client to be based on the `Date` header.
351 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
352 &quot;A String&quot;,
353 ],
354 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
355 &quot;body&quot;: { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
356 &quot;attachmentId&quot;: &quot;A String&quot;, # When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field.
357 &quot;data&quot;: &quot;A String&quot;, # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
358 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800359 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800360 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
361 &quot;headers&quot;: [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as `To`, `From`, and `Subject`.
362 {
363 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
364 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
365 },
366 ],
367 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
368 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
369 &quot;parts&quot;: [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example `multipart/*`. For non- container MIME message part types, such as `text/plain`, this field is empty. For more information, see RFC 1521.
370 # Object with schema name: MessagePart
371 ],
Craig Citro065b5302014-08-14 00:47:23 -0700372 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800373 &quot;raw&quot;: &quot;A String&quot;, # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in `messages.get` and `drafts.get` responses when the `format=RAW` parameter is supplied.
374 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
375 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
376 &quot;threadId&quot;: &quot;A String&quot;, # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested `threadId` must be specified on the `Message` or `Draft.Message` you supply with your request. 2. The `References` and `In-Reply-To` headers must be set in compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822) standard. 3. The `Subject` headers must match.
377 },
378 ],
379 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
380}</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700381</div>
382
383<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700384 <code class="details" id="untrash">untrash(userId, id, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700385 <pre>Removes the specified thread from the trash.
386
387Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700388 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700389 id: string, The ID of the thread to remove from Trash. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700390 x__xgafv: string, V1 error format.
391 Allowed values
392 1 - v1 error format
393 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700394
395Returns:
396 An object of the form:
397
398 { # A collection of messages representing a conversation.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800399 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this thread.
400 &quot;id&quot;: &quot;A String&quot;, # The unique ID of the thread.
401 &quot;messages&quot;: [ # The list of messages in the thread.
402 { # An email message.
403 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
404 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
405 &quot;internalDate&quot;: &quot;A String&quot;, # The internal message creation timestamp (epoch ms), which determines ordering in the inbox. For normal SMTP-received email, this represents the time the message was originally accepted by Google, which is more reliable than the `Date` header. However, for API-migrated mail, it can be configured by client to be based on the `Date` header.
406 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
407 &quot;A String&quot;,
408 ],
409 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
410 &quot;body&quot;: { # The body of a single MIME message part. # The message part body for this part, which may be empty for container MIME message parts.
411 &quot;attachmentId&quot;: &quot;A String&quot;, # When present, contains the ID of an external attachment that can be retrieved in a separate `messages.attachments.get` request. When not present, the entire content of the message part body is contained in the data field.
412 &quot;data&quot;: &quot;A String&quot;, # The body data of a MIME message part as a base64url encoded string. May be empty for MIME container types that have no message body or when the body data is sent as a separate attachment. An attachment ID is present if the body data is contained in a separate attachment.
413 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800414 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800415 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
416 &quot;headers&quot;: [ # List of headers on this message part. For the top-level message part, representing the entire message payload, it will contain the standard RFC 2822 email headers such as `To`, `From`, and `Subject`.
417 {
418 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
419 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
420 },
421 ],
422 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
423 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
424 &quot;parts&quot;: [ # The child MIME message parts of this part. This only applies to container MIME message parts, for example `multipart/*`. For non- container MIME message part types, such as `text/plain`, this field is empty. For more information, see RFC 1521.
425 # Object with schema name: MessagePart
426 ],
Craig Citro065b5302014-08-14 00:47:23 -0700427 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800428 &quot;raw&quot;: &quot;A String&quot;, # The entire email message in an RFC 2822 formatted and base64url encoded string. Returned in `messages.get` and `drafts.get` responses when the `format=RAW` parameter is supplied.
429 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
430 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
431 &quot;threadId&quot;: &quot;A String&quot;, # The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: 1. The requested `threadId` must be specified on the `Message` or `Draft.Message` you supply with your request. 2. The `References` and `In-Reply-To` headers must be set in compliance with the [RFC 2822](https://tools.ietf.org/html/rfc2822) standard. 3. The `Subject` headers must match.
432 },
433 ],
434 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
435}</pre>
Craig Citro065b5302014-08-14 00:47:23 -0700436</div>
437
438</body></html>