{-# 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.Delete
(
SchemasDeleteResource
, schemasDelete
, SchemasDelete
, sdCustomerId
, sdSchemaKey
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type SchemasDeleteResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customerId" Text :>
"schemas" :>
Capture "schemaKey" Text :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
-- | Delete schema
--
-- /See:/ 'schemasDelete' smart constructor.
data SchemasDelete = SchemasDelete'
{ _sdCustomerId :: !Text
, _sdSchemaKey :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'SchemasDelete' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sdCustomerId'
--
-- * 'sdSchemaKey'
schemasDelete
:: Text -- ^ 'sdCustomerId'
-> Text -- ^ 'sdSchemaKey'
-> SchemasDelete
schemasDelete pSdCustomerId_ pSdSchemaKey_ =
SchemasDelete'
{ _sdCustomerId = pSdCustomerId_
, _sdSchemaKey = pSdSchemaKey_
}
-- | Immutable id of the Google Apps account
sdCustomerId :: Lens' SchemasDelete Text
sdCustomerId
= lens _sdCustomerId (\ s a -> s{_sdCustomerId = a})
-- | Name or immutable Id of the schema
sdSchemaKey :: Lens' SchemasDelete Text
sdSchemaKey
= lens _sdSchemaKey (\ s a -> s{_sdSchemaKey = a})
instance GoogleRequest SchemasDelete where
type Rs SchemasDelete = ()
type Scopes SchemasDelete =
'["https://www.googleapis.com/auth/admin.directory.userschema"]
requestClient SchemasDelete'{..}
= go _sdCustomerId _sdSchemaKey (Just AltJSON)
directoryService
where go
= buildClient (Proxy :: Proxy SchemasDeleteResource)
mempty