blob: 01e0e5a61318bc592e6ea1ed8d31b6a413e6dd96 [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.messages.html">messages</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="gmail_v1.users.messages.attachments.html">attachments()</a></code>
79</p>
80<p class="firstline">Returns the attachments Resource.</p>
81
82<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070083 <code><a href="#batchDelete">batchDelete(userId, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084<p class="firstline">Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.</p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070085<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070086 <code><a href="#batchModify">batchModify(userId, body=None, x__xgafv=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080087<p class="firstline">Modifies the labels on the specified messages.</p>
88<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070089 <code><a href="#close">close()</a></code></p>
90<p class="firstline">Close httplib2 connections.</p>
Craig Citro065b5302014-08-14 00:47:23 -070091<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070092 <code><a href="#delete">delete(userId, id, x__xgafv=None)</a></code></p>
93<p class="firstline">Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer `messages.trash` instead.</p>
94<p class="toc_element">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080095 <code><a href="#get">get(userId, id, metadataHeaders=None, format=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070096<p class="firstline">Gets the specified message.</p>
97<p class="toc_element">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -080098 <code><a href="#import_">import_(userId, body=None, deleted=None, processForCalendar=None, internalDateSource=None, neverMarkSpam=None, x__xgafv=None, media_body=None, media_mime_type=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070099<p class="firstline">Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message. Note: This function doesn't trigger forwarding rules or filters set up by the user.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700100<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700101 <code><a href="#insert">insert(userId, body=None, deleted=None, internalDateSource=None, x__xgafv=None, media_body=None, media_mime_type=None)</a></code></p>
102<p class="firstline">Directly inserts a message into only this user's mailbox similar to `IMAP APPEND`, bypassing most scanning and classification. Does not send a message.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700103<p class="toc_element">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800104 <code><a href="#list">list(userId, q=None, pageToken=None, labelIds=None, maxResults=None, includeSpamTrash=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700105<p class="firstline">Lists the messages in the user's mailbox.</p>
106<p class="toc_element">
107 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
108<p class="firstline">Retrieves the next page of results.</p>
109<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700110 <code><a href="#modify">modify(userId, id, body=None, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700111<p class="firstline">Modifies the labels on the specified message.</p>
112<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700113 <code><a href="#send">send(userId, body=None, x__xgafv=None, media_body=None, media_mime_type=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114<p class="firstline">Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700115<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700116 <code><a href="#trash">trash(userId, id, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700117<p class="firstline">Moves the specified message to the trash.</p>
118<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700119 <code><a href="#untrash">untrash(userId, id, x__xgafv=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700120<p class="firstline">Removes the specified message from the trash.</p>
121<h3>Method Details</h3>
122<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700123 <code class="details" id="batchDelete">batchDelete(userId, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700124 <pre>Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700125
126Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700127 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700128 body: object, The request body.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700129 The object takes the form of:
130
131{
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 &quot;ids&quot;: [ # The IDs of the messages to delete.
133 &quot;A String&quot;,
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700134 ],
135 }
136
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700137 x__xgafv: string, V1 error format.
138 Allowed values
139 1 - v1 error format
140 2 - v2 error format
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700141</pre>
142</div>
143
144<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700145 <code class="details" id="batchModify">batchModify(userId, body=None, x__xgafv=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800146 <pre>Modifies the labels on the specified messages.
147
148Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700149 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800151 The object takes the form of:
152
153{
Bu Sun Kim65020912020-05-20 12:08:20 -0700154 &quot;addLabelIds&quot;: [ # A list of label IDs to add to messages.
155 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800156 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700157 &quot;removeLabelIds&quot;: [ # A list of label IDs to remove from messages.
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800159 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700160 &quot;ids&quot;: [ # The IDs of the messages to modify. There is a limit of 1000 ids per request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 &quot;A String&quot;,
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800162 ],
163 }
164
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700165 x__xgafv: string, V1 error format.
166 Allowed values
167 1 - v1 error format
168 2 - v2 error format
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800169</pre>
170</div>
171
172<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700173 <code class="details" id="close">close()</code>
174 <pre>Close httplib2 connections.</pre>
175</div>
176
177<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700178 <code class="details" id="delete">delete(userId, id, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700179 <pre>Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer `messages.trash` instead.
Craig Citro065b5302014-08-14 00:47:23 -0700180
181Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700182 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 -0700183 id: string, The ID of the message to delete. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700184 x__xgafv: string, V1 error format.
185 Allowed values
186 1 - v1 error format
187 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700188</pre>
189</div>
190
191<div class="method">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800192 <code class="details" id="get">get(userId, id, metadataHeaders=None, format=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700193 <pre>Gets the specified message.
194
195Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700196 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 -0700197 id: string, The ID of the message to retrieve. (required)
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800198 metadataHeaders: string, When given and format is `METADATA`, only include headers specified. (repeated)
Craig Citro065b5302014-08-14 00:47:23 -0700199 format: string, The format to return the message in.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700200 Allowed values
201 minimal - Returns only email message ID and labels; does not return the email headers, body, or payload.
202 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.
203 raw - Returns the full email message data with body content in the `raw` field as a base64url encoded string; the `payload` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.
204 metadata - Returns only email message ID, labels, and email headers.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700205 x__xgafv: string, V1 error format.
206 Allowed values
207 1 - v1 error format
208 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700209
210Returns:
211 An object of the form:
212
213 { # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800214 &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.
215 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700216 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800217 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700218 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700219 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700220 &quot;A String&quot;,
221 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800222 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700223 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700224 &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.
225 # Object with schema name: MessagePart
226 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700227 &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`.
228 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700229 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800230 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700231 },
232 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800233 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
234 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700235 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
236 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800237 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700238 &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.
239 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
240 },
241 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700242 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700243 }</pre>
244</div>
245
246<div class="method">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800247 <code class="details" id="import_">import_(userId, body=None, deleted=None, processForCalendar=None, internalDateSource=None, neverMarkSpam=None, x__xgafv=None, media_body=None, media_mime_type=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700248 <pre>Imports a message into only this user&#x27;s mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. Does not send a message. Note: This function doesn&#x27;t trigger forwarding rules or filters set up by the user.
Craig Citro065b5302014-08-14 00:47:23 -0700249
250Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700251 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 -0700252 body: object, The request body.
253 The object takes the form of:
254
255{ # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800256 &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.
257 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700258 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800259 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700261 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700262 &quot;A String&quot;,
263 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800264 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700265 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700266 &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.
267 # Object with schema name: MessagePart
268 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700269 &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`.
270 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700271 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800272 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700273 },
274 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800275 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
276 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700277 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
278 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800279 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700280 &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.
281 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
282 },
283 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700284 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700285}
286
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700287 deleted: boolean, Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800288 processForCalendar: boolean, Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.
Bu Sun Kim65020912020-05-20 12:08:20 -0700289 internalDateSource: string, Source for Gmail&#x27;s internal date of the message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700290 Allowed values
291 receivedTime - Internal message date set to current time when received by Gmail.
292 dateHeader - Internal message time based on &#x27;Date&#x27; header in email, when valid.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800293 neverMarkSpam: boolean, Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700294 x__xgafv: string, V1 error format.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700295 Allowed values
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700296 1 - v1 error format
297 2 - v2 error format
Dan O'Mearadd494642020-05-01 07:42:23 -0700298 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800299 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Craig Citro065b5302014-08-14 00:47:23 -0700300
301Returns:
302 An object of the form:
303
304 { # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800305 &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.
306 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700307 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800308 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700310 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700311 &quot;A String&quot;,
312 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800313 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700314 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700315 &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.
316 # Object with schema name: MessagePart
317 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700318 &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`.
319 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700320 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800321 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700322 },
323 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800324 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
325 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700326 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
327 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800328 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700329 &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.
330 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
331 },
332 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700333 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700334 }</pre>
335</div>
336
337<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700338 <code class="details" id="insert">insert(userId, body=None, deleted=None, internalDateSource=None, x__xgafv=None, media_body=None, media_mime_type=None)</code>
339 <pre>Directly inserts a message into only this user&#x27;s mailbox similar to `IMAP APPEND`, bypassing most scanning and classification. Does not send a message.
Craig Citro065b5302014-08-14 00:47:23 -0700340
341Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700342 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 body: object, The request body.
344 The object takes the form of:
345
346{ # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800347 &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.
348 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700349 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800350 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700351 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700352 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700353 &quot;A String&quot;,
354 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800355 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700356 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700357 &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.
358 # Object with schema name: MessagePart
359 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700360 &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`.
361 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700362 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800363 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700364 },
365 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800366 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
367 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700368 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
369 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800370 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700371 &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.
372 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
373 },
374 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700375 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700376}
377
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700378 deleted: boolean, Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 internalDateSource: string, Source for Gmail&#x27;s internal date of the message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700380 Allowed values
381 receivedTime - Internal message date set to current time when received by Gmail.
382 dateHeader - Internal message time based on &#x27;Date&#x27; header in email, when valid.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700383 x__xgafv: string, V1 error format.
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 Allowed values
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700385 1 - v1 error format
386 2 - v2 error format
Bu Sun Kim65020912020-05-20 12:08:20 -0700387 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
388 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
389
390Returns:
391 An object of the form:
392
393 { # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800394 &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.
395 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700396 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800397 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700398 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700399 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700400 &quot;A String&quot;,
401 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800402 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700403 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700404 &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.
405 # Object with schema name: MessagePart
406 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700407 &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`.
408 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700409 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800410 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700411 },
412 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800413 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
414 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700415 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
416 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800417 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700418 &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.
419 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
420 },
421 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700422 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700423 }</pre>
424</div>
425
426<div class="method">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800427 <code class="details" id="list">list(userId, q=None, pageToken=None, labelIds=None, maxResults=None, includeSpamTrash=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 <pre>Lists the messages in the user&#x27;s mailbox.
429
430Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700431 userId: string, The user&#x27;s email address. The special value `me` can be used to indicate the authenticated user. (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700432 q: string, Only return messages 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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800433 pageToken: string, Page token to retrieve a specific page of results in the list.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700434 labelIds: string, Only return messages with labels that match all of the specified label IDs. (repeated)
435 maxResults: integer, Maximum number of messages to return.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800436 includeSpamTrash: boolean, Include messages from `SPAM` and `TRASH` in the results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700437 x__xgafv: string, V1 error format.
438 Allowed values
439 1 - v1 error format
440 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700441
442Returns:
443 An object of the form:
444
445 {
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700446 &quot;messages&quot;: [ # List of messages. Note that each message resource contains only an `id` and a `threadId`. Additional message details can be fetched using the messages.get method.
Craig Citro065b5302014-08-14 00:47:23 -0700447 { # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800448 &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.
449 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700450 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800451 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700452 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700453 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700454 &quot;A String&quot;,
455 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800456 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700457 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700458 &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.
459 # Object with schema name: MessagePart
460 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700461 &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`.
462 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700463 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800464 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700465 },
466 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800467 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
468 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700469 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
470 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800471 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700472 &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.
473 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
474 },
475 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700476 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700477 },
478 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700479 &quot;resultSizeEstimate&quot;: 42, # Estimated total number of results.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800480 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results in the list.
Craig Citro065b5302014-08-14 00:47:23 -0700481 }</pre>
482</div>
483
484<div class="method">
485 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
486 <pre>Retrieves the next page of results.
487
488Args:
489 previous_request: The request for the previous page. (required)
490 previous_response: The response from the request for the previous page. (required)
491
492Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 A request object that you can call &#x27;execute()&#x27; on to request the next
Craig Citro065b5302014-08-14 00:47:23 -0700494 page. Returns None if there are no more items in the collection.
495 </pre>
496</div>
497
498<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700499 <code class="details" id="modify">modify(userId, id, body=None, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700500 <pre>Modifies the labels on the specified message.
501
502Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700503 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 -0700504 id: string, The ID of the message to modify. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700505 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700506 The object takes the form of:
507
508{
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700509 &quot;removeLabelIds&quot;: [ # A list IDs of labels to remove from this message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &quot;A String&quot;,
Craig Citro065b5302014-08-14 00:47:23 -0700511 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700512 &quot;addLabelIds&quot;: [ # A list of IDs of labels to add to this message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700513 &quot;A String&quot;,
Craig Citro065b5302014-08-14 00:47:23 -0700514 ],
515 }
516
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700517 x__xgafv: string, V1 error format.
518 Allowed values
519 1 - v1 error format
520 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700521
522Returns:
523 An object of the form:
524
525 { # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800526 &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.
527 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700528 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800529 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700530 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700531 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700532 &quot;A String&quot;,
533 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800534 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700535 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700536 &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.
537 # Object with schema name: MessagePart
538 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700539 &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`.
540 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700541 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800542 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700543 },
544 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800545 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
546 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700547 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
548 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800549 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700550 &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.
551 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
552 },
553 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700554 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700555 }</pre>
556</div>
557
558<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700559 <code class="details" id="send">send(userId, body=None, x__xgafv=None, media_body=None, media_mime_type=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700560 <pre>Sends the specified message to the recipients in the `To`, `Cc`, and `Bcc` headers.
Craig Citro065b5302014-08-14 00:47:23 -0700561
562Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700563 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 -0700564 body: object, The request body.
565 The object takes the form of:
566
567{ # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800568 &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.
569 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700570 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800571 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700572 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700573 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700574 &quot;A String&quot;,
575 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800576 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700577 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700578 &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.
579 # Object with schema name: MessagePart
580 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700581 &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`.
582 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700583 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800584 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700585 },
586 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800587 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
588 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700589 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
590 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800591 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700592 &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.
593 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
594 },
595 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700596 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700597}
598
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700599 x__xgafv: string, V1 error format.
600 Allowed values
601 1 - v1 error format
602 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700603 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800604 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Craig Citro065b5302014-08-14 00:47:23 -0700605
606Returns:
607 An object of the form:
608
609 { # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800610 &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.
611 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700612 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800613 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700614 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700615 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700616 &quot;A String&quot;,
617 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800618 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700619 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700620 &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.
621 # Object with schema name: MessagePart
622 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700623 &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`.
624 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700625 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800626 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700627 },
628 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800629 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
630 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700631 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
632 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800633 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700634 &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.
635 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
636 },
637 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700638 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700639 }</pre>
640</div>
641
642<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700643 <code class="details" id="trash">trash(userId, id, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700644 <pre>Moves the specified message to the trash.
645
646Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700647 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 -0700648 id: string, The ID of the message to Trash. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700649 x__xgafv: string, V1 error format.
650 Allowed values
651 1 - v1 error format
652 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700653
654Returns:
655 An object of the form:
656
657 { # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800658 &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.
659 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700660 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800661 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700662 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700663 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700664 &quot;A String&quot;,
665 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800666 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700667 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700668 &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.
669 # Object with schema name: MessagePart
670 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700671 &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`.
672 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700673 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800674 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700675 },
676 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800677 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
678 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700679 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
680 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800681 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700682 &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.
683 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
684 },
685 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700686 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700687 }</pre>
688</div>
689
690<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700691 <code class="details" id="untrash">untrash(userId, id, x__xgafv=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700692 <pre>Removes the specified message from the trash.
693
694Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700695 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 -0700696 id: string, The ID of the message to remove from Trash. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700697 x__xgafv: string, V1 error format.
698 Allowed values
699 1 - v1 error format
700 2 - v2 error format
Craig Citro065b5302014-08-14 00:47:23 -0700701
702Returns:
703 An object of the form:
704
705 { # An email message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800706 &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.
707 &quot;id&quot;: &quot;A String&quot;, # The immutable ID of the message.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700708 &quot;sizeEstimate&quot;: 42, # Estimated size in bytes of the message.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800709 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700710 &quot;snippet&quot;: &quot;A String&quot;, # A short part of the message text.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700711 &quot;labelIds&quot;: [ # List of IDs of labels applied to this message.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700712 &quot;A String&quot;,
713 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800714 &quot;historyId&quot;: &quot;A String&quot;, # The ID of the last history record that modified this message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700715 &quot;payload&quot;: { # A single MIME message part. # The parsed email structure in the message parts.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700716 &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.
717 # Object with schema name: MessagePart
718 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700719 &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`.
720 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700721 &quot;value&quot;: &quot;A String&quot;, # The value of the header after the `:` separator. For example, `someuser@example.com`.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800722 &quot;name&quot;: &quot;A String&quot;, # The name of the header before the `:` separator. For example, `To`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700723 },
724 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800725 &quot;partId&quot;: &quot;A String&quot;, # The immutable ID of the message part.
726 &quot;mimeType&quot;: &quot;A String&quot;, # The MIME type of the message part.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700727 &quot;filename&quot;: &quot;A String&quot;, # The filename of the attachment. Only present if this message part represents an attachment.
728 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800729 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700730 &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.
731 &quot;size&quot;: 42, # Number of bytes for the message part data (encoding notwithstanding).
732 },
733 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700734 &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.
Craig Citro065b5302014-08-14 00:47:23 -0700735 }</pre>
736</div>
737
738</body></html>