{-# 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.Delete
(
UsersSettingsSendAsDeleteResource
, usersSettingsSendAsDelete
, UsersSettingsSendAsDelete
, ussadUserId
, ussadSendAsEmail
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsSendAsDeleteResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"sendAs" :>
Capture "sendAsEmail" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersSettingsSendAsDelete = UsersSettingsSendAsDelete'
{ _ussadUserId :: !Text
, _ussadSendAsEmail :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsSendAsDelete
:: Text
-> UsersSettingsSendAsDelete
usersSettingsSendAsDelete pUssadSendAsEmail_ =
UsersSettingsSendAsDelete'
{ _ussadUserId = "me"
, _ussadSendAsEmail = pUssadSendAsEmail_
}
ussadUserId :: Lens' UsersSettingsSendAsDelete Text
ussadUserId
= lens _ussadUserId (\ s a -> s{_ussadUserId = a})
ussadSendAsEmail :: Lens' UsersSettingsSendAsDelete Text
ussadSendAsEmail
= lens _ussadSendAsEmail
(\ s a -> s{_ussadSendAsEmail = a})
instance GoogleRequest UsersSettingsSendAsDelete
where
type Rs UsersSettingsSendAsDelete = ()
type Scopes UsersSettingsSendAsDelete =
'["https://www.googleapis.com/auth/gmail.settings.sharing"]
requestClient UsersSettingsSendAsDelete'{..}
= go _ussadUserId _ussadSendAsEmail (Just AltJSON)
gmailService
where go
= buildClient
(Proxy :: Proxy UsersSettingsSendAsDeleteResource)
mempty