{-# 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.MergeDeveloperIdentities
-- 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)
--
-- Merges two users having different @IdentityId@s, existing in the same
-- identity pool, and identified by the same developer provider. You can
-- use this action to request that discrete users be merged and identified
-- as a single user in the Cognito environment. Cognito associates the
-- given source user (@SourceUserIdentifier@) with the @IdentityId@ of the
-- @DestinationUserIdentifier@. Only developer-authenticated users can be
-- merged. If the users to be merged are associated with the same public
-- provider, but as two different users, an exception will be thrown.
--
-- The number of linked logins is limited to 20. So, the number of linked
-- logins for the source user, @SourceUserIdentifier@, and the destination
-- user, @DestinationUserIdentifier@, together should not be larger than
-- 20. Otherwise, an exception will be thrown.
--
-- You must use AWS Developer credentials to call this API.
module Amazonka.CognitoIdentity.MergeDeveloperIdentities
  ( -- * Creating a Request
    MergeDeveloperIdentities (..),
    newMergeDeveloperIdentities,

    -- * Request Lenses
    mergeDeveloperIdentities_sourceUserIdentifier,
    mergeDeveloperIdentities_destinationUserIdentifier,
    mergeDeveloperIdentities_developerProviderName,
    mergeDeveloperIdentities_identityPoolId,

    -- * Destructuring the Response
    MergeDeveloperIdentitiesResponse (..),
    newMergeDeveloperIdentitiesResponse,

    -- * Response Lenses
    mergeDeveloperIdentitiesResponse_identityId,
    mergeDeveloperIdentitiesResponse_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 @MergeDeveloperIdentities@ action.
--
-- /See:/ 'newMergeDeveloperIdentities' smart constructor.
data MergeDeveloperIdentities = MergeDeveloperIdentities'
  { -- | User identifier for the source user. The value should be a
    -- @DeveloperUserIdentifier@.
    MergeDeveloperIdentities -> Text
sourceUserIdentifier :: Prelude.Text,
    -- | User identifier for the destination user. The value should be a
    -- @DeveloperUserIdentifier@.
    MergeDeveloperIdentities -> Text
destinationUserIdentifier :: Prelude.Text,
    -- | The \"domain\" by which Cognito will refer to your users. This is a
    -- (pseudo) domain name that you provide while creating an identity pool.
    -- This name acts as a placeholder that allows your backend and the Cognito
    -- service to communicate about the developer provider. For the
    -- @DeveloperProviderName@, you can use letters as well as period (.),
    -- underscore (_), and dash (-).
    MergeDeveloperIdentities -> Text
developerProviderName :: Prelude.Text,
    -- | An identity pool ID in the format REGION:GUID.
    MergeDeveloperIdentities -> Text
identityPoolId :: Prelude.Text
  }
  deriving (MergeDeveloperIdentities -> MergeDeveloperIdentities -> Bool
(MergeDeveloperIdentities -> MergeDeveloperIdentities -> Bool)
-> (MergeDeveloperIdentities -> MergeDeveloperIdentities -> Bool)
-> Eq MergeDeveloperIdentities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergeDeveloperIdentities -> MergeDeveloperIdentities -> Bool
$c/= :: MergeDeveloperIdentities -> MergeDeveloperIdentities -> Bool
== :: MergeDeveloperIdentities -> MergeDeveloperIdentities -> Bool
$c== :: MergeDeveloperIdentities -> MergeDeveloperIdentities -> Bool
Prelude.Eq, ReadPrec [MergeDeveloperIdentities]
ReadPrec MergeDeveloperIdentities
Int -> ReadS MergeDeveloperIdentities
ReadS [MergeDeveloperIdentities]
(Int -> ReadS MergeDeveloperIdentities)
-> ReadS [MergeDeveloperIdentities]
-> ReadPrec MergeDeveloperIdentities
-> ReadPrec [MergeDeveloperIdentities]
-> Read MergeDeveloperIdentities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergeDeveloperIdentities]
$creadListPrec :: ReadPrec [MergeDeveloperIdentities]
readPrec :: ReadPrec MergeDeveloperIdentities
$creadPrec :: ReadPrec MergeDeveloperIdentities
readList :: ReadS [MergeDeveloperIdentities]
$creadList :: ReadS [MergeDeveloperIdentities]
readsPrec :: Int -> ReadS MergeDeveloperIdentities
$creadsPrec :: Int -> ReadS MergeDeveloperIdentities
Prelude.Read, Int -> MergeDeveloperIdentities -> ShowS
[MergeDeveloperIdentities] -> ShowS
MergeDeveloperIdentities -> String
(Int -> MergeDeveloperIdentities -> ShowS)
-> (MergeDeveloperIdentities -> String)
-> ([MergeDeveloperIdentities] -> ShowS)
-> Show MergeDeveloperIdentities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergeDeveloperIdentities] -> ShowS
$cshowList :: [MergeDeveloperIdentities] -> ShowS
show :: MergeDeveloperIdentities -> String
$cshow :: MergeDeveloperIdentities -> String
showsPrec :: Int -> MergeDeveloperIdentities -> ShowS
$cshowsPrec :: Int -> MergeDeveloperIdentities -> ShowS
Prelude.Show, (forall x.
 MergeDeveloperIdentities -> Rep MergeDeveloperIdentities x)
-> (forall x.
    Rep MergeDeveloperIdentities x -> MergeDeveloperIdentities)
-> Generic MergeDeveloperIdentities
forall x.
Rep MergeDeveloperIdentities x -> MergeDeveloperIdentities
forall x.
MergeDeveloperIdentities -> Rep MergeDeveloperIdentities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MergeDeveloperIdentities x -> MergeDeveloperIdentities
$cfrom :: forall x.
MergeDeveloperIdentities -> Rep MergeDeveloperIdentities x
Prelude.Generic)

-- |
-- Create a value of 'MergeDeveloperIdentities' 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:
--
-- 'sourceUserIdentifier', 'mergeDeveloperIdentities_sourceUserIdentifier' - User identifier for the source user. The value should be a
-- @DeveloperUserIdentifier@.
--
-- 'destinationUserIdentifier', 'mergeDeveloperIdentities_destinationUserIdentifier' - User identifier for the destination user. The value should be a
-- @DeveloperUserIdentifier@.
--
-- 'developerProviderName', 'mergeDeveloperIdentities_developerProviderName' - The \"domain\" by which Cognito will refer to your users. This is a
-- (pseudo) domain name that you provide while creating an identity pool.
-- This name acts as a placeholder that allows your backend and the Cognito
-- service to communicate about the developer provider. For the
-- @DeveloperProviderName@, you can use letters as well as period (.),
-- underscore (_), and dash (-).
--
-- 'identityPoolId', 'mergeDeveloperIdentities_identityPoolId' - An identity pool ID in the format REGION:GUID.
newMergeDeveloperIdentities ::
  -- | 'sourceUserIdentifier'
  Prelude.Text ->
  -- | 'destinationUserIdentifier'
  Prelude.Text ->
  -- | 'developerProviderName'
  Prelude.Text ->
  -- | 'identityPoolId'
  Prelude.Text ->
  MergeDeveloperIdentities
newMergeDeveloperIdentities :: Text -> Text -> Text -> Text -> MergeDeveloperIdentities
newMergeDeveloperIdentities
  Text
pSourceUserIdentifier_
  Text
pDestinationUserIdentifier_
  Text
pDeveloperProviderName_
  Text
pIdentityPoolId_ =
    MergeDeveloperIdentities' :: Text -> Text -> Text -> Text -> MergeDeveloperIdentities
MergeDeveloperIdentities'
      { $sel:sourceUserIdentifier:MergeDeveloperIdentities' :: Text
sourceUserIdentifier =
          Text
pSourceUserIdentifier_,
        $sel:destinationUserIdentifier:MergeDeveloperIdentities' :: Text
destinationUserIdentifier =
          Text
pDestinationUserIdentifier_,
        $sel:developerProviderName:MergeDeveloperIdentities' :: Text
developerProviderName = Text
pDeveloperProviderName_,
        $sel:identityPoolId:MergeDeveloperIdentities' :: Text
identityPoolId = Text
pIdentityPoolId_
      }

-- | User identifier for the source user. The value should be a
-- @DeveloperUserIdentifier@.
mergeDeveloperIdentities_sourceUserIdentifier :: Lens.Lens' MergeDeveloperIdentities Prelude.Text
mergeDeveloperIdentities_sourceUserIdentifier :: (Text -> f Text)
-> MergeDeveloperIdentities -> f MergeDeveloperIdentities
mergeDeveloperIdentities_sourceUserIdentifier = (MergeDeveloperIdentities -> Text)
-> (MergeDeveloperIdentities -> Text -> MergeDeveloperIdentities)
-> Lens MergeDeveloperIdentities MergeDeveloperIdentities Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeDeveloperIdentities' {Text
sourceUserIdentifier :: Text
$sel:sourceUserIdentifier:MergeDeveloperIdentities' :: MergeDeveloperIdentities -> Text
sourceUserIdentifier} -> Text
sourceUserIdentifier) (\s :: MergeDeveloperIdentities
s@MergeDeveloperIdentities' {} Text
a -> MergeDeveloperIdentities
s {$sel:sourceUserIdentifier:MergeDeveloperIdentities' :: Text
sourceUserIdentifier = Text
a} :: MergeDeveloperIdentities)

-- | User identifier for the destination user. The value should be a
-- @DeveloperUserIdentifier@.
mergeDeveloperIdentities_destinationUserIdentifier :: Lens.Lens' MergeDeveloperIdentities Prelude.Text
mergeDeveloperIdentities_destinationUserIdentifier :: (Text -> f Text)
-> MergeDeveloperIdentities -> f MergeDeveloperIdentities
mergeDeveloperIdentities_destinationUserIdentifier = (MergeDeveloperIdentities -> Text)
-> (MergeDeveloperIdentities -> Text -> MergeDeveloperIdentities)
-> Lens MergeDeveloperIdentities MergeDeveloperIdentities Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeDeveloperIdentities' {Text
destinationUserIdentifier :: Text
$sel:destinationUserIdentifier:MergeDeveloperIdentities' :: MergeDeveloperIdentities -> Text
destinationUserIdentifier} -> Text
destinationUserIdentifier) (\s :: MergeDeveloperIdentities
s@MergeDeveloperIdentities' {} Text
a -> MergeDeveloperIdentities
s {$sel:destinationUserIdentifier:MergeDeveloperIdentities' :: Text
destinationUserIdentifier = Text
a} :: MergeDeveloperIdentities)

-- | The \"domain\" by which Cognito will refer to your users. This is a
-- (pseudo) domain name that you provide while creating an identity pool.
-- This name acts as a placeholder that allows your backend and the Cognito
-- service to communicate about the developer provider. For the
-- @DeveloperProviderName@, you can use letters as well as period (.),
-- underscore (_), and dash (-).
mergeDeveloperIdentities_developerProviderName :: Lens.Lens' MergeDeveloperIdentities Prelude.Text
mergeDeveloperIdentities_developerProviderName :: (Text -> f Text)
-> MergeDeveloperIdentities -> f MergeDeveloperIdentities
mergeDeveloperIdentities_developerProviderName = (MergeDeveloperIdentities -> Text)
-> (MergeDeveloperIdentities -> Text -> MergeDeveloperIdentities)
-> Lens MergeDeveloperIdentities MergeDeveloperIdentities Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeDeveloperIdentities' {Text
developerProviderName :: Text
$sel:developerProviderName:MergeDeveloperIdentities' :: MergeDeveloperIdentities -> Text
developerProviderName} -> Text
developerProviderName) (\s :: MergeDeveloperIdentities
s@MergeDeveloperIdentities' {} Text
a -> MergeDeveloperIdentities
s {$sel:developerProviderName:MergeDeveloperIdentities' :: Text
developerProviderName = Text
a} :: MergeDeveloperIdentities)

-- | An identity pool ID in the format REGION:GUID.
mergeDeveloperIdentities_identityPoolId :: Lens.Lens' MergeDeveloperIdentities Prelude.Text
mergeDeveloperIdentities_identityPoolId :: (Text -> f Text)
-> MergeDeveloperIdentities -> f MergeDeveloperIdentities
mergeDeveloperIdentities_identityPoolId = (MergeDeveloperIdentities -> Text)
-> (MergeDeveloperIdentities -> Text -> MergeDeveloperIdentities)
-> Lens MergeDeveloperIdentities MergeDeveloperIdentities Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MergeDeveloperIdentities' {Text
identityPoolId :: Text
$sel:identityPoolId:MergeDeveloperIdentities' :: MergeDeveloperIdentities -> Text
identityPoolId} -> Text
identityPoolId) (\s :: MergeDeveloperIdentities
s@MergeDeveloperIdentities' {} Text
a -> MergeDeveloperIdentities
s {$sel:identityPoolId:MergeDeveloperIdentities' :: Text
identityPoolId = Text
a} :: MergeDeveloperIdentities)

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

instance Prelude.NFData MergeDeveloperIdentities

instance Core.ToHeaders MergeDeveloperIdentities where
  toHeaders :: MergeDeveloperIdentities -> ResponseHeaders
toHeaders =
    ResponseHeaders -> MergeDeveloperIdentities -> 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.MergeDeveloperIdentities" ::
                          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 MergeDeveloperIdentities where
  toJSON :: MergeDeveloperIdentities -> Value
toJSON MergeDeveloperIdentities' {Text
identityPoolId :: Text
developerProviderName :: Text
destinationUserIdentifier :: Text
sourceUserIdentifier :: Text
$sel:identityPoolId:MergeDeveloperIdentities' :: MergeDeveloperIdentities -> Text
$sel:developerProviderName:MergeDeveloperIdentities' :: MergeDeveloperIdentities -> Text
$sel:destinationUserIdentifier:MergeDeveloperIdentities' :: MergeDeveloperIdentities -> Text
$sel:sourceUserIdentifier:MergeDeveloperIdentities' :: MergeDeveloperIdentities -> 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
"SourceUserIdentifier"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sourceUserIdentifier
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"DestinationUserIdentifier"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
destinationUserIdentifier
              ),
            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
"IdentityPoolId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
identityPoolId)
          ]
      )

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

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

-- | Returned in response to a successful @MergeDeveloperIdentities@ action.
--
-- /See:/ 'newMergeDeveloperIdentitiesResponse' smart constructor.
data MergeDeveloperIdentitiesResponse = MergeDeveloperIdentitiesResponse'
  { -- | A unique identifier in the format REGION:GUID.
    MergeDeveloperIdentitiesResponse -> Maybe Text
identityId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    MergeDeveloperIdentitiesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (MergeDeveloperIdentitiesResponse
-> MergeDeveloperIdentitiesResponse -> Bool
(MergeDeveloperIdentitiesResponse
 -> MergeDeveloperIdentitiesResponse -> Bool)
-> (MergeDeveloperIdentitiesResponse
    -> MergeDeveloperIdentitiesResponse -> Bool)
-> Eq MergeDeveloperIdentitiesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MergeDeveloperIdentitiesResponse
-> MergeDeveloperIdentitiesResponse -> Bool
$c/= :: MergeDeveloperIdentitiesResponse
-> MergeDeveloperIdentitiesResponse -> Bool
== :: MergeDeveloperIdentitiesResponse
-> MergeDeveloperIdentitiesResponse -> Bool
$c== :: MergeDeveloperIdentitiesResponse
-> MergeDeveloperIdentitiesResponse -> Bool
Prelude.Eq, ReadPrec [MergeDeveloperIdentitiesResponse]
ReadPrec MergeDeveloperIdentitiesResponse
Int -> ReadS MergeDeveloperIdentitiesResponse
ReadS [MergeDeveloperIdentitiesResponse]
(Int -> ReadS MergeDeveloperIdentitiesResponse)
-> ReadS [MergeDeveloperIdentitiesResponse]
-> ReadPrec MergeDeveloperIdentitiesResponse
-> ReadPrec [MergeDeveloperIdentitiesResponse]
-> Read MergeDeveloperIdentitiesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MergeDeveloperIdentitiesResponse]
$creadListPrec :: ReadPrec [MergeDeveloperIdentitiesResponse]
readPrec :: ReadPrec MergeDeveloperIdentitiesResponse
$creadPrec :: ReadPrec MergeDeveloperIdentitiesResponse
readList :: ReadS [MergeDeveloperIdentitiesResponse]
$creadList :: ReadS [MergeDeveloperIdentitiesResponse]
readsPrec :: Int -> ReadS MergeDeveloperIdentitiesResponse
$creadsPrec :: Int -> ReadS MergeDeveloperIdentitiesResponse
Prelude.Read, Int -> MergeDeveloperIdentitiesResponse -> ShowS
[MergeDeveloperIdentitiesResponse] -> ShowS
MergeDeveloperIdentitiesResponse -> String
(Int -> MergeDeveloperIdentitiesResponse -> ShowS)
-> (MergeDeveloperIdentitiesResponse -> String)
-> ([MergeDeveloperIdentitiesResponse] -> ShowS)
-> Show MergeDeveloperIdentitiesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MergeDeveloperIdentitiesResponse] -> ShowS
$cshowList :: [MergeDeveloperIdentitiesResponse] -> ShowS
show :: MergeDeveloperIdentitiesResponse -> String
$cshow :: MergeDeveloperIdentitiesResponse -> String
showsPrec :: Int -> MergeDeveloperIdentitiesResponse -> ShowS
$cshowsPrec :: Int -> MergeDeveloperIdentitiesResponse -> ShowS
Prelude.Show, (forall x.
 MergeDeveloperIdentitiesResponse
 -> Rep MergeDeveloperIdentitiesResponse x)
-> (forall x.
    Rep MergeDeveloperIdentitiesResponse x
    -> MergeDeveloperIdentitiesResponse)
-> Generic MergeDeveloperIdentitiesResponse
forall x.
Rep MergeDeveloperIdentitiesResponse x
-> MergeDeveloperIdentitiesResponse
forall x.
MergeDeveloperIdentitiesResponse
-> Rep MergeDeveloperIdentitiesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MergeDeveloperIdentitiesResponse x
-> MergeDeveloperIdentitiesResponse
$cfrom :: forall x.
MergeDeveloperIdentitiesResponse
-> Rep MergeDeveloperIdentitiesResponse x
Prelude.Generic)

-- |
-- Create a value of 'MergeDeveloperIdentitiesResponse' 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:
--
-- 'identityId', 'mergeDeveloperIdentitiesResponse_identityId' - A unique identifier in the format REGION:GUID.
--
-- 'httpStatus', 'mergeDeveloperIdentitiesResponse_httpStatus' - The response's http status code.
newMergeDeveloperIdentitiesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  MergeDeveloperIdentitiesResponse
newMergeDeveloperIdentitiesResponse :: Int -> MergeDeveloperIdentitiesResponse
newMergeDeveloperIdentitiesResponse Int
pHttpStatus_ =
  MergeDeveloperIdentitiesResponse' :: Maybe Text -> Int -> MergeDeveloperIdentitiesResponse
MergeDeveloperIdentitiesResponse'
    { $sel:identityId:MergeDeveloperIdentitiesResponse' :: Maybe Text
identityId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:MergeDeveloperIdentitiesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

instance
  Prelude.NFData
    MergeDeveloperIdentitiesResponse