{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CognitoIdentityProvider.DeleteUserPoolClient
(
DeleteUserPoolClient (..),
newDeleteUserPoolClient,
deleteUserPoolClient_userPoolId,
deleteUserPoolClient_clientId,
DeleteUserPoolClientResponse (..),
newDeleteUserPoolClientResponse,
)
where
import Amazonka.CognitoIdentityProvider.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteUserPoolClient = DeleteUserPoolClient'
{
DeleteUserPoolClient -> Text
userPoolId :: Prelude.Text,
DeleteUserPoolClient -> Sensitive Text
clientId :: Data.Sensitive Prelude.Text
}
deriving (DeleteUserPoolClient -> DeleteUserPoolClient -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteUserPoolClient -> DeleteUserPoolClient -> Bool
$c/= :: DeleteUserPoolClient -> DeleteUserPoolClient -> Bool
== :: DeleteUserPoolClient -> DeleteUserPoolClient -> Bool
$c== :: DeleteUserPoolClient -> DeleteUserPoolClient -> Bool
Prelude.Eq, Int -> DeleteUserPoolClient -> ShowS
[DeleteUserPoolClient] -> ShowS
DeleteUserPoolClient -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteUserPoolClient] -> ShowS
$cshowList :: [DeleteUserPoolClient] -> ShowS
show :: DeleteUserPoolClient -> String
$cshow :: DeleteUserPoolClient -> String
showsPrec :: Int -> DeleteUserPoolClient -> ShowS
$cshowsPrec :: Int -> DeleteUserPoolClient -> ShowS
Prelude.Show, forall x. Rep DeleteUserPoolClient x -> DeleteUserPoolClient
forall x. DeleteUserPoolClient -> Rep DeleteUserPoolClient x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteUserPoolClient x -> DeleteUserPoolClient
$cfrom :: forall x. DeleteUserPoolClient -> Rep DeleteUserPoolClient x
Prelude.Generic)
newDeleteUserPoolClient ::
Prelude.Text ->
Prelude.Text ->
DeleteUserPoolClient
newDeleteUserPoolClient :: Text -> Text -> DeleteUserPoolClient
newDeleteUserPoolClient Text
pUserPoolId_ Text
pClientId_ =
DeleteUserPoolClient'
{ $sel:userPoolId:DeleteUserPoolClient' :: Text
userPoolId = Text
pUserPoolId_,
$sel:clientId:DeleteUserPoolClient' :: Sensitive Text
clientId = forall a. Iso' (Sensitive a) a
Data._Sensitive forall t b. AReview t b -> b -> t
Lens.# Text
pClientId_
}
deleteUserPoolClient_userPoolId :: Lens.Lens' DeleteUserPoolClient Prelude.Text
deleteUserPoolClient_userPoolId :: Lens' DeleteUserPoolClient Text
deleteUserPoolClient_userPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteUserPoolClient' {Text
userPoolId :: Text
$sel:userPoolId:DeleteUserPoolClient' :: DeleteUserPoolClient -> Text
userPoolId} -> Text
userPoolId) (\s :: DeleteUserPoolClient
s@DeleteUserPoolClient' {} Text
a -> DeleteUserPoolClient
s {$sel:userPoolId:DeleteUserPoolClient' :: Text
userPoolId = Text
a} :: DeleteUserPoolClient)
deleteUserPoolClient_clientId :: Lens.Lens' DeleteUserPoolClient Prelude.Text
deleteUserPoolClient_clientId :: Lens' DeleteUserPoolClient Text
deleteUserPoolClient_clientId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteUserPoolClient' {Sensitive Text
clientId :: Sensitive Text
$sel:clientId:DeleteUserPoolClient' :: DeleteUserPoolClient -> Sensitive Text
clientId} -> Sensitive Text
clientId) (\s :: DeleteUserPoolClient
s@DeleteUserPoolClient' {} Sensitive Text
a -> DeleteUserPoolClient
s {$sel:clientId:DeleteUserPoolClient' :: Sensitive Text
clientId = Sensitive Text
a} :: DeleteUserPoolClient) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a. Iso' (Sensitive a) a
Data._Sensitive
instance Core.AWSRequest DeleteUserPoolClient where
type
AWSResponse DeleteUserPoolClient =
DeleteUserPoolClientResponse
request :: (Service -> Service)
-> DeleteUserPoolClient -> Request DeleteUserPoolClient
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteUserPoolClient
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteUserPoolClient)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteUserPoolClientResponse
DeleteUserPoolClientResponse'
instance Prelude.Hashable DeleteUserPoolClient where
hashWithSalt :: Int -> DeleteUserPoolClient -> Int
hashWithSalt Int
_salt DeleteUserPoolClient' {Text
Sensitive Text
clientId :: Sensitive Text
userPoolId :: Text
$sel:clientId:DeleteUserPoolClient' :: DeleteUserPoolClient -> Sensitive Text
$sel:userPoolId:DeleteUserPoolClient' :: DeleteUserPoolClient -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
userPoolId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Sensitive Text
clientId
instance Prelude.NFData DeleteUserPoolClient where
rnf :: DeleteUserPoolClient -> ()
rnf DeleteUserPoolClient' {Text
Sensitive Text
clientId :: Sensitive Text
userPoolId :: Text
$sel:clientId:DeleteUserPoolClient' :: DeleteUserPoolClient -> Sensitive Text
$sel:userPoolId:DeleteUserPoolClient' :: DeleteUserPoolClient -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
userPoolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Sensitive Text
clientId
instance Data.ToHeaders DeleteUserPoolClient where
toHeaders :: DeleteUserPoolClient -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"AWSCognitoIdentityProviderService.DeleteUserPoolClient" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteUserPoolClient where
toJSON :: DeleteUserPoolClient -> Value
toJSON DeleteUserPoolClient' {Text
Sensitive Text
clientId :: Sensitive Text
userPoolId :: Text
$sel:clientId:DeleteUserPoolClient' :: DeleteUserPoolClient -> Sensitive Text
$sel:userPoolId:DeleteUserPoolClient' :: DeleteUserPoolClient -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"UserPoolId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
userPoolId),
forall a. a -> Maybe a
Prelude.Just (Key
"ClientId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Sensitive Text
clientId)
]
)
instance Data.ToPath DeleteUserPoolClient where
toPath :: DeleteUserPoolClient -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteUserPoolClient where
toQuery :: DeleteUserPoolClient -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteUserPoolClientResponse = DeleteUserPoolClientResponse'
{
}
deriving (DeleteUserPoolClientResponse
-> DeleteUserPoolClientResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteUserPoolClientResponse
-> DeleteUserPoolClientResponse -> Bool
$c/= :: DeleteUserPoolClientResponse
-> DeleteUserPoolClientResponse -> Bool
== :: DeleteUserPoolClientResponse
-> DeleteUserPoolClientResponse -> Bool
$c== :: DeleteUserPoolClientResponse
-> DeleteUserPoolClientResponse -> Bool
Prelude.Eq, ReadPrec [DeleteUserPoolClientResponse]
ReadPrec DeleteUserPoolClientResponse
Int -> ReadS DeleteUserPoolClientResponse
ReadS [DeleteUserPoolClientResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteUserPoolClientResponse]
$creadListPrec :: ReadPrec [DeleteUserPoolClientResponse]
readPrec :: ReadPrec DeleteUserPoolClientResponse
$creadPrec :: ReadPrec DeleteUserPoolClientResponse
readList :: ReadS [DeleteUserPoolClientResponse]
$creadList :: ReadS [DeleteUserPoolClientResponse]
readsPrec :: Int -> ReadS DeleteUserPoolClientResponse
$creadsPrec :: Int -> ReadS DeleteUserPoolClientResponse
Prelude.Read, Int -> DeleteUserPoolClientResponse -> ShowS
[DeleteUserPoolClientResponse] -> ShowS
DeleteUserPoolClientResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteUserPoolClientResponse] -> ShowS
$cshowList :: [DeleteUserPoolClientResponse] -> ShowS
show :: DeleteUserPoolClientResponse -> String
$cshow :: DeleteUserPoolClientResponse -> String
showsPrec :: Int -> DeleteUserPoolClientResponse -> ShowS
$cshowsPrec :: Int -> DeleteUserPoolClientResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteUserPoolClientResponse x -> DeleteUserPoolClientResponse
forall x.
DeleteUserPoolClientResponse -> Rep DeleteUserPoolClientResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteUserPoolClientResponse x -> DeleteUserPoolClientResponse
$cfrom :: forall x.
DeleteUserPoolClientResponse -> Rep DeleteUserPoolClientResponse x
Prelude.Generic)
newDeleteUserPoolClientResponse ::
DeleteUserPoolClientResponse
newDeleteUserPoolClientResponse :: DeleteUserPoolClientResponse
newDeleteUserPoolClientResponse =
DeleteUserPoolClientResponse
DeleteUserPoolClientResponse'
instance Prelude.NFData DeleteUserPoolClientResponse where
rnf :: DeleteUserPoolClientResponse -> ()
rnf DeleteUserPoolClientResponse
_ = ()