module Stratosphere.Cognito.UserPool.NumberAttributeConstraintsProperty (
        NumberAttributeConstraintsProperty(..),
        mkNumberAttributeConstraintsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NumberAttributeConstraintsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-numberattributeconstraints.html>
    NumberAttributeConstraintsProperty {NumberAttributeConstraintsProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-numberattributeconstraints.html#cfn-cognito-userpool-numberattributeconstraints-maxvalue>
                                        NumberAttributeConstraintsProperty -> Maybe (Value Text)
maxValue :: (Prelude.Maybe (Value Prelude.Text)),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-userpool-numberattributeconstraints.html#cfn-cognito-userpool-numberattributeconstraints-minvalue>
                                        NumberAttributeConstraintsProperty -> Maybe (Value Text)
minValue :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty -> Bool
(NumberAttributeConstraintsProperty
 -> NumberAttributeConstraintsProperty -> Bool)
-> (NumberAttributeConstraintsProperty
    -> NumberAttributeConstraintsProperty -> Bool)
-> Eq NumberAttributeConstraintsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty -> Bool
== :: NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty -> Bool
$c/= :: NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty -> Bool
/= :: NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty -> Bool
Prelude.Eq, Int -> NumberAttributeConstraintsProperty -> ShowS
[NumberAttributeConstraintsProperty] -> ShowS
NumberAttributeConstraintsProperty -> String
(Int -> NumberAttributeConstraintsProperty -> ShowS)
-> (NumberAttributeConstraintsProperty -> String)
-> ([NumberAttributeConstraintsProperty] -> ShowS)
-> Show NumberAttributeConstraintsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NumberAttributeConstraintsProperty -> ShowS
showsPrec :: Int -> NumberAttributeConstraintsProperty -> ShowS
$cshow :: NumberAttributeConstraintsProperty -> String
show :: NumberAttributeConstraintsProperty -> String
$cshowList :: [NumberAttributeConstraintsProperty] -> ShowS
showList :: [NumberAttributeConstraintsProperty] -> ShowS
Prelude.Show)
mkNumberAttributeConstraintsProperty ::
  NumberAttributeConstraintsProperty
mkNumberAttributeConstraintsProperty :: NumberAttributeConstraintsProperty
mkNumberAttributeConstraintsProperty
  = NumberAttributeConstraintsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maxValue :: Maybe (Value Text)
maxValue = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       minValue :: Maybe (Value Text)
minValue = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NumberAttributeConstraintsProperty where
  toResourceProperties :: NumberAttributeConstraintsProperty -> ResourceProperties
toResourceProperties NumberAttributeConstraintsProperty {Maybe (Value Text)
()
haddock_workaround_ :: NumberAttributeConstraintsProperty -> ()
maxValue :: NumberAttributeConstraintsProperty -> Maybe (Value Text)
minValue :: NumberAttributeConstraintsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxValue :: Maybe (Value Text)
minValue :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::UserPool.NumberAttributeConstraints",
         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 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
"MaxValue" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
maxValue,
                            Key -> Value 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
"MinValue" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
minValue])}
instance JSON.ToJSON NumberAttributeConstraintsProperty where
  toJSON :: NumberAttributeConstraintsProperty -> Value
toJSON NumberAttributeConstraintsProperty {Maybe (Value Text)
()
haddock_workaround_ :: NumberAttributeConstraintsProperty -> ()
maxValue :: NumberAttributeConstraintsProperty -> Maybe (Value Text)
minValue :: NumberAttributeConstraintsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxValue :: Maybe (Value Text)
minValue :: Maybe (Value 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 -> Value 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
"MaxValue" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
maxValue,
               Key -> Value 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
"MinValue" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
minValue]))
instance Property "MaxValue" NumberAttributeConstraintsProperty where
  type PropertyType "MaxValue" NumberAttributeConstraintsProperty = Value Prelude.Text
  set :: PropertyType "MaxValue" NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty
set PropertyType "MaxValue" NumberAttributeConstraintsProperty
newValue NumberAttributeConstraintsProperty {Maybe (Value Text)
()
haddock_workaround_ :: NumberAttributeConstraintsProperty -> ()
maxValue :: NumberAttributeConstraintsProperty -> Maybe (Value Text)
minValue :: NumberAttributeConstraintsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxValue :: Maybe (Value Text)
minValue :: Maybe (Value Text)
..}
    = NumberAttributeConstraintsProperty
        {maxValue :: Maybe (Value Text)
maxValue = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MaxValue" NumberAttributeConstraintsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
minValue :: Maybe (Value Text)
haddock_workaround_ :: ()
minValue :: Maybe (Value Text)
..}
instance Property "MinValue" NumberAttributeConstraintsProperty where
  type PropertyType "MinValue" NumberAttributeConstraintsProperty = Value Prelude.Text
  set :: PropertyType "MinValue" NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty
-> NumberAttributeConstraintsProperty
set PropertyType "MinValue" NumberAttributeConstraintsProperty
newValue NumberAttributeConstraintsProperty {Maybe (Value Text)
()
haddock_workaround_ :: NumberAttributeConstraintsProperty -> ()
maxValue :: NumberAttributeConstraintsProperty -> Maybe (Value Text)
minValue :: NumberAttributeConstraintsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
maxValue :: Maybe (Value Text)
minValue :: Maybe (Value Text)
..}
    = NumberAttributeConstraintsProperty
        {minValue :: Maybe (Value Text)
minValue = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "MinValue" NumberAttributeConstraintsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
maxValue :: Maybe (Value Text)
haddock_workaround_ :: ()
maxValue :: Maybe (Value Text)
..}