All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.gmail.Gmail.Users.Drafts.html Maven / Gradle / Ivy

There is a newer version: v1-rev20240520-2.0.0
Show newest version






Gmail.Users.Drafts (Gmail API v1-rev20230925-2.0.0)












com.google.api.services.gmail

Class Gmail.Users.Drafts

  • Enclosing class:
    Gmail.Users


    public class Gmail.Users.Drafts
    extends Object
    The "drafts" collection of methods.
    • Constructor Detail

      • Drafts

        public Drafts()
    • 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