{-# 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.Verify
(
UsersSettingsSendAsVerifyResource
, usersSettingsSendAsVerify
, UsersSettingsSendAsVerify
, ussavUserId
, ussavSendAsEmail
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsSendAsVerifyResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"sendAs" :>
Capture "sendAsEmail" Text :>
"verify" :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data UsersSettingsSendAsVerify = UsersSettingsSendAsVerify'
{ _ussavUserId :: !Text
, _ussavSendAsEmail :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsSendAsVerify
:: Text
-> UsersSettingsSendAsVerify
usersSettingsSendAsVerify pUssavSendAsEmail_ =
UsersSettingsSendAsVerify'
{ _ussavUserId = "me"
, _ussavSendAsEmail = pUssavSendAsEmail_
}
ussavUserId :: Lens' UsersSettingsSendAsVerify Text
ussavUserId
= lens _ussavUserId (\ s a -> s{_ussavUserId = a})
ussavSendAsEmail :: Lens' UsersSettingsSendAsVerify Text
ussavSendAsEmail
= lens _ussavSendAsEmail
(\ s a -> s{_ussavSendAsEmail = a})
instance GoogleRequest UsersSettingsSendAsVerify
where
type Rs UsersSettingsSendAsVerify = ()
type Scopes UsersSettingsSendAsVerify =
'["https://www.googleapis.com/auth/gmail.settings.sharing"]
requestClient UsersSettingsSendAsVerify'{..}
= go _ussavUserId _ussavSendAsEmail (Just AltJSON)
gmailService
where go
= buildClient
(Proxy :: Proxy UsersSettingsSendAsVerifyResource)
mempty