{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CognitoIdentity.GetOpenIdToken
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets an OpenID token, using a known Cognito ID. This known Cognito ID is
-- returned by GetId. You can optionally add additional logins for the
-- identity. Supplying multiple logins creates an implicit link.
--
-- The OpenID token is valid for 10 minutes.
--
-- This is a public API. You do not need any credentials to call this API.
module Amazonka.CognitoIdentity.GetOpenIdToken
  ( -- * Creating a Request
    GetOpenIdToken (..),
    newGetOpenIdToken,

    -- * Request Lenses
    getOpenIdToken_logins,
    getOpenIdToken_identityId,

    -- * Destructuring the Response
    GetOpenIdTokenResponse (..),
    newGetOpenIdTokenResponse,

    -- * Response Lenses
    getOpenIdTokenResponse_token,
    getOpenIdTokenResponse_identityId,
    getOpenIdTokenResponse_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

-- | Input to the GetOpenIdToken action.
--
-- /See:/ 'newGetOpenIdToken' smart constructor.
data GetOpenIdToken = GetOpenIdToken'
  { -- | A set of optional name-value pairs that map provider names to provider
    -- tokens. When using graph.facebook.com and www.amazon.com, supply the
    -- access_token returned from the provider\'s authflow. For
    -- accounts.google.com, an Amazon Cognito user pool provider, or any other
    -- OpenID Connect provider, always include the @id_token@.
    GetOpenIdToken -> Maybe (HashMap Text Text)
logins :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A unique identifier in the format REGION:GUID.
    GetOpenIdToken -> Text
identityId :: Prelude.Text
  }
  deriving (GetOpenIdToken -> GetOpenIdToken -> Bool
(GetOpenIdToken -> GetOpenIdToken -> Bool)
-> (GetOpenIdToken -> GetOpenIdToken -> Bool) -> Eq GetOpenIdToken
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOpenIdToken -> GetOpenIdToken -> Bool
$c/= :: GetOpenIdToken -> GetOpenIdToken -> Bool
== :: GetOpenIdToken -> GetOpenIdToken -> Bool
$c== :: GetOpenIdToken -> GetOpenIdToken -> Bool
Prelude.Eq, ReadPrec [GetOpenIdToken]
ReadPrec GetOpenIdToken
Int -> ReadS GetOpenIdToken
ReadS [GetOpenIdToken]
(Int -> ReadS GetOpenIdToken)
-> ReadS [GetOpenIdToken]
-> ReadPrec GetOpenIdToken
-> ReadPrec [GetOpenIdToken]
-> Read GetOpenIdToken
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOpenIdToken]
$creadListPrec :: ReadPrec [GetOpenIdToken]
readPrec :: ReadPrec GetOpenIdToken
$creadPrec :: ReadPrec GetOpenIdToken
readList :: ReadS [GetOpenIdToken]
$creadList :: ReadS [GetOpenIdToken]
readsPrec :: Int -> ReadS GetOpenIdToken
$creadsPrec :: Int -> ReadS GetOpenIdToken
Prelude.Read, Int -> GetOpenIdToken -> ShowS
[GetOpenIdToken] -> ShowS
GetOpenIdToken -> String
(Int -> GetOpenIdToken -> ShowS)
-> (GetOpenIdToken -> String)
-> ([GetOpenIdToken] -> ShowS)
-> Show GetOpenIdToken
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOpenIdToken] -> ShowS
$cshowList :: [GetOpenIdToken] -> ShowS
show :: GetOpenIdToken -> String
$cshow :: GetOpenIdToken -> String
showsPrec :: Int -> GetOpenIdToken -> ShowS
$cshowsPrec :: Int -> GetOpenIdToken -> ShowS
Prelude.Show, (forall x. GetOpenIdToken -> Rep GetOpenIdToken x)
-> (forall x. Rep GetOpenIdToken x -> GetOpenIdToken)
-> Generic GetOpenIdToken
forall x. Rep GetOpenIdToken x -> GetOpenIdToken
forall x. GetOpenIdToken -> Rep GetOpenIdToken x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetOpenIdToken x -> GetOpenIdToken
$cfrom :: forall x. GetOpenIdToken -> Rep GetOpenIdToken x
Prelude.Generic)

-- |
-- Create a value of 'GetOpenIdToken' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'logins', 'getOpenIdToken_logins' - A set of optional name-value pairs that map provider names to provider
-- tokens. When using graph.facebook.com and www.amazon.com, supply the
-- access_token returned from the provider\'s authflow. For
-- accounts.google.com, an Amazon Cognito user pool provider, or any other
-- OpenID Connect provider, always include the @id_token@.
--
-- 'identityId', 'getOpenIdToken_identityId' - A unique identifier in the format REGION:GUID.
newGetOpenIdToken ::
  -- | 'identityId'
  Prelude.Text ->
  GetOpenIdToken
newGetOpenIdToken :: Text -> GetOpenIdToken
newGetOpenIdToken Text
pIdentityId_ =
  GetOpenIdToken' :: Maybe (HashMap Text Text) -> Text -> GetOpenIdToken
GetOpenIdToken'
    { $sel:logins:GetOpenIdToken' :: Maybe (HashMap Text Text)
logins = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:identityId:GetOpenIdToken' :: Text
identityId = Text
pIdentityId_
    }

-- | A set of optional name-value pairs that map provider names to provider
-- tokens. When using graph.facebook.com and www.amazon.com, supply the
-- access_token returned from the provider\'s authflow. For
-- accounts.google.com, an Amazon Cognito user pool provider, or any other
-- OpenID Connect provider, always include the @id_token@.
getOpenIdToken_logins :: Lens.Lens' GetOpenIdToken (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getOpenIdToken_logins :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetOpenIdToken -> f GetOpenIdToken
getOpenIdToken_logins = (GetOpenIdToken -> Maybe (HashMap Text Text))
-> (GetOpenIdToken -> Maybe (HashMap Text Text) -> GetOpenIdToken)
-> Lens
     GetOpenIdToken
     GetOpenIdToken
     (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 (\GetOpenIdToken' {Maybe (HashMap Text Text)
logins :: Maybe (HashMap Text Text)
$sel:logins:GetOpenIdToken' :: GetOpenIdToken -> Maybe (HashMap Text Text)
logins} -> Maybe (HashMap Text Text)
logins) (\s :: GetOpenIdToken
s@GetOpenIdToken' {} Maybe (HashMap Text Text)
a -> GetOpenIdToken
s {$sel:logins:GetOpenIdToken' :: Maybe (HashMap Text Text)
logins = Maybe (HashMap Text Text)
a} :: GetOpenIdToken) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetOpenIdToken -> f GetOpenIdToken)
-> ((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)))
-> GetOpenIdToken
-> f GetOpenIdToken
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

-- | A unique identifier in the format REGION:GUID.
getOpenIdToken_identityId :: Lens.Lens' GetOpenIdToken Prelude.Text
getOpenIdToken_identityId :: (Text -> f Text) -> GetOpenIdToken -> f GetOpenIdToken
getOpenIdToken_identityId = (GetOpenIdToken -> Text)
-> (GetOpenIdToken -> Text -> GetOpenIdToken)
-> Lens GetOpenIdToken GetOpenIdToken Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdToken' {Text
identityId :: Text
$sel:identityId:GetOpenIdToken' :: GetOpenIdToken -> Text
identityId} -> Text
identityId) (\s :: GetOpenIdToken
s@GetOpenIdToken' {} Text
a -> GetOpenIdToken
s {$sel:identityId:GetOpenIdToken' :: Text
identityId = Text
a} :: GetOpenIdToken)

instance Core.AWSRequest GetOpenIdToken where
  type
    AWSResponse GetOpenIdToken =
      GetOpenIdTokenResponse
  request :: GetOpenIdToken -> Request GetOpenIdToken
request = Service -> GetOpenIdToken -> Request GetOpenIdToken
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetOpenIdToken
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetOpenIdToken)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetOpenIdToken))
-> Logger
-> Service
-> Proxy GetOpenIdToken
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetOpenIdToken)))
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 -> GetOpenIdTokenResponse
GetOpenIdTokenResponse'
            (Maybe Text -> Maybe Text -> Int -> GetOpenIdTokenResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> GetOpenIdTokenResponse)
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 -> GetOpenIdTokenResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetOpenIdTokenResponse)
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 -> GetOpenIdTokenResponse)
-> Either String Int -> Either String GetOpenIdTokenResponse
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 GetOpenIdToken

instance Prelude.NFData GetOpenIdToken

instance Core.ToHeaders GetOpenIdToken where
  toHeaders :: GetOpenIdToken -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetOpenIdToken -> 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.GetOpenIdToken" ::
                          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 GetOpenIdToken where
  toJSON :: GetOpenIdToken -> Value
toJSON GetOpenIdToken' {Maybe (HashMap Text Text)
Text
identityId :: Text
logins :: Maybe (HashMap Text Text)
$sel:identityId:GetOpenIdToken' :: GetOpenIdToken -> Text
$sel:logins:GetOpenIdToken' :: GetOpenIdToken -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Logins" 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)
logins,
            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)
          ]
      )

instance Core.ToPath GetOpenIdToken where
  toPath :: GetOpenIdToken -> ByteString
toPath = ByteString -> GetOpenIdToken -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetOpenIdToken where
  toQuery :: GetOpenIdToken -> QueryString
toQuery = QueryString -> GetOpenIdToken -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Returned in response to a successful GetOpenIdToken request.
--
-- /See:/ 'newGetOpenIdTokenResponse' smart constructor.
data GetOpenIdTokenResponse = GetOpenIdTokenResponse'
  { -- | An OpenID token, valid for 10 minutes.
    GetOpenIdTokenResponse -> Maybe Text
token :: Prelude.Maybe Prelude.Text,
    -- | A unique identifier in the format REGION:GUID. Note that the IdentityId
    -- returned may not match the one passed on input.
    GetOpenIdTokenResponse -> Maybe Text
identityId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetOpenIdTokenResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetOpenIdTokenResponse -> GetOpenIdTokenResponse -> Bool
(GetOpenIdTokenResponse -> GetOpenIdTokenResponse -> Bool)
-> (GetOpenIdTokenResponse -> GetOpenIdTokenResponse -> Bool)
-> Eq GetOpenIdTokenResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetOpenIdTokenResponse -> GetOpenIdTokenResponse -> Bool
$c/= :: GetOpenIdTokenResponse -> GetOpenIdTokenResponse -> Bool
== :: GetOpenIdTokenResponse -> GetOpenIdTokenResponse -> Bool
$c== :: GetOpenIdTokenResponse -> GetOpenIdTokenResponse -> Bool
Prelude.Eq, ReadPrec [GetOpenIdTokenResponse]
ReadPrec GetOpenIdTokenResponse
Int -> ReadS GetOpenIdTokenResponse
ReadS [GetOpenIdTokenResponse]
(Int -> ReadS GetOpenIdTokenResponse)
-> ReadS [GetOpenIdTokenResponse]
-> ReadPrec GetOpenIdTokenResponse
-> ReadPrec [GetOpenIdTokenResponse]
-> Read GetOpenIdTokenResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetOpenIdTokenResponse]
$creadListPrec :: ReadPrec [GetOpenIdTokenResponse]
readPrec :: ReadPrec GetOpenIdTokenResponse
$creadPrec :: ReadPrec GetOpenIdTokenResponse
readList :: ReadS [GetOpenIdTokenResponse]
$creadList :: ReadS [GetOpenIdTokenResponse]
readsPrec :: Int -> ReadS GetOpenIdTokenResponse
$creadsPrec :: Int -> ReadS GetOpenIdTokenResponse
Prelude.Read, Int -> GetOpenIdTokenResponse -> ShowS
[GetOpenIdTokenResponse] -> ShowS
GetOpenIdTokenResponse -> String
(Int -> GetOpenIdTokenResponse -> ShowS)
-> (GetOpenIdTokenResponse -> String)
-> ([GetOpenIdTokenResponse] -> ShowS)
-> Show GetOpenIdTokenResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetOpenIdTokenResponse] -> ShowS
$cshowList :: [GetOpenIdTokenResponse] -> ShowS
show :: GetOpenIdTokenResponse -> String
$cshow :: GetOpenIdTokenResponse -> String
showsPrec :: Int -> GetOpenIdTokenResponse -> ShowS
$cshowsPrec :: Int -> GetOpenIdTokenResponse -> ShowS
Prelude.Show, (forall x. GetOpenIdTokenResponse -> Rep GetOpenIdTokenResponse x)
-> (forall x.
    Rep GetOpenIdTokenResponse x -> GetOpenIdTokenResponse)
-> Generic GetOpenIdTokenResponse
forall x. Rep GetOpenIdTokenResponse x -> GetOpenIdTokenResponse
forall x. GetOpenIdTokenResponse -> Rep GetOpenIdTokenResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetOpenIdTokenResponse x -> GetOpenIdTokenResponse
$cfrom :: forall x. GetOpenIdTokenResponse -> Rep GetOpenIdTokenResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetOpenIdTokenResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'token', 'getOpenIdTokenResponse_token' - An OpenID token, valid for 10 minutes.
--
-- 'identityId', 'getOpenIdTokenResponse_identityId' - A unique identifier in the format REGION:GUID. Note that the IdentityId
-- returned may not match the one passed on input.
--
-- 'httpStatus', 'getOpenIdTokenResponse_httpStatus' - The response's http status code.
newGetOpenIdTokenResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetOpenIdTokenResponse
newGetOpenIdTokenResponse :: Int -> GetOpenIdTokenResponse
newGetOpenIdTokenResponse Int
pHttpStatus_ =
  GetOpenIdTokenResponse' :: Maybe Text -> Maybe Text -> Int -> GetOpenIdTokenResponse
GetOpenIdTokenResponse'
    { $sel:token:GetOpenIdTokenResponse' :: Maybe Text
token = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:identityId:GetOpenIdTokenResponse' :: Maybe Text
identityId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetOpenIdTokenResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An OpenID token, valid for 10 minutes.
getOpenIdTokenResponse_token :: Lens.Lens' GetOpenIdTokenResponse (Prelude.Maybe Prelude.Text)
getOpenIdTokenResponse_token :: (Maybe Text -> f (Maybe Text))
-> GetOpenIdTokenResponse -> f GetOpenIdTokenResponse
getOpenIdTokenResponse_token = (GetOpenIdTokenResponse -> Maybe Text)
-> (GetOpenIdTokenResponse -> Maybe Text -> GetOpenIdTokenResponse)
-> Lens
     GetOpenIdTokenResponse
     GetOpenIdTokenResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenResponse' {Maybe Text
token :: Maybe Text
$sel:token:GetOpenIdTokenResponse' :: GetOpenIdTokenResponse -> Maybe Text
token} -> Maybe Text
token) (\s :: GetOpenIdTokenResponse
s@GetOpenIdTokenResponse' {} Maybe Text
a -> GetOpenIdTokenResponse
s {$sel:token:GetOpenIdTokenResponse' :: Maybe Text
token = Maybe Text
a} :: GetOpenIdTokenResponse)

-- | A unique identifier in the format REGION:GUID. Note that the IdentityId
-- returned may not match the one passed on input.
getOpenIdTokenResponse_identityId :: Lens.Lens' GetOpenIdTokenResponse (Prelude.Maybe Prelude.Text)
getOpenIdTokenResponse_identityId :: (Maybe Text -> f (Maybe Text))
-> GetOpenIdTokenResponse -> f GetOpenIdTokenResponse
getOpenIdTokenResponse_identityId = (GetOpenIdTokenResponse -> Maybe Text)
-> (GetOpenIdTokenResponse -> Maybe Text -> GetOpenIdTokenResponse)
-> Lens
     GetOpenIdTokenResponse
     GetOpenIdTokenResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenResponse' {Maybe Text
identityId :: Maybe Text
$sel:identityId:GetOpenIdTokenResponse' :: GetOpenIdTokenResponse -> Maybe Text
identityId} -> Maybe Text
identityId) (\s :: GetOpenIdTokenResponse
s@GetOpenIdTokenResponse' {} Maybe Text
a -> GetOpenIdTokenResponse
s {$sel:identityId:GetOpenIdTokenResponse' :: Maybe Text
identityId = Maybe Text
a} :: GetOpenIdTokenResponse)

-- | The response's http status code.
getOpenIdTokenResponse_httpStatus :: Lens.Lens' GetOpenIdTokenResponse Prelude.Int
getOpenIdTokenResponse_httpStatus :: (Int -> f Int)
-> GetOpenIdTokenResponse -> f GetOpenIdTokenResponse
getOpenIdTokenResponse_httpStatus = (GetOpenIdTokenResponse -> Int)
-> (GetOpenIdTokenResponse -> Int -> GetOpenIdTokenResponse)
-> Lens GetOpenIdTokenResponse GetOpenIdTokenResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetOpenIdTokenResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetOpenIdTokenResponse' :: GetOpenIdTokenResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetOpenIdTokenResponse
s@GetOpenIdTokenResponse' {} Int
a -> GetOpenIdTokenResponse
s {$sel:httpStatus:GetOpenIdTokenResponse' :: Int
httpStatus = Int
a} :: GetOpenIdTokenResponse)

instance Prelude.NFData GetOpenIdTokenResponse