{-# 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.List
(
SchemasListResource
, schemasList
, SchemasList
, slCustomerId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type SchemasListResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"schemas" :>
QueryParam "alt" AltJSON :> Get '[JSON] Schemas
newtype SchemasList = SchemasList'
{ _slCustomerId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
schemasList
:: Text
-> SchemasList
schemasList pSlCustomerId_ =
SchemasList'
{ _slCustomerId = pSlCustomerId_
}
slCustomerId :: Lens' SchemasList Text
slCustomerId
= lens _slCustomerId (\ s a -> s{_slCustomerId = a})
instance GoogleRequest SchemasList where
type Rs SchemasList = Schemas
type Scopes SchemasList =
'["https://www.googleapis.com/auth/admin.directory.userschema",
"https://www.googleapis.com/auth/admin.directory.userschema.readonly"]
requestClient SchemasList'{..}
= go _slCustomerId (Just AltJSON) directoryService
where go
= buildClient (Proxy :: Proxy SchemasListResource)
mempty