module Stratosphere.Cognito.UserPool.DeviceConfigurationProperty (
DeviceConfigurationProperty(..), mkDeviceConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DeviceConfigurationProperty
=
DeviceConfigurationProperty {DeviceConfigurationProperty -> ()
haddock_workaround_ :: (),
DeviceConfigurationProperty -> Maybe (Value Bool)
challengeRequiredOnNewDevice :: (Prelude.Maybe (Value Prelude.Bool)),
DeviceConfigurationProperty -> Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (DeviceConfigurationProperty -> DeviceConfigurationProperty -> Bool
(DeviceConfigurationProperty
-> DeviceConfigurationProperty -> Bool)
-> (DeviceConfigurationProperty
-> DeviceConfigurationProperty -> Bool)
-> Eq DeviceConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceConfigurationProperty -> DeviceConfigurationProperty -> Bool
== :: DeviceConfigurationProperty -> DeviceConfigurationProperty -> Bool
$c/= :: DeviceConfigurationProperty -> DeviceConfigurationProperty -> Bool
/= :: DeviceConfigurationProperty -> DeviceConfigurationProperty -> Bool
Prelude.Eq, Int -> DeviceConfigurationProperty -> ShowS
[DeviceConfigurationProperty] -> ShowS
DeviceConfigurationProperty -> String
(Int -> DeviceConfigurationProperty -> ShowS)
-> (DeviceConfigurationProperty -> String)
-> ([DeviceConfigurationProperty] -> ShowS)
-> Show DeviceConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DeviceConfigurationProperty -> ShowS
showsPrec :: Int -> DeviceConfigurationProperty -> ShowS
$cshow :: DeviceConfigurationProperty -> String
show :: DeviceConfigurationProperty -> String
$cshowList :: [DeviceConfigurationProperty] -> ShowS
showList :: [DeviceConfigurationProperty] -> ShowS
Prelude.Show)
mkDeviceConfigurationProperty :: DeviceConfigurationProperty
mkDeviceConfigurationProperty :: DeviceConfigurationProperty
mkDeviceConfigurationProperty
= DeviceConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
challengeRequiredOnNewDevice :: Maybe (Value Bool)
challengeRequiredOnNewDevice = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
deviceOnlyRememberedOnUserPrompt :: Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DeviceConfigurationProperty where
toResourceProperties :: DeviceConfigurationProperty -> ResourceProperties
toResourceProperties DeviceConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: DeviceConfigurationProperty -> ()
challengeRequiredOnNewDevice :: DeviceConfigurationProperty -> Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: DeviceConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
challengeRequiredOnNewDevice :: Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Cognito::UserPool.DeviceConfiguration",
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
"ChallengeRequiredOnNewDevice"
(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)
challengeRequiredOnNewDevice,
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
"DeviceOnlyRememberedOnUserPrompt"
(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)
deviceOnlyRememberedOnUserPrompt])}
instance JSON.ToJSON DeviceConfigurationProperty where
toJSON :: DeviceConfigurationProperty -> Value
toJSON DeviceConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: DeviceConfigurationProperty -> ()
challengeRequiredOnNewDevice :: DeviceConfigurationProperty -> Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: DeviceConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
challengeRequiredOnNewDevice :: Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: 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
"ChallengeRequiredOnNewDevice"
(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)
challengeRequiredOnNewDevice,
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
"DeviceOnlyRememberedOnUserPrompt"
(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)
deviceOnlyRememberedOnUserPrompt]))
instance Property "ChallengeRequiredOnNewDevice" DeviceConfigurationProperty where
type PropertyType "ChallengeRequiredOnNewDevice" DeviceConfigurationProperty = Value Prelude.Bool
set :: PropertyType
"ChallengeRequiredOnNewDevice" DeviceConfigurationProperty
-> DeviceConfigurationProperty -> DeviceConfigurationProperty
set PropertyType
"ChallengeRequiredOnNewDevice" DeviceConfigurationProperty
newValue DeviceConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: DeviceConfigurationProperty -> ()
challengeRequiredOnNewDevice :: DeviceConfigurationProperty -> Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: DeviceConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
challengeRequiredOnNewDevice :: Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: Maybe (Value Bool)
..}
= DeviceConfigurationProperty
{challengeRequiredOnNewDevice :: Maybe (Value Bool)
challengeRequiredOnNewDevice = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"ChallengeRequiredOnNewDevice" DeviceConfigurationProperty
Value Bool
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
deviceOnlyRememberedOnUserPrompt :: Maybe (Value Bool)
haddock_workaround_ :: ()
deviceOnlyRememberedOnUserPrompt :: Maybe (Value Bool)
..}
instance Property "DeviceOnlyRememberedOnUserPrompt" DeviceConfigurationProperty where
type PropertyType "DeviceOnlyRememberedOnUserPrompt" DeviceConfigurationProperty = Value Prelude.Bool
set :: PropertyType
"DeviceOnlyRememberedOnUserPrompt" DeviceConfigurationProperty
-> DeviceConfigurationProperty -> DeviceConfigurationProperty
set PropertyType
"DeviceOnlyRememberedOnUserPrompt" DeviceConfigurationProperty
newValue DeviceConfigurationProperty {Maybe (Value Bool)
()
haddock_workaround_ :: DeviceConfigurationProperty -> ()
challengeRequiredOnNewDevice :: DeviceConfigurationProperty -> Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: DeviceConfigurationProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
challengeRequiredOnNewDevice :: Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt :: Maybe (Value Bool)
..}
= DeviceConfigurationProperty
{deviceOnlyRememberedOnUserPrompt :: Maybe (Value Bool)
deviceOnlyRememberedOnUserPrompt = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"DeviceOnlyRememberedOnUserPrompt" DeviceConfigurationProperty
Value Bool
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
challengeRequiredOnNewDevice :: Maybe (Value Bool)
haddock_workaround_ :: ()
challengeRequiredOnNewDevice :: Maybe (Value Bool)
..}