{-# 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.ProviderUserIdentifierType where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProviderUserIdentifierType = ProviderUserIdentifierType'
{
ProviderUserIdentifierType -> Maybe Text
providerAttributeValue :: Prelude.Maybe Prelude.Text,
ProviderUserIdentifierType -> Maybe Text
providerAttributeName :: Prelude.Maybe Prelude.Text,
ProviderUserIdentifierType -> Maybe Text
providerName :: Prelude.Maybe Prelude.Text
}
deriving (ProviderUserIdentifierType -> ProviderUserIdentifierType -> Bool
(ProviderUserIdentifierType -> ProviderUserIdentifierType -> Bool)
-> (ProviderUserIdentifierType
-> ProviderUserIdentifierType -> Bool)
-> Eq ProviderUserIdentifierType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProviderUserIdentifierType -> ProviderUserIdentifierType -> Bool
$c/= :: ProviderUserIdentifierType -> ProviderUserIdentifierType -> Bool
== :: ProviderUserIdentifierType -> ProviderUserIdentifierType -> Bool
$c== :: ProviderUserIdentifierType -> ProviderUserIdentifierType -> Bool
Prelude.Eq, ReadPrec [ProviderUserIdentifierType]
ReadPrec ProviderUserIdentifierType
Int -> ReadS ProviderUserIdentifierType
ReadS [ProviderUserIdentifierType]
(Int -> ReadS ProviderUserIdentifierType)
-> ReadS [ProviderUserIdentifierType]
-> ReadPrec ProviderUserIdentifierType
-> ReadPrec [ProviderUserIdentifierType]
-> Read ProviderUserIdentifierType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProviderUserIdentifierType]
$creadListPrec :: ReadPrec [ProviderUserIdentifierType]
readPrec :: ReadPrec ProviderUserIdentifierType
$creadPrec :: ReadPrec ProviderUserIdentifierType
readList :: ReadS [ProviderUserIdentifierType]
$creadList :: ReadS [ProviderUserIdentifierType]
readsPrec :: Int -> ReadS ProviderUserIdentifierType
$creadsPrec :: Int -> ReadS ProviderUserIdentifierType
Prelude.Read, Int -> ProviderUserIdentifierType -> ShowS
[ProviderUserIdentifierType] -> ShowS
ProviderUserIdentifierType -> String
(Int -> ProviderUserIdentifierType -> ShowS)
-> (ProviderUserIdentifierType -> String)
-> ([ProviderUserIdentifierType] -> ShowS)
-> Show ProviderUserIdentifierType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProviderUserIdentifierType] -> ShowS
$cshowList :: [ProviderUserIdentifierType] -> ShowS
show :: ProviderUserIdentifierType -> String
$cshow :: ProviderUserIdentifierType -> String
showsPrec :: Int -> ProviderUserIdentifierType -> ShowS
$cshowsPrec :: Int -> ProviderUserIdentifierType -> ShowS
Prelude.Show, (forall x.
ProviderUserIdentifierType -> Rep ProviderUserIdentifierType x)
-> (forall x.
Rep ProviderUserIdentifierType x -> ProviderUserIdentifierType)
-> Generic ProviderUserIdentifierType
forall x.
Rep ProviderUserIdentifierType x -> ProviderUserIdentifierType
forall x.
ProviderUserIdentifierType -> Rep ProviderUserIdentifierType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProviderUserIdentifierType x -> ProviderUserIdentifierType
$cfrom :: forall x.
ProviderUserIdentifierType -> Rep ProviderUserIdentifierType x
Prelude.Generic)
newProviderUserIdentifierType ::
ProviderUserIdentifierType
newProviderUserIdentifierType :: ProviderUserIdentifierType
newProviderUserIdentifierType =
ProviderUserIdentifierType' :: Maybe Text
-> Maybe Text -> Maybe Text -> ProviderUserIdentifierType
ProviderUserIdentifierType'
{ $sel:providerAttributeValue:ProviderUserIdentifierType' :: Maybe Text
providerAttributeValue =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:providerAttributeName:ProviderUserIdentifierType' :: Maybe Text
providerAttributeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:providerName:ProviderUserIdentifierType' :: Maybe Text
providerName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
providerUserIdentifierType_providerAttributeValue :: Lens.Lens' ProviderUserIdentifierType (Prelude.Maybe Prelude.Text)
providerUserIdentifierType_providerAttributeValue :: (Maybe Text -> f (Maybe Text))
-> ProviderUserIdentifierType -> f ProviderUserIdentifierType
providerUserIdentifierType_providerAttributeValue = (ProviderUserIdentifierType -> Maybe Text)
-> (ProviderUserIdentifierType
-> Maybe Text -> ProviderUserIdentifierType)
-> Lens
ProviderUserIdentifierType
ProviderUserIdentifierType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProviderUserIdentifierType' {Maybe Text
providerAttributeValue :: Maybe Text
$sel:providerAttributeValue:ProviderUserIdentifierType' :: ProviderUserIdentifierType -> Maybe Text
providerAttributeValue} -> Maybe Text
providerAttributeValue) (\s :: ProviderUserIdentifierType
s@ProviderUserIdentifierType' {} Maybe Text
a -> ProviderUserIdentifierType
s {$sel:providerAttributeValue:ProviderUserIdentifierType' :: Maybe Text
providerAttributeValue = Maybe Text
a} :: ProviderUserIdentifierType)
providerUserIdentifierType_providerAttributeName :: Lens.Lens' ProviderUserIdentifierType (Prelude.Maybe Prelude.Text)
providerUserIdentifierType_providerAttributeName :: (Maybe Text -> f (Maybe Text))
-> ProviderUserIdentifierType -> f ProviderUserIdentifierType
providerUserIdentifierType_providerAttributeName = (ProviderUserIdentifierType -> Maybe Text)
-> (ProviderUserIdentifierType
-> Maybe Text -> ProviderUserIdentifierType)
-> Lens
ProviderUserIdentifierType
ProviderUserIdentifierType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProviderUserIdentifierType' {Maybe Text
providerAttributeName :: Maybe Text
$sel:providerAttributeName:ProviderUserIdentifierType' :: ProviderUserIdentifierType -> Maybe Text
providerAttributeName} -> Maybe Text
providerAttributeName) (\s :: ProviderUserIdentifierType
s@ProviderUserIdentifierType' {} Maybe Text
a -> ProviderUserIdentifierType
s {$sel:providerAttributeName:ProviderUserIdentifierType' :: Maybe Text
providerAttributeName = Maybe Text
a} :: ProviderUserIdentifierType)
providerUserIdentifierType_providerName :: Lens.Lens' ProviderUserIdentifierType (Prelude.Maybe Prelude.Text)
providerUserIdentifierType_providerName :: (Maybe Text -> f (Maybe Text))
-> ProviderUserIdentifierType -> f ProviderUserIdentifierType
providerUserIdentifierType_providerName = (ProviderUserIdentifierType -> Maybe Text)
-> (ProviderUserIdentifierType
-> Maybe Text -> ProviderUserIdentifierType)
-> Lens
ProviderUserIdentifierType
ProviderUserIdentifierType
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProviderUserIdentifierType' {Maybe Text
providerName :: Maybe Text
$sel:providerName:ProviderUserIdentifierType' :: ProviderUserIdentifierType -> Maybe Text
providerName} -> Maybe Text
providerName) (\s :: ProviderUserIdentifierType
s@ProviderUserIdentifierType' {} Maybe Text
a -> ProviderUserIdentifierType
s {$sel:providerName:ProviderUserIdentifierType' :: Maybe Text
providerName = Maybe Text
a} :: ProviderUserIdentifierType)
instance Prelude.Hashable ProviderUserIdentifierType
instance Prelude.NFData ProviderUserIdentifierType
instance Core.ToJSON ProviderUserIdentifierType where
toJSON :: ProviderUserIdentifierType -> Value
toJSON ProviderUserIdentifierType' {Maybe Text
providerName :: Maybe Text
providerAttributeName :: Maybe Text
providerAttributeValue :: Maybe Text
$sel:providerName:ProviderUserIdentifierType' :: ProviderUserIdentifierType -> Maybe Text
$sel:providerAttributeName:ProviderUserIdentifierType' :: ProviderUserIdentifierType -> Maybe Text
$sel:providerAttributeValue:ProviderUserIdentifierType' :: ProviderUserIdentifierType -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ProviderAttributeValue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
providerAttributeValue,
(Text
"ProviderAttributeName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
providerAttributeName,
(Text
"ProviderName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
providerName
]
)