module Stratosphere.Cognito.UserPool.SignInPolicyProperty (
SignInPolicyProperty(..), mkSignInPolicyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SignInPolicyProperty
=
SignInPolicyProperty {SignInPolicyProperty -> ()
haddock_workaround_ :: (),
SignInPolicyProperty -> Maybe (ValueList Text)
allowedFirstAuthFactors :: (Prelude.Maybe (ValueList Prelude.Text))}
deriving stock (SignInPolicyProperty -> SignInPolicyProperty -> Bool
(SignInPolicyProperty -> SignInPolicyProperty -> Bool)
-> (SignInPolicyProperty -> SignInPolicyProperty -> Bool)
-> Eq SignInPolicyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SignInPolicyProperty -> SignInPolicyProperty -> Bool
== :: SignInPolicyProperty -> SignInPolicyProperty -> Bool
$c/= :: SignInPolicyProperty -> SignInPolicyProperty -> Bool
/= :: SignInPolicyProperty -> SignInPolicyProperty -> Bool
Prelude.Eq, Int -> SignInPolicyProperty -> ShowS
[SignInPolicyProperty] -> ShowS
SignInPolicyProperty -> String
(Int -> SignInPolicyProperty -> ShowS)
-> (SignInPolicyProperty -> String)
-> ([SignInPolicyProperty] -> ShowS)
-> Show SignInPolicyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SignInPolicyProperty -> ShowS
showsPrec :: Int -> SignInPolicyProperty -> ShowS
$cshow :: SignInPolicyProperty -> String
show :: SignInPolicyProperty -> String
$cshowList :: [SignInPolicyProperty] -> ShowS
showList :: [SignInPolicyProperty] -> ShowS
Prelude.Show)
mkSignInPolicyProperty :: SignInPolicyProperty
mkSignInPolicyProperty :: SignInPolicyProperty
mkSignInPolicyProperty
= SignInPolicyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
allowedFirstAuthFactors :: Maybe (ValueList Text)
allowedFirstAuthFactors = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SignInPolicyProperty where
toResourceProperties :: SignInPolicyProperty -> ResourceProperties
toResourceProperties SignInPolicyProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: SignInPolicyProperty -> ()
allowedFirstAuthFactors :: SignInPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
allowedFirstAuthFactors :: Maybe (ValueList Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cognito::UserPool.SignInPolicy",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowedFirstAuthFactors"
(ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
allowedFirstAuthFactors])}
instance JSON.ToJSON SignInPolicyProperty where
toJSON :: SignInPolicyProperty -> Value
toJSON SignInPolicyProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: SignInPolicyProperty -> ()
allowedFirstAuthFactors :: SignInPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
allowedFirstAuthFactors :: Maybe (ValueList Text)
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> ValueList Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AllowedFirstAuthFactors"
(ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
allowedFirstAuthFactors]))
instance Property "AllowedFirstAuthFactors" SignInPolicyProperty where
type PropertyType "AllowedFirstAuthFactors" SignInPolicyProperty = ValueList Prelude.Text
set :: PropertyType "AllowedFirstAuthFactors" SignInPolicyProperty
-> SignInPolicyProperty -> SignInPolicyProperty
set PropertyType "AllowedFirstAuthFactors" SignInPolicyProperty
newValue SignInPolicyProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: SignInPolicyProperty -> ()
allowedFirstAuthFactors :: SignInPolicyProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
allowedFirstAuthFactors :: Maybe (ValueList Text)
..}
= SignInPolicyProperty
{allowedFirstAuthFactors :: Maybe (ValueList Text)
allowedFirstAuthFactors = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AllowedFirstAuthFactors" SignInPolicyProperty
ValueList Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}