{-# 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.Get
(
SchemasGetResource
, schemasGet
, SchemasGet
, sgCustomerId
, sgSchemaKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type SchemasGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"schemas" :>
Capture "schemaKey" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Schema
data SchemasGet = SchemasGet'
{ _sgCustomerId :: !Text
, _sgSchemaKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
schemasGet
:: Text
-> Text
-> SchemasGet
schemasGet pSgCustomerId_ pSgSchemaKey_ =
SchemasGet'
{ _sgCustomerId = pSgCustomerId_
, _sgSchemaKey = pSgSchemaKey_
}
sgCustomerId :: Lens' SchemasGet Text
sgCustomerId
= lens _sgCustomerId (\ s a -> s{_sgCustomerId = a})
sgSchemaKey :: Lens' SchemasGet Text
sgSchemaKey
= lens _sgSchemaKey (\ s a -> s{_sgSchemaKey = a})
instance GoogleRequest SchemasGet where
type Rs SchemasGet = Schema
type Scopes SchemasGet =
'["https://www.googleapis.com/auth/admin.directory.userschema",
"https://www.googleapis.com/auth/admin.directory.userschema.readonly"]
requestClient SchemasGet'{..}
= go _sgCustomerId _sgSchemaKey (Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy SchemasGetResource)
mempty