{-# 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.Get
(
ResourcesBuildingsGetResource
, resourcesBuildingsGet
, ResourcesBuildingsGet
, rbgBuildingId
, rbgCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesBuildingsGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"buildings" :>
Capture "buildingId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Building
data ResourcesBuildingsGet = ResourcesBuildingsGet'
{ _rbgBuildingId :: !Text
, _rbgCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesBuildingsGet
:: Text
-> Text
-> ResourcesBuildingsGet
resourcesBuildingsGet pRbgBuildingId_ pRbgCustomer_ =
ResourcesBuildingsGet'
{ _rbgBuildingId = pRbgBuildingId_
, _rbgCustomer = pRbgCustomer_
}
rbgBuildingId :: Lens' ResourcesBuildingsGet Text
rbgBuildingId
= lens _rbgBuildingId
(\ s a -> s{_rbgBuildingId = a})
rbgCustomer :: Lens' ResourcesBuildingsGet Text
rbgCustomer
= lens _rbgCustomer (\ s a -> s{_rbgCustomer = a})
instance GoogleRequest ResourcesBuildingsGet where
type Rs ResourcesBuildingsGet = Building
type Scopes ResourcesBuildingsGet =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar",
"https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"]
requestClient ResourcesBuildingsGet'{..}
= go _rbgCustomer _rbgBuildingId (Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesBuildingsGetResource)
mempty