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