{-# 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.DeleteResourceServer
(
DeleteResourceServer (..),
newDeleteResourceServer,
deleteResourceServer_userPoolId,
deleteResourceServer_identifier,
DeleteResourceServerResponse (..),
newDeleteResourceServerResponse,
)
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 DeleteResourceServer = DeleteResourceServer'
{
DeleteResourceServer -> Text
userPoolId :: Prelude.Text,
DeleteResourceServer -> Text
identifier :: Prelude.Text
}
deriving (DeleteResourceServer -> DeleteResourceServer -> Bool
(DeleteResourceServer -> DeleteResourceServer -> Bool)
-> (DeleteResourceServer -> DeleteResourceServer -> Bool)
-> Eq DeleteResourceServer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteResourceServer -> DeleteResourceServer -> Bool
$c/= :: DeleteResourceServer -> DeleteResourceServer -> Bool
== :: DeleteResourceServer -> DeleteResourceServer -> Bool
$c== :: DeleteResourceServer -> DeleteResourceServer -> Bool
Prelude.Eq, ReadPrec [DeleteResourceServer]
ReadPrec DeleteResourceServer
Int -> ReadS DeleteResourceServer
ReadS [DeleteResourceServer]
(Int -> ReadS DeleteResourceServer)
-> ReadS [DeleteResourceServer]
-> ReadPrec DeleteResourceServer
-> ReadPrec [DeleteResourceServer]
-> Read DeleteResourceServer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteResourceServer]
$creadListPrec :: ReadPrec [DeleteResourceServer]
readPrec :: ReadPrec DeleteResourceServer
$creadPrec :: ReadPrec DeleteResourceServer
readList :: ReadS [DeleteResourceServer]
$creadList :: ReadS [DeleteResourceServer]
readsPrec :: Int -> ReadS DeleteResourceServer
$creadsPrec :: Int -> ReadS DeleteResourceServer
Prelude.Read, Int -> DeleteResourceServer -> ShowS
[DeleteResourceServer] -> ShowS
DeleteResourceServer -> String
(Int -> DeleteResourceServer -> ShowS)
-> (DeleteResourceServer -> String)
-> ([DeleteResourceServer] -> ShowS)
-> Show DeleteResourceServer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteResourceServer] -> ShowS
$cshowList :: [DeleteResourceServer] -> ShowS
show :: DeleteResourceServer -> String
$cshow :: DeleteResourceServer -> String
showsPrec :: Int -> DeleteResourceServer -> ShowS
$cshowsPrec :: Int -> DeleteResourceServer -> ShowS
Prelude.Show, (forall x. DeleteResourceServer -> Rep DeleteResourceServer x)
-> (forall x. Rep DeleteResourceServer x -> DeleteResourceServer)
-> Generic DeleteResourceServer
forall x. Rep DeleteResourceServer x -> DeleteResourceServer
forall x. DeleteResourceServer -> Rep DeleteResourceServer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteResourceServer x -> DeleteResourceServer
$cfrom :: forall x. DeleteResourceServer -> Rep DeleteResourceServer x
Prelude.Generic)
newDeleteResourceServer ::
Prelude.Text ->
Prelude.Text ->
DeleteResourceServer
newDeleteResourceServer :: Text -> Text -> DeleteResourceServer
newDeleteResourceServer Text
pUserPoolId_ Text
pIdentifier_ =
DeleteResourceServer' :: Text -> Text -> DeleteResourceServer
DeleteResourceServer'
{ $sel:userPoolId:DeleteResourceServer' :: Text
userPoolId = Text
pUserPoolId_,
$sel:identifier:DeleteResourceServer' :: Text
identifier = Text
pIdentifier_
}
deleteResourceServer_userPoolId :: Lens.Lens' DeleteResourceServer Prelude.Text
deleteResourceServer_userPoolId :: (Text -> f Text) -> DeleteResourceServer -> f DeleteResourceServer
deleteResourceServer_userPoolId = (DeleteResourceServer -> Text)
-> (DeleteResourceServer -> Text -> DeleteResourceServer)
-> Lens DeleteResourceServer DeleteResourceServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteResourceServer' {Text
userPoolId :: Text
$sel:userPoolId:DeleteResourceServer' :: DeleteResourceServer -> Text
userPoolId} -> Text
userPoolId) (\s :: DeleteResourceServer
s@DeleteResourceServer' {} Text
a -> DeleteResourceServer
s {$sel:userPoolId:DeleteResourceServer' :: Text
userPoolId = Text
a} :: DeleteResourceServer)
deleteResourceServer_identifier :: Lens.Lens' DeleteResourceServer Prelude.Text
deleteResourceServer_identifier :: (Text -> f Text) -> DeleteResourceServer -> f DeleteResourceServer
deleteResourceServer_identifier = (DeleteResourceServer -> Text)
-> (DeleteResourceServer -> Text -> DeleteResourceServer)
-> Lens DeleteResourceServer DeleteResourceServer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteResourceServer' {Text
identifier :: Text
$sel:identifier:DeleteResourceServer' :: DeleteResourceServer -> Text
identifier} -> Text
identifier) (\s :: DeleteResourceServer
s@DeleteResourceServer' {} Text
a -> DeleteResourceServer
s {$sel:identifier:DeleteResourceServer' :: Text
identifier = Text
a} :: DeleteResourceServer)
instance Core.AWSRequest DeleteResourceServer where
type
AWSResponse DeleteResourceServer =
DeleteResourceServerResponse
request :: DeleteResourceServer -> Request DeleteResourceServer
request = Service -> DeleteResourceServer -> Request DeleteResourceServer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteResourceServer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteResourceServer)))
response =
AWSResponse DeleteResourceServer
-> Logger
-> Service
-> Proxy DeleteResourceServer
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteResourceServer)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteResourceServer
DeleteResourceServerResponse
DeleteResourceServerResponse'
instance Prelude.Hashable DeleteResourceServer
instance Prelude.NFData DeleteResourceServer
instance Core.ToHeaders DeleteResourceServer where
toHeaders :: DeleteResourceServer -> [Header]
toHeaders =
[Header] -> DeleteResourceServer -> [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.DeleteResourceServer" ::
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 DeleteResourceServer where
toJSON :: DeleteResourceServer -> Value
toJSON DeleteResourceServer' {Text
identifier :: Text
userPoolId :: Text
$sel:identifier:DeleteResourceServer' :: DeleteResourceServer -> Text
$sel:userPoolId:DeleteResourceServer' :: DeleteResourceServer -> 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
"Identifier" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
identifier)
]
)
instance Core.ToPath DeleteResourceServer where
toPath :: DeleteResourceServer -> ByteString
toPath = ByteString -> DeleteResourceServer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteResourceServer where
toQuery :: DeleteResourceServer -> QueryString
toQuery = QueryString -> DeleteResourceServer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteResourceServerResponse = DeleteResourceServerResponse'
{
}
deriving (DeleteResourceServerResponse
-> DeleteResourceServerResponse -> Bool
(DeleteResourceServerResponse
-> DeleteResourceServerResponse -> Bool)
-> (DeleteResourceServerResponse
-> DeleteResourceServerResponse -> Bool)
-> Eq DeleteResourceServerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteResourceServerResponse
-> DeleteResourceServerResponse -> Bool
$c/= :: DeleteResourceServerResponse
-> DeleteResourceServerResponse -> Bool
== :: DeleteResourceServerResponse
-> DeleteResourceServerResponse -> Bool
$c== :: DeleteResourceServerResponse
-> DeleteResourceServerResponse -> Bool
Prelude.Eq, ReadPrec [DeleteResourceServerResponse]
ReadPrec DeleteResourceServerResponse
Int -> ReadS DeleteResourceServerResponse
ReadS [DeleteResourceServerResponse]
(Int -> ReadS DeleteResourceServerResponse)
-> ReadS [DeleteResourceServerResponse]
-> ReadPrec DeleteResourceServerResponse
-> ReadPrec [DeleteResourceServerResponse]
-> Read DeleteResourceServerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteResourceServerResponse]
$creadListPrec :: ReadPrec [DeleteResourceServerResponse]
readPrec :: ReadPrec DeleteResourceServerResponse
$creadPrec :: ReadPrec DeleteResourceServerResponse
readList :: ReadS [DeleteResourceServerResponse]
$creadList :: ReadS [DeleteResourceServerResponse]
readsPrec :: Int -> ReadS DeleteResourceServerResponse
$creadsPrec :: Int -> ReadS DeleteResourceServerResponse
Prelude.Read, Int -> DeleteResourceServerResponse -> ShowS
[DeleteResourceServerResponse] -> ShowS
DeleteResourceServerResponse -> String
(Int -> DeleteResourceServerResponse -> ShowS)
-> (DeleteResourceServerResponse -> String)
-> ([DeleteResourceServerResponse] -> ShowS)
-> Show DeleteResourceServerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteResourceServerResponse] -> ShowS
$cshowList :: [DeleteResourceServerResponse] -> ShowS
show :: DeleteResourceServerResponse -> String
$cshow :: DeleteResourceServerResponse -> String
showsPrec :: Int -> DeleteResourceServerResponse -> ShowS
$cshowsPrec :: Int -> DeleteResourceServerResponse -> ShowS
Prelude.Show, (forall x.
DeleteResourceServerResponse -> Rep DeleteResourceServerResponse x)
-> (forall x.
Rep DeleteResourceServerResponse x -> DeleteResourceServerResponse)
-> Generic DeleteResourceServerResponse
forall x.
Rep DeleteResourceServerResponse x -> DeleteResourceServerResponse
forall x.
DeleteResourceServerResponse -> Rep DeleteResourceServerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteResourceServerResponse x -> DeleteResourceServerResponse
$cfrom :: forall x.
DeleteResourceServerResponse -> Rep DeleteResourceServerResponse x
Prelude.Generic)
newDeleteResourceServerResponse ::
DeleteResourceServerResponse
newDeleteResourceServerResponse :: DeleteResourceServerResponse
newDeleteResourceServerResponse =
DeleteResourceServerResponse
DeleteResourceServerResponse'
instance Prelude.NFData DeleteResourceServerResponse