{-# 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.Update
(
SchemasUpdateResource
, schemasUpdate
, SchemasUpdate
, suPayload
, suCustomerId
, suSchemaKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type SchemasUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"schemas" :>
Capture "schemaKey" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Schema :> Put '[JSON] Schema
data SchemasUpdate = SchemasUpdate'
{ _suPayload :: !Schema
, _suCustomerId :: !Text
, _suSchemaKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
schemasUpdate
:: Schema
-> Text
-> Text
-> SchemasUpdate
schemasUpdate pSuPayload_ pSuCustomerId_ pSuSchemaKey_ =
SchemasUpdate'
{ _suPayload = pSuPayload_
, _suCustomerId = pSuCustomerId_
, _suSchemaKey = pSuSchemaKey_
}
suPayload :: Lens' SchemasUpdate Schema
suPayload
= lens _suPayload (\ s a -> s{_suPayload = a})
suCustomerId :: Lens' SchemasUpdate Text
suCustomerId
= lens _suCustomerId (\ s a -> s{_suCustomerId = a})
suSchemaKey :: Lens' SchemasUpdate Text
suSchemaKey
= lens _suSchemaKey (\ s a -> s{_suSchemaKey = a})
instance GoogleRequest SchemasUpdate where
type Rs SchemasUpdate = Schema
type Scopes SchemasUpdate =
'["https://www.googleapis.com/auth/admin.directory.userschema"]
requestClient SchemasUpdate'{..}
= go _suCustomerId _suSchemaKey (Just AltJSON)
_suPayload
directoryService
where go
= buildClient (Proxy :: Proxy SchemasUpdateResource)
mempty