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