{-# 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.ForwardingAddresses.Delete
(
UsersSettingsForwardingAddressesDeleteResource
, usersSettingsForwardingAddressesDelete
, UsersSettingsForwardingAddressesDelete
, usfadForwardingEmail
, usfadUserId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsForwardingAddressesDeleteResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"forwardingAddresses" :>
Capture "forwardingEmail" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersSettingsForwardingAddressesDelete = UsersSettingsForwardingAddressesDelete'
{ _usfadForwardingEmail :: !Text
, _usfadUserId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsForwardingAddressesDelete
:: Text
-> UsersSettingsForwardingAddressesDelete
usersSettingsForwardingAddressesDelete pUsfadForwardingEmail_ =
UsersSettingsForwardingAddressesDelete'
{ _usfadForwardingEmail = pUsfadForwardingEmail_
, _usfadUserId = "me"
}
usfadForwardingEmail :: Lens' UsersSettingsForwardingAddressesDelete Text
usfadForwardingEmail
= lens _usfadForwardingEmail
(\ s a -> s{_usfadForwardingEmail = a})
usfadUserId :: Lens' UsersSettingsForwardingAddressesDelete Text
usfadUserId
= lens _usfadUserId (\ s a -> s{_usfadUserId = a})
instance GoogleRequest
UsersSettingsForwardingAddressesDelete where
type Rs UsersSettingsForwardingAddressesDelete = ()
type Scopes UsersSettingsForwardingAddressesDelete =
'["https://www.googleapis.com/auth/gmail.settings.sharing"]
requestClient
UsersSettingsForwardingAddressesDelete'{..}
= go _usfadUserId _usfadForwardingEmail
(Just AltJSON)
gmailService
where go
= buildClient
(Proxy ::
Proxy UsersSettingsForwardingAddressesDeleteResource)
mempty