{-# 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.Directory.Resources.Buildings.List
(
ResourcesBuildingsListResource
, resourcesBuildingsList
, ResourcesBuildingsList
, rblCustomer
, rblPageToken
, rblMaxResults
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesBuildingsListResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"buildings" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Buildings
data ResourcesBuildingsList = ResourcesBuildingsList'
{ _rblCustomer :: !Text
, _rblPageToken :: !(Maybe Text)
, _rblMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesBuildingsList
:: Text
-> ResourcesBuildingsList
resourcesBuildingsList pRblCustomer_ =
ResourcesBuildingsList'
{ _rblCustomer = pRblCustomer_
, _rblPageToken = Nothing
, _rblMaxResults = Nothing
}
rblCustomer :: Lens' ResourcesBuildingsList Text
rblCustomer
= lens _rblCustomer (\ s a -> s{_rblCustomer = a})
rblPageToken :: Lens' ResourcesBuildingsList (Maybe Text)
rblPageToken
= lens _rblPageToken (\ s a -> s{_rblPageToken = a})
rblMaxResults :: Lens' ResourcesBuildingsList (Maybe Int32)
rblMaxResults
= lens _rblMaxResults
(\ s a -> s{_rblMaxResults = a})
. mapping _Coerce
instance GoogleRequest ResourcesBuildingsList where
type Rs ResourcesBuildingsList = Buildings
type Scopes ResourcesBuildingsList =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar",
"https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"]
requestClient ResourcesBuildingsList'{..}
= go _rblCustomer _rblPageToken _rblMaxResults
(Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesBuildingsListResource)
mempty