{-# 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.Update
(
ResourcesBuildingsUpdateResource
, resourcesBuildingsUpdate
, ResourcesBuildingsUpdate
, rbuBuildingId
, rbuPayload
, rbuCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesBuildingsUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"buildings" :>
Capture "buildingId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Building :> Put '[JSON] Building
data ResourcesBuildingsUpdate = ResourcesBuildingsUpdate'
{ _rbuBuildingId :: !Text
, _rbuPayload :: !Building
, _rbuCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesBuildingsUpdate
:: Text
-> Building
-> Text
-> ResourcesBuildingsUpdate
resourcesBuildingsUpdate pRbuBuildingId_ pRbuPayload_ pRbuCustomer_ =
ResourcesBuildingsUpdate'
{ _rbuBuildingId = pRbuBuildingId_
, _rbuPayload = pRbuPayload_
, _rbuCustomer = pRbuCustomer_
}
rbuBuildingId :: Lens' ResourcesBuildingsUpdate Text
rbuBuildingId
= lens _rbuBuildingId
(\ s a -> s{_rbuBuildingId = a})
rbuPayload :: Lens' ResourcesBuildingsUpdate Building
rbuPayload
= lens _rbuPayload (\ s a -> s{_rbuPayload = a})
rbuCustomer :: Lens' ResourcesBuildingsUpdate Text
rbuCustomer
= lens _rbuCustomer (\ s a -> s{_rbuCustomer = a})
instance GoogleRequest ResourcesBuildingsUpdate where
type Rs ResourcesBuildingsUpdate = Building
type Scopes ResourcesBuildingsUpdate =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar"]
requestClient ResourcesBuildingsUpdate'{..}
= go _rbuCustomer _rbuBuildingId (Just AltJSON)
_rbuPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesBuildingsUpdateResource)
mempty