{-# 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.SetDefault
(
UsersSettingsSendAsSmimeInfoSetDefaultResource
, usersSettingsSendAsSmimeInfoSetDefault
, UsersSettingsSendAsSmimeInfoSetDefault
, ussasisdUserId
, ussasisdSendAsEmail
, ussasisdId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsSendAsSmimeInfoSetDefaultResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"sendAs" :>
Capture "sendAsEmail" Text :>
"smimeInfo" :>
Capture "id" Text :>
"setDefault" :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data UsersSettingsSendAsSmimeInfoSetDefault = UsersSettingsSendAsSmimeInfoSetDefault'
{ _ussasisdUserId :: !Text
, _ussasisdSendAsEmail :: !Text
, _ussasisdId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsSendAsSmimeInfoSetDefault
:: Text
-> Text
-> UsersSettingsSendAsSmimeInfoSetDefault
usersSettingsSendAsSmimeInfoSetDefault pUssasisdSendAsEmail_ pUssasisdId_ =
UsersSettingsSendAsSmimeInfoSetDefault'
{ _ussasisdUserId = "me"
, _ussasisdSendAsEmail = pUssasisdSendAsEmail_
, _ussasisdId = pUssasisdId_
}
ussasisdUserId :: Lens' UsersSettingsSendAsSmimeInfoSetDefault Text
ussasisdUserId
= lens _ussasisdUserId
(\ s a -> s{_ussasisdUserId = a})
ussasisdSendAsEmail :: Lens' UsersSettingsSendAsSmimeInfoSetDefault Text
ussasisdSendAsEmail
= lens _ussasisdSendAsEmail
(\ s a -> s{_ussasisdSendAsEmail = a})
ussasisdId :: Lens' UsersSettingsSendAsSmimeInfoSetDefault Text
ussasisdId
= lens _ussasisdId (\ s a -> s{_ussasisdId = a})
instance GoogleRequest
UsersSettingsSendAsSmimeInfoSetDefault where
type Rs UsersSettingsSendAsSmimeInfoSetDefault = ()
type Scopes UsersSettingsSendAsSmimeInfoSetDefault =
'["https://www.googleapis.com/auth/gmail.settings.basic",
"https://www.googleapis.com/auth/gmail.settings.sharing"]
requestClient
UsersSettingsSendAsSmimeInfoSetDefault'{..}
= go _ussasisdUserId _ussasisdSendAsEmail _ussasisdId
(Just AltJSON)
gmailService
where go
= buildClient
(Proxy ::
Proxy UsersSettingsSendAsSmimeInfoSetDefaultResource)
mempty