{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CognitoIdentity.Types.IdentityPoolShortDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data IdentityPoolShortDescription = IdentityPoolShortDescription'
{
IdentityPoolShortDescription -> Maybe Text
identityPoolId :: Prelude.Maybe Prelude.Text,
IdentityPoolShortDescription -> Maybe Text
identityPoolName :: Prelude.Maybe Prelude.Text
}
deriving (IdentityPoolShortDescription
-> IdentityPoolShortDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IdentityPoolShortDescription
-> IdentityPoolShortDescription -> Bool
$c/= :: IdentityPoolShortDescription
-> IdentityPoolShortDescription -> Bool
== :: IdentityPoolShortDescription
-> IdentityPoolShortDescription -> Bool
$c== :: IdentityPoolShortDescription
-> IdentityPoolShortDescription -> Bool
Prelude.Eq, ReadPrec [IdentityPoolShortDescription]
ReadPrec IdentityPoolShortDescription
Int -> ReadS IdentityPoolShortDescription
ReadS [IdentityPoolShortDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IdentityPoolShortDescription]
$creadListPrec :: ReadPrec [IdentityPoolShortDescription]
readPrec :: ReadPrec IdentityPoolShortDescription
$creadPrec :: ReadPrec IdentityPoolShortDescription
readList :: ReadS [IdentityPoolShortDescription]
$creadList :: ReadS [IdentityPoolShortDescription]
readsPrec :: Int -> ReadS IdentityPoolShortDescription
$creadsPrec :: Int -> ReadS IdentityPoolShortDescription
Prelude.Read, Int -> IdentityPoolShortDescription -> ShowS
[IdentityPoolShortDescription] -> ShowS
IdentityPoolShortDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IdentityPoolShortDescription] -> ShowS
$cshowList :: [IdentityPoolShortDescription] -> ShowS
show :: IdentityPoolShortDescription -> String
$cshow :: IdentityPoolShortDescription -> String
showsPrec :: Int -> IdentityPoolShortDescription -> ShowS
$cshowsPrec :: Int -> IdentityPoolShortDescription -> ShowS
Prelude.Show, forall x.
Rep IdentityPoolShortDescription x -> IdentityPoolShortDescription
forall x.
IdentityPoolShortDescription -> Rep IdentityPoolShortDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep IdentityPoolShortDescription x -> IdentityPoolShortDescription
$cfrom :: forall x.
IdentityPoolShortDescription -> Rep IdentityPoolShortDescription x
Prelude.Generic)
newIdentityPoolShortDescription ::
IdentityPoolShortDescription
newIdentityPoolShortDescription :: IdentityPoolShortDescription
newIdentityPoolShortDescription =
IdentityPoolShortDescription'
{ $sel:identityPoolId:IdentityPoolShortDescription' :: Maybe Text
identityPoolId =
forall a. Maybe a
Prelude.Nothing,
$sel:identityPoolName:IdentityPoolShortDescription' :: Maybe Text
identityPoolName = forall a. Maybe a
Prelude.Nothing
}
identityPoolShortDescription_identityPoolId :: Lens.Lens' IdentityPoolShortDescription (Prelude.Maybe Prelude.Text)
identityPoolShortDescription_identityPoolId :: Lens' IdentityPoolShortDescription (Maybe Text)
identityPoolShortDescription_identityPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityPoolShortDescription' {Maybe Text
identityPoolId :: Maybe Text
$sel:identityPoolId:IdentityPoolShortDescription' :: IdentityPoolShortDescription -> Maybe Text
identityPoolId} -> Maybe Text
identityPoolId) (\s :: IdentityPoolShortDescription
s@IdentityPoolShortDescription' {} Maybe Text
a -> IdentityPoolShortDescription
s {$sel:identityPoolId:IdentityPoolShortDescription' :: Maybe Text
identityPoolId = Maybe Text
a} :: IdentityPoolShortDescription)
identityPoolShortDescription_identityPoolName :: Lens.Lens' IdentityPoolShortDescription (Prelude.Maybe Prelude.Text)
identityPoolShortDescription_identityPoolName :: Lens' IdentityPoolShortDescription (Maybe Text)
identityPoolShortDescription_identityPoolName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IdentityPoolShortDescription' {Maybe Text
identityPoolName :: Maybe Text
$sel:identityPoolName:IdentityPoolShortDescription' :: IdentityPoolShortDescription -> Maybe Text
identityPoolName} -> Maybe Text
identityPoolName) (\s :: IdentityPoolShortDescription
s@IdentityPoolShortDescription' {} Maybe Text
a -> IdentityPoolShortDescription
s {$sel:identityPoolName:IdentityPoolShortDescription' :: Maybe Text
identityPoolName = Maybe Text
a} :: IdentityPoolShortDescription)
instance Data.FromJSON IdentityPoolShortDescription where
parseJSON :: Value -> Parser IdentityPoolShortDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"IdentityPoolShortDescription"
( \Object
x ->
Maybe Text -> Maybe Text -> IdentityPoolShortDescription
IdentityPoolShortDescription'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IdentityPoolId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IdentityPoolName")
)
instance
Prelude.Hashable
IdentityPoolShortDescription
where
hashWithSalt :: Int -> IdentityPoolShortDescription -> Int
hashWithSalt Int
_salt IdentityPoolShortDescription' {Maybe Text
identityPoolName :: Maybe Text
identityPoolId :: Maybe Text
$sel:identityPoolName:IdentityPoolShortDescription' :: IdentityPoolShortDescription -> Maybe Text
$sel:identityPoolId:IdentityPoolShortDescription' :: IdentityPoolShortDescription -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
identityPoolId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
identityPoolName
instance Prelude.NFData IdentityPoolShortDescription where
rnf :: IdentityPoolShortDescription -> ()
rnf IdentityPoolShortDescription' {Maybe Text
identityPoolName :: Maybe Text
identityPoolId :: Maybe Text
$sel:identityPoolName:IdentityPoolShortDescription' :: IdentityPoolShortDescription -> Maybe Text
$sel:identityPoolId:IdentityPoolShortDescription' :: IdentityPoolShortDescription -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
identityPoolId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
identityPoolName