/** * Gets IMAP settings. * * Create a request for the method "settings.getImap". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link GetImap#execute()} method to invoke the remote operation. * * @param userId User's email address. The special value "me" can be used to indicate the authenticated user. * [default: me] * @return the request */ public GetImap getImap(java.lang.String userId) throws java.io.IOException { GetImap result = new GetImap(userId); initialize(result); return result; }
/** * Gets vacation responder settings. * * Create a request for the method "settings.getVacation". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link GetVacation#execute()} method to invoke the remote operation. * * @param userId User's email address. The special value "me" can be used to indicate the authenticated user. * [default: me] * @return the request */ public GetVacation getVacation(java.lang.String userId) throws java.io.IOException { GetVacation result = new GetVacation(userId); initialize(result); return result; }
/** * Stop receiving push notifications for the given user mailbox. * * Create a request for the method "users.stop". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link Stop#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @return the request */ public Stop stop(java.lang.String userId) throws java.io.IOException { Stop result = new Stop(userId); initialize(result); return result; }
/** * 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 {@link List#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @return the request */ public List list(java.lang.String userId) throws java.io.IOException { List result = new List(userId); initialize(result); return result; }
/** * 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 {@link Delete#execute()} method to invoke the remote operation. * * @param 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 delete. * @return the request */ public Delete delete(java.lang.String userId, java.lang.String id) throws java.io.IOException { Delete result = new Delete(userId, id); initialize(result); return result; }
/** * Creates a new label. * * Create a request for the method "labels.create". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param content the {@link com.google.api.services.gmail.model.Label} * @return the request */ public Create create(java.lang.String userId, com.google.api.services.gmail.model.Label content) throws java.io.IOException { Create result = new Create(userId, content); initialize(result); return result; }
/** * Gets the specified message. * * Create a request for the method "messages.get". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param 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 message to retrieve. * @return the request */ public Get get(java.lang.String userId, java.lang.String id) throws java.io.IOException { Get result = new Get(userId, id); initialize(result); return result; }
/** * Sends the specified message to the recipients in the To, Cc, and Bcc headers. * * Create a request for the method "messages.send". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link Send#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param content the {@link com.google.api.services.gmail.model.Message} * @return the request */ public Send send(java.lang.String userId, com.google.api.services.gmail.model.Message content) throws java.io.IOException { Send result = new Send(userId, content); initialize(result); return result; }
/** * Removes the specified message from the trash. * * Create a request for the method "messages.untrash". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link Untrash#execute()} method to invoke the remote operation. * * @param 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 message to remove from Trash. * @return the request */ public Untrash untrash(java.lang.String userId, java.lang.String id) throws java.io.IOException { Untrash result = new Untrash(userId, id); initialize(result); return result; }
/** * Gets the specified thread. * * Create a request for the method "threads.get". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link Get#execute()} method to invoke the remote operation. * * @param 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 thread to retrieve. * @return the request */ public Get get(java.lang.String userId, java.lang.String id) throws java.io.IOException { Get result = new Get(userId, id); initialize(result); return result; }
/** * 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 {@link Create#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param content the {@link com.google.api.services.gmail.model.Draft} * @return the request */ public Create create(java.lang.String userId, com.google.api.services.gmail.model.Draft content) throws java.io.IOException { Create result = new Create(userId, content); initialize(result); return result; }
/** * Creates a filter. * * Create a request for the method "filters.create". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link Create#execute()} method to invoke the remote operation. * * @param userId User's email address. The special value "me" can be used to indicate the authenticated user. * [default: me] * @param content the {@link com.google.api.services.gmail.model.Filter} * @return the request */ public Create create(java.lang.String userId, com.google.api.services.gmail.model.Filter content) throws java.io.IOException { Create result = new Create(userId, content); initialize(result); return result; }
/** * Deletes a filter. * * Create a request for the method "filters.delete". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link Delete#execute()} method to invoke the remote operation. * * @param userId User's email address. The special value "me" can be used to indicate the authenticated user. * [default: me] * @param id The ID of the filter to be deleted. * @return the request */ public Delete delete(java.lang.String userId, java.lang.String id) throws java.io.IOException { Delete result = new Delete(userId, id); initialize(result); return result; }
/** * Lists S/MIME configs for the specified send-as alias. * * Create a request for the method "smimeInfo.list". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param sendAsEmail The email address that appears in the "From:" header for mail sent using this alias. * @return the request */ public List list(java.lang.String userId, java.lang.String sendAsEmail) throws java.io.IOException { List result = new List(userId, sendAsEmail); initialize(result); return result; }
/** * Gets the current user's Gmail profile. * * Create a request for the method "users.getProfile". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link GetProfile#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @return the request */ public GetProfile getProfile(java.lang.String userId) throws java.io.IOException { GetProfile result = new GetProfile(userId); initialize(result); return result; }
/** * Lists all labels in the user's mailbox. * * Create a request for the method "labels.list". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @return the request */ public List list(java.lang.String userId) throws java.io.IOException { List result = new List(userId); initialize(result); return result; }
/** * Lists the threads in the user's mailbox. * * Create a request for the method "threads.list". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @return the request */ public List list(java.lang.String userId) throws java.io.IOException { List result = new List(userId); initialize(result); return result; }
/** * Sets the default S/MIME config for the specified send-as alias. * * Create a request for the method "smimeInfo.setDefault". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link SetDefault#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param sendAsEmail The email address that appears in the "From:" header for mail sent using this alias. * @param id The immutable ID for the SmimeInfo. * @return the request */ public SetDefault setDefault(java.lang.String userId, java.lang.String sendAsEmail, java.lang.String id) throws java.io.IOException { SetDefault result = new SetDefault(userId, sendAsEmail, id); initialize(result); return result; }
/** * 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. * * Create a request for the method "messages.import". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link GmailImport#execute()} method to invoke the remote operation. * * @param userId The user's email address. The special value me can be used to indicate the authenticated user. * [default: me] * @param content the {@link com.google.api.services.gmail.model.Message} * @return the request */ public GmailImport gmailImport(java.lang.String userId, com.google.api.services.gmail.model.Message content) throws java.io.IOException { GmailImport result = new GmailImport(userId, content); initialize(result); return result; }
/** * Lists the message filters of a Gmail user. * * Create a request for the method "filters.list". * * This request holds the parameters needed by the gmail server. After setting any optional * parameters, call the {@link List#execute()} method to invoke the remote operation. * * @param userId User's email address. The special value "me" can be used to indicate the authenticated user. * [default: me] * @return the request */ public List list(java.lang.String userId) throws java.io.IOException { List result = new List(userId); initialize(result); return result; }