{-# 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.Delegates.Delete
(
UsersSettingsDelegatesDeleteResource
, usersSettingsDelegatesDelete
, UsersSettingsDelegatesDelete
, usddUserId
, usddDelegateEmail
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsDelegatesDeleteResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"delegates" :>
Capture "delegateEmail" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data UsersSettingsDelegatesDelete = UsersSettingsDelegatesDelete'
{ _usddUserId :: !Text
, _usddDelegateEmail :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsDelegatesDelete
:: Text
-> UsersSettingsDelegatesDelete
usersSettingsDelegatesDelete pUsddDelegateEmail_ =
UsersSettingsDelegatesDelete'
{ _usddUserId = "me"
, _usddDelegateEmail = pUsddDelegateEmail_
}
usddUserId :: Lens' UsersSettingsDelegatesDelete Text
usddUserId
= lens _usddUserId (\ s a -> s{_usddUserId = a})
usddDelegateEmail :: Lens' UsersSettingsDelegatesDelete Text
usddDelegateEmail
= lens _usddDelegateEmail
(\ s a -> s{_usddDelegateEmail = a})
instance GoogleRequest UsersSettingsDelegatesDelete
where
type Rs UsersSettingsDelegatesDelete = ()
type Scopes UsersSettingsDelegatesDelete =
'["https://www.googleapis.com/auth/gmail.settings.sharing"]
requestClient UsersSettingsDelegatesDelete'{..}
= go _usddUserId _usddDelegateEmail (Just AltJSON)
gmailService
where go
= buildClient
(Proxy :: Proxy UsersSettingsDelegatesDeleteResource)
mempty