module Stratosphere.Cognito.UserPool.UsernameConfigurationProperty (
UsernameConfigurationProperty(..), mkUsernameConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data UsernameConfigurationProperty
=
UsernameConfigurationProperty {UsernameConfigurationProperty -> ()
haddock_workaround_ :: (),
UsernameConfigurationProperty -> Maybe (Value Bool)
caseSensitive :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (UsernameConfigurationProperty
-> UsernameConfigurationProperty -> Bool
(UsernameConfigurationProperty
-> UsernameConfigurationProperty -> Bool)
-> (UsernameConfigurationProperty
-> UsernameConfigurationProperty -> Bool)
-> Eq UsernameConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UsernameConfigurationProperty
-> UsernameConfigurationProperty -> Bool
== :: UsernameConfigurationProperty
-> UsernameConfigurationProperty -> Bool
$c/= :: UsernameConfigurationProperty
-> UsernameConfigurationProperty -> Bool
/= :: UsernameConfigurationProperty
-> UsernameConfigurationProperty -> Bool
Prelude.Eq, Int -> UsernameConfigurationProperty -> ShowS
[UsernameConfigurationProperty] -> ShowS
UsernameConfigurationProperty -> String
(Int -> UsernameConfigurationProperty -> ShowS)
-> (UsernameConfigurationProperty -> String)
-> ([UsernameConfigurationProperty] -> ShowS)
-> Show UsernameConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UsernameConfigurationProperty -> ShowS
showsPrec :: Int -> UsernameConfigurationProperty -> ShowS
$cshow :: UsernameConfigurationProperty -> String
show :: UsernameConfigurationProperty -> String
$cshowList :: [UsernameConfigurationProperty] -> ShowS
showList :: [UsernameConfigurationProperty] -> ShowS
Prelude.Show)
mkUsernameConfigurationProperty :: UsernameConfigurationProperty
mkUsernameConfigurationProperty :: UsernameConfigurationProperty
mkUsernameConfigurationProperty
= UsernameConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), caseSensitive :: Maybe (Value Bool)
caseSensitive = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties UsernameConfigurationProperty where
toResourceProperties :: UsernameConfigurationProperty -> ResourceProperties
toResourceProperties UsernameConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: UsernameConfigurationProperty -> ()
caseSensitive :: UsernameConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
caseSensitive :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cognito::UserPool.UsernameConfiguration",
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 -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CaseSensitive" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
caseSensitive])}
instance JSON.ToJSON UsernameConfigurationProperty where
toJSON :: UsernameConfigurationProperty -> Value
toJSON UsernameConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: UsernameConfigurationProperty -> ()
caseSensitive :: UsernameConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
caseSensitive :: Maybe (Value Bool)
..}
= [(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 -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CaseSensitive" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
caseSensitive]))
instance Property "CaseSensitive" UsernameConfigurationProperty where
type PropertyType "CaseSensitive" UsernameConfigurationProperty = Value Prelude.Bool
set :: PropertyType "CaseSensitive" UsernameConfigurationProperty
-> UsernameConfigurationProperty -> UsernameConfigurationProperty
set PropertyType "CaseSensitive" UsernameConfigurationProperty
newValue UsernameConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: UsernameConfigurationProperty -> ()
caseSensitive :: UsernameConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
caseSensitive :: Maybe (Value Bool)
..}
= UsernameConfigurationProperty
{caseSensitive :: Maybe (Value Bool)
caseSensitive = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CaseSensitive" UsernameConfigurationProperty
Value Bool
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}