{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.CognitoIdentityProvider.DeleteUserPoolClient
(
deleteUserPoolClient
, DeleteUserPoolClient
, dupcUserPoolId
, dupcClientId
, deleteUserPoolClientResponse
, DeleteUserPoolClientResponse
) where
import Network.AWS.CognitoIdentityProvider.Types
import Network.AWS.CognitoIdentityProvider.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteUserPoolClient = DeleteUserPoolClient'
{ _dupcUserPoolId :: !Text
, _dupcClientId :: !(Sensitive Text)
} deriving (Eq, Show, Data, Typeable, Generic)
deleteUserPoolClient
:: Text
-> Text
-> DeleteUserPoolClient
deleteUserPoolClient pUserPoolId_ pClientId_ =
DeleteUserPoolClient'
{_dupcUserPoolId = pUserPoolId_, _dupcClientId = _Sensitive # pClientId_}
dupcUserPoolId :: Lens' DeleteUserPoolClient Text
dupcUserPoolId = lens _dupcUserPoolId (\ s a -> s{_dupcUserPoolId = a})
dupcClientId :: Lens' DeleteUserPoolClient Text
dupcClientId = lens _dupcClientId (\ s a -> s{_dupcClientId = a}) . _Sensitive
instance AWSRequest DeleteUserPoolClient where
type Rs DeleteUserPoolClient =
DeleteUserPoolClientResponse
request = postJSON cognitoIdentityProvider
response = receiveNull DeleteUserPoolClientResponse'
instance Hashable DeleteUserPoolClient where
instance NFData DeleteUserPoolClient where
instance ToHeaders DeleteUserPoolClient where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSCognitoIdentityProviderService.DeleteUserPoolClient"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteUserPoolClient where
toJSON DeleteUserPoolClient'{..}
= object
(catMaybes
[Just ("UserPoolId" .= _dupcUserPoolId),
Just ("ClientId" .= _dupcClientId)])
instance ToPath DeleteUserPoolClient where
toPath = const "/"
instance ToQuery DeleteUserPoolClient where
toQuery = const mempty
data DeleteUserPoolClientResponse =
DeleteUserPoolClientResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteUserPoolClientResponse
:: DeleteUserPoolClientResponse
deleteUserPoolClientResponse = DeleteUserPoolClientResponse'
instance NFData DeleteUserPoolClientResponse where