{-# 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.List
(
UsersSettingsDelegatesListResource
, usersSettingsDelegatesList
, UsersSettingsDelegatesList
, usdlUserId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsDelegatesListResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"delegates" :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListDelegatesResponse
newtype UsersSettingsDelegatesList = UsersSettingsDelegatesList'
{ _usdlUserId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsDelegatesList
:: UsersSettingsDelegatesList
usersSettingsDelegatesList =
UsersSettingsDelegatesList'
{ _usdlUserId = "me"
}
usdlUserId :: Lens' UsersSettingsDelegatesList Text
usdlUserId
= lens _usdlUserId (\ s a -> s{_usdlUserId = a})
instance GoogleRequest UsersSettingsDelegatesList
where
type Rs UsersSettingsDelegatesList =
ListDelegatesResponse
type Scopes UsersSettingsDelegatesList =
'["https://mail.google.com/",
"https://www.googleapis.com/auth/gmail.modify",
"https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/gmail.settings.basic"]
requestClient UsersSettingsDelegatesList'{..}
= go _usdlUserId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersSettingsDelegatesListResource)
mempty