{-# 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.CognitoIdentity.UnlinkDeveloperIdentity
(
UnlinkDeveloperIdentity (..),
newUnlinkDeveloperIdentity,
unlinkDeveloperIdentity_identityId,
unlinkDeveloperIdentity_identityPoolId,
unlinkDeveloperIdentity_developerProviderName,
unlinkDeveloperIdentity_developerUserIdentifier,
UnlinkDeveloperIdentityResponse (..),
newUnlinkDeveloperIdentityResponse,
)
where
import Amazonka.CognitoIdentity.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 UnlinkDeveloperIdentity = UnlinkDeveloperIdentity'
{
UnlinkDeveloperIdentity -> Text
identityId :: Prelude.Text,
UnlinkDeveloperIdentity -> Text
identityPoolId :: Prelude.Text,
UnlinkDeveloperIdentity -> Text
developerProviderName :: Prelude.Text,
UnlinkDeveloperIdentity -> Text
developerUserIdentifier :: Prelude.Text
}
deriving (UnlinkDeveloperIdentity -> UnlinkDeveloperIdentity -> Bool
(UnlinkDeveloperIdentity -> UnlinkDeveloperIdentity -> Bool)
-> (UnlinkDeveloperIdentity -> UnlinkDeveloperIdentity -> Bool)
-> Eq UnlinkDeveloperIdentity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnlinkDeveloperIdentity -> UnlinkDeveloperIdentity -> Bool
$c/= :: UnlinkDeveloperIdentity -> UnlinkDeveloperIdentity -> Bool
== :: UnlinkDeveloperIdentity -> UnlinkDeveloperIdentity -> Bool
$c== :: UnlinkDeveloperIdentity -> UnlinkDeveloperIdentity -> Bool
Prelude.Eq, ReadPrec [UnlinkDeveloperIdentity]
ReadPrec UnlinkDeveloperIdentity
Int -> ReadS UnlinkDeveloperIdentity
ReadS [UnlinkDeveloperIdentity]
(Int -> ReadS UnlinkDeveloperIdentity)
-> ReadS [UnlinkDeveloperIdentity]
-> ReadPrec UnlinkDeveloperIdentity
-> ReadPrec [UnlinkDeveloperIdentity]
-> Read UnlinkDeveloperIdentity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnlinkDeveloperIdentity]
$creadListPrec :: ReadPrec [UnlinkDeveloperIdentity]
readPrec :: ReadPrec UnlinkDeveloperIdentity
$creadPrec :: ReadPrec UnlinkDeveloperIdentity
readList :: ReadS [UnlinkDeveloperIdentity]
$creadList :: ReadS [UnlinkDeveloperIdentity]
readsPrec :: Int -> ReadS UnlinkDeveloperIdentity
$creadsPrec :: Int -> ReadS UnlinkDeveloperIdentity
Prelude.Read, Int -> UnlinkDeveloperIdentity -> ShowS
[UnlinkDeveloperIdentity] -> ShowS
UnlinkDeveloperIdentity -> String
(Int -> UnlinkDeveloperIdentity -> ShowS)
-> (UnlinkDeveloperIdentity -> String)
-> ([UnlinkDeveloperIdentity] -> ShowS)
-> Show UnlinkDeveloperIdentity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnlinkDeveloperIdentity] -> ShowS
$cshowList :: [UnlinkDeveloperIdentity] -> ShowS
show :: UnlinkDeveloperIdentity -> String
$cshow :: UnlinkDeveloperIdentity -> String
showsPrec :: Int -> UnlinkDeveloperIdentity -> ShowS
$cshowsPrec :: Int -> UnlinkDeveloperIdentity -> ShowS
Prelude.Show, (forall x.
UnlinkDeveloperIdentity -> Rep UnlinkDeveloperIdentity x)
-> (forall x.
Rep UnlinkDeveloperIdentity x -> UnlinkDeveloperIdentity)
-> Generic UnlinkDeveloperIdentity
forall x. Rep UnlinkDeveloperIdentity x -> UnlinkDeveloperIdentity
forall x. UnlinkDeveloperIdentity -> Rep UnlinkDeveloperIdentity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UnlinkDeveloperIdentity x -> UnlinkDeveloperIdentity
$cfrom :: forall x. UnlinkDeveloperIdentity -> Rep UnlinkDeveloperIdentity x
Prelude.Generic)
newUnlinkDeveloperIdentity ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
UnlinkDeveloperIdentity
newUnlinkDeveloperIdentity :: Text -> Text -> Text -> Text -> UnlinkDeveloperIdentity
newUnlinkDeveloperIdentity
Text
pIdentityId_
Text
pIdentityPoolId_
Text
pDeveloperProviderName_
Text
pDeveloperUserIdentifier_ =
UnlinkDeveloperIdentity' :: Text -> Text -> Text -> Text -> UnlinkDeveloperIdentity
UnlinkDeveloperIdentity'
{ $sel:identityId:UnlinkDeveloperIdentity' :: Text
identityId = Text
pIdentityId_,
$sel:identityPoolId:UnlinkDeveloperIdentity' :: Text
identityPoolId = Text
pIdentityPoolId_,
$sel:developerProviderName:UnlinkDeveloperIdentity' :: Text
developerProviderName = Text
pDeveloperProviderName_,
$sel:developerUserIdentifier:UnlinkDeveloperIdentity' :: Text
developerUserIdentifier =
Text
pDeveloperUserIdentifier_
}
unlinkDeveloperIdentity_identityId :: Lens.Lens' UnlinkDeveloperIdentity Prelude.Text
unlinkDeveloperIdentity_identityId :: (Text -> f Text)
-> UnlinkDeveloperIdentity -> f UnlinkDeveloperIdentity
unlinkDeveloperIdentity_identityId = (UnlinkDeveloperIdentity -> Text)
-> (UnlinkDeveloperIdentity -> Text -> UnlinkDeveloperIdentity)
-> Lens UnlinkDeveloperIdentity UnlinkDeveloperIdentity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnlinkDeveloperIdentity' {Text
identityId :: Text
$sel:identityId:UnlinkDeveloperIdentity' :: UnlinkDeveloperIdentity -> Text
identityId} -> Text
identityId) (\s :: UnlinkDeveloperIdentity
s@UnlinkDeveloperIdentity' {} Text
a -> UnlinkDeveloperIdentity
s {$sel:identityId:UnlinkDeveloperIdentity' :: Text
identityId = Text
a} :: UnlinkDeveloperIdentity)
unlinkDeveloperIdentity_identityPoolId :: Lens.Lens' UnlinkDeveloperIdentity Prelude.Text
unlinkDeveloperIdentity_identityPoolId :: (Text -> f Text)
-> UnlinkDeveloperIdentity -> f UnlinkDeveloperIdentity
unlinkDeveloperIdentity_identityPoolId = (UnlinkDeveloperIdentity -> Text)
-> (UnlinkDeveloperIdentity -> Text -> UnlinkDeveloperIdentity)
-> Lens UnlinkDeveloperIdentity UnlinkDeveloperIdentity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnlinkDeveloperIdentity' {Text
identityPoolId :: Text
$sel:identityPoolId:UnlinkDeveloperIdentity' :: UnlinkDeveloperIdentity -> Text
identityPoolId} -> Text
identityPoolId) (\s :: UnlinkDeveloperIdentity
s@UnlinkDeveloperIdentity' {} Text
a -> UnlinkDeveloperIdentity
s {$sel:identityPoolId:UnlinkDeveloperIdentity' :: Text
identityPoolId = Text
a} :: UnlinkDeveloperIdentity)
unlinkDeveloperIdentity_developerProviderName :: Lens.Lens' UnlinkDeveloperIdentity Prelude.Text
unlinkDeveloperIdentity_developerProviderName :: (Text -> f Text)
-> UnlinkDeveloperIdentity -> f UnlinkDeveloperIdentity
unlinkDeveloperIdentity_developerProviderName = (UnlinkDeveloperIdentity -> Text)
-> (UnlinkDeveloperIdentity -> Text -> UnlinkDeveloperIdentity)
-> Lens UnlinkDeveloperIdentity UnlinkDeveloperIdentity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnlinkDeveloperIdentity' {Text
developerProviderName :: Text
$sel:developerProviderName:UnlinkDeveloperIdentity' :: UnlinkDeveloperIdentity -> Text
developerProviderName} -> Text
developerProviderName) (\s :: UnlinkDeveloperIdentity
s@UnlinkDeveloperIdentity' {} Text
a -> UnlinkDeveloperIdentity
s {$sel:developerProviderName:UnlinkDeveloperIdentity' :: Text
developerProviderName = Text
a} :: UnlinkDeveloperIdentity)
unlinkDeveloperIdentity_developerUserIdentifier :: Lens.Lens' UnlinkDeveloperIdentity Prelude.Text
unlinkDeveloperIdentity_developerUserIdentifier :: (Text -> f Text)
-> UnlinkDeveloperIdentity -> f UnlinkDeveloperIdentity
unlinkDeveloperIdentity_developerUserIdentifier = (UnlinkDeveloperIdentity -> Text)
-> (UnlinkDeveloperIdentity -> Text -> UnlinkDeveloperIdentity)
-> Lens UnlinkDeveloperIdentity UnlinkDeveloperIdentity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnlinkDeveloperIdentity' {Text
developerUserIdentifier :: Text
$sel:developerUserIdentifier:UnlinkDeveloperIdentity' :: UnlinkDeveloperIdentity -> Text
developerUserIdentifier} -> Text
developerUserIdentifier) (\s :: UnlinkDeveloperIdentity
s@UnlinkDeveloperIdentity' {} Text
a -> UnlinkDeveloperIdentity
s {$sel:developerUserIdentifier:UnlinkDeveloperIdentity' :: Text
developerUserIdentifier = Text
a} :: UnlinkDeveloperIdentity)
instance Core.AWSRequest UnlinkDeveloperIdentity where
type
AWSResponse UnlinkDeveloperIdentity =
UnlinkDeveloperIdentityResponse
request :: UnlinkDeveloperIdentity -> Request UnlinkDeveloperIdentity
request = Service
-> UnlinkDeveloperIdentity -> Request UnlinkDeveloperIdentity
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UnlinkDeveloperIdentity
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UnlinkDeveloperIdentity)))
response =
AWSResponse UnlinkDeveloperIdentity
-> Logger
-> Service
-> Proxy UnlinkDeveloperIdentity
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UnlinkDeveloperIdentity)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UnlinkDeveloperIdentity
UnlinkDeveloperIdentityResponse
UnlinkDeveloperIdentityResponse'
instance Prelude.Hashable UnlinkDeveloperIdentity
instance Prelude.NFData UnlinkDeveloperIdentity
instance Core.ToHeaders UnlinkDeveloperIdentity where
toHeaders :: UnlinkDeveloperIdentity -> [Header]
toHeaders =
[Header] -> UnlinkDeveloperIdentity -> [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
"AWSCognitoIdentityService.UnlinkDeveloperIdentity" ::
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 UnlinkDeveloperIdentity where
toJSON :: UnlinkDeveloperIdentity -> Value
toJSON UnlinkDeveloperIdentity' {Text
developerUserIdentifier :: Text
developerProviderName :: Text
identityPoolId :: Text
identityId :: Text
$sel:developerUserIdentifier:UnlinkDeveloperIdentity' :: UnlinkDeveloperIdentity -> Text
$sel:developerProviderName:UnlinkDeveloperIdentity' :: UnlinkDeveloperIdentity -> Text
$sel:identityPoolId:UnlinkDeveloperIdentity' :: UnlinkDeveloperIdentity -> Text
$sel:identityId:UnlinkDeveloperIdentity' :: UnlinkDeveloperIdentity -> 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
"IdentityId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
identityId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"IdentityPoolId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
identityPoolId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"DeveloperProviderName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
developerProviderName
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"DeveloperUserIdentifier"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
developerUserIdentifier
)
]
)
instance Core.ToPath UnlinkDeveloperIdentity where
toPath :: UnlinkDeveloperIdentity -> ByteString
toPath = ByteString -> UnlinkDeveloperIdentity -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UnlinkDeveloperIdentity where
toQuery :: UnlinkDeveloperIdentity -> QueryString
toQuery = QueryString -> UnlinkDeveloperIdentity -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UnlinkDeveloperIdentityResponse = UnlinkDeveloperIdentityResponse'
{
}
deriving (UnlinkDeveloperIdentityResponse
-> UnlinkDeveloperIdentityResponse -> Bool
(UnlinkDeveloperIdentityResponse
-> UnlinkDeveloperIdentityResponse -> Bool)
-> (UnlinkDeveloperIdentityResponse
-> UnlinkDeveloperIdentityResponse -> Bool)
-> Eq UnlinkDeveloperIdentityResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnlinkDeveloperIdentityResponse
-> UnlinkDeveloperIdentityResponse -> Bool
$c/= :: UnlinkDeveloperIdentityResponse
-> UnlinkDeveloperIdentityResponse -> Bool
== :: UnlinkDeveloperIdentityResponse
-> UnlinkDeveloperIdentityResponse -> Bool
$c== :: UnlinkDeveloperIdentityResponse
-> UnlinkDeveloperIdentityResponse -> Bool
Prelude.Eq, ReadPrec [UnlinkDeveloperIdentityResponse]
ReadPrec UnlinkDeveloperIdentityResponse
Int -> ReadS UnlinkDeveloperIdentityResponse
ReadS [UnlinkDeveloperIdentityResponse]
(Int -> ReadS UnlinkDeveloperIdentityResponse)
-> ReadS [UnlinkDeveloperIdentityResponse]
-> ReadPrec UnlinkDeveloperIdentityResponse
-> ReadPrec [UnlinkDeveloperIdentityResponse]
-> Read UnlinkDeveloperIdentityResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnlinkDeveloperIdentityResponse]
$creadListPrec :: ReadPrec [UnlinkDeveloperIdentityResponse]
readPrec :: ReadPrec UnlinkDeveloperIdentityResponse
$creadPrec :: ReadPrec UnlinkDeveloperIdentityResponse
readList :: ReadS [UnlinkDeveloperIdentityResponse]
$creadList :: ReadS [UnlinkDeveloperIdentityResponse]
readsPrec :: Int -> ReadS UnlinkDeveloperIdentityResponse
$creadsPrec :: Int -> ReadS UnlinkDeveloperIdentityResponse
Prelude.Read, Int -> UnlinkDeveloperIdentityResponse -> ShowS
[UnlinkDeveloperIdentityResponse] -> ShowS
UnlinkDeveloperIdentityResponse -> String
(Int -> UnlinkDeveloperIdentityResponse -> ShowS)
-> (UnlinkDeveloperIdentityResponse -> String)
-> ([UnlinkDeveloperIdentityResponse] -> ShowS)
-> Show UnlinkDeveloperIdentityResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnlinkDeveloperIdentityResponse] -> ShowS
$cshowList :: [UnlinkDeveloperIdentityResponse] -> ShowS
show :: UnlinkDeveloperIdentityResponse -> String
$cshow :: UnlinkDeveloperIdentityResponse -> String
showsPrec :: Int -> UnlinkDeveloperIdentityResponse -> ShowS
$cshowsPrec :: Int -> UnlinkDeveloperIdentityResponse -> ShowS
Prelude.Show, (forall x.
UnlinkDeveloperIdentityResponse
-> Rep UnlinkDeveloperIdentityResponse x)
-> (forall x.
Rep UnlinkDeveloperIdentityResponse x
-> UnlinkDeveloperIdentityResponse)
-> Generic UnlinkDeveloperIdentityResponse
forall x.
Rep UnlinkDeveloperIdentityResponse x
-> UnlinkDeveloperIdentityResponse
forall x.
UnlinkDeveloperIdentityResponse
-> Rep UnlinkDeveloperIdentityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UnlinkDeveloperIdentityResponse x
-> UnlinkDeveloperIdentityResponse
$cfrom :: forall x.
UnlinkDeveloperIdentityResponse
-> Rep UnlinkDeveloperIdentityResponse x
Prelude.Generic)
newUnlinkDeveloperIdentityResponse ::
UnlinkDeveloperIdentityResponse
newUnlinkDeveloperIdentityResponse :: UnlinkDeveloperIdentityResponse
newUnlinkDeveloperIdentityResponse =
UnlinkDeveloperIdentityResponse
UnlinkDeveloperIdentityResponse'
instance
Prelude.NFData
UnlinkDeveloperIdentityResponse