{-# 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.Insert
(
ResourcesBuildingsInsertResource
, resourcesBuildingsInsert
, ResourcesBuildingsInsert
, rbiPayload
, rbiCustomer
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type ResourcesBuildingsInsertResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"resources" :>
"buildings" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Building :> Post '[JSON] Building
data ResourcesBuildingsInsert = ResourcesBuildingsInsert'
{ _rbiPayload :: !Building
, _rbiCustomer :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
resourcesBuildingsInsert
:: Building
-> Text
-> ResourcesBuildingsInsert
resourcesBuildingsInsert pRbiPayload_ pRbiCustomer_ =
ResourcesBuildingsInsert'
{ _rbiPayload = pRbiPayload_
, _rbiCustomer = pRbiCustomer_
}
rbiPayload :: Lens' ResourcesBuildingsInsert Building
rbiPayload
= lens _rbiPayload (\ s a -> s{_rbiPayload = a})
rbiCustomer :: Lens' ResourcesBuildingsInsert Text
rbiCustomer
= lens _rbiCustomer (\ s a -> s{_rbiCustomer = a})
instance GoogleRequest ResourcesBuildingsInsert where
type Rs ResourcesBuildingsInsert = Building
type Scopes ResourcesBuildingsInsert =
'["https://www.googleapis.com/auth/admin.directory.resource.calendar"]
requestClient ResourcesBuildingsInsert'{..}
= go _rbiCustomer (Just AltJSON) _rbiPayload
directoryService
where go
= buildClient
(Proxy :: Proxy ResourcesBuildingsInsertResource)
mempty