{-# 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.Lens as Lens
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 :: Core.Sensitive Prelude.Text
}
deriving (DeleteUserPoolClient -> DeleteUserPoolClient -> Bool
(DeleteUserPoolClient -> DeleteUserPoolClient -> Bool)
-> (DeleteUserPoolClient -> DeleteUserPoolClient -> Bool)
-> Eq DeleteUserPoolClient
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
(Int -> DeleteUserPoolClient -> ShowS)
-> (DeleteUserPoolClient -> String)
-> ([DeleteUserPoolClient] -> ShowS)
-> Show DeleteUserPoolClient
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. DeleteUserPoolClient -> Rep DeleteUserPoolClient x)
-> (forall x. Rep DeleteUserPoolClient x -> DeleteUserPoolClient)
-> Generic DeleteUserPoolClient
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' :: Text -> Sensitive Text -> DeleteUserPoolClient
DeleteUserPoolClient'
{ $sel:userPoolId:DeleteUserPoolClient' :: Text
userPoolId = Text
pUserPoolId_,
$sel:clientId:DeleteUserPoolClient' :: Sensitive Text
clientId = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pClientId_
}
deleteUserPoolClient_userPoolId :: Lens.Lens' DeleteUserPoolClient Prelude.Text
deleteUserPoolClient_userPoolId :: (Text -> f Text) -> DeleteUserPoolClient -> f DeleteUserPoolClient
deleteUserPoolClient_userPoolId = (DeleteUserPoolClient -> Text)
-> (DeleteUserPoolClient -> Text -> DeleteUserPoolClient)
-> Lens DeleteUserPoolClient DeleteUserPoolClient Text Text
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 :: (Text -> f Text) -> DeleteUserPoolClient -> f DeleteUserPoolClient
deleteUserPoolClient_clientId = (DeleteUserPoolClient -> Sensitive Text)
-> (DeleteUserPoolClient -> Sensitive Text -> DeleteUserPoolClient)
-> Lens
DeleteUserPoolClient
DeleteUserPoolClient
(Sensitive Text)
(Sensitive Text)
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) ((Sensitive Text -> f (Sensitive Text))
-> DeleteUserPoolClient -> f DeleteUserPoolClient)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> DeleteUserPoolClient
-> f DeleteUserPoolClient
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.AWSRequest DeleteUserPoolClient where
type
AWSResponse DeleteUserPoolClient =
DeleteUserPoolClientResponse
request :: DeleteUserPoolClient -> Request DeleteUserPoolClient
request = Service -> DeleteUserPoolClient -> Request DeleteUserPoolClient
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteUserPoolClient
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteUserPoolClient)))
response =
AWSResponse DeleteUserPoolClient
-> Logger
-> Service
-> Proxy DeleteUserPoolClient
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteUserPoolClient)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteUserPoolClient
DeleteUserPoolClientResponse
DeleteUserPoolClientResponse'
instance Prelude.Hashable DeleteUserPoolClient
instance Prelude.NFData DeleteUserPoolClient
instance Core.ToHeaders DeleteUserPoolClient where
toHeaders :: DeleteUserPoolClient -> [Header]
toHeaders =
[Header] -> DeleteUserPoolClient -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"AWSCognitoIdentityProviderService.DeleteUserPoolClient" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UserPoolId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userPoolId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientId" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
clientId)
]
)
instance Core.ToPath DeleteUserPoolClient where
toPath :: DeleteUserPoolClient -> ByteString
toPath = ByteString -> DeleteUserPoolClient -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteUserPoolClient where
toQuery :: DeleteUserPoolClient -> QueryString
toQuery = QueryString -> DeleteUserPoolClient -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteUserPoolClientResponse = DeleteUserPoolClientResponse'
{
}
deriving (DeleteUserPoolClientResponse
-> DeleteUserPoolClientResponse -> Bool
(DeleteUserPoolClientResponse
-> DeleteUserPoolClientResponse -> Bool)
-> (DeleteUserPoolClientResponse
-> DeleteUserPoolClientResponse -> Bool)
-> Eq DeleteUserPoolClientResponse
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]
(Int -> ReadS DeleteUserPoolClientResponse)
-> ReadS [DeleteUserPoolClientResponse]
-> ReadPrec DeleteUserPoolClientResponse
-> ReadPrec [DeleteUserPoolClientResponse]
-> Read 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
(Int -> DeleteUserPoolClientResponse -> ShowS)
-> (DeleteUserPoolClientResponse -> String)
-> ([DeleteUserPoolClientResponse] -> ShowS)
-> Show DeleteUserPoolClientResponse
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.
DeleteUserPoolClientResponse -> Rep DeleteUserPoolClientResponse x)
-> (forall x.
Rep DeleteUserPoolClientResponse x -> DeleteUserPoolClientResponse)
-> Generic DeleteUserPoolClientResponse
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