{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UserPoolClientDescription = UserPoolClientDescription'
{
UserPoolClientDescription -> Maybe (Sensitive Text)
clientId :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UserPoolClientDescription -> Maybe Text
userPoolId :: Prelude.Maybe Prelude.Text,
UserPoolClientDescription -> Maybe Text
clientName :: Prelude.Maybe Prelude.Text
}
deriving (UserPoolClientDescription -> UserPoolClientDescription -> Bool
(UserPoolClientDescription -> UserPoolClientDescription -> Bool)
-> (UserPoolClientDescription -> UserPoolClientDescription -> Bool)
-> Eq UserPoolClientDescription
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
(Int -> UserPoolClientDescription -> ShowS)
-> (UserPoolClientDescription -> String)
-> ([UserPoolClientDescription] -> ShowS)
-> Show UserPoolClientDescription
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.
UserPoolClientDescription -> Rep UserPoolClientDescription x)
-> (forall x.
Rep UserPoolClientDescription x -> UserPoolClientDescription)
-> Generic UserPoolClientDescription
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' :: Maybe (Sensitive Text)
-> Maybe Text -> Maybe Text -> UserPoolClientDescription
UserPoolClientDescription'
{ $sel:clientId:UserPoolClientDescription' :: Maybe (Sensitive Text)
clientId =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:userPoolId:UserPoolClientDescription' :: Maybe Text
userPoolId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientName:UserPoolClientDescription' :: Maybe Text
clientName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
userPoolClientDescription_clientId :: Lens.Lens' UserPoolClientDescription (Prelude.Maybe Prelude.Text)
userPoolClientDescription_clientId :: (Maybe Text -> f (Maybe Text))
-> UserPoolClientDescription -> f UserPoolClientDescription
userPoolClientDescription_clientId = (UserPoolClientDescription -> Maybe (Sensitive Text))
-> (UserPoolClientDescription
-> Maybe (Sensitive Text) -> UserPoolClientDescription)
-> Lens
UserPoolClientDescription
UserPoolClientDescription
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UserPoolClientDescription -> f UserPoolClientDescription)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UserPoolClientDescription
-> f UserPoolClientDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
userPoolClientDescription_userPoolId :: Lens.Lens' UserPoolClientDescription (Prelude.Maybe Prelude.Text)
userPoolClientDescription_userPoolId :: (Maybe Text -> f (Maybe Text))
-> UserPoolClientDescription -> f UserPoolClientDescription
userPoolClientDescription_userPoolId = (UserPoolClientDescription -> Maybe Text)
-> (UserPoolClientDescription
-> Maybe Text -> UserPoolClientDescription)
-> Lens
UserPoolClientDescription
UserPoolClientDescription
(Maybe Text)
(Maybe Text)
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)
userPoolClientDescription_clientName :: Lens.Lens' UserPoolClientDescription (Prelude.Maybe Prelude.Text)
userPoolClientDescription_clientName :: (Maybe Text -> f (Maybe Text))
-> UserPoolClientDescription -> f UserPoolClientDescription
userPoolClientDescription_clientName = (UserPoolClientDescription -> Maybe Text)
-> (UserPoolClientDescription
-> Maybe Text -> UserPoolClientDescription)
-> Lens
UserPoolClientDescription
UserPoolClientDescription
(Maybe Text)
(Maybe Text)
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)
instance Core.FromJSON UserPoolClientDescription where
parseJSON :: Value -> Parser UserPoolClientDescription
parseJSON =
String
-> (Object -> Parser UserPoolClientDescription)
-> Value
-> Parser UserPoolClientDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UserPoolClientDescription"
( \Object
x ->
Maybe (Sensitive Text)
-> Maybe Text -> Maybe Text -> UserPoolClientDescription
UserPoolClientDescription'
(Maybe (Sensitive Text)
-> Maybe Text -> Maybe Text -> UserPoolClientDescription)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe Text -> Maybe Text -> UserPoolClientDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClientId")
Parser (Maybe Text -> Maybe Text -> UserPoolClientDescription)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> UserPoolClientDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UserPoolId")
Parser (Maybe Text -> UserPoolClientDescription)
-> Parser (Maybe Text) -> Parser UserPoolClientDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ClientName")
)
instance Prelude.Hashable UserPoolClientDescription
instance Prelude.NFData UserPoolClientDescription