{-# 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.List
(
SettingsListResource
, settingsList
, SettingsList
, slSyncToken
, slPageToken
, slMaxResults
) where
import Network.Google.AppsCalendar.Types
import Network.Google.Prelude
type SettingsListResource =
"calendar" :>
"v3" :>
"users" :>
"me" :>
"settings" :>
QueryParam "syncToken" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Settings
data SettingsList = SettingsList'
{ _slSyncToken :: !(Maybe Text)
, _slPageToken :: !(Maybe Text)
, _slMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
settingsList
:: SettingsList
settingsList =
SettingsList'
{ _slSyncToken = Nothing
, _slPageToken = Nothing
, _slMaxResults = Nothing
}
slSyncToken :: Lens' SettingsList (Maybe Text)
slSyncToken
= lens _slSyncToken (\ s a -> s{_slSyncToken = a})
slPageToken :: Lens' SettingsList (Maybe Text)
slPageToken
= lens _slPageToken (\ s a -> s{_slPageToken = a})
slMaxResults :: Lens' SettingsList (Maybe Int32)
slMaxResults
= lens _slMaxResults (\ s a -> s{_slMaxResults = a})
. mapping _Coerce
instance GoogleRequest SettingsList where
type Rs SettingsList = Settings
type Scopes SettingsList =
'["https://www.googleapis.com/auth/calendar",
"https://www.googleapis.com/auth/calendar.readonly",
"https://www.googleapis.com/auth/calendar.settings.readonly"]
requestClient SettingsList'{..}
= go _slSyncToken _slPageToken _slMaxResults
(Just AltJSON)
appsCalendarService
where go
= buildClient (Proxy :: Proxy SettingsListResource)
mempty