-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Google Email Migration API v2 SDK.
--   
--   Email Migration API lets you migrate emails of users to Google
--   backends.
--   
--   <i>Warning:</i> This is an experimental prototype/preview release
--   which is still under exploratory development and not intended for
--   public use, caveat emptor!
--   
--   This library is compatible with version <tt>email_migration_v2</tt> of
--   the API.
@package gogol-admin-emailmigration
@version 0.3.0


module Network.Google.EmailMigration.Types

-- | Default request referring to version <tt>email_migration_v2</tt> of
--   the Email Migration API v2. This contains the host and root path used
--   as a starting point for constructing service requests.
emailMigrationService :: ServiceConfig

-- | Manage email messages of users on your domain
emailMigrationScope :: Proxy '["https://www.googleapis.com/auth/email.migration"]

-- | JSON template for MailItem object in Email Migration API.
--   
--   <i>See:</i> <a>mailItem</a> smart constructor.
data MailItem

-- | Creates a value of <a>MailItem</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>miIsDeleted</a></li>
--   <li><a>miIsDraft</a></li>
--   <li><a>miIsStarred</a></li>
--   <li><a>miKind</a></li>
--   <li><a>miIsUnread</a></li>
--   <li><a>miLabels</a></li>
--   <li><a>miIsInbox</a></li>
--   <li><a>miIsTrash</a></li>
--   <li><a>miIsSent</a></li>
--   </ul>
mailItem :: MailItem

-- | Boolean indicating if the mail is deleted (used in Vault)
miIsDeleted :: Lens' MailItem (Maybe Bool)

-- | Boolean indicating if the mail is draft
miIsDraft :: Lens' MailItem (Maybe Bool)

-- | Boolean indicating if the mail is starred
miIsStarred :: Lens' MailItem (Maybe Bool)

-- | Kind of resource this is.
miKind :: Lens' MailItem Text

-- | Boolean indicating if the mail is unread
miIsUnread :: Lens' MailItem (Maybe Bool)

-- | List of labels (strings)
miLabels :: Lens' MailItem [Text]

-- | Boolean indicating if the mail is in inbox
miIsInbox :: Lens' MailItem (Maybe Bool)

-- | Boolean indicating if the mail is in trash
miIsTrash :: Lens' MailItem (Maybe Bool)

-- | Boolean indicating if the mail is in 'sent mails'
miIsSent :: Lens' MailItem (Maybe Bool)


-- | Insert Mail into Google's Gmail backends
--   
--   <i>See:</i> <a>Email Migration API v2 Reference</a> for
--   <tt>emailMigration.mail.insert</tt>.
module Network.Google.Resource.EmailMigration.Mail.Insert

-- | A resource alias for <tt>emailMigration.mail.insert</tt> method which
--   the <a>MailInsert</a> request conforms to.
type MailInsertResource = ("email" :> ("v2" :> ("users" :> (Capture "userKey" Text :> ("mail" :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] MailItem :> Post '[JSON] ()))))))) :<|> ("upload" :> ("email" :> ("v2" :> ("users" :> (Capture "userKey" Text :> ("mail" :> (QueryParam "alt" AltJSON :> (QueryParam "uploadType" Multipart :> (MultipartRelated '[JSON] MailItem :> Post '[JSON] ())))))))))

-- | Creates a value of <a>MailInsert</a> with the minimum fields required
--   to make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>miPayload</a></li>
--   <li><a>miUserKey</a></li>
--   </ul>
mailInsert :: MailItem -> Text -> MailInsert

-- | Insert Mail into Google's Gmail backends
--   
--   <i>See:</i> <a>mailInsert</a> smart constructor.
data MailInsert

-- | Multipart request metadata.
miPayload :: Lens' MailInsert MailItem

-- | The email or immutable id of the user
miUserKey :: Lens' MailInsert Text
instance GHC.Generics.Generic Network.Google.Resource.EmailMigration.Mail.Insert.MailInsert
instance Data.Data.Data Network.Google.Resource.EmailMigration.Mail.Insert.MailInsert
instance GHC.Show.Show Network.Google.Resource.EmailMigration.Mail.Insert.MailInsert
instance GHC.Classes.Eq Network.Google.Resource.EmailMigration.Mail.Insert.MailInsert
instance Network.Google.Types.GoogleRequest Network.Google.Resource.EmailMigration.Mail.Insert.MailInsert
instance Network.Google.Types.GoogleRequest (Network.Google.Types.MediaUpload Network.Google.Resource.EmailMigration.Mail.Insert.MailInsert)


-- | Email Migration API lets you migrate emails of users to Google
--   backends.
--   
--   <i>See:</i> <a>Email Migration API v2 Reference</a>
module Network.Google.EmailMigration

-- | Default request referring to version <tt>email_migration_v2</tt> of
--   the Email Migration API v2. This contains the host and root path used
--   as a starting point for constructing service requests.
emailMigrationService :: ServiceConfig

-- | Manage email messages of users on your domain
emailMigrationScope :: Proxy '["https://www.googleapis.com/auth/email.migration"]

-- | Represents the entirety of the methods and resources available for the
--   Email Migration API v2 service.
type EmailMigrationAPI = MailInsertResource

-- | JSON template for MailItem object in Email Migration API.
--   
--   <i>See:</i> <a>mailItem</a> smart constructor.
data MailItem

-- | Creates a value of <a>MailItem</a> with the minimum fields required to
--   make a request.
--   
--   Use one of the following lenses to modify other fields as desired:
--   
--   <ul>
--   <li><a>miIsDeleted</a></li>
--   <li><a>miIsDraft</a></li>
--   <li><a>miIsStarred</a></li>
--   <li><a>miKind</a></li>
--   <li><a>miIsUnread</a></li>
--   <li><a>miLabels</a></li>
--   <li><a>miIsInbox</a></li>
--   <li><a>miIsTrash</a></li>
--   <li><a>miIsSent</a></li>
--   </ul>
mailItem :: MailItem

-- | Boolean indicating if the mail is deleted (used in Vault)
miIsDeleted :: Lens' MailItem (Maybe Bool)

-- | Boolean indicating if the mail is draft
miIsDraft :: Lens' MailItem (Maybe Bool)

-- | Boolean indicating if the mail is starred
miIsStarred :: Lens' MailItem (Maybe Bool)

-- | Kind of resource this is.
miKind :: Lens' MailItem Text

-- | Boolean indicating if the mail is unread
miIsUnread :: Lens' MailItem (Maybe Bool)

-- | List of labels (strings)
miLabels :: Lens' MailItem [Text]

-- | Boolean indicating if the mail is in inbox
miIsInbox :: Lens' MailItem (Maybe Bool)

-- | Boolean indicating if the mail is in trash
miIsTrash :: Lens' MailItem (Maybe Bool)

-- | Boolean indicating if the mail is in 'sent mails'
miIsSent :: Lens' MailItem (Maybe Bool)
