Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.
See: Gmail API Reference for gmail.users.messages.insert
.
Synopsis
- type UsersMessagesInsertResource = ("gmail" :> ("v1" :> ("users" :> (Capture "userId" Text :> ("messages" :> (QueryParam "deleted" Bool :> (QueryParam "internalDateSource" UsersMessagesInsertInternalDateSource :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Message :> Post '[JSON] Message))))))))) :<|> ("upload" :> ("gmail" :> ("v1" :> ("users" :> (Capture "userId" Text :> ("messages" :> (QueryParam "deleted" Bool :> (QueryParam "internalDateSource" UsersMessagesInsertInternalDateSource :> (QueryParam "alt" AltJSON :> (QueryParam "uploadType" Multipart :> (MultipartRelated '[JSON] Message :> Post '[JSON] Message)))))))))))
- usersMessagesInsert :: Message -> UsersMessagesInsert
- data UsersMessagesInsert
- uPayload :: Lens' UsersMessagesInsert Message
- uUserId :: Lens' UsersMessagesInsert Text
- uDeleted :: Lens' UsersMessagesInsert Bool
- uInternalDateSource :: Lens' UsersMessagesInsert UsersMessagesInsertInternalDateSource
REST Resource
type UsersMessagesInsertResource = ("gmail" :> ("v1" :> ("users" :> (Capture "userId" Text :> ("messages" :> (QueryParam "deleted" Bool :> (QueryParam "internalDateSource" UsersMessagesInsertInternalDateSource :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Message :> Post '[JSON] Message))))))))) :<|> ("upload" :> ("gmail" :> ("v1" :> ("users" :> (Capture "userId" Text :> ("messages" :> (QueryParam "deleted" Bool :> (QueryParam "internalDateSource" UsersMessagesInsertInternalDateSource :> (QueryParam "alt" AltJSON :> (QueryParam "uploadType" Multipart :> (MultipartRelated '[JSON] Message :> Post '[JSON] Message))))))))))) Source #
A resource alias for gmail.users.messages.insert
method which the
UsersMessagesInsert
request conforms to.
Creating a Request
Creates a value of UsersMessagesInsert
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data UsersMessagesInsert Source #
Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. Does not send a message.
See: usersMessagesInsert
smart constructor.
Instances
Request Lenses
uUserId :: Lens' UsersMessagesInsert Text Source #
The user's email address. The special value me can be used to indicate the authenticated user.
uDeleted :: Lens' UsersMessagesInsert Bool Source #
Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for G Suite accounts.
uInternalDateSource :: Lens' UsersMessagesInsert UsersMessagesInsertInternalDateSource Source #
Source for Gmail's internal date of the message.