{-# 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.List
(
UsersSettingsSendAsListResource
, usersSettingsSendAsList
, UsersSettingsSendAsList
, ussalUserId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsSendAsListResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"sendAs" :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListSendAsResponse
newtype UsersSettingsSendAsList = UsersSettingsSendAsList'
{ _ussalUserId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsSendAsList
:: UsersSettingsSendAsList
usersSettingsSendAsList =
UsersSettingsSendAsList'
{ _ussalUserId = "me"
}
ussalUserId :: Lens' UsersSettingsSendAsList Text
ussalUserId
= lens _ussalUserId (\ s a -> s{_ussalUserId = a})
instance GoogleRequest UsersSettingsSendAsList where
type Rs UsersSettingsSendAsList = ListSendAsResponse
type Scopes UsersSettingsSendAsList =
'["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 UsersSettingsSendAsList'{..}
= go _ussalUserId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersSettingsSendAsListResource)
mempty