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 |
- Service Configuration
- OAuth Scopes
- BatchDeleteMessagesRequest
- FilterCriteriaSizeComparison
- UsersMessagesGetFormat
- ModifyThreadRequest
- ListFiltersResponse
- ModifyMessageRequest
- ListForwardingAddressesResponse
- PopSettings
- PopSettingsAccessWindow
- History
- ForwardingAddressVerificationStatus
- FilterCriteria
- ProFile
- AutoForwardingDisPosition
- MessagePartHeader
- SendAsVerificationStatus
- ListHistoryResponse
- SendAs
- LabelType
- UsersDraftsGetFormat
- UsersMessagesImportInternalDateSource
- LabelMessageListVisibility
- ListThreadsResponse
- MessagePart
- HistoryLabelAdded
- ListLabelsResponse
- VacationSettings
- LabelLabelListVisibility
- HistoryMessageDeleted
- MessagePartBody
- AutoForwarding
- ListDraftsResponse
- ListSendAsResponse
- WatchResponse
- UsersThreadsGetFormat
- BatchModifyMessagesRequest
- Draft
- SmtpMsa
- ForwardingAddress
- PopSettingsDisPosition
- Filter
- WatchRequest
- WatchRequestLabelFilterAction
- ImapSettings
- ImapSettingsExpungeBehavior
- SmtpMsaSecurityMode
- Message
- UsersMessagesInsertInternalDateSource
- HistoryLabelRemoved
- Thread
- FilterAction
- Label
- ListMessagesResponse
- HistoryMessageAdded
- gmailService :: ServiceConfig
- gmailSettingsBasicScope :: Proxy '["https://www.googleapis.com/auth/gmail.settings.basic"]
- mailGoogleComScope :: Proxy '["https://mail.google.com/"]
- gmailModifyScope :: Proxy '["https://www.googleapis.com/auth/gmail.modify"]
- gmailMetadataScope :: Proxy '["https://www.googleapis.com/auth/gmail.metadata"]
- gmailLabelsScope :: Proxy '["https://www.googleapis.com/auth/gmail.labels"]
- gmailSettingsSharingScope :: Proxy '["https://www.googleapis.com/auth/gmail.settings.sharing"]
- gmailSendScope :: Proxy '["https://www.googleapis.com/auth/gmail.send"]
- gmailInsertScope :: Proxy '["https://www.googleapis.com/auth/gmail.insert"]
- gmailComposeScope :: Proxy '["https://www.googleapis.com/auth/gmail.compose"]
- gmailReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/gmail.readonly"]
- data BatchDeleteMessagesRequest
- batchDeleteMessagesRequest :: BatchDeleteMessagesRequest
- bdmrIds :: Lens' BatchDeleteMessagesRequest [Text]
- data FilterCriteriaSizeComparison
- = Larger
- | Smaller
- | Unspecified
- data UsersMessagesGetFormat
- data ModifyThreadRequest
- modifyThreadRequest :: ModifyThreadRequest
- mtrRemoveLabelIds :: Lens' ModifyThreadRequest [Text]
- mtrAddLabelIds :: Lens' ModifyThreadRequest [Text]
- data ListFiltersResponse
- listFiltersResponse :: ListFiltersResponse
- lfrFilter :: Lens' ListFiltersResponse [Filter]
- data ModifyMessageRequest
- modifyMessageRequest :: ModifyMessageRequest
- mmrRemoveLabelIds :: Lens' ModifyMessageRequest [Text]
- mmrAddLabelIds :: Lens' ModifyMessageRequest [Text]
- data ListForwardingAddressesResponse
- listForwardingAddressesResponse :: ListForwardingAddressesResponse
- lfarForwardingAddresses :: Lens' ListForwardingAddressesResponse [ForwardingAddress]
- data PopSettings
- popSettings :: PopSettings
- psAccessWindow :: Lens' PopSettings (Maybe PopSettingsAccessWindow)
- psDisPosition :: Lens' PopSettings (Maybe PopSettingsDisPosition)
- data PopSettingsAccessWindow
- data History
- history :: History
- hLabelsRemoved :: Lens' History [HistoryLabelRemoved]
- hMessagesDeleted :: Lens' History [HistoryMessageDeleted]
- hMessagesAdded :: Lens' History [HistoryMessageAdded]
- hLabelsAdded :: Lens' History [HistoryLabelAdded]
- hId :: Lens' History (Maybe Word64)
- hMessages :: Lens' History [Message]
- data ForwardingAddressVerificationStatus
- data FilterCriteria
- filterCriteria :: FilterCriteria
- fcSizeComparison :: Lens' FilterCriteria (Maybe FilterCriteriaSizeComparison)
- fcSubject :: Lens' FilterCriteria (Maybe Text)
- fcSize :: Lens' FilterCriteria (Maybe Int32)
- fcExcludeChats :: Lens' FilterCriteria (Maybe Bool)
- fcTo :: Lens' FilterCriteria (Maybe Text)
- fcFrom :: Lens' FilterCriteria (Maybe Text)
- fcQuery :: Lens' FilterCriteria (Maybe Text)
- fcNegatedQuery :: Lens' FilterCriteria (Maybe Text)
- fcHasAttachment :: Lens' FilterCriteria (Maybe Bool)
- data ProFile
- proFile :: ProFile
- pfMessagesTotal :: Lens' ProFile (Maybe Int32)
- pfThreadsTotal :: Lens' ProFile (Maybe Int32)
- pfHistoryId :: Lens' ProFile (Maybe Word64)
- pfEmailAddress :: Lens' ProFile (Maybe Text)
- data AutoForwardingDisPosition
- data MessagePartHeader
- messagePartHeader :: MessagePartHeader
- mphValue :: Lens' MessagePartHeader (Maybe Text)
- mphName :: Lens' MessagePartHeader (Maybe Text)
- data SendAsVerificationStatus
- data ListHistoryResponse
- listHistoryResponse :: ListHistoryResponse
- lhrNextPageToken :: Lens' ListHistoryResponse (Maybe Text)
- lhrHistory :: Lens' ListHistoryResponse [History]
- lhrHistoryId :: Lens' ListHistoryResponse (Maybe Word64)
- data SendAs
- sendAs :: SendAs
- saSignature :: Lens' SendAs (Maybe Text)
- saReplyToAddress :: Lens' SendAs (Maybe Text)
- saTreatAsAlias :: Lens' SendAs (Maybe Bool)
- saSendAsEmail :: Lens' SendAs (Maybe Text)
- saDisplayName :: Lens' SendAs (Maybe Text)
- saVerificationStatus :: Lens' SendAs (Maybe SendAsVerificationStatus)
- saSmtpMsa :: Lens' SendAs (Maybe SmtpMsa)
- saIsPrimary :: Lens' SendAs (Maybe Bool)
- saIsDefault :: Lens' SendAs (Maybe Bool)
- data LabelType
- data UsersDraftsGetFormat
- data UsersMessagesImportInternalDateSource
- data LabelMessageListVisibility
- data ListThreadsResponse
- listThreadsResponse :: ListThreadsResponse
- ltrNextPageToken :: Lens' ListThreadsResponse (Maybe Text)
- ltrResultSizeEstimate :: Lens' ListThreadsResponse (Maybe Word32)
- ltrThreads :: Lens' ListThreadsResponse [Thread]
- data MessagePart
- messagePart :: MessagePart
- mpParts :: Lens' MessagePart [MessagePart]
- mpBody :: Lens' MessagePart (Maybe MessagePartBody)
- mpMimeType :: Lens' MessagePart (Maybe Text)
- mpHeaders :: Lens' MessagePart [MessagePartHeader]
- mpPartId :: Lens' MessagePart (Maybe Text)
- mpFilename :: Lens' MessagePart (Maybe Text)
- data HistoryLabelAdded
- historyLabelAdded :: HistoryLabelAdded
- hlaLabelIds :: Lens' HistoryLabelAdded [Text]
- hlaMessage :: Lens' HistoryLabelAdded (Maybe Message)
- data ListLabelsResponse
- listLabelsResponse :: ListLabelsResponse
- llrLabels :: Lens' ListLabelsResponse [Label]
- data VacationSettings
- vacationSettings :: VacationSettings
- vsEnableAutoReply :: Lens' VacationSettings (Maybe Bool)
- vsResponseBodyPlainText :: Lens' VacationSettings (Maybe Text)
- vsRestrictToDomain :: Lens' VacationSettings (Maybe Bool)
- vsStartTime :: Lens' VacationSettings (Maybe Int64)
- vsResponseBodyHTML :: Lens' VacationSettings (Maybe Text)
- vsRestrictToContacts :: Lens' VacationSettings (Maybe Bool)
- vsResponseSubject :: Lens' VacationSettings (Maybe Text)
- vsEndTime :: Lens' VacationSettings (Maybe Int64)
- data LabelLabelListVisibility
- data HistoryMessageDeleted
- historyMessageDeleted :: HistoryMessageDeleted
- hmdMessage :: Lens' HistoryMessageDeleted (Maybe Message)
- data MessagePartBody
- messagePartBody :: MessagePartBody
- mpbSize :: Lens' MessagePartBody (Maybe Int32)
- mpbData :: Lens' MessagePartBody (Maybe ByteString)
- mpbAttachmentId :: Lens' MessagePartBody (Maybe Text)
- data AutoForwarding
- autoForwarding :: AutoForwarding
- afEnabled :: Lens' AutoForwarding (Maybe Bool)
- afDisPosition :: Lens' AutoForwarding (Maybe AutoForwardingDisPosition)
- afEmailAddress :: Lens' AutoForwarding (Maybe Text)
- data ListDraftsResponse
- listDraftsResponse :: ListDraftsResponse
- ldrNextPageToken :: Lens' ListDraftsResponse (Maybe Text)
- ldrResultSizeEstimate :: Lens' ListDraftsResponse (Maybe Word32)
- ldrDrafts :: Lens' ListDraftsResponse [Draft]
- data ListSendAsResponse
- listSendAsResponse :: ListSendAsResponse
- lsarSendAs :: Lens' ListSendAsResponse [SendAs]
- data WatchResponse
- watchResponse :: WatchResponse
- wrExpiration :: Lens' WatchResponse (Maybe Int64)
- wrHistoryId :: Lens' WatchResponse (Maybe Word64)
- data UsersThreadsGetFormat
- data BatchModifyMessagesRequest
- batchModifyMessagesRequest :: BatchModifyMessagesRequest
- bmmrIds :: Lens' BatchModifyMessagesRequest [Text]
- bmmrRemoveLabelIds :: Lens' BatchModifyMessagesRequest [Text]
- bmmrAddLabelIds :: Lens' BatchModifyMessagesRequest [Text]
- data Draft
- draft :: Draft
- dId :: Lens' Draft (Maybe Text)
- dMessage :: Lens' Draft (Maybe Message)
- data SmtpMsa
- smtpMsa :: SmtpMsa
- smSecurityMode :: Lens' SmtpMsa (Maybe SmtpMsaSecurityMode)
- smUsername :: Lens' SmtpMsa (Maybe Text)
- smPassword :: Lens' SmtpMsa (Maybe Text)
- smHost :: Lens' SmtpMsa (Maybe Text)
- smPort :: Lens' SmtpMsa (Maybe Int32)
- data ForwardingAddress
- forwardingAddress :: ForwardingAddress
- faForwardingEmail :: Lens' ForwardingAddress (Maybe Text)
- faVerificationStatus :: Lens' ForwardingAddress (Maybe ForwardingAddressVerificationStatus)
- data PopSettingsDisPosition
- data Filter
- filter' :: Filter
- fAction :: Lens' Filter (Maybe FilterAction)
- fId :: Lens' Filter (Maybe Text)
- fCriteria :: Lens' Filter (Maybe FilterCriteria)
- data WatchRequest
- watchRequest :: WatchRequest
- wrLabelFilterAction :: Lens' WatchRequest (Maybe WatchRequestLabelFilterAction)
- wrTopicName :: Lens' WatchRequest (Maybe Text)
- wrLabelIds :: Lens' WatchRequest [Text]
- data WatchRequestLabelFilterAction
- data ImapSettings
- imapSettings :: ImapSettings
- isEnabled :: Lens' ImapSettings (Maybe Bool)
- isExpungeBehavior :: Lens' ImapSettings (Maybe ImapSettingsExpungeBehavior)
- isAutoExpunge :: Lens' ImapSettings (Maybe Bool)
- isMaxFolderSize :: Lens' ImapSettings (Maybe Int32)
- data ImapSettingsExpungeBehavior
- data SmtpMsaSecurityMode
- data Message
- message :: Message
- mRaw :: Lens' Message (Maybe ByteString)
- mSnippet :: Lens' Message (Maybe Text)
- mSizeEstimate :: Lens' Message (Maybe Int32)
- mPayload :: Lens' Message (Maybe MessagePart)
- mHistoryId :: Lens' Message (Maybe Word64)
- mId :: Lens' Message (Maybe Text)
- mLabelIds :: Lens' Message [Text]
- mThreadId :: Lens' Message (Maybe Text)
- mInternalDate :: Lens' Message (Maybe Int64)
- data UsersMessagesInsertInternalDateSource
- data HistoryLabelRemoved
- historyLabelRemoved :: HistoryLabelRemoved
- hlrLabelIds :: Lens' HistoryLabelRemoved [Text]
- hlrMessage :: Lens' HistoryLabelRemoved (Maybe Message)
- data Thread
- thread :: Thread
- tSnippet :: Lens' Thread (Maybe Text)
- tHistoryId :: Lens' Thread (Maybe Word64)
- tId :: Lens' Thread (Maybe Text)
- tMessages :: Lens' Thread [Message]
- data FilterAction
- filterAction :: FilterAction
- faForward :: Lens' FilterAction (Maybe Text)
- faRemoveLabelIds :: Lens' FilterAction [Text]
- faAddLabelIds :: Lens' FilterAction [Text]
- data Label
- label :: Label
- lThreadsUnread :: Lens' Label (Maybe Int32)
- lMessageListVisibility :: Lens' Label (Maybe LabelMessageListVisibility)
- lMessagesTotal :: Lens' Label (Maybe Int32)
- lMessagesUnread :: Lens' Label (Maybe Int32)
- lName :: Lens' Label (Maybe Text)
- lThreadsTotal :: Lens' Label (Maybe Int32)
- lLabelListVisibility :: Lens' Label (Maybe LabelLabelListVisibility)
- lId :: Lens' Label (Maybe Text)
- lType :: Lens' Label (Maybe LabelType)
- data ListMessagesResponse
- listMessagesResponse :: ListMessagesResponse
- lmrNextPageToken :: Lens' ListMessagesResponse (Maybe Text)
- lmrResultSizeEstimate :: Lens' ListMessagesResponse (Maybe Word32)
- lmrMessages :: Lens' ListMessagesResponse [Message]
- data HistoryMessageAdded
- historyMessageAdded :: HistoryMessageAdded
- hmaMessage :: Lens' HistoryMessageAdded (Maybe Message)
Service Configuration
gmailService :: ServiceConfig Source #
Default request referring to version v1
of the Gmail API. This contains the host and root path used as a starting point for constructing service requests.
OAuth Scopes
gmailSettingsBasicScope :: Proxy '["https://www.googleapis.com/auth/gmail.settings.basic"] Source #
Manage your basic mail settings
mailGoogleComScope :: Proxy '["https://mail.google.com/"] Source #
View and manage your mail
gmailModifyScope :: Proxy '["https://www.googleapis.com/auth/gmail.modify"] Source #
View and modify but not delete your email
gmailMetadataScope :: Proxy '["https://www.googleapis.com/auth/gmail.metadata"] Source #
View your email message metadata such as labels and headers, but not the email body
gmailLabelsScope :: Proxy '["https://www.googleapis.com/auth/gmail.labels"] Source #
Manage mailbox labels
gmailSettingsSharingScope :: Proxy '["https://www.googleapis.com/auth/gmail.settings.sharing"] Source #
Manage your sensitive mail settings, including who can manage your mail
gmailSendScope :: Proxy '["https://www.googleapis.com/auth/gmail.send"] Source #
Send email on your behalf
gmailInsertScope :: Proxy '["https://www.googleapis.com/auth/gmail.insert"] Source #
Insert mail into your mailbox
gmailComposeScope :: Proxy '["https://www.googleapis.com/auth/gmail.compose"] Source #
Manage drafts and send emails
gmailReadOnlyScope :: Proxy '["https://www.googleapis.com/auth/gmail.readonly"] Source #
View your emails messages and settings
BatchDeleteMessagesRequest
batchDeleteMessagesRequest :: BatchDeleteMessagesRequest Source #
Creates a value of BatchDeleteMessagesRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
FilterCriteriaSizeComparison
data FilterCriteriaSizeComparison Source #
How the message size in bytes should be in relation to the size field.
Larger | larger |
Smaller | smaller |
Unspecified | unspecified |
UsersMessagesGetFormat
data UsersMessagesGetFormat Source #
The format to return the message in.
ModifyThreadRequest
data ModifyThreadRequest Source #
modifyThreadRequest :: ModifyThreadRequest Source #
Creates a value of ModifyThreadRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mtrRemoveLabelIds :: Lens' ModifyThreadRequest [Text] Source #
A list of IDs of labels to remove from this thread.
mtrAddLabelIds :: Lens' ModifyThreadRequest [Text] Source #
A list of IDs of labels to add to this thread.
ListFiltersResponse
data ListFiltersResponse Source #
Response for the ListFilters method.
See: listFiltersResponse
smart constructor.
listFiltersResponse :: ListFiltersResponse Source #
Creates a value of ListFiltersResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ModifyMessageRequest
data ModifyMessageRequest Source #
modifyMessageRequest :: ModifyMessageRequest Source #
Creates a value of ModifyMessageRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mmrRemoveLabelIds :: Lens' ModifyMessageRequest [Text] Source #
A list IDs of labels to remove from this message.
mmrAddLabelIds :: Lens' ModifyMessageRequest [Text] Source #
A list of IDs of labels to add to this message.
ListForwardingAddressesResponse
data ListForwardingAddressesResponse Source #
Response for the ListForwardingAddresses method.
See: listForwardingAddressesResponse
smart constructor.
listForwardingAddressesResponse :: ListForwardingAddressesResponse Source #
Creates a value of ListForwardingAddressesResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lfarForwardingAddresses :: Lens' ListForwardingAddressesResponse [ForwardingAddress] Source #
List of addresses that may be used for forwarding.
PopSettings
data PopSettings Source #
POP settings for an account.
See: popSettings
smart constructor.
popSettings :: PopSettings Source #
Creates a value of PopSettings
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
psAccessWindow :: Lens' PopSettings (Maybe PopSettingsAccessWindow) Source #
The range of messages which are accessible via POP.
psDisPosition :: Lens' PopSettings (Maybe PopSettingsDisPosition) Source #
The action that will be executed on a message after it has been fetched via POP.
PopSettingsAccessWindow
data PopSettingsAccessWindow Source #
The range of messages which are accessible via POP.
AccessWindowUnspecified | accessWindowUnspecified |
AllMail | allMail |
Disabled | disabled |
FromNowOn | fromNowOn |
History
A record of a change to the user's mailbox. Each history change may affect multiple messages in multiple ways.
See: history
smart constructor.
Creates a value of History
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
hLabelsRemoved :: Lens' History [HistoryLabelRemoved] Source #
Labels removed from messages in this history record.
hMessagesDeleted :: Lens' History [HistoryMessageDeleted] Source #
Messages deleted (not Trashed) from the mailbox in this history record.
hMessagesAdded :: Lens' History [HistoryMessageAdded] Source #
Messages added to the mailbox in this history record.
hLabelsAdded :: Lens' History [HistoryLabelAdded] Source #
Labels added to messages in this history record.
hMessages :: Lens' History [Message] Source #
List of messages changed in this history record. The fields for specific change types, such as messagesAdded may duplicate messages in this field. We recommend using the specific change-type fields instead of this.
ForwardingAddressVerificationStatus
data ForwardingAddressVerificationStatus Source #
Indicates whether this address has been verified and is usable for forwarding. Read-only.
Accepted | accepted |
Pending | pending |
VerificationStatusUnspecified | verificationStatusUnspecified |
FilterCriteria
data FilterCriteria Source #
Message matching criteria.
See: filterCriteria
smart constructor.
filterCriteria :: FilterCriteria Source #
Creates a value of FilterCriteria
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
fcSizeComparison :: Lens' FilterCriteria (Maybe FilterCriteriaSizeComparison) Source #
How the message size in bytes should be in relation to the size field.
fcSubject :: Lens' FilterCriteria (Maybe Text) Source #
Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed.
fcSize :: Lens' FilterCriteria (Maybe Int32) Source #
The size of the entire RFC822 message in bytes, including all headers and attachments.
fcExcludeChats :: Lens' FilterCriteria (Maybe Bool) Source #
Whether the response should exclude chats.
fcTo :: Lens' FilterCriteria (Maybe Text) Source #
The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use simply the local part of the email address. For example, "example" and "example'" both match "example'gmail.com". This field is case-insensitive.
fcQuery :: Lens' FilterCriteria (Maybe Text) Source #
Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser'example.com rfc822msgid: is:unread".
fcNegatedQuery :: Lens' FilterCriteria (Maybe Text) Source #
Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser'example.com rfc822msgid: is:unread".
fcHasAttachment :: Lens' FilterCriteria (Maybe Bool) Source #
Whether the message has any attachment.
ProFile
Profile for a Gmail user.
See: proFile
smart constructor.
Creates a value of ProFile
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
AutoForwardingDisPosition
data AutoForwardingDisPosition Source #
The state that a message should be left in after it has been forwarded.
Archive | archive |
DisPositionUnspecified | dispositionUnspecified |
LeaveInInbox | leaveInInbox |
MarkRead | markRead |
Trash | trash |
MessagePartHeader
data MessagePartHeader Source #
messagePartHeader :: MessagePartHeader Source #
Creates a value of MessagePartHeader
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mphValue :: Lens' MessagePartHeader (Maybe Text) Source #
The value of the header after the : separator. For example, someuser'example.com.
mphName :: Lens' MessagePartHeader (Maybe Text) Source #
The name of the header before the : separator. For example, To.
SendAsVerificationStatus
data SendAsVerificationStatus Source #
Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases.
SAVSAccepted | accepted |
SAVSPending | pending |
SAVSVerificationStatusUnspecified | verificationStatusUnspecified |
ListHistoryResponse
data ListHistoryResponse Source #
listHistoryResponse :: ListHistoryResponse Source #
Creates a value of ListHistoryResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lhrNextPageToken :: Lens' ListHistoryResponse (Maybe Text) Source #
Page token to retrieve the next page of results in the list.
lhrHistory :: Lens' ListHistoryResponse [History] Source #
List of history records. Any messages contained in the response will typically only have id and threadId fields populated.
lhrHistoryId :: Lens' ListHistoryResponse (Maybe Word64) Source #
The ID of the mailbox's current history record.
SendAs
Settings associated with a send-as alias, which can be either the primary login address associated with the account or a custom "from" address. Send-as aliases correspond to the "Send Mail As" feature in the web interface.
See: sendAs
smart constructor.
Creates a value of SendAs
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
saSignature :: Lens' SendAs (Maybe Text) Source #
An optional HTML signature that is included in messages composed with this alias in the Gmail web UI.
saReplyToAddress :: Lens' SendAs (Maybe Text) Source #
An optional email address that is included in a "Reply-To:" header for mail sent using this alias. If this is empty, Gmail will not generate a "Reply-To:" header.
saTreatAsAlias :: Lens' SendAs (Maybe Bool) Source #
Whether Gmail should treat this address as an alias for the user's primary email address. This setting only applies to custom "from" aliases.
saSendAsEmail :: Lens' SendAs (Maybe Text) Source #
The email address that appears in the "From:" header for mail sent using this alias. This is read-only for all operations except create.
saDisplayName :: Lens' SendAs (Maybe Text) Source #
A name that appears in the "From:" header for mail sent using this alias. For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account.
saVerificationStatus :: Lens' SendAs (Maybe SendAsVerificationStatus) Source #
Indicates whether this address has been verified for use as a send-as alias. Read-only. This setting only applies to custom "from" aliases.
saSmtpMsa :: Lens' SendAs (Maybe SmtpMsa) Source #
An optional SMTP service that will be used as an outbound relay for mail sent using this alias. If this is empty, outbound mail will be sent directly from Gmail's servers to the destination SMTP service. This setting only applies to custom "from" aliases.
saIsPrimary :: Lens' SendAs (Maybe Bool) Source #
Whether this address is the primary address used to login to the account. Every Gmail account has exactly one primary address, and it cannot be deleted from the collection of send-as aliases. This field is read-only.
saIsDefault :: Lens' SendAs (Maybe Bool) Source #
Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. Changing this from false to true for an address will result in this field becoming false for the other previous default address.
LabelType
The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
UsersDraftsGetFormat
data UsersDraftsGetFormat Source #
The format to return the draft in.
UDGFFull | full |
UDGFMetadata | metadata |
UDGFMinimal | minimal |
UDGFRaw | raw |
UsersMessagesImportInternalDateSource
data UsersMessagesImportInternalDateSource Source #
Source for Gmail's internal date of the message.
DateHeader | dateHeader |
ReceivedTime | receivedTime |
LabelMessageListVisibility
data LabelMessageListVisibility Source #
The visibility of the label in the message list in the Gmail web interface.
ListThreadsResponse
data ListThreadsResponse Source #
listThreadsResponse :: ListThreadsResponse Source #
Creates a value of ListThreadsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ltrNextPageToken :: Lens' ListThreadsResponse (Maybe Text) Source #
Page token to retrieve the next page of results in the list.
ltrResultSizeEstimate :: Lens' ListThreadsResponse (Maybe Word32) Source #
Estimated total number of results.
ltrThreads :: Lens' ListThreadsResponse [Thread] Source #
List of threads.
MessagePart
data MessagePart Source #
A single MIME message part.
See: messagePart
smart constructor.
messagePart :: MessagePart Source #
Creates a value of MessagePart
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mpParts :: Lens' MessagePart [MessagePart] Source #
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.
mpBody :: Lens' MessagePart (Maybe MessagePartBody) Source #
The message part body for this part, which may be empty for container MIME message parts.
mpMimeType :: Lens' MessagePart (Maybe Text) Source #
The MIME type of the message part.
mpHeaders :: Lens' MessagePart [MessagePartHeader] Source #
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.
mpFilename :: Lens' MessagePart (Maybe Text) Source #
The filename of the attachment. Only present if this message part represents an attachment.
HistoryLabelAdded
data HistoryLabelAdded Source #
historyLabelAdded :: HistoryLabelAdded Source #
Creates a value of HistoryLabelAdded
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
hlaLabelIds :: Lens' HistoryLabelAdded [Text] Source #
Label IDs added to the message.
ListLabelsResponse
data ListLabelsResponse Source #
listLabelsResponse :: ListLabelsResponse Source #
Creates a value of ListLabelsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
VacationSettings
data VacationSettings Source #
Vacation auto-reply settings for an account. These settings correspond to the "Vacation responder" feature in the web interface.
See: vacationSettings
smart constructor.
vacationSettings :: VacationSettings Source #
Creates a value of VacationSettings
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
vsEnableAutoReply :: Lens' VacationSettings (Maybe Bool) Source #
Flag that controls whether Gmail automatically replies to messages.
vsResponseBodyPlainText :: Lens' VacationSettings (Maybe Text) Source #
Response body in plain text format.
vsRestrictToDomain :: Lens' VacationSettings (Maybe Bool) Source #
Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for Google Apps users.
vsStartTime :: Lens' VacationSettings (Maybe Int64) Source #
An optional start time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives after the start time. If both startTime and endTime are specified, startTime must precede endTime.
vsResponseBodyHTML :: Lens' VacationSettings (Maybe Text) Source #
Response body in HTML format. Gmail will sanitize the HTML before storing it.
vsRestrictToContacts :: Lens' VacationSettings (Maybe Bool) Source #
Flag that determines whether responses are sent to recipients who are not in the user's list of contacts.
vsResponseSubject :: Lens' VacationSettings (Maybe Text) Source #
Optional text to prepend to the subject line in vacation responses. In order to enable auto-replies, either the response subject or the response body must be nonempty.
vsEndTime :: Lens' VacationSettings (Maybe Int64) Source #
An optional end time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives before the end time. If both startTime and endTime are specified, startTime must precede endTime.
LabelLabelListVisibility
data LabelLabelListVisibility Source #
The visibility of the label in the label list in the Gmail web interface.
LabelHide | labelHide |
LabelShow | labelShow |
LabelShowIfUnread | labelShowIfUnread |
HistoryMessageDeleted
data HistoryMessageDeleted Source #
historyMessageDeleted :: HistoryMessageDeleted Source #
Creates a value of HistoryMessageDeleted
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
MessagePartBody
data MessagePartBody Source #
The body of a single MIME message part.
See: messagePartBody
smart constructor.
messagePartBody :: MessagePartBody Source #
Creates a value of MessagePartBody
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mpbSize :: Lens' MessagePartBody (Maybe Int32) Source #
Number of bytes for the message part data (encoding notwithstanding).
mpbData :: Lens' MessagePartBody (Maybe ByteString) Source #
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.
mpbAttachmentId :: Lens' MessagePartBody (Maybe Text) Source #
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.
AutoForwarding
data AutoForwarding Source #
Auto-forwarding settings for an account.
See: autoForwarding
smart constructor.
autoForwarding :: AutoForwarding Source #
Creates a value of AutoForwarding
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
afEnabled :: Lens' AutoForwarding (Maybe Bool) Source #
Whether all incoming mail is automatically forwarded to another address.
afDisPosition :: Lens' AutoForwarding (Maybe AutoForwardingDisPosition) Source #
The state that a message should be left in after it has been forwarded.
afEmailAddress :: Lens' AutoForwarding (Maybe Text) Source #
Email address to which all incoming messages are forwarded. This email address must be a verified member of the forwarding addresses.
ListDraftsResponse
data ListDraftsResponse Source #
listDraftsResponse :: ListDraftsResponse Source #
Creates a value of ListDraftsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ldrNextPageToken :: Lens' ListDraftsResponse (Maybe Text) Source #
Token to retrieve the next page of results in the list.
ldrResultSizeEstimate :: Lens' ListDraftsResponse (Maybe Word32) Source #
Estimated total number of results.
ListSendAsResponse
data ListSendAsResponse Source #
Response for the ListSendAs method.
See: listSendAsResponse
smart constructor.
listSendAsResponse :: ListSendAsResponse Source #
Creates a value of ListSendAsResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lsarSendAs :: Lens' ListSendAsResponse [SendAs] Source #
List of send-as aliases.
WatchResponse
data WatchResponse Source #
Push notification watch response.
See: watchResponse
smart constructor.
watchResponse :: WatchResponse Source #
Creates a value of WatchResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
wrExpiration :: Lens' WatchResponse (Maybe Int64) Source #
When Gmail will stop sending notifications for mailbox updates (epoch millis). Call watch again before this time to renew the watch.
wrHistoryId :: Lens' WatchResponse (Maybe Word64) Source #
The ID of the mailbox's current history record.
UsersThreadsGetFormat
data UsersThreadsGetFormat Source #
The format to return the messages in.
UTGFFull | full |
UTGFMetadata | metadata |
UTGFMinimal | minimal |
BatchModifyMessagesRequest
batchModifyMessagesRequest :: BatchModifyMessagesRequest Source #
Creates a value of BatchModifyMessagesRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
bmmrIds :: Lens' BatchModifyMessagesRequest [Text] Source #
The IDs of the messages to modify. There is a limit of 1000 ids per request.
bmmrRemoveLabelIds :: Lens' BatchModifyMessagesRequest [Text] Source #
A list of label IDs to remove from messages.
bmmrAddLabelIds :: Lens' BatchModifyMessagesRequest [Text] Source #
A list of label IDs to add to messages.
Draft
A draft email in the user's mailbox.
See: draft
smart constructor.
SmtpMsa
Configuration for communication with an SMTP service.
See: smtpMsa
smart constructor.
Creates a value of SmtpMsa
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
smSecurityMode :: Lens' SmtpMsa (Maybe SmtpMsaSecurityMode) Source #
The protocol that will be used to secure communication with the SMTP service. Required.
smUsername :: Lens' SmtpMsa (Maybe Text) Source #
The username that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
smPassword :: Lens' SmtpMsa (Maybe Text) Source #
The password that will be used for authentication with the SMTP service. This is a write-only field that can be specified in requests to create or update SendAs settings; it is never populated in responses.
ForwardingAddress
data ForwardingAddress Source #
Settings for a forwarding address.
See: forwardingAddress
smart constructor.
forwardingAddress :: ForwardingAddress Source #
Creates a value of ForwardingAddress
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
faForwardingEmail :: Lens' ForwardingAddress (Maybe Text) Source #
An email address to which messages can be forwarded.
faVerificationStatus :: Lens' ForwardingAddress (Maybe ForwardingAddressVerificationStatus) Source #
Indicates whether this address has been verified and is usable for forwarding. Read-only.
PopSettingsDisPosition
data PopSettingsDisPosition Source #
The action that will be executed on a message after it has been fetched via POP.
PSDPArchive | archive |
PSDPDisPositionUnspecified | dispositionUnspecified |
PSDPLeaveInInbox | leaveInInbox |
PSDPMarkRead | markRead |
PSDPTrash | trash |
Filter
Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread.
See: filter'
smart constructor.
WatchRequest
data WatchRequest Source #
Set up or update a new push notification watch on this user's mailbox.
See: watchRequest
smart constructor.
watchRequest :: WatchRequest Source #
Creates a value of WatchRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
wrLabelFilterAction :: Lens' WatchRequest (Maybe WatchRequestLabelFilterAction) Source #
Filtering behavior of labelIds list specified.
wrTopicName :: Lens' WatchRequest (Maybe Text) Source #
A fully qualified Google Cloud Pub/Sub API topic name to publish the events to. This topic name **must** already exist in Cloud Pub/Sub and you **must** have already granted gmail "publish" permission on it. For example, "projects/my-project-identifier/topics/my-topic-name" (using the Cloud Pub/Sub "v1" topic naming format). Note that the "my-project-identifier" portion must exactly match your Google developer project id (the one executing this watch request).
wrLabelIds :: Lens' WatchRequest [Text] Source #
List of label_ids to restrict notifications about. By default, if unspecified, all changes are pushed out. If specified then dictates which labels are required for a push notification to be generated.
WatchRequestLabelFilterAction
data WatchRequestLabelFilterAction Source #
Filtering behavior of labelIds list specified.
ImapSettings
data ImapSettings Source #
IMAP settings for an account.
See: imapSettings
smart constructor.
imapSettings :: ImapSettings Source #
Creates a value of ImapSettings
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
isExpungeBehavior :: Lens' ImapSettings (Maybe ImapSettingsExpungeBehavior) Source #
The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder.
isAutoExpunge :: Lens' ImapSettings (Maybe Bool) Source #
If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted.
isMaxFolderSize :: Lens' ImapSettings (Maybe Int32) Source #
An optional limit on the number of messages that an IMAP folder may contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted to mean that there is no limit.
ImapSettingsExpungeBehavior
data ImapSettingsExpungeBehavior Source #
The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder.
ISEBArchive | archive |
ISEBDeleteForever | deleteForever |
ISEBExpungeBehaviorUnspecified | expungeBehaviorUnspecified |
ISEBTrash | trash |
SmtpMsaSecurityMode
data SmtpMsaSecurityMode Source #
The protocol that will be used to secure communication with the SMTP service. Required.
None | none |
SecurityModeUnspecified | securityModeUnspecified |
SSL | ssl |
Starttls | starttls |
Message
An email message.
See: message
smart constructor.
Creates a value of Message
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
mRaw :: Lens' Message (Maybe ByteString) Source #
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.
mPayload :: Lens' Message (Maybe MessagePart) Source #
The parsed email structure in the message parts.
mHistoryId :: Lens' Message (Maybe Word64) Source #
The ID of the last history record that modified this message.
mThreadId :: Lens' Message (Maybe Text) Source #
The ID of the thread the message belongs to. To add a message or draft to a thread, the following criteria must be met: - The requested threadId must be specified on the Message or Draft.Message you supply with your request. - The References and In-Reply-To headers must be set in compliance with the RFC 2822 standard. - The Subject headers must match.
mInternalDate :: Lens' Message (Maybe Int64) Source #
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.
UsersMessagesInsertInternalDateSource
data UsersMessagesInsertInternalDateSource Source #
Source for Gmail's internal date of the message.
UMIIDSDateHeader | dateHeader |
UMIIDSReceivedTime | receivedTime |
HistoryLabelRemoved
data HistoryLabelRemoved Source #
historyLabelRemoved :: HistoryLabelRemoved Source #
Creates a value of HistoryLabelRemoved
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
hlrLabelIds :: Lens' HistoryLabelRemoved [Text] Source #
Label IDs removed from the message.
Thread
A collection of messages representing a conversation.
See: thread
smart constructor.
Creates a value of Thread
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
tHistoryId :: Lens' Thread (Maybe Word64) Source #
The ID of the last history record that modified this thread.
FilterAction
data FilterAction Source #
A set of actions to perform on a message.
See: filterAction
smart constructor.
filterAction :: FilterAction Source #
Creates a value of FilterAction
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
faForward :: Lens' FilterAction (Maybe Text) Source #
Email address that the message should be forwarded to.
faRemoveLabelIds :: Lens' FilterAction [Text] Source #
List of labels to remove from the message.
faAddLabelIds :: Lens' FilterAction [Text] Source #
List of labels to add to the message.
Label
Labels are used to categorize messages and threads within the user's mailbox.
See: label
smart constructor.
Creates a value of Label
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lMessageListVisibility :: Lens' Label (Maybe LabelMessageListVisibility) Source #
The visibility of the label in the message list in the Gmail web interface.
lLabelListVisibility :: Lens' Label (Maybe LabelLabelListVisibility) Source #
The visibility of the label in the label list in the Gmail web interface.
lType :: Lens' Label (Maybe LabelType) Source #
The owner type for the label. User labels are created by the user and can be modified and deleted by the user and can be applied to any message or thread. System labels are internally created and cannot be added, modified, or deleted. System labels may be able to be applied to or removed from messages and threads under some circumstances but this is not guaranteed. For example, users can apply and remove the INBOX and UNREAD labels from messages and threads, but cannot apply or remove the DRAFTS or SENT labels from messages or threads.
ListMessagesResponse
data ListMessagesResponse Source #
listMessagesResponse :: ListMessagesResponse Source #
Creates a value of ListMessagesResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
lmrNextPageToken :: Lens' ListMessagesResponse (Maybe Text) Source #
Token to retrieve the next page of results in the list.
lmrResultSizeEstimate :: Lens' ListMessagesResponse (Maybe Word32) Source #
Estimated total number of results.
lmrMessages :: Lens' ListMessagesResponse [Message] Source #
List of messages.
HistoryMessageAdded
data HistoryMessageAdded Source #
historyMessageAdded :: HistoryMessageAdded Source #
Creates a value of HistoryMessageAdded
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired: