{-# 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.GetOpenIdTokenForDeveloperIdentity
(
GetOpenIdTokenForDeveloperIdentity (..),
newGetOpenIdTokenForDeveloperIdentity,
getOpenIdTokenForDeveloperIdentity_tokenDuration,
getOpenIdTokenForDeveloperIdentity_principalTags,
getOpenIdTokenForDeveloperIdentity_identityId,
getOpenIdTokenForDeveloperIdentity_identityPoolId,
getOpenIdTokenForDeveloperIdentity_logins,
GetOpenIdTokenForDeveloperIdentityResponse (..),
newGetOpenIdTokenForDeveloperIdentityResponse,
getOpenIdTokenForDeveloperIdentityResponse_token,
getOpenIdTokenForDeveloperIdentityResponse_identityId,
getOpenIdTokenForDeveloperIdentityResponse_httpStatus,
)
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 GetOpenIdTokenForDeveloperIdentity = GetOpenIdTokenForDeveloperIdentity'
{
GetOpenIdTokenForDeveloperIdentity -> Maybe Natural
tokenDuration :: Prelude.Maybe Prelude.Natural,
GetOpenIdTokenForDeveloperIdentity -> Maybe (HashMap Text Text)
principalTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
GetOpenIdTokenForDeveloperIdentity -> Maybe Text
identityId :: Prelude.Maybe Prelude.Text,
GetOpenIdTokenForDeveloperIdentity -> Text
identityPoolId :: Prelude.Text,
GetOpenIdTokenForDeveloperIdentity -> HashMap Text Text
logins :: Prelude.HashMap Prelude.Text Prelude.Text
}
deriving (GetOpenIdTokenForDeveloperIdentity
-> GetOpenIdTokenForDeveloperIdentity -> Bool
(GetOpenIdTokenForDeveloperIdentity
-> GetOpenIdTokenForDeveloperIdentity -> Bool)
-> (GetOpenIdTokenForDeveloperIdentity
-> GetOpenIdTokenForDeveloperIdentity -> Bool)
-> Eq GetOpenIdTokenForDeveloperIdentity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOpenIdTokenForDeveloperIdentity
-> GetOpenIdTokenForDeveloperIdentity -> Bool
$c/= :: GetOpenIdTokenForDeveloperIdentity
-> GetOpenIdTokenForDeveloperIdentity -> Bool
== :: GetOpenIdTokenForDeveloperIdentity
-> GetOpenIdTokenForDeveloperIdentity -> Bool
$c== :: GetOpenIdTokenForDeveloperIdentity
-> GetOpenIdTokenForDeveloperIdentity -> Bool
Prelude.Eq, ReadPrec [GetOpenIdTokenForDeveloperIdentity]
ReadPrec GetOpenIdTokenForDeveloperIdentity
Int -> ReadS GetOpenIdTokenForDeveloperIdentity
ReadS [GetOpenIdTokenForDeveloperIdentity]
(Int -> ReadS GetOpenIdTokenForDeveloperIdentity)
-> ReadS [GetOpenIdTokenForDeveloperIdentity]
-> ReadPrec GetOpenIdTokenForDeveloperIdentity
-> ReadPrec [GetOpenIdTokenForDeveloperIdentity]
-> Read GetOpenIdTokenForDeveloperIdentity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOpenIdTokenForDeveloperIdentity]
$creadListPrec :: ReadPrec [GetOpenIdTokenForDeveloperIdentity]
readPrec :: ReadPrec GetOpenIdTokenForDeveloperIdentity
$creadPrec :: ReadPrec GetOpenIdTokenForDeveloperIdentity
readList :: ReadS [GetOpenIdTokenForDeveloperIdentity]
$creadList :: ReadS [GetOpenIdTokenForDeveloperIdentity]
readsPrec :: Int -> ReadS GetOpenIdTokenForDeveloperIdentity
$creadsPrec :: Int -> ReadS GetOpenIdTokenForDeveloperIdentity
Prelude.Read, Int -> GetOpenIdTokenForDeveloperIdentity -> ShowS
[GetOpenIdTokenForDeveloperIdentity] -> ShowS
GetOpenIdTokenForDeveloperIdentity -> String
(Int -> GetOpenIdTokenForDeveloperIdentity -> ShowS)
-> (GetOpenIdTokenForDeveloperIdentity -> String)
-> ([GetOpenIdTokenForDeveloperIdentity] -> ShowS)
-> Show GetOpenIdTokenForDeveloperIdentity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOpenIdTokenForDeveloperIdentity] -> ShowS
$cshowList :: [GetOpenIdTokenForDeveloperIdentity] -> ShowS
show :: GetOpenIdTokenForDeveloperIdentity -> String
$cshow :: GetOpenIdTokenForDeveloperIdentity -> String
showsPrec :: Int -> GetOpenIdTokenForDeveloperIdentity -> ShowS
$cshowsPrec :: Int -> GetOpenIdTokenForDeveloperIdentity -> ShowS
Prelude.Show, (forall x.
GetOpenIdTokenForDeveloperIdentity
-> Rep GetOpenIdTokenForDeveloperIdentity x)
-> (forall x.
Rep GetOpenIdTokenForDeveloperIdentity x
-> GetOpenIdTokenForDeveloperIdentity)
-> Generic GetOpenIdTokenForDeveloperIdentity
forall x.
Rep GetOpenIdTokenForDeveloperIdentity x
-> GetOpenIdTokenForDeveloperIdentity
forall x.
GetOpenIdTokenForDeveloperIdentity
-> Rep GetOpenIdTokenForDeveloperIdentity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOpenIdTokenForDeveloperIdentity x
-> GetOpenIdTokenForDeveloperIdentity
$cfrom :: forall x.
GetOpenIdTokenForDeveloperIdentity
-> Rep GetOpenIdTokenForDeveloperIdentity x
Prelude.Generic)
newGetOpenIdTokenForDeveloperIdentity ::
Prelude.Text ->
GetOpenIdTokenForDeveloperIdentity
newGetOpenIdTokenForDeveloperIdentity :: Text -> GetOpenIdTokenForDeveloperIdentity
newGetOpenIdTokenForDeveloperIdentity
Text
pIdentityPoolId_ =
GetOpenIdTokenForDeveloperIdentity' :: Maybe Natural
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Text
-> HashMap Text Text
-> GetOpenIdTokenForDeveloperIdentity
GetOpenIdTokenForDeveloperIdentity'
{ $sel:tokenDuration:GetOpenIdTokenForDeveloperIdentity' :: Maybe Natural
tokenDuration =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:principalTags:GetOpenIdTokenForDeveloperIdentity' :: Maybe (HashMap Text Text)
principalTags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:identityId:GetOpenIdTokenForDeveloperIdentity' :: Maybe Text
identityId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityPoolId:GetOpenIdTokenForDeveloperIdentity' :: Text
identityPoolId = Text
pIdentityPoolId_,
$sel:logins:GetOpenIdTokenForDeveloperIdentity' :: HashMap Text Text
logins = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
}
getOpenIdTokenForDeveloperIdentity_tokenDuration :: Lens.Lens' GetOpenIdTokenForDeveloperIdentity (Prelude.Maybe Prelude.Natural)
getOpenIdTokenForDeveloperIdentity_tokenDuration :: (Maybe Natural -> f (Maybe Natural))
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity
getOpenIdTokenForDeveloperIdentity_tokenDuration = (GetOpenIdTokenForDeveloperIdentity -> Maybe Natural)
-> (GetOpenIdTokenForDeveloperIdentity
-> Maybe Natural -> GetOpenIdTokenForDeveloperIdentity)
-> Lens
GetOpenIdTokenForDeveloperIdentity
GetOpenIdTokenForDeveloperIdentity
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenForDeveloperIdentity' {Maybe Natural
tokenDuration :: Maybe Natural
$sel:tokenDuration:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> Maybe Natural
tokenDuration} -> Maybe Natural
tokenDuration) (\s :: GetOpenIdTokenForDeveloperIdentity
s@GetOpenIdTokenForDeveloperIdentity' {} Maybe Natural
a -> GetOpenIdTokenForDeveloperIdentity
s {$sel:tokenDuration:GetOpenIdTokenForDeveloperIdentity' :: Maybe Natural
tokenDuration = Maybe Natural
a} :: GetOpenIdTokenForDeveloperIdentity)
getOpenIdTokenForDeveloperIdentity_principalTags :: Lens.Lens' GetOpenIdTokenForDeveloperIdentity (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getOpenIdTokenForDeveloperIdentity_principalTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity
getOpenIdTokenForDeveloperIdentity_principalTags = (GetOpenIdTokenForDeveloperIdentity -> Maybe (HashMap Text Text))
-> (GetOpenIdTokenForDeveloperIdentity
-> Maybe (HashMap Text Text) -> GetOpenIdTokenForDeveloperIdentity)
-> Lens
GetOpenIdTokenForDeveloperIdentity
GetOpenIdTokenForDeveloperIdentity
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenForDeveloperIdentity' {Maybe (HashMap Text Text)
principalTags :: Maybe (HashMap Text Text)
$sel:principalTags:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> Maybe (HashMap Text Text)
principalTags} -> Maybe (HashMap Text Text)
principalTags) (\s :: GetOpenIdTokenForDeveloperIdentity
s@GetOpenIdTokenForDeveloperIdentity' {} Maybe (HashMap Text Text)
a -> GetOpenIdTokenForDeveloperIdentity
s {$sel:principalTags:GetOpenIdTokenForDeveloperIdentity' :: Maybe (HashMap Text Text)
principalTags = Maybe (HashMap Text Text)
a} :: GetOpenIdTokenForDeveloperIdentity) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getOpenIdTokenForDeveloperIdentity_identityId :: Lens.Lens' GetOpenIdTokenForDeveloperIdentity (Prelude.Maybe Prelude.Text)
getOpenIdTokenForDeveloperIdentity_identityId :: (Maybe Text -> f (Maybe Text))
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity
getOpenIdTokenForDeveloperIdentity_identityId = (GetOpenIdTokenForDeveloperIdentity -> Maybe Text)
-> (GetOpenIdTokenForDeveloperIdentity
-> Maybe Text -> GetOpenIdTokenForDeveloperIdentity)
-> Lens
GetOpenIdTokenForDeveloperIdentity
GetOpenIdTokenForDeveloperIdentity
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenForDeveloperIdentity' {Maybe Text
identityId :: Maybe Text
$sel:identityId:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> Maybe Text
identityId} -> Maybe Text
identityId) (\s :: GetOpenIdTokenForDeveloperIdentity
s@GetOpenIdTokenForDeveloperIdentity' {} Maybe Text
a -> GetOpenIdTokenForDeveloperIdentity
s {$sel:identityId:GetOpenIdTokenForDeveloperIdentity' :: Maybe Text
identityId = Maybe Text
a} :: GetOpenIdTokenForDeveloperIdentity)
getOpenIdTokenForDeveloperIdentity_identityPoolId :: Lens.Lens' GetOpenIdTokenForDeveloperIdentity Prelude.Text
getOpenIdTokenForDeveloperIdentity_identityPoolId :: (Text -> f Text)
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity
getOpenIdTokenForDeveloperIdentity_identityPoolId = (GetOpenIdTokenForDeveloperIdentity -> Text)
-> (GetOpenIdTokenForDeveloperIdentity
-> Text -> GetOpenIdTokenForDeveloperIdentity)
-> Lens
GetOpenIdTokenForDeveloperIdentity
GetOpenIdTokenForDeveloperIdentity
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenForDeveloperIdentity' {Text
identityPoolId :: Text
$sel:identityPoolId:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> Text
identityPoolId} -> Text
identityPoolId) (\s :: GetOpenIdTokenForDeveloperIdentity
s@GetOpenIdTokenForDeveloperIdentity' {} Text
a -> GetOpenIdTokenForDeveloperIdentity
s {$sel:identityPoolId:GetOpenIdTokenForDeveloperIdentity' :: Text
identityPoolId = Text
a} :: GetOpenIdTokenForDeveloperIdentity)
getOpenIdTokenForDeveloperIdentity_logins :: Lens.Lens' GetOpenIdTokenForDeveloperIdentity (Prelude.HashMap Prelude.Text Prelude.Text)
getOpenIdTokenForDeveloperIdentity_logins :: (HashMap Text Text -> f (HashMap Text Text))
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity
getOpenIdTokenForDeveloperIdentity_logins = (GetOpenIdTokenForDeveloperIdentity -> HashMap Text Text)
-> (GetOpenIdTokenForDeveloperIdentity
-> HashMap Text Text -> GetOpenIdTokenForDeveloperIdentity)
-> Lens
GetOpenIdTokenForDeveloperIdentity
GetOpenIdTokenForDeveloperIdentity
(HashMap Text Text)
(HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenForDeveloperIdentity' {HashMap Text Text
logins :: HashMap Text Text
$sel:logins:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> HashMap Text Text
logins} -> HashMap Text Text
logins) (\s :: GetOpenIdTokenForDeveloperIdentity
s@GetOpenIdTokenForDeveloperIdentity' {} HashMap Text Text
a -> GetOpenIdTokenForDeveloperIdentity
s {$sel:logins:GetOpenIdTokenForDeveloperIdentity' :: HashMap Text Text
logins = HashMap Text Text
a} :: GetOpenIdTokenForDeveloperIdentity) ((HashMap Text Text -> f (HashMap Text Text))
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> GetOpenIdTokenForDeveloperIdentity
-> f GetOpenIdTokenForDeveloperIdentity
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
GetOpenIdTokenForDeveloperIdentity
where
type
AWSResponse GetOpenIdTokenForDeveloperIdentity =
GetOpenIdTokenForDeveloperIdentityResponse
request :: GetOpenIdTokenForDeveloperIdentity
-> Request GetOpenIdTokenForDeveloperIdentity
request = Service
-> GetOpenIdTokenForDeveloperIdentity
-> Request GetOpenIdTokenForDeveloperIdentity
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetOpenIdTokenForDeveloperIdentity
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetOpenIdTokenForDeveloperIdentity)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetOpenIdTokenForDeveloperIdentity))
-> Logger
-> Service
-> Proxy GetOpenIdTokenForDeveloperIdentity
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetOpenIdTokenForDeveloperIdentity)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text -> Int -> GetOpenIdTokenForDeveloperIdentityResponse
GetOpenIdTokenForDeveloperIdentityResponse'
(Maybe Text
-> Maybe Text -> Int -> GetOpenIdTokenForDeveloperIdentityResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Int -> GetOpenIdTokenForDeveloperIdentityResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Token")
Either
String
(Maybe Text -> Int -> GetOpenIdTokenForDeveloperIdentityResponse)
-> Either String (Maybe Text)
-> Either
String (Int -> GetOpenIdTokenForDeveloperIdentityResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"IdentityId")
Either String (Int -> GetOpenIdTokenForDeveloperIdentityResponse)
-> Either String Int
-> Either String GetOpenIdTokenForDeveloperIdentityResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
GetOpenIdTokenForDeveloperIdentity
instance
Prelude.NFData
GetOpenIdTokenForDeveloperIdentity
instance
Core.ToHeaders
GetOpenIdTokenForDeveloperIdentity
where
toHeaders :: GetOpenIdTokenForDeveloperIdentity -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetOpenIdTokenForDeveloperIdentity -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSCognitoIdentityService.GetOpenIdTokenForDeveloperIdentity" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Core.ToJSON
GetOpenIdTokenForDeveloperIdentity
where
toJSON :: GetOpenIdTokenForDeveloperIdentity -> Value
toJSON GetOpenIdTokenForDeveloperIdentity' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Text
HashMap Text Text
logins :: HashMap Text Text
identityPoolId :: Text
identityId :: Maybe Text
principalTags :: Maybe (HashMap Text Text)
tokenDuration :: Maybe Natural
$sel:logins:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> HashMap Text Text
$sel:identityPoolId:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> Text
$sel:identityId:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> Maybe Text
$sel:principalTags:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> Maybe (HashMap Text Text)
$sel:tokenDuration:GetOpenIdTokenForDeveloperIdentity' :: GetOpenIdTokenForDeveloperIdentity -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"TokenDuration" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
tokenDuration,
(Text
"PrincipalTags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
principalTags,
(Text
"IdentityId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe 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
"Logins" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HashMap Text Text
logins)
]
)
instance
Core.ToPath
GetOpenIdTokenForDeveloperIdentity
where
toPath :: GetOpenIdTokenForDeveloperIdentity -> ByteString
toPath = ByteString -> GetOpenIdTokenForDeveloperIdentity -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
GetOpenIdTokenForDeveloperIdentity
where
toQuery :: GetOpenIdTokenForDeveloperIdentity -> QueryString
toQuery = QueryString -> GetOpenIdTokenForDeveloperIdentity -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetOpenIdTokenForDeveloperIdentityResponse = GetOpenIdTokenForDeveloperIdentityResponse'
{
GetOpenIdTokenForDeveloperIdentityResponse -> Maybe Text
token :: Prelude.Maybe Prelude.Text,
GetOpenIdTokenForDeveloperIdentityResponse -> Maybe Text
identityId :: Prelude.Maybe Prelude.Text,
GetOpenIdTokenForDeveloperIdentityResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetOpenIdTokenForDeveloperIdentityResponse
-> GetOpenIdTokenForDeveloperIdentityResponse -> Bool
(GetOpenIdTokenForDeveloperIdentityResponse
-> GetOpenIdTokenForDeveloperIdentityResponse -> Bool)
-> (GetOpenIdTokenForDeveloperIdentityResponse
-> GetOpenIdTokenForDeveloperIdentityResponse -> Bool)
-> Eq GetOpenIdTokenForDeveloperIdentityResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOpenIdTokenForDeveloperIdentityResponse
-> GetOpenIdTokenForDeveloperIdentityResponse -> Bool
$c/= :: GetOpenIdTokenForDeveloperIdentityResponse
-> GetOpenIdTokenForDeveloperIdentityResponse -> Bool
== :: GetOpenIdTokenForDeveloperIdentityResponse
-> GetOpenIdTokenForDeveloperIdentityResponse -> Bool
$c== :: GetOpenIdTokenForDeveloperIdentityResponse
-> GetOpenIdTokenForDeveloperIdentityResponse -> Bool
Prelude.Eq, ReadPrec [GetOpenIdTokenForDeveloperIdentityResponse]
ReadPrec GetOpenIdTokenForDeveloperIdentityResponse
Int -> ReadS GetOpenIdTokenForDeveloperIdentityResponse
ReadS [GetOpenIdTokenForDeveloperIdentityResponse]
(Int -> ReadS GetOpenIdTokenForDeveloperIdentityResponse)
-> ReadS [GetOpenIdTokenForDeveloperIdentityResponse]
-> ReadPrec GetOpenIdTokenForDeveloperIdentityResponse
-> ReadPrec [GetOpenIdTokenForDeveloperIdentityResponse]
-> Read GetOpenIdTokenForDeveloperIdentityResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOpenIdTokenForDeveloperIdentityResponse]
$creadListPrec :: ReadPrec [GetOpenIdTokenForDeveloperIdentityResponse]
readPrec :: ReadPrec GetOpenIdTokenForDeveloperIdentityResponse
$creadPrec :: ReadPrec GetOpenIdTokenForDeveloperIdentityResponse
readList :: ReadS [GetOpenIdTokenForDeveloperIdentityResponse]
$creadList :: ReadS [GetOpenIdTokenForDeveloperIdentityResponse]
readsPrec :: Int -> ReadS GetOpenIdTokenForDeveloperIdentityResponse
$creadsPrec :: Int -> ReadS GetOpenIdTokenForDeveloperIdentityResponse
Prelude.Read, Int -> GetOpenIdTokenForDeveloperIdentityResponse -> ShowS
[GetOpenIdTokenForDeveloperIdentityResponse] -> ShowS
GetOpenIdTokenForDeveloperIdentityResponse -> String
(Int -> GetOpenIdTokenForDeveloperIdentityResponse -> ShowS)
-> (GetOpenIdTokenForDeveloperIdentityResponse -> String)
-> ([GetOpenIdTokenForDeveloperIdentityResponse] -> ShowS)
-> Show GetOpenIdTokenForDeveloperIdentityResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOpenIdTokenForDeveloperIdentityResponse] -> ShowS
$cshowList :: [GetOpenIdTokenForDeveloperIdentityResponse] -> ShowS
show :: GetOpenIdTokenForDeveloperIdentityResponse -> String
$cshow :: GetOpenIdTokenForDeveloperIdentityResponse -> String
showsPrec :: Int -> GetOpenIdTokenForDeveloperIdentityResponse -> ShowS
$cshowsPrec :: Int -> GetOpenIdTokenForDeveloperIdentityResponse -> ShowS
Prelude.Show, (forall x.
GetOpenIdTokenForDeveloperIdentityResponse
-> Rep GetOpenIdTokenForDeveloperIdentityResponse x)
-> (forall x.
Rep GetOpenIdTokenForDeveloperIdentityResponse x
-> GetOpenIdTokenForDeveloperIdentityResponse)
-> Generic GetOpenIdTokenForDeveloperIdentityResponse
forall x.
Rep GetOpenIdTokenForDeveloperIdentityResponse x
-> GetOpenIdTokenForDeveloperIdentityResponse
forall x.
GetOpenIdTokenForDeveloperIdentityResponse
-> Rep GetOpenIdTokenForDeveloperIdentityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetOpenIdTokenForDeveloperIdentityResponse x
-> GetOpenIdTokenForDeveloperIdentityResponse
$cfrom :: forall x.
GetOpenIdTokenForDeveloperIdentityResponse
-> Rep GetOpenIdTokenForDeveloperIdentityResponse x
Prelude.Generic)
newGetOpenIdTokenForDeveloperIdentityResponse ::
Prelude.Int ->
GetOpenIdTokenForDeveloperIdentityResponse
newGetOpenIdTokenForDeveloperIdentityResponse :: Int -> GetOpenIdTokenForDeveloperIdentityResponse
newGetOpenIdTokenForDeveloperIdentityResponse
Int
pHttpStatus_ =
GetOpenIdTokenForDeveloperIdentityResponse' :: Maybe Text
-> Maybe Text -> Int -> GetOpenIdTokenForDeveloperIdentityResponse
GetOpenIdTokenForDeveloperIdentityResponse'
{ $sel:token:GetOpenIdTokenForDeveloperIdentityResponse' :: Maybe Text
token =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityId:GetOpenIdTokenForDeveloperIdentityResponse' :: Maybe Text
identityId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetOpenIdTokenForDeveloperIdentityResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getOpenIdTokenForDeveloperIdentityResponse_token :: Lens.Lens' GetOpenIdTokenForDeveloperIdentityResponse (Prelude.Maybe Prelude.Text)
getOpenIdTokenForDeveloperIdentityResponse_token :: (Maybe Text -> f (Maybe Text))
-> GetOpenIdTokenForDeveloperIdentityResponse
-> f GetOpenIdTokenForDeveloperIdentityResponse
getOpenIdTokenForDeveloperIdentityResponse_token = (GetOpenIdTokenForDeveloperIdentityResponse -> Maybe Text)
-> (GetOpenIdTokenForDeveloperIdentityResponse
-> Maybe Text -> GetOpenIdTokenForDeveloperIdentityResponse)
-> Lens
GetOpenIdTokenForDeveloperIdentityResponse
GetOpenIdTokenForDeveloperIdentityResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenForDeveloperIdentityResponse' {Maybe Text
token :: Maybe Text
$sel:token:GetOpenIdTokenForDeveloperIdentityResponse' :: GetOpenIdTokenForDeveloperIdentityResponse -> Maybe Text
token} -> Maybe Text
token) (\s :: GetOpenIdTokenForDeveloperIdentityResponse
s@GetOpenIdTokenForDeveloperIdentityResponse' {} Maybe Text
a -> GetOpenIdTokenForDeveloperIdentityResponse
s {$sel:token:GetOpenIdTokenForDeveloperIdentityResponse' :: Maybe Text
token = Maybe Text
a} :: GetOpenIdTokenForDeveloperIdentityResponse)
getOpenIdTokenForDeveloperIdentityResponse_identityId :: Lens.Lens' GetOpenIdTokenForDeveloperIdentityResponse (Prelude.Maybe Prelude.Text)
getOpenIdTokenForDeveloperIdentityResponse_identityId :: (Maybe Text -> f (Maybe Text))
-> GetOpenIdTokenForDeveloperIdentityResponse
-> f GetOpenIdTokenForDeveloperIdentityResponse
getOpenIdTokenForDeveloperIdentityResponse_identityId = (GetOpenIdTokenForDeveloperIdentityResponse -> Maybe Text)
-> (GetOpenIdTokenForDeveloperIdentityResponse
-> Maybe Text -> GetOpenIdTokenForDeveloperIdentityResponse)
-> Lens
GetOpenIdTokenForDeveloperIdentityResponse
GetOpenIdTokenForDeveloperIdentityResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenForDeveloperIdentityResponse' {Maybe Text
identityId :: Maybe Text
$sel:identityId:GetOpenIdTokenForDeveloperIdentityResponse' :: GetOpenIdTokenForDeveloperIdentityResponse -> Maybe Text
identityId} -> Maybe Text
identityId) (\s :: GetOpenIdTokenForDeveloperIdentityResponse
s@GetOpenIdTokenForDeveloperIdentityResponse' {} Maybe Text
a -> GetOpenIdTokenForDeveloperIdentityResponse
s {$sel:identityId:GetOpenIdTokenForDeveloperIdentityResponse' :: Maybe Text
identityId = Maybe Text
a} :: GetOpenIdTokenForDeveloperIdentityResponse)
getOpenIdTokenForDeveloperIdentityResponse_httpStatus :: Lens.Lens' GetOpenIdTokenForDeveloperIdentityResponse Prelude.Int
getOpenIdTokenForDeveloperIdentityResponse_httpStatus :: (Int -> f Int)
-> GetOpenIdTokenForDeveloperIdentityResponse
-> f GetOpenIdTokenForDeveloperIdentityResponse
getOpenIdTokenForDeveloperIdentityResponse_httpStatus = (GetOpenIdTokenForDeveloperIdentityResponse -> Int)
-> (GetOpenIdTokenForDeveloperIdentityResponse
-> Int -> GetOpenIdTokenForDeveloperIdentityResponse)
-> Lens
GetOpenIdTokenForDeveloperIdentityResponse
GetOpenIdTokenForDeveloperIdentityResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenForDeveloperIdentityResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetOpenIdTokenForDeveloperIdentityResponse' :: GetOpenIdTokenForDeveloperIdentityResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetOpenIdTokenForDeveloperIdentityResponse
s@GetOpenIdTokenForDeveloperIdentityResponse' {} Int
a -> GetOpenIdTokenForDeveloperIdentityResponse
s {$sel:httpStatus:GetOpenIdTokenForDeveloperIdentityResponse' :: Int
httpStatus = Int
a} :: GetOpenIdTokenForDeveloperIdentityResponse)
instance
Prelude.NFData
GetOpenIdTokenForDeveloperIdentityResponse