{-# 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.AdminForgetDevice
(
adminForgetDevice
, AdminForgetDevice
, afdUserPoolId
, afdUsername
, afdDeviceKey
, adminForgetDeviceResponse
, AdminForgetDeviceResponse
) 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 AdminForgetDevice = AdminForgetDevice'
{ _afdUserPoolId :: !Text
, _afdUsername :: !(Sensitive Text)
, _afdDeviceKey :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
adminForgetDevice
:: Text
-> Text
-> Text
-> AdminForgetDevice
adminForgetDevice pUserPoolId_ pUsername_ pDeviceKey_ =
AdminForgetDevice'
{ _afdUserPoolId = pUserPoolId_
, _afdUsername = _Sensitive # pUsername_
, _afdDeviceKey = pDeviceKey_
}
afdUserPoolId :: Lens' AdminForgetDevice Text
afdUserPoolId = lens _afdUserPoolId (\ s a -> s{_afdUserPoolId = a});
afdUsername :: Lens' AdminForgetDevice Text
afdUsername = lens _afdUsername (\ s a -> s{_afdUsername = a}) . _Sensitive;
afdDeviceKey :: Lens' AdminForgetDevice Text
afdDeviceKey = lens _afdDeviceKey (\ s a -> s{_afdDeviceKey = a});
instance AWSRequest AdminForgetDevice where
type Rs AdminForgetDevice = AdminForgetDeviceResponse
request = postJSON cognitoIdentityProvider
response = receiveNull AdminForgetDeviceResponse'
instance Hashable AdminForgetDevice
instance NFData AdminForgetDevice
instance ToHeaders AdminForgetDevice where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSCognitoIdentityProviderService.AdminForgetDevice"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON AdminForgetDevice where
toJSON AdminForgetDevice'{..}
= object
(catMaybes
[Just ("UserPoolId" .= _afdUserPoolId),
Just ("Username" .= _afdUsername),
Just ("DeviceKey" .= _afdDeviceKey)])
instance ToPath AdminForgetDevice where
toPath = const "/"
instance ToQuery AdminForgetDevice where
toQuery = const mempty
data AdminForgetDeviceResponse =
AdminForgetDeviceResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
adminForgetDeviceResponse
:: AdminForgetDeviceResponse
adminForgetDeviceResponse = AdminForgetDeviceResponse'
instance NFData AdminForgetDeviceResponse