module Stratosphere.AmplifyUIBuilder.Component.PredicateProperty (
        PredicateProperty(..), mkPredicateProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PredicateProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html>
    PredicateProperty {PredicateProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-and>
                       PredicateProperty -> Maybe [PredicateProperty]
and :: (Prelude.Maybe [PredicateProperty]),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-field>
                       PredicateProperty -> Maybe (Value Text)
field :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-operand>
                       PredicateProperty -> Maybe (Value Text)
operand :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-operandtype>
                       PredicateProperty -> Maybe (Value Text)
operandType :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-operator>
                       PredicateProperty -> Maybe (Value Text)
operator :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-predicate.html#cfn-amplifyuibuilder-component-predicate-or>
                       PredicateProperty -> Maybe [PredicateProperty]
or :: (Prelude.Maybe [PredicateProperty])}
  deriving stock (PredicateProperty -> PredicateProperty -> Bool
(PredicateProperty -> PredicateProperty -> Bool)
-> (PredicateProperty -> PredicateProperty -> Bool)
-> Eq PredicateProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PredicateProperty -> PredicateProperty -> Bool
== :: PredicateProperty -> PredicateProperty -> Bool
$c/= :: PredicateProperty -> PredicateProperty -> Bool
/= :: PredicateProperty -> PredicateProperty -> Bool
Prelude.Eq, Int -> PredicateProperty -> ShowS
[PredicateProperty] -> ShowS
PredicateProperty -> String
(Int -> PredicateProperty -> ShowS)
-> (PredicateProperty -> String)
-> ([PredicateProperty] -> ShowS)
-> Show PredicateProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PredicateProperty -> ShowS
showsPrec :: Int -> PredicateProperty -> ShowS
$cshow :: PredicateProperty -> String
show :: PredicateProperty -> String
$cshowList :: [PredicateProperty] -> ShowS
showList :: [PredicateProperty] -> ShowS
Prelude.Show)
mkPredicateProperty :: PredicateProperty
mkPredicateProperty :: PredicateProperty
mkPredicateProperty
  = PredicateProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), and :: Maybe [PredicateProperty]
and = Maybe [PredicateProperty]
forall a. Maybe a
Prelude.Nothing,
       field :: Maybe (Value Text)
field = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, operand :: Maybe (Value Text)
operand = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       operandType :: Maybe (Value Text)
operandType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, operator :: Maybe (Value Text)
operator = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       or :: Maybe [PredicateProperty]
or = Maybe [PredicateProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PredicateProperty where
  toResourceProperties :: PredicateProperty -> ResourceProperties
toResourceProperties PredicateProperty {Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredicateProperty -> ()
and :: PredicateProperty -> Maybe [PredicateProperty]
field :: PredicateProperty -> Maybe (Value Text)
operand :: PredicateProperty -> Maybe (Value Text)
operandType :: PredicateProperty -> Maybe (Value Text)
operator :: PredicateProperty -> Maybe (Value Text)
or :: PredicateProperty -> Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AmplifyUIBuilder::Component.Predicate",
         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 -> [PredicateProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"And" ([PredicateProperty] -> (Key, Value))
-> Maybe [PredicateProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PredicateProperty]
and,
                            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
"Field" (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)
field,
                            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
"Operand" (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)
operand,
                            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
"OperandType" (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)
operandType,
                            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
"Operator" (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)
operator,
                            Key -> [PredicateProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Or" ([PredicateProperty] -> (Key, Value))
-> Maybe [PredicateProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PredicateProperty]
or])}
instance JSON.ToJSON PredicateProperty where
  toJSON :: PredicateProperty -> Value
toJSON PredicateProperty {Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredicateProperty -> ()
and :: PredicateProperty -> Maybe [PredicateProperty]
field :: PredicateProperty -> Maybe (Value Text)
operand :: PredicateProperty -> Maybe (Value Text)
operandType :: PredicateProperty -> Maybe (Value Text)
operator :: PredicateProperty -> Maybe (Value Text)
or :: PredicateProperty -> Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
    = [(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 -> [PredicateProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"And" ([PredicateProperty] -> (Key, Value))
-> Maybe [PredicateProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PredicateProperty]
and,
               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
"Field" (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)
field,
               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
"Operand" (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)
operand,
               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
"OperandType" (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)
operandType,
               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
"Operator" (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)
operator,
               Key -> [PredicateProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Or" ([PredicateProperty] -> (Key, Value))
-> Maybe [PredicateProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PredicateProperty]
or]))
instance Property "And" PredicateProperty where
  type PropertyType "And" PredicateProperty = [PredicateProperty]
  set :: PropertyType "And" PredicateProperty
-> PredicateProperty -> PredicateProperty
set PropertyType "And" PredicateProperty
newValue PredicateProperty {Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredicateProperty -> ()
and :: PredicateProperty -> Maybe [PredicateProperty]
field :: PredicateProperty -> Maybe (Value Text)
operand :: PredicateProperty -> Maybe (Value Text)
operandType :: PredicateProperty -> Maybe (Value Text)
operator :: PredicateProperty -> Maybe (Value Text)
or :: PredicateProperty -> Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
    = PredicateProperty {and :: Maybe [PredicateProperty]
and = [PredicateProperty] -> Maybe [PredicateProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PredicateProperty]
PropertyType "And" PredicateProperty
newValue, Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
haddock_workaround_ :: ()
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
instance Property "Field" PredicateProperty where
  type PropertyType "Field" PredicateProperty = Value Prelude.Text
  set :: PropertyType "Field" PredicateProperty
-> PredicateProperty -> PredicateProperty
set PropertyType "Field" PredicateProperty
newValue PredicateProperty {Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredicateProperty -> ()
and :: PredicateProperty -> Maybe [PredicateProperty]
field :: PredicateProperty -> Maybe (Value Text)
operand :: PredicateProperty -> Maybe (Value Text)
operandType :: PredicateProperty -> Maybe (Value Text)
operator :: PredicateProperty -> Maybe (Value Text)
or :: PredicateProperty -> Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
    = PredicateProperty {field :: Maybe (Value Text)
field = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Field" PredicateProperty
Value Text
newValue, Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
instance Property "Operand" PredicateProperty where
  type PropertyType "Operand" PredicateProperty = Value Prelude.Text
  set :: PropertyType "Operand" PredicateProperty
-> PredicateProperty -> PredicateProperty
set PropertyType "Operand" PredicateProperty
newValue PredicateProperty {Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredicateProperty -> ()
and :: PredicateProperty -> Maybe [PredicateProperty]
field :: PredicateProperty -> Maybe (Value Text)
operand :: PredicateProperty -> Maybe (Value Text)
operandType :: PredicateProperty -> Maybe (Value Text)
operator :: PredicateProperty -> Maybe (Value Text)
or :: PredicateProperty -> Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
    = PredicateProperty {operand :: Maybe (Value Text)
operand = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Operand" PredicateProperty
Value Text
newValue, Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
instance Property "OperandType" PredicateProperty where
  type PropertyType "OperandType" PredicateProperty = Value Prelude.Text
  set :: PropertyType "OperandType" PredicateProperty
-> PredicateProperty -> PredicateProperty
set PropertyType "OperandType" PredicateProperty
newValue PredicateProperty {Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredicateProperty -> ()
and :: PredicateProperty -> Maybe [PredicateProperty]
field :: PredicateProperty -> Maybe (Value Text)
operand :: PredicateProperty -> Maybe (Value Text)
operandType :: PredicateProperty -> Maybe (Value Text)
operator :: PredicateProperty -> Maybe (Value Text)
or :: PredicateProperty -> Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
    = PredicateProperty {operandType :: Maybe (Value Text)
operandType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "OperandType" PredicateProperty
Value Text
newValue, Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
instance Property "Operator" PredicateProperty where
  type PropertyType "Operator" PredicateProperty = Value Prelude.Text
  set :: PropertyType "Operator" PredicateProperty
-> PredicateProperty -> PredicateProperty
set PropertyType "Operator" PredicateProperty
newValue PredicateProperty {Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredicateProperty -> ()
and :: PredicateProperty -> Maybe [PredicateProperty]
field :: PredicateProperty -> Maybe (Value Text)
operand :: PredicateProperty -> Maybe (Value Text)
operandType :: PredicateProperty -> Maybe (Value Text)
operator :: PredicateProperty -> Maybe (Value Text)
or :: PredicateProperty -> Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
    = PredicateProperty {operator :: Maybe (Value Text)
operator = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Operator" PredicateProperty
Value Text
newValue, Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
instance Property "Or" PredicateProperty where
  type PropertyType "Or" PredicateProperty = [PredicateProperty]
  set :: PropertyType "Or" PredicateProperty
-> PredicateProperty -> PredicateProperty
set PropertyType "Or" PredicateProperty
newValue PredicateProperty {Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: PredicateProperty -> ()
and :: PredicateProperty -> Maybe [PredicateProperty]
field :: PredicateProperty -> Maybe (Value Text)
operand :: PredicateProperty -> Maybe (Value Text)
operandType :: PredicateProperty -> Maybe (Value Text)
operator :: PredicateProperty -> Maybe (Value Text)
or :: PredicateProperty -> Maybe [PredicateProperty]
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
or :: Maybe [PredicateProperty]
..}
    = PredicateProperty {or :: Maybe [PredicateProperty]
or = [PredicateProperty] -> Maybe [PredicateProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [PredicateProperty]
PropertyType "Or" PredicateProperty
newValue, Maybe [PredicateProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
haddock_workaround_ :: ()
and :: Maybe [PredicateProperty]
field :: Maybe (Value Text)
operand :: Maybe (Value Text)
operandType :: Maybe (Value Text)
operator :: Maybe (Value Text)
..}