{-# 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.Filters.Get
(
UsersSettingsFiltersGetResource
, usersSettingsFiltersGet
, UsersSettingsFiltersGet
, usfgUserId
, usfgId
) where
import Network.Google.Gmail.Types
import Network.Google.Prelude
type UsersSettingsFiltersGetResource =
"gmail" :>
"v1" :>
"users" :>
Capture "userId" Text :>
"settings" :>
"filters" :>
Capture "id" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Filter
data UsersSettingsFiltersGet = UsersSettingsFiltersGet'
{ _usfgUserId :: !Text
, _usfgId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersSettingsFiltersGet
:: Text
-> UsersSettingsFiltersGet
usersSettingsFiltersGet pUsfgId_ =
UsersSettingsFiltersGet'
{ _usfgUserId = "me"
, _usfgId = pUsfgId_
}
usfgUserId :: Lens' UsersSettingsFiltersGet Text
usfgUserId
= lens _usfgUserId (\ s a -> s{_usfgUserId = a})
usfgId :: Lens' UsersSettingsFiltersGet Text
usfgId = lens _usfgId (\ s a -> s{_usfgId = a})
instance GoogleRequest UsersSettingsFiltersGet where
type Rs UsersSettingsFiltersGet = Filter
type Scopes UsersSettingsFiltersGet =
'["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 UsersSettingsFiltersGet'{..}
= go _usfgUserId _usfgId (Just AltJSON) gmailService
where go
= buildClient
(Proxy :: Proxy UsersSettingsFiltersGetResource)
mempty