Copyright | (c) 2015 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
- UsersMessagesGetFormat
- ModifyThreadRequest
- ModifyMessageRequest
- History
- ProFile
- MessagePartHeader
- ListHistoryResponse
- LabelType
- UsersDraftsGetFormat
- UsersMessagesImportInternalDateSource
- LabelMessageListVisibility
- ListThreadsResponse
- MessagePart
- HistoryLabelAdded
- ListLabelsResponse
- LabelLabelListVisibility
- HistoryMessageDeleted
- MessagePartBody
- ListDraftsResponse
- WatchResponse
- UsersThreadsGetFormat
- Draft
- WatchRequest
- WatchRequestLabelFilterAction
- Message
- UsersMessagesInsertInternalDateSource
- HistoryLabelRemoved
- Thread
- Label
- ListMessagesResponse
- HistoryMessageAdded
- gmailService :: Service
- gmailAllScope :: OAuthScope
- gmailModifyScope :: OAuthScope
- gmailLabelsScope :: OAuthScope
- gmailSendScope :: OAuthScope
- gmailInsertScope :: OAuthScope
- gmailComposeScope :: OAuthScope
- gmailReadonlyScope :: OAuthScope
- data UsersMessagesGetFormat
- data ModifyThreadRequest
- modifyThreadRequest :: ModifyThreadRequest
- mtrRemoveLabelIds :: Lens' ModifyThreadRequest [Text]
- mtrAddLabelIds :: Lens' ModifyThreadRequest [Text]
- data ModifyMessageRequest
- modifyMessageRequest :: ModifyMessageRequest
- mmrRemoveLabelIds :: Lens' ModifyMessageRequest [Text]
- mmrAddLabelIds :: Lens' ModifyMessageRequest [Text]
- 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 ProFile
- proFile :: ProFile
- pfMessagesTotal :: Lens' ProFile (Maybe Int32)
- pfThreadsTotal :: Lens' ProFile (Maybe Int32)
- pfHistoryId :: Lens' ProFile (Maybe Word64)
- pfEmailAddress :: Lens' ProFile (Maybe Text)
- data MessagePartHeader
- messagePartHeader :: MessagePartHeader
- mphValue :: Lens' MessagePartHeader (Maybe Text)
- mphName :: Lens' MessagePartHeader (Maybe Text)
- data ListHistoryResponse
- listHistoryResponse :: ListHistoryResponse
- lhrNextPageToken :: Lens' ListHistoryResponse (Maybe Text)
- lhrHistory :: Lens' ListHistoryResponse [History]
- lhrHistoryId :: Lens' ListHistoryResponse (Maybe Word64)
- 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 LabelLabelListVisibility
- data HistoryMessageDeleted
- historyMessageDeleted :: HistoryMessageDeleted
- hmdMessage :: Lens' HistoryMessageDeleted (Maybe Message)
- data MessagePartBody
- messagePartBody :: MessagePartBody
- mpbSize :: Lens' MessagePartBody (Maybe Int32)
- mpbData :: Lens' MessagePartBody (Maybe Word8)
- mpbAttachmentId :: Lens' MessagePartBody (Maybe Text)
- data ListDraftsResponse
- listDraftsResponse :: ListDraftsResponse
- ldrNextPageToken :: Lens' ListDraftsResponse (Maybe Text)
- ldrResultSizeEstimate :: Lens' ListDraftsResponse (Maybe Word32)
- ldrDrafts :: Lens' ListDraftsResponse [Draft]
- data WatchResponse
- watchResponse :: WatchResponse
- wrExpiration :: Lens' WatchResponse (Maybe Int64)
- wrHistoryId :: Lens' WatchResponse (Maybe Word64)
- data UsersThreadsGetFormat
- data Draft
- draft :: Draft
- dId :: Lens' Draft (Maybe Text)
- dMessage :: Lens' Draft (Maybe Message)
- data WatchRequest
- watchRequest :: WatchRequest
- wrLabelFilterAction :: Lens' WatchRequest (Maybe WatchRequestLabelFilterAction)
- wrTopicName :: Lens' WatchRequest (Maybe Text)
- wrLabelIds :: Lens' WatchRequest [Text]
- data WatchRequestLabelFilterAction
- data Message
- message :: Message
- mRaw :: Lens' Message (Maybe Word8)
- 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 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 :: Service 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
gmailAllScope :: OAuthScope Source
View and manage your mail
gmailModifyScope :: OAuthScope Source
View and modify but not delete your email
gmailLabelsScope :: OAuthScope Source
Manage mailbox labels
gmailSendScope :: OAuthScope Source
Send email on your behalf
gmailInsertScope :: OAuthScope Source
Insert mail into your mailbox
gmailComposeScope :: OAuthScope Source
Manage drafts and send emails
gmailReadonlyScope :: OAuthScope Source
View your emails messages and settings
UsersMessagesGetFormat
data UsersMessagesGetFormat Source
The format to return the message in.
ModifyThreadRequest
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.
ModifyMessageRequest
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.
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.
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:
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.
ListHistoryResponse
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.
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
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:
llrLabels :: Lens' ListLabelsResponse [Label] Source
List of labels.
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
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
Total number of bytes in the body of the message part.
mpbData :: Lens' MessagePartBody (Maybe Word8) Source
The body data of a MIME message part. 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.
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.
ldrDrafts :: Lens' ListDraftsResponse [Draft] Source
List of drafts.
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 |
Draft
A draft email in the user's mailbox.
See: draft
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 new Cloud Pub/Sub "v1beta2" 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.
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 Word8) 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
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.
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
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
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: