{-# 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.Schemas.Patch
(
SchemasPatchResource
, schemasPatch
, SchemasPatch
, spPayload
, spCustomerId
, spSchemaKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type SchemasPatchResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"schemas" :>
Capture "schemaKey" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Schema :> Patch '[JSON] Schema
data SchemasPatch = SchemasPatch'
{ _spPayload :: !Schema
, _spCustomerId :: !Text
, _spSchemaKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
schemasPatch
:: Schema
-> Text
-> Text
-> SchemasPatch
schemasPatch pSpPayload_ pSpCustomerId_ pSpSchemaKey_ =
SchemasPatch'
{ _spPayload = pSpPayload_
, _spCustomerId = pSpCustomerId_
, _spSchemaKey = pSpSchemaKey_
}
spPayload :: Lens' SchemasPatch Schema
spPayload
= lens _spPayload (\ s a -> s{_spPayload = a})
spCustomerId :: Lens' SchemasPatch Text
spCustomerId
= lens _spCustomerId (\ s a -> s{_spCustomerId = a})
spSchemaKey :: Lens' SchemasPatch Text
spSchemaKey
= lens _spSchemaKey (\ s a -> s{_spSchemaKey = a})
instance GoogleRequest SchemasPatch where
type Rs SchemasPatch = Schema
type Scopes SchemasPatch =
'["https://www.googleapis.com/auth/admin.directory.userschema"]
requestClient SchemasPatch'{..}
= go _spCustomerId _spSchemaKey (Just AltJSON)
_spPayload
directoryService
where go
= buildClient (Proxy :: Proxy SchemasPatchResource)
mempty