{-# 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.Calendar.Settings.Get
(
SettingsGetResource
, settingsGet
, SettingsGet
, sgSetting
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type SettingsGetResource =
"calendar" :>
"v3" :>
"users" :>
"me" :>
"settings" :>
Capture "setting" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Setting
newtype SettingsGet = SettingsGet'
{ _sgSetting :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
settingsGet
:: Text
-> SettingsGet
settingsGet pSgSetting_ =
SettingsGet'
{ _sgSetting = pSgSetting_
}
sgSetting :: Lens' SettingsGet Text
sgSetting
= lens _sgSetting (\ s a -> s{_sgSetting = a})
instance GoogleRequest SettingsGet where
type Rs SettingsGet = Setting
type Scopes SettingsGet =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.readonly",
"https://www.googleapis.com/auth/calendar.settings.readonly"]
requestClient SettingsGet'{..}
= go _sgSetting (Just AltJSON) appsCalendarService
where go
= buildClient (Proxy :: Proxy SettingsGetResource)
mempty