{-# 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.CognitoIdentityProvider.Types.UserPoolClientDescription 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 UserPoolClientDescription = UserPoolClientDescription'
{
UserPoolClientDescription -> Maybe (Sensitive Text)
clientId :: Prelude.Maybe (Data.Sensitive Prelude.Text),
UserPoolClientDescription -> Maybe Text
clientName :: Prelude.Maybe Prelude.Text,
UserPoolClientDescription -> Maybe Text
userPoolId :: Prelude.Maybe Prelude.Text
}
deriving (UserPoolClientDescription -> UserPoolClientDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserPoolClientDescription -> UserPoolClientDescription -> Bool
$c/= :: UserPoolClientDescription -> UserPoolClientDescription -> Bool
== :: UserPoolClientDescription -> UserPoolClientDescription -> Bool
$c== :: UserPoolClientDescription -> UserPoolClientDescription -> Bool
Prelude.Eq, Int -> UserPoolClientDescription -> ShowS
[UserPoolClientDescription] -> ShowS
UserPoolClientDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserPoolClientDescription] -> ShowS
$cshowList :: [UserPoolClientDescription] -> ShowS
show :: UserPoolClientDescription -> String
$cshow :: UserPoolClientDescription -> String
showsPrec :: Int -> UserPoolClientDescription -> ShowS
$cshowsPrec :: Int -> UserPoolClientDescription -> ShowS
Prelude.Show, forall x.
Rep UserPoolClientDescription x -> UserPoolClientDescription
forall x.
UserPoolClientDescription -> Rep UserPoolClientDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UserPoolClientDescription x -> UserPoolClientDescription
$cfrom :: forall x.
UserPoolClientDescription -> Rep UserPoolClientDescription x
Prelude.Generic)
newUserPoolClientDescription ::
UserPoolClientDescription
newUserPoolClientDescription :: UserPoolClientDescription
newUserPoolClientDescription =
UserPoolClientDescription'
{ $sel:clientId:UserPoolClientDescription' :: Maybe (Sensitive Text)
clientId =
forall a. Maybe a
Prelude.Nothing,
$sel:clientName:UserPoolClientDescription' :: Maybe Text
clientName = forall a. Maybe a
Prelude.Nothing,
$sel:userPoolId:UserPoolClientDescription' :: Maybe Text
userPoolId = forall a. Maybe a
Prelude.Nothing
}
userPoolClientDescription_clientId :: Lens.Lens' UserPoolClientDescription (Prelude.Maybe Prelude.Text)
userPoolClientDescription_clientId :: Lens' UserPoolClientDescription (Maybe Text)
userPoolClientDescription_clientId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserPoolClientDescription' {Maybe (Sensitive Text)
clientId :: Maybe (Sensitive Text)
$sel:clientId:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe (Sensitive Text)
clientId} -> Maybe (Sensitive Text)
clientId) (\s :: UserPoolClientDescription
s@UserPoolClientDescription' {} Maybe (Sensitive Text)
a -> UserPoolClientDescription
s {$sel:clientId:UserPoolClientDescription' :: Maybe (Sensitive Text)
clientId = Maybe (Sensitive Text)
a} :: UserPoolClientDescription) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall a. Iso' (Sensitive a) a
Data._Sensitive
userPoolClientDescription_clientName :: Lens.Lens' UserPoolClientDescription (Prelude.Maybe Prelude.Text)
userPoolClientDescription_clientName :: Lens' UserPoolClientDescription (Maybe Text)
userPoolClientDescription_clientName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserPoolClientDescription' {Maybe Text
clientName :: Maybe Text
$sel:clientName:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe Text
clientName} -> Maybe Text
clientName) (\s :: UserPoolClientDescription
s@UserPoolClientDescription' {} Maybe Text
a -> UserPoolClientDescription
s {$sel:clientName:UserPoolClientDescription' :: Maybe Text
clientName = Maybe Text
a} :: UserPoolClientDescription)
userPoolClientDescription_userPoolId :: Lens.Lens' UserPoolClientDescription (Prelude.Maybe Prelude.Text)
userPoolClientDescription_userPoolId :: Lens' UserPoolClientDescription (Maybe Text)
userPoolClientDescription_userPoolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UserPoolClientDescription' {Maybe Text
userPoolId :: Maybe Text
$sel:userPoolId:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe Text
userPoolId} -> Maybe Text
userPoolId) (\s :: UserPoolClientDescription
s@UserPoolClientDescription' {} Maybe Text
a -> UserPoolClientDescription
s {$sel:userPoolId:UserPoolClientDescription' :: Maybe Text
userPoolId = Maybe Text
a} :: UserPoolClientDescription)
instance Data.FromJSON UserPoolClientDescription where
parseJSON :: Value -> Parser UserPoolClientDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"UserPoolClientDescription"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe Text -> Maybe Text -> UserPoolClientDescription
UserPoolClientDescription'
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
"ClientId")
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
"ClientName")
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
"UserPoolId")
)
instance Prelude.Hashable UserPoolClientDescription where
hashWithSalt :: Int -> UserPoolClientDescription -> Int
hashWithSalt Int
_salt UserPoolClientDescription' {Maybe Text
Maybe (Sensitive Text)
userPoolId :: Maybe Text
clientName :: Maybe Text
clientId :: Maybe (Sensitive Text)
$sel:userPoolId:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe Text
$sel:clientName:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe Text
$sel:clientId:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe (Sensitive Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
clientId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userPoolId
instance Prelude.NFData UserPoolClientDescription where
rnf :: UserPoolClientDescription -> ()
rnf UserPoolClientDescription' {Maybe Text
Maybe (Sensitive Text)
userPoolId :: Maybe Text
clientName :: Maybe Text
clientId :: Maybe (Sensitive Text)
$sel:userPoolId:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe Text
$sel:clientName:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe Text
$sel:clientId:UserPoolClientDescription' :: UserPoolClientDescription -> Maybe (Sensitive Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
clientId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userPoolId