{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Gmail.Users.Settings.SendAs.SmimeInfo.Get
(
UsersSettingsSendAsSmimeInfoGetResource
, usersSettingsSendAsSmimeInfoGet
, UsersSettingsSendAsSmimeInfoGet
, ussasigUserId
, ussasigSendAsEmail
, ussasigId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsSendAsSmimeInfoGetResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"sendAs" :>
Capture "sendAsEmail" Text :>
"smimeInfo" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] SmimeInfo
data UsersSettingsSendAsSmimeInfoGet = UsersSettingsSendAsSmimeInfoGet'
{ _ussasigUserId :: !Text
, _ussasigSendAsEmail :: !Text
, _ussasigId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsSendAsSmimeInfoGet
:: Text
-> Text
-> UsersSettingsSendAsSmimeInfoGet
usersSettingsSendAsSmimeInfoGet pUssasigSendAsEmail_ pUssasigId_ =
UsersSettingsSendAsSmimeInfoGet'
{ _ussasigUserId = "me"
, _ussasigSendAsEmail = pUssasigSendAsEmail_
, _ussasigId = pUssasigId_
}
ussasigUserId :: Lens' UsersSettingsSendAsSmimeInfoGet Text
ussasigUserId
= lens _ussasigUserId
(\ s a -> s{_ussasigUserId = a})
ussasigSendAsEmail :: Lens' UsersSettingsSendAsSmimeInfoGet Text
ussasigSendAsEmail
= lens _ussasigSendAsEmail
(\ s a -> s{_ussasigSendAsEmail = a})
ussasigId :: Lens' UsersSettingsSendAsSmimeInfoGet Text
ussasigId
= lens _ussasigId (\ s a -> s{_ussasigId = a})
instance GoogleRequest
UsersSettingsSendAsSmimeInfoGet where
type Rs UsersSettingsSendAsSmimeInfoGet = SmimeInfo
type Scopes UsersSettingsSendAsSmimeInfoGet =
'["https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"]
requestClient UsersSettingsSendAsSmimeInfoGet'{..}
= go _ussasigUserId _ussasigSendAsEmail _ussasigId
(Just AltJSON)
gmailService
where go
= buildClient
(Proxy ::
Proxy UsersSettingsSendAsSmimeInfoGetResource)
mempty