{-# 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.Patch
(
ResourcesBuildingsPatchResource
, resourcesBuildingsPatch
, ResourcesBuildingsPatch
, rbpBuildingId
, rbpPayload
, rbpCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesBuildingsPatchResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"buildings" :>
Capture "buildingId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Building :> Patch '[JSON] Building
data ResourcesBuildingsPatch = ResourcesBuildingsPatch'
{ _rbpBuildingId :: !Text
, _rbpPayload :: !Building
, _rbpCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesBuildingsPatch
:: Text
-> Building
-> Text
-> ResourcesBuildingsPatch
resourcesBuildingsPatch pRbpBuildingId_ pRbpPayload_ pRbpCustomer_ =
ResourcesBuildingsPatch'
{ _rbpBuildingId = pRbpBuildingId_
, _rbpPayload = pRbpPayload_
, _rbpCustomer = pRbpCustomer_
}
rbpBuildingId :: Lens' ResourcesBuildingsPatch Text
rbpBuildingId
= lens _rbpBuildingId
(\ s a -> s{_rbpBuildingId = a})
rbpPayload :: Lens' ResourcesBuildingsPatch Building
rbpPayload
= lens _rbpPayload (\ s a -> s{_rbpPayload = a})
rbpCustomer :: Lens' ResourcesBuildingsPatch Text
rbpCustomer
= lens _rbpCustomer (\ s a -> s{_rbpCustomer = a})
instance GoogleRequest ResourcesBuildingsPatch where
type Rs ResourcesBuildingsPatch = Building
type Scopes ResourcesBuildingsPatch =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar"]
requestClient ResourcesBuildingsPatch'{..}
= go _rbpCustomer _rbpBuildingId (Just AltJSON)
_rbpPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesBuildingsPatchResource)
mempty