{-# 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.CognitoSync.SetIdentityPoolConfiguration
-- 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)
--
-- Sets the necessary configuration for push sync.
--
-- This API can only be called with developer credentials. You cannot call
-- this API with the temporary user credentials provided by Cognito
-- Identity.
module Amazonka.CognitoSync.SetIdentityPoolConfiguration
  ( -- * Creating a Request
    SetIdentityPoolConfiguration (..),
    newSetIdentityPoolConfiguration,

    -- * Request Lenses
    setIdentityPoolConfiguration_cognitoStreams,
    setIdentityPoolConfiguration_pushSync,
    setIdentityPoolConfiguration_identityPoolId,

    -- * Destructuring the Response
    SetIdentityPoolConfigurationResponse (..),
    newSetIdentityPoolConfigurationResponse,

    -- * Response Lenses
    setIdentityPoolConfigurationResponse_identityPoolId,
    setIdentityPoolConfigurationResponse_cognitoStreams,
    setIdentityPoolConfigurationResponse_pushSync,
    setIdentityPoolConfigurationResponse_httpStatus,
  )
where

import Amazonka.CognitoSync.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

-- | The input for the SetIdentityPoolConfiguration operation.
--
-- /See:/ 'newSetIdentityPoolConfiguration' smart constructor.
data SetIdentityPoolConfiguration = SetIdentityPoolConfiguration'
  { -- | Options to apply to this identity pool for Amazon Cognito streams.
    SetIdentityPoolConfiguration -> Maybe CognitoStreams
cognitoStreams :: Prelude.Maybe CognitoStreams,
    -- | Options to apply to this identity pool for push synchronization.
    SetIdentityPoolConfiguration -> Maybe PushSync
pushSync :: Prelude.Maybe PushSync,
    -- | A name-spaced GUID (for example,
    -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
    -- Cognito. This is the ID of the pool to modify.
    SetIdentityPoolConfiguration -> Text
identityPoolId :: Prelude.Text
  }
  deriving (SetIdentityPoolConfiguration
-> SetIdentityPoolConfiguration -> Bool
(SetIdentityPoolConfiguration
 -> SetIdentityPoolConfiguration -> Bool)
-> (SetIdentityPoolConfiguration
    -> SetIdentityPoolConfiguration -> Bool)
-> Eq SetIdentityPoolConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetIdentityPoolConfiguration
-> SetIdentityPoolConfiguration -> Bool
$c/= :: SetIdentityPoolConfiguration
-> SetIdentityPoolConfiguration -> Bool
== :: SetIdentityPoolConfiguration
-> SetIdentityPoolConfiguration -> Bool
$c== :: SetIdentityPoolConfiguration
-> SetIdentityPoolConfiguration -> Bool
Prelude.Eq, ReadPrec [SetIdentityPoolConfiguration]
ReadPrec SetIdentityPoolConfiguration
Int -> ReadS SetIdentityPoolConfiguration
ReadS [SetIdentityPoolConfiguration]
(Int -> ReadS SetIdentityPoolConfiguration)
-> ReadS [SetIdentityPoolConfiguration]
-> ReadPrec SetIdentityPoolConfiguration
-> ReadPrec [SetIdentityPoolConfiguration]
-> Read SetIdentityPoolConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetIdentityPoolConfiguration]
$creadListPrec :: ReadPrec [SetIdentityPoolConfiguration]
readPrec :: ReadPrec SetIdentityPoolConfiguration
$creadPrec :: ReadPrec SetIdentityPoolConfiguration
readList :: ReadS [SetIdentityPoolConfiguration]
$creadList :: ReadS [SetIdentityPoolConfiguration]
readsPrec :: Int -> ReadS SetIdentityPoolConfiguration
$creadsPrec :: Int -> ReadS SetIdentityPoolConfiguration
Prelude.Read, Int -> SetIdentityPoolConfiguration -> ShowS
[SetIdentityPoolConfiguration] -> ShowS
SetIdentityPoolConfiguration -> String
(Int -> SetIdentityPoolConfiguration -> ShowS)
-> (SetIdentityPoolConfiguration -> String)
-> ([SetIdentityPoolConfiguration] -> ShowS)
-> Show SetIdentityPoolConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetIdentityPoolConfiguration] -> ShowS
$cshowList :: [SetIdentityPoolConfiguration] -> ShowS
show :: SetIdentityPoolConfiguration -> String
$cshow :: SetIdentityPoolConfiguration -> String
showsPrec :: Int -> SetIdentityPoolConfiguration -> ShowS
$cshowsPrec :: Int -> SetIdentityPoolConfiguration -> ShowS
Prelude.Show, (forall x.
 SetIdentityPoolConfiguration -> Rep SetIdentityPoolConfiguration x)
-> (forall x.
    Rep SetIdentityPoolConfiguration x -> SetIdentityPoolConfiguration)
-> Generic SetIdentityPoolConfiguration
forall x.
Rep SetIdentityPoolConfiguration x -> SetIdentityPoolConfiguration
forall x.
SetIdentityPoolConfiguration -> Rep SetIdentityPoolConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetIdentityPoolConfiguration x -> SetIdentityPoolConfiguration
$cfrom :: forall x.
SetIdentityPoolConfiguration -> Rep SetIdentityPoolConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'SetIdentityPoolConfiguration' 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:
--
-- 'cognitoStreams', 'setIdentityPoolConfiguration_cognitoStreams' - Options to apply to this identity pool for Amazon Cognito streams.
--
-- 'pushSync', 'setIdentityPoolConfiguration_pushSync' - Options to apply to this identity pool for push synchronization.
--
-- 'identityPoolId', 'setIdentityPoolConfiguration_identityPoolId' - A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. This is the ID of the pool to modify.
newSetIdentityPoolConfiguration ::
  -- | 'identityPoolId'
  Prelude.Text ->
  SetIdentityPoolConfiguration
newSetIdentityPoolConfiguration :: Text -> SetIdentityPoolConfiguration
newSetIdentityPoolConfiguration Text
pIdentityPoolId_ =
  SetIdentityPoolConfiguration' :: Maybe CognitoStreams
-> Maybe PushSync -> Text -> SetIdentityPoolConfiguration
SetIdentityPoolConfiguration'
    { $sel:cognitoStreams:SetIdentityPoolConfiguration' :: Maybe CognitoStreams
cognitoStreams =
        Maybe CognitoStreams
forall a. Maybe a
Prelude.Nothing,
      $sel:pushSync:SetIdentityPoolConfiguration' :: Maybe PushSync
pushSync = Maybe PushSync
forall a. Maybe a
Prelude.Nothing,
      $sel:identityPoolId:SetIdentityPoolConfiguration' :: Text
identityPoolId = Text
pIdentityPoolId_
    }

-- | Options to apply to this identity pool for Amazon Cognito streams.
setIdentityPoolConfiguration_cognitoStreams :: Lens.Lens' SetIdentityPoolConfiguration (Prelude.Maybe CognitoStreams)
setIdentityPoolConfiguration_cognitoStreams :: (Maybe CognitoStreams -> f (Maybe CognitoStreams))
-> SetIdentityPoolConfiguration -> f SetIdentityPoolConfiguration
setIdentityPoolConfiguration_cognitoStreams = (SetIdentityPoolConfiguration -> Maybe CognitoStreams)
-> (SetIdentityPoolConfiguration
    -> Maybe CognitoStreams -> SetIdentityPoolConfiguration)
-> Lens
     SetIdentityPoolConfiguration
     SetIdentityPoolConfiguration
     (Maybe CognitoStreams)
     (Maybe CognitoStreams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityPoolConfiguration' {Maybe CognitoStreams
cognitoStreams :: Maybe CognitoStreams
$sel:cognitoStreams:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Maybe CognitoStreams
cognitoStreams} -> Maybe CognitoStreams
cognitoStreams) (\s :: SetIdentityPoolConfiguration
s@SetIdentityPoolConfiguration' {} Maybe CognitoStreams
a -> SetIdentityPoolConfiguration
s {$sel:cognitoStreams:SetIdentityPoolConfiguration' :: Maybe CognitoStreams
cognitoStreams = Maybe CognitoStreams
a} :: SetIdentityPoolConfiguration)

-- | Options to apply to this identity pool for push synchronization.
setIdentityPoolConfiguration_pushSync :: Lens.Lens' SetIdentityPoolConfiguration (Prelude.Maybe PushSync)
setIdentityPoolConfiguration_pushSync :: (Maybe PushSync -> f (Maybe PushSync))
-> SetIdentityPoolConfiguration -> f SetIdentityPoolConfiguration
setIdentityPoolConfiguration_pushSync = (SetIdentityPoolConfiguration -> Maybe PushSync)
-> (SetIdentityPoolConfiguration
    -> Maybe PushSync -> SetIdentityPoolConfiguration)
-> Lens
     SetIdentityPoolConfiguration
     SetIdentityPoolConfiguration
     (Maybe PushSync)
     (Maybe PushSync)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityPoolConfiguration' {Maybe PushSync
pushSync :: Maybe PushSync
$sel:pushSync:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Maybe PushSync
pushSync} -> Maybe PushSync
pushSync) (\s :: SetIdentityPoolConfiguration
s@SetIdentityPoolConfiguration' {} Maybe PushSync
a -> SetIdentityPoolConfiguration
s {$sel:pushSync:SetIdentityPoolConfiguration' :: Maybe PushSync
pushSync = Maybe PushSync
a} :: SetIdentityPoolConfiguration)

-- | A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito. This is the ID of the pool to modify.
setIdentityPoolConfiguration_identityPoolId :: Lens.Lens' SetIdentityPoolConfiguration Prelude.Text
setIdentityPoolConfiguration_identityPoolId :: (Text -> f Text)
-> SetIdentityPoolConfiguration -> f SetIdentityPoolConfiguration
setIdentityPoolConfiguration_identityPoolId = (SetIdentityPoolConfiguration -> Text)
-> (SetIdentityPoolConfiguration
    -> Text -> SetIdentityPoolConfiguration)
-> Lens
     SetIdentityPoolConfiguration SetIdentityPoolConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityPoolConfiguration' {Text
identityPoolId :: Text
$sel:identityPoolId:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Text
identityPoolId} -> Text
identityPoolId) (\s :: SetIdentityPoolConfiguration
s@SetIdentityPoolConfiguration' {} Text
a -> SetIdentityPoolConfiguration
s {$sel:identityPoolId:SetIdentityPoolConfiguration' :: Text
identityPoolId = Text
a} :: SetIdentityPoolConfiguration)

instance Core.AWSRequest SetIdentityPoolConfiguration where
  type
    AWSResponse SetIdentityPoolConfiguration =
      SetIdentityPoolConfigurationResponse
  request :: SetIdentityPoolConfiguration
-> Request SetIdentityPoolConfiguration
request = Service
-> SetIdentityPoolConfiguration
-> Request SetIdentityPoolConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy SetIdentityPoolConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SetIdentityPoolConfiguration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse SetIdentityPoolConfiguration))
-> Logger
-> Service
-> Proxy SetIdentityPoolConfiguration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse SetIdentityPoolConfiguration)))
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 CognitoStreams
-> Maybe PushSync
-> Int
-> SetIdentityPoolConfigurationResponse
SetIdentityPoolConfigurationResponse'
            (Maybe Text
 -> Maybe CognitoStreams
 -> Maybe PushSync
 -> Int
 -> SetIdentityPoolConfigurationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe CognitoStreams
      -> Maybe PushSync -> Int -> SetIdentityPoolConfigurationResponse)
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
"IdentityPoolId")
            Either
  String
  (Maybe CognitoStreams
   -> Maybe PushSync -> Int -> SetIdentityPoolConfigurationResponse)
-> Either String (Maybe CognitoStreams)
-> Either
     String
     (Maybe PushSync -> Int -> SetIdentityPoolConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe CognitoStreams)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CognitoStreams")
            Either
  String
  (Maybe PushSync -> Int -> SetIdentityPoolConfigurationResponse)
-> Either String (Maybe PushSync)
-> Either String (Int -> SetIdentityPoolConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe PushSync)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PushSync")
            Either String (Int -> SetIdentityPoolConfigurationResponse)
-> Either String Int
-> Either String SetIdentityPoolConfigurationResponse
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
    SetIdentityPoolConfiguration

instance Prelude.NFData SetIdentityPoolConfiguration

instance Core.ToHeaders SetIdentityPoolConfiguration where
  toHeaders :: SetIdentityPoolConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders -> SetIdentityPoolConfiguration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 SetIdentityPoolConfiguration where
  toJSON :: SetIdentityPoolConfiguration -> Value
toJSON SetIdentityPoolConfiguration' {Maybe PushSync
Maybe CognitoStreams
Text
identityPoolId :: Text
pushSync :: Maybe PushSync
cognitoStreams :: Maybe CognitoStreams
$sel:identityPoolId:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Text
$sel:pushSync:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Maybe PushSync
$sel:cognitoStreams:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Maybe CognitoStreams
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"CognitoStreams" Text -> CognitoStreams -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CognitoStreams -> Pair) -> Maybe CognitoStreams -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CognitoStreams
cognitoStreams,
            (Text
"PushSync" Text -> PushSync -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PushSync -> Pair) -> Maybe PushSync -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PushSync
pushSync
          ]
      )

instance Core.ToPath SetIdentityPoolConfiguration where
  toPath :: SetIdentityPoolConfiguration -> ByteString
toPath SetIdentityPoolConfiguration' {Maybe PushSync
Maybe CognitoStreams
Text
identityPoolId :: Text
pushSync :: Maybe PushSync
cognitoStreams :: Maybe CognitoStreams
$sel:identityPoolId:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Text
$sel:pushSync:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Maybe PushSync
$sel:cognitoStreams:SetIdentityPoolConfiguration' :: SetIdentityPoolConfiguration -> Maybe CognitoStreams
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/identitypools/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
identityPoolId,
        ByteString
"/configuration"
      ]

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

-- | The output for the SetIdentityPoolConfiguration operation
--
-- /See:/ 'newSetIdentityPoolConfigurationResponse' smart constructor.
data SetIdentityPoolConfigurationResponse = SetIdentityPoolConfigurationResponse'
  { -- | A name-spaced GUID (for example,
    -- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
    -- Cognito.
    SetIdentityPoolConfigurationResponse -> Maybe Text
identityPoolId :: Prelude.Maybe Prelude.Text,
    -- | Options to apply to this identity pool for Amazon Cognito streams.
    SetIdentityPoolConfigurationResponse -> Maybe CognitoStreams
cognitoStreams :: Prelude.Maybe CognitoStreams,
    -- | Options to apply to this identity pool for push synchronization.
    SetIdentityPoolConfigurationResponse -> Maybe PushSync
pushSync :: Prelude.Maybe PushSync,
    -- | The response's http status code.
    SetIdentityPoolConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (SetIdentityPoolConfigurationResponse
-> SetIdentityPoolConfigurationResponse -> Bool
(SetIdentityPoolConfigurationResponse
 -> SetIdentityPoolConfigurationResponse -> Bool)
-> (SetIdentityPoolConfigurationResponse
    -> SetIdentityPoolConfigurationResponse -> Bool)
-> Eq SetIdentityPoolConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetIdentityPoolConfigurationResponse
-> SetIdentityPoolConfigurationResponse -> Bool
$c/= :: SetIdentityPoolConfigurationResponse
-> SetIdentityPoolConfigurationResponse -> Bool
== :: SetIdentityPoolConfigurationResponse
-> SetIdentityPoolConfigurationResponse -> Bool
$c== :: SetIdentityPoolConfigurationResponse
-> SetIdentityPoolConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [SetIdentityPoolConfigurationResponse]
ReadPrec SetIdentityPoolConfigurationResponse
Int -> ReadS SetIdentityPoolConfigurationResponse
ReadS [SetIdentityPoolConfigurationResponse]
(Int -> ReadS SetIdentityPoolConfigurationResponse)
-> ReadS [SetIdentityPoolConfigurationResponse]
-> ReadPrec SetIdentityPoolConfigurationResponse
-> ReadPrec [SetIdentityPoolConfigurationResponse]
-> Read SetIdentityPoolConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetIdentityPoolConfigurationResponse]
$creadListPrec :: ReadPrec [SetIdentityPoolConfigurationResponse]
readPrec :: ReadPrec SetIdentityPoolConfigurationResponse
$creadPrec :: ReadPrec SetIdentityPoolConfigurationResponse
readList :: ReadS [SetIdentityPoolConfigurationResponse]
$creadList :: ReadS [SetIdentityPoolConfigurationResponse]
readsPrec :: Int -> ReadS SetIdentityPoolConfigurationResponse
$creadsPrec :: Int -> ReadS SetIdentityPoolConfigurationResponse
Prelude.Read, Int -> SetIdentityPoolConfigurationResponse -> ShowS
[SetIdentityPoolConfigurationResponse] -> ShowS
SetIdentityPoolConfigurationResponse -> String
(Int -> SetIdentityPoolConfigurationResponse -> ShowS)
-> (SetIdentityPoolConfigurationResponse -> String)
-> ([SetIdentityPoolConfigurationResponse] -> ShowS)
-> Show SetIdentityPoolConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetIdentityPoolConfigurationResponse] -> ShowS
$cshowList :: [SetIdentityPoolConfigurationResponse] -> ShowS
show :: SetIdentityPoolConfigurationResponse -> String
$cshow :: SetIdentityPoolConfigurationResponse -> String
showsPrec :: Int -> SetIdentityPoolConfigurationResponse -> ShowS
$cshowsPrec :: Int -> SetIdentityPoolConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 SetIdentityPoolConfigurationResponse
 -> Rep SetIdentityPoolConfigurationResponse x)
-> (forall x.
    Rep SetIdentityPoolConfigurationResponse x
    -> SetIdentityPoolConfigurationResponse)
-> Generic SetIdentityPoolConfigurationResponse
forall x.
Rep SetIdentityPoolConfigurationResponse x
-> SetIdentityPoolConfigurationResponse
forall x.
SetIdentityPoolConfigurationResponse
-> Rep SetIdentityPoolConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetIdentityPoolConfigurationResponse x
-> SetIdentityPoolConfigurationResponse
$cfrom :: forall x.
SetIdentityPoolConfigurationResponse
-> Rep SetIdentityPoolConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'SetIdentityPoolConfigurationResponse' 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:
--
-- 'identityPoolId', 'setIdentityPoolConfigurationResponse_identityPoolId' - A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito.
--
-- 'cognitoStreams', 'setIdentityPoolConfigurationResponse_cognitoStreams' - Options to apply to this identity pool for Amazon Cognito streams.
--
-- 'pushSync', 'setIdentityPoolConfigurationResponse_pushSync' - Options to apply to this identity pool for push synchronization.
--
-- 'httpStatus', 'setIdentityPoolConfigurationResponse_httpStatus' - The response's http status code.
newSetIdentityPoolConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  SetIdentityPoolConfigurationResponse
newSetIdentityPoolConfigurationResponse :: Int -> SetIdentityPoolConfigurationResponse
newSetIdentityPoolConfigurationResponse Int
pHttpStatus_ =
  SetIdentityPoolConfigurationResponse' :: Maybe Text
-> Maybe CognitoStreams
-> Maybe PushSync
-> Int
-> SetIdentityPoolConfigurationResponse
SetIdentityPoolConfigurationResponse'
    { $sel:identityPoolId:SetIdentityPoolConfigurationResponse' :: Maybe Text
identityPoolId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:cognitoStreams:SetIdentityPoolConfigurationResponse' :: Maybe CognitoStreams
cognitoStreams = Maybe CognitoStreams
forall a. Maybe a
Prelude.Nothing,
      $sel:pushSync:SetIdentityPoolConfigurationResponse' :: Maybe PushSync
pushSync = Maybe PushSync
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:SetIdentityPoolConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A name-spaced GUID (for example,
-- us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
-- Cognito.
setIdentityPoolConfigurationResponse_identityPoolId :: Lens.Lens' SetIdentityPoolConfigurationResponse (Prelude.Maybe Prelude.Text)
setIdentityPoolConfigurationResponse_identityPoolId :: (Maybe Text -> f (Maybe Text))
-> SetIdentityPoolConfigurationResponse
-> f SetIdentityPoolConfigurationResponse
setIdentityPoolConfigurationResponse_identityPoolId = (SetIdentityPoolConfigurationResponse -> Maybe Text)
-> (SetIdentityPoolConfigurationResponse
    -> Maybe Text -> SetIdentityPoolConfigurationResponse)
-> Lens
     SetIdentityPoolConfigurationResponse
     SetIdentityPoolConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityPoolConfigurationResponse' {Maybe Text
identityPoolId :: Maybe Text
$sel:identityPoolId:SetIdentityPoolConfigurationResponse' :: SetIdentityPoolConfigurationResponse -> Maybe Text
identityPoolId} -> Maybe Text
identityPoolId) (\s :: SetIdentityPoolConfigurationResponse
s@SetIdentityPoolConfigurationResponse' {} Maybe Text
a -> SetIdentityPoolConfigurationResponse
s {$sel:identityPoolId:SetIdentityPoolConfigurationResponse' :: Maybe Text
identityPoolId = Maybe Text
a} :: SetIdentityPoolConfigurationResponse)

-- | Options to apply to this identity pool for Amazon Cognito streams.
setIdentityPoolConfigurationResponse_cognitoStreams :: Lens.Lens' SetIdentityPoolConfigurationResponse (Prelude.Maybe CognitoStreams)
setIdentityPoolConfigurationResponse_cognitoStreams :: (Maybe CognitoStreams -> f (Maybe CognitoStreams))
-> SetIdentityPoolConfigurationResponse
-> f SetIdentityPoolConfigurationResponse
setIdentityPoolConfigurationResponse_cognitoStreams = (SetIdentityPoolConfigurationResponse -> Maybe CognitoStreams)
-> (SetIdentityPoolConfigurationResponse
    -> Maybe CognitoStreams -> SetIdentityPoolConfigurationResponse)
-> Lens
     SetIdentityPoolConfigurationResponse
     SetIdentityPoolConfigurationResponse
     (Maybe CognitoStreams)
     (Maybe CognitoStreams)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityPoolConfigurationResponse' {Maybe CognitoStreams
cognitoStreams :: Maybe CognitoStreams
$sel:cognitoStreams:SetIdentityPoolConfigurationResponse' :: SetIdentityPoolConfigurationResponse -> Maybe CognitoStreams
cognitoStreams} -> Maybe CognitoStreams
cognitoStreams) (\s :: SetIdentityPoolConfigurationResponse
s@SetIdentityPoolConfigurationResponse' {} Maybe CognitoStreams
a -> SetIdentityPoolConfigurationResponse
s {$sel:cognitoStreams:SetIdentityPoolConfigurationResponse' :: Maybe CognitoStreams
cognitoStreams = Maybe CognitoStreams
a} :: SetIdentityPoolConfigurationResponse)

-- | Options to apply to this identity pool for push synchronization.
setIdentityPoolConfigurationResponse_pushSync :: Lens.Lens' SetIdentityPoolConfigurationResponse (Prelude.Maybe PushSync)
setIdentityPoolConfigurationResponse_pushSync :: (Maybe PushSync -> f (Maybe PushSync))
-> SetIdentityPoolConfigurationResponse
-> f SetIdentityPoolConfigurationResponse
setIdentityPoolConfigurationResponse_pushSync = (SetIdentityPoolConfigurationResponse -> Maybe PushSync)
-> (SetIdentityPoolConfigurationResponse
    -> Maybe PushSync -> SetIdentityPoolConfigurationResponse)
-> Lens
     SetIdentityPoolConfigurationResponse
     SetIdentityPoolConfigurationResponse
     (Maybe PushSync)
     (Maybe PushSync)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetIdentityPoolConfigurationResponse' {Maybe PushSync
pushSync :: Maybe PushSync
$sel:pushSync:SetIdentityPoolConfigurationResponse' :: SetIdentityPoolConfigurationResponse -> Maybe PushSync
pushSync} -> Maybe PushSync
pushSync) (\s :: SetIdentityPoolConfigurationResponse
s@SetIdentityPoolConfigurationResponse' {} Maybe PushSync
a -> SetIdentityPoolConfigurationResponse
s {$sel:pushSync:SetIdentityPoolConfigurationResponse' :: Maybe PushSync
pushSync = Maybe PushSync
a} :: SetIdentityPoolConfigurationResponse)

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

instance
  Prelude.NFData
    SetIdentityPoolConfigurationResponse