target.apidocs.com.google.api.services.gmail.Gmail.Users.Drafts.html Maven / Gradle / Ivy
Gmail.Users.Drafts (Gmail API v1-rev20230925-2.0.0)
com.google.api.services.gmail
Class Gmail.Users.Drafts
- java.lang.Object
-
- com.google.api.services.gmail.Gmail.Users.Drafts
-
- Enclosing class:
- Gmail.Users
public class Gmail.Users.Drafts
extends Object
The "drafts" collection of methods.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
class
Gmail.Users.Drafts.Create
class
Gmail.Users.Drafts.Delete
class
Gmail.Users.Drafts.Get
class
Gmail.Users.Drafts.List
class
Gmail.Users.Drafts.Send
class
Gmail.Users.Drafts.Update
-
Constructor Summary
Constructors
Constructor and Description
Drafts()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
Gmail.Users.Drafts.Create
create(String userId,
Draft content)
Creates a new draft with the `DRAFT` label.
Gmail.Users.Drafts.Create
create(String userId,
Draft content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Creates a new draft with the `DRAFT` label.
Gmail.Users.Drafts.Delete
delete(String userId,
String id)
Immediately and permanently deletes the specified draft.
Gmail.Users.Drafts.Get
get(String userId,
String id)
Gets the specified draft.
Gmail.Users.Drafts.List
list(String userId)
Lists the drafts in the user's mailbox.
Gmail.Users.Drafts.Send
send(String userId,
Draft content)
Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers.
Gmail.Users.Drafts.Send
send(String userId,
Draft content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers.
Gmail.Users.Drafts.Update
update(String userId,
String id,
Draft content)
Replaces a draft's content.
Gmail.Users.Drafts.Update
update(String userId,
String id,
Draft content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Replaces a draft's content.
-
-
Method Detail
-
create
public Gmail.Users.Drafts.Create create(String userId,
Draft content)
throws IOException
Creates a new draft with the `DRAFT` label.
Create a request for the method "drafts.create".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]
content
- the Draft
- Returns:
- the request
- Throws:
IOException
-
create
public Gmail.Users.Drafts.Create create(String userId,
Draft content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
throws IOException
Creates a new draft with the `DRAFT` label.
Create a request for the method "drafts.create".
This request holds the parameters needed by the the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]
content
- the Draft
media metadata or null
if none
mediaContent
- The media HTTP content.
- Returns:
- the request
- Throws:
IOException
- if the initialization of the request fails
-
delete
public Gmail.Users.Drafts.Delete delete(String userId,
String id)
throws IOException
Immediately and permanently deletes the specified draft. Does not simply trash it.
Create a request for the method "drafts.delete".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]
id
- The ID of the draft to delete.
- Returns:
- the request
- Throws:
IOException
-
get
public Gmail.Users.Drafts.Get get(String userId,
String id)
throws IOException
Gets the specified draft.
Create a request for the method "drafts.get".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]
id
- The ID of the draft to retrieve.
- Returns:
- the request
- Throws:
IOException
-
list
public Gmail.Users.Drafts.List list(String userId)
throws IOException
Lists the drafts in the user's mailbox.
Create a request for the method "drafts.list".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]
- Returns:
- the request
- Throws:
IOException
-
send
public Gmail.Users.Drafts.Send send(String userId,
Draft content)
throws IOException
Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers.
Create a request for the method "drafts.send".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]
content
- the Draft
- Returns:
- the request
- Throws:
IOException
-
send
public Gmail.Users.Drafts.Send send(String userId,
Draft content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
throws IOException
Sends the specified, existing draft to the recipients in the `To`, `Cc`, and `Bcc` headers.
Create a request for the method "drafts.send".
This request holds the parameters needed by the the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]
content
- the Draft
media metadata or null
if none
mediaContent
- The media HTTP content.
- Returns:
- the request
- Throws:
IOException
- if the initialization of the request fails
-
update
public Gmail.Users.Drafts.Update update(String userId,
String id,
Draft content)
throws IOException
Replaces a draft's content.
Create a request for the method "drafts.update".
This request holds the parameters needed by the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]
id
- The ID of the draft to update.
content
- the Draft
- Returns:
- the request
- Throws:
IOException
-
update
public Gmail.Users.Drafts.Update update(String userId,
String id,
Draft content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
throws IOException
Replaces a draft's content.
Create a request for the method "drafts.update".
This request holds the parameters needed by the the gmail server. After setting any optional
parameters, call the AbstractGoogleClientRequest.execute()
method to invoke the remote operation.
This method should be used for uploading media content.
- Parameters:
userId
- The user's email address. The special value `me` can be used to indicate the authenticated user.
[default: me]@param id The ID of the draft to update.
content
- the Draft
media metadata or null
if none
mediaContent
- The media HTTP content.
- Returns:
- the request
- Throws:
IOException
- if the initialization of the request fails
Copyright © 2011–2023 Google. All rights reserved.
© 2015 - 2024 Weber Informatics LLC | Privacy Policy