module Stratosphere.AmplifyUIBuilder.Form.FieldValidationConfigurationProperty (
        FieldValidationConfigurationProperty(..),
        mkFieldValidationConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FieldValidationConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-fieldvalidationconfiguration.html>
    FieldValidationConfigurationProperty {FieldValidationConfigurationProperty -> ()
haddock_workaround_ :: (),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-fieldvalidationconfiguration.html#cfn-amplifyuibuilder-form-fieldvalidationconfiguration-numvalues>
                                          FieldValidationConfigurationProperty -> Maybe (ValueList Double)
numValues :: (Prelude.Maybe (ValueList Prelude.Double)),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-fieldvalidationconfiguration.html#cfn-amplifyuibuilder-form-fieldvalidationconfiguration-strvalues>
                                          FieldValidationConfigurationProperty -> Maybe (ValueList Text)
strValues :: (Prelude.Maybe (ValueList Prelude.Text)),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-fieldvalidationconfiguration.html#cfn-amplifyuibuilder-form-fieldvalidationconfiguration-type>
                                          FieldValidationConfigurationProperty -> Value Text
type' :: (Value Prelude.Text),
                                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-form-fieldvalidationconfiguration.html#cfn-amplifyuibuilder-form-fieldvalidationconfiguration-validationmessage>
                                          FieldValidationConfigurationProperty -> Maybe (Value Text)
validationMessage :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty -> Bool
(FieldValidationConfigurationProperty
 -> FieldValidationConfigurationProperty -> Bool)
-> (FieldValidationConfigurationProperty
    -> FieldValidationConfigurationProperty -> Bool)
-> Eq FieldValidationConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty -> Bool
== :: FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty -> Bool
$c/= :: FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty -> Bool
/= :: FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty -> Bool
Prelude.Eq, Int -> FieldValidationConfigurationProperty -> ShowS
[FieldValidationConfigurationProperty] -> ShowS
FieldValidationConfigurationProperty -> String
(Int -> FieldValidationConfigurationProperty -> ShowS)
-> (FieldValidationConfigurationProperty -> String)
-> ([FieldValidationConfigurationProperty] -> ShowS)
-> Show FieldValidationConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FieldValidationConfigurationProperty -> ShowS
showsPrec :: Int -> FieldValidationConfigurationProperty -> ShowS
$cshow :: FieldValidationConfigurationProperty -> String
show :: FieldValidationConfigurationProperty -> String
$cshowList :: [FieldValidationConfigurationProperty] -> ShowS
showList :: [FieldValidationConfigurationProperty] -> ShowS
Prelude.Show)
mkFieldValidationConfigurationProperty ::
  Value Prelude.Text -> FieldValidationConfigurationProperty
mkFieldValidationConfigurationProperty :: Value Text -> FieldValidationConfigurationProperty
mkFieldValidationConfigurationProperty Value Text
type'
  = FieldValidationConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), type' :: Value Text
type' = Value Text
type',
       numValues :: Maybe (ValueList Double)
numValues = Maybe (ValueList Double)
forall a. Maybe a
Prelude.Nothing, strValues :: Maybe (ValueList Text)
strValues = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       validationMessage :: Maybe (Value Text)
validationMessage = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FieldValidationConfigurationProperty where
  toResourceProperties :: FieldValidationConfigurationProperty -> ResourceProperties
toResourceProperties FieldValidationConfigurationProperty {Maybe (ValueList Double)
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldValidationConfigurationProperty -> ()
numValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Double)
strValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Text)
type' :: FieldValidationConfigurationProperty -> Value Text
validationMessage :: FieldValidationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
type' :: Value Text
validationMessage :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AmplifyUIBuilder::Form.FieldValidationConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Type" 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..= Value Text
type']
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NumValues" (ValueList Double -> (Key, Value))
-> Maybe (ValueList Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Double)
numValues,
                               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
"StrValues" (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)
strValues,
                               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
"ValidationMessage" (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)
validationMessage]))}
instance JSON.ToJSON FieldValidationConfigurationProperty where
  toJSON :: FieldValidationConfigurationProperty -> Value
toJSON FieldValidationConfigurationProperty {Maybe (ValueList Double)
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldValidationConfigurationProperty -> ()
numValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Double)
strValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Text)
type' :: FieldValidationConfigurationProperty -> Value Text
validationMessage :: FieldValidationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
type' :: Value Text
validationMessage :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Type" 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..= Value Text
type']
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NumValues" (ValueList Double -> (Key, Value))
-> Maybe (ValueList Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Double)
numValues,
                  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
"StrValues" (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)
strValues,
                  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
"ValidationMessage" (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)
validationMessage])))
instance Property "NumValues" FieldValidationConfigurationProperty where
  type PropertyType "NumValues" FieldValidationConfigurationProperty = ValueList Prelude.Double
  set :: PropertyType "NumValues" FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty
set PropertyType "NumValues" FieldValidationConfigurationProperty
newValue FieldValidationConfigurationProperty {Maybe (ValueList Double)
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldValidationConfigurationProperty -> ()
numValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Double)
strValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Text)
type' :: FieldValidationConfigurationProperty -> Value Text
validationMessage :: FieldValidationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
type' :: Value Text
validationMessage :: Maybe (Value Text)
..}
    = FieldValidationConfigurationProperty
        {numValues :: Maybe (ValueList Double)
numValues = ValueList Double -> Maybe (ValueList Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NumValues" FieldValidationConfigurationProperty
ValueList Double
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
strValues :: Maybe (ValueList Text)
type' :: Value Text
validationMessage :: Maybe (Value Text)
haddock_workaround_ :: ()
strValues :: Maybe (ValueList Text)
type' :: Value Text
validationMessage :: Maybe (Value Text)
..}
instance Property "StrValues" FieldValidationConfigurationProperty where
  type PropertyType "StrValues" FieldValidationConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "StrValues" FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty
set PropertyType "StrValues" FieldValidationConfigurationProperty
newValue FieldValidationConfigurationProperty {Maybe (ValueList Double)
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldValidationConfigurationProperty -> ()
numValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Double)
strValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Text)
type' :: FieldValidationConfigurationProperty -> Value Text
validationMessage :: FieldValidationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
type' :: Value Text
validationMessage :: Maybe (Value Text)
..}
    = FieldValidationConfigurationProperty
        {strValues :: Maybe (ValueList Text)
strValues = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StrValues" FieldValidationConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
type' :: Value Text
validationMessage :: Maybe (Value Text)
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
type' :: Value Text
validationMessage :: Maybe (Value Text)
..}
instance Property "Type" FieldValidationConfigurationProperty where
  type PropertyType "Type" FieldValidationConfigurationProperty = Value Prelude.Text
  set :: PropertyType "Type" FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty
set PropertyType "Type" FieldValidationConfigurationProperty
newValue FieldValidationConfigurationProperty {Maybe (ValueList Double)
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldValidationConfigurationProperty -> ()
numValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Double)
strValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Text)
type' :: FieldValidationConfigurationProperty -> Value Text
validationMessage :: FieldValidationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
type' :: Value Text
validationMessage :: Maybe (Value Text)
..}
    = FieldValidationConfigurationProperty {type' :: Value Text
type' = PropertyType "Type" FieldValidationConfigurationProperty
Value Text
newValue, Maybe (ValueList Double)
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
validationMessage :: Maybe (Value Text)
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
validationMessage :: Maybe (Value Text)
..}
instance Property "ValidationMessage" FieldValidationConfigurationProperty where
  type PropertyType "ValidationMessage" FieldValidationConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "ValidationMessage" FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty
-> FieldValidationConfigurationProperty
set PropertyType
  "ValidationMessage" FieldValidationConfigurationProperty
newValue FieldValidationConfigurationProperty {Maybe (ValueList Double)
Maybe (ValueList Text)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: FieldValidationConfigurationProperty -> ()
numValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Double)
strValues :: FieldValidationConfigurationProperty -> Maybe (ValueList Text)
type' :: FieldValidationConfigurationProperty -> Value Text
validationMessage :: FieldValidationConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
type' :: Value Text
validationMessage :: Maybe (Value Text)
..}
    = FieldValidationConfigurationProperty
        {validationMessage :: Maybe (Value Text)
validationMessage = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ValidationMessage" FieldValidationConfigurationProperty
Value Text
newValue, Maybe (ValueList Double)
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
type' :: Value Text
haddock_workaround_ :: ()
numValues :: Maybe (ValueList Double)
strValues :: Maybe (ValueList Text)
type' :: Value Text
..}