module Stratosphere.Connect.EvaluationForm.EvaluationFormItemEnablementConfigurationProperty (
        module Exports,
        EvaluationFormItemEnablementConfigurationProperty(..),
        mkEvaluationFormItemEnablementConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Connect.EvaluationForm.EvaluationFormItemEnablementConditionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EvaluationFormItemEnablementConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-evaluationform-evaluationformitemenablementconfiguration.html>
    EvaluationFormItemEnablementConfigurationProperty {EvaluationFormItemEnablementConfigurationProperty -> ()
haddock_workaround_ :: (),
                                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-evaluationform-evaluationformitemenablementconfiguration.html#cfn-connect-evaluationform-evaluationformitemenablementconfiguration-action>
                                                       EvaluationFormItemEnablementConfigurationProperty -> Value Text
action :: (Value Prelude.Text),
                                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-evaluationform-evaluationformitemenablementconfiguration.html#cfn-connect-evaluationform-evaluationformitemenablementconfiguration-condition>
                                                       EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConditionProperty
condition :: EvaluationFormItemEnablementConditionProperty,
                                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-evaluationform-evaluationformitemenablementconfiguration.html#cfn-connect-evaluationform-evaluationformitemenablementconfiguration-defaultaction>
                                                       EvaluationFormItemEnablementConfigurationProperty
-> Maybe (Value Text)
defaultAction :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty -> Bool
(EvaluationFormItemEnablementConfigurationProperty
 -> EvaluationFormItemEnablementConfigurationProperty -> Bool)
-> (EvaluationFormItemEnablementConfigurationProperty
    -> EvaluationFormItemEnablementConfigurationProperty -> Bool)
-> Eq EvaluationFormItemEnablementConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty -> Bool
== :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty -> Bool
$c/= :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty -> Bool
/= :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty -> Bool
Prelude.Eq, Int -> EvaluationFormItemEnablementConfigurationProperty -> ShowS
[EvaluationFormItemEnablementConfigurationProperty] -> ShowS
EvaluationFormItemEnablementConfigurationProperty -> String
(Int -> EvaluationFormItemEnablementConfigurationProperty -> ShowS)
-> (EvaluationFormItemEnablementConfigurationProperty -> String)
-> ([EvaluationFormItemEnablementConfigurationProperty] -> ShowS)
-> Show EvaluationFormItemEnablementConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EvaluationFormItemEnablementConfigurationProperty -> ShowS
showsPrec :: Int -> EvaluationFormItemEnablementConfigurationProperty -> ShowS
$cshow :: EvaluationFormItemEnablementConfigurationProperty -> String
show :: EvaluationFormItemEnablementConfigurationProperty -> String
$cshowList :: [EvaluationFormItemEnablementConfigurationProperty] -> ShowS
showList :: [EvaluationFormItemEnablementConfigurationProperty] -> ShowS
Prelude.Show)
mkEvaluationFormItemEnablementConfigurationProperty ::
  Value Prelude.Text
  -> EvaluationFormItemEnablementConditionProperty
     -> EvaluationFormItemEnablementConfigurationProperty
mkEvaluationFormItemEnablementConfigurationProperty :: Value Text
-> EvaluationFormItemEnablementConditionProperty
-> EvaluationFormItemEnablementConfigurationProperty
mkEvaluationFormItemEnablementConfigurationProperty
  Value Text
action
  EvaluationFormItemEnablementConditionProperty
condition
  = EvaluationFormItemEnablementConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), action :: Value Text
action = Value Text
action, condition :: EvaluationFormItemEnablementConditionProperty
condition = EvaluationFormItemEnablementConditionProperty
condition,
       defaultAction :: Maybe (Value Text)
defaultAction = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EvaluationFormItemEnablementConfigurationProperty where
  toResourceProperties :: EvaluationFormItemEnablementConfigurationProperty
-> ResourceProperties
toResourceProperties
    EvaluationFormItemEnablementConfigurationProperty {Maybe (Value Text)
()
Value Text
EvaluationFormItemEnablementConditionProperty
haddock_workaround_ :: EvaluationFormItemEnablementConfigurationProperty -> ()
action :: EvaluationFormItemEnablementConfigurationProperty -> Value Text
condition :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConditionProperty
defaultAction :: EvaluationFormItemEnablementConfigurationProperty
-> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Value Text
condition :: EvaluationFormItemEnablementConditionProperty
defaultAction :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Connect::EvaluationForm.EvaluationFormItemEnablementConfiguration",
         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
"Action" 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
action, Key
"Condition" Key
-> EvaluationFormItemEnablementConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= EvaluationFormItemEnablementConditionProperty
condition]
                           ([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
"DefaultAction" (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)
defaultAction]))}
instance JSON.ToJSON EvaluationFormItemEnablementConfigurationProperty where
  toJSON :: EvaluationFormItemEnablementConfigurationProperty -> Value
toJSON EvaluationFormItemEnablementConfigurationProperty {Maybe (Value Text)
()
Value Text
EvaluationFormItemEnablementConditionProperty
haddock_workaround_ :: EvaluationFormItemEnablementConfigurationProperty -> ()
action :: EvaluationFormItemEnablementConfigurationProperty -> Value Text
condition :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConditionProperty
defaultAction :: EvaluationFormItemEnablementConfigurationProperty
-> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Value Text
condition :: EvaluationFormItemEnablementConditionProperty
defaultAction :: 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
"Action" 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
action, Key
"Condition" Key
-> EvaluationFormItemEnablementConditionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= EvaluationFormItemEnablementConditionProperty
condition]
              ([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
"DefaultAction" (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)
defaultAction])))
instance Property "Action" EvaluationFormItemEnablementConfigurationProperty where
  type PropertyType "Action" EvaluationFormItemEnablementConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "Action" EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty
set PropertyType
  "Action" EvaluationFormItemEnablementConfigurationProperty
newValue EvaluationFormItemEnablementConfigurationProperty {Maybe (Value Text)
()
Value Text
EvaluationFormItemEnablementConditionProperty
haddock_workaround_ :: EvaluationFormItemEnablementConfigurationProperty -> ()
action :: EvaluationFormItemEnablementConfigurationProperty -> Value Text
condition :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConditionProperty
defaultAction :: EvaluationFormItemEnablementConfigurationProperty
-> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Value Text
condition :: EvaluationFormItemEnablementConditionProperty
defaultAction :: Maybe (Value Text)
..}
    = EvaluationFormItemEnablementConfigurationProperty
        {action :: Value Text
action = PropertyType
  "Action" EvaluationFormItemEnablementConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
EvaluationFormItemEnablementConditionProperty
haddock_workaround_ :: ()
condition :: EvaluationFormItemEnablementConditionProperty
defaultAction :: Maybe (Value Text)
haddock_workaround_ :: ()
condition :: EvaluationFormItemEnablementConditionProperty
defaultAction :: Maybe (Value Text)
..}
instance Property "Condition" EvaluationFormItemEnablementConfigurationProperty where
  type PropertyType "Condition" EvaluationFormItemEnablementConfigurationProperty = EvaluationFormItemEnablementConditionProperty
  set :: PropertyType
  "Condition" EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty
set PropertyType
  "Condition" EvaluationFormItemEnablementConfigurationProperty
newValue EvaluationFormItemEnablementConfigurationProperty {Maybe (Value Text)
()
Value Text
EvaluationFormItemEnablementConditionProperty
haddock_workaround_ :: EvaluationFormItemEnablementConfigurationProperty -> ()
action :: EvaluationFormItemEnablementConfigurationProperty -> Value Text
condition :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConditionProperty
defaultAction :: EvaluationFormItemEnablementConfigurationProperty
-> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Value Text
condition :: EvaluationFormItemEnablementConditionProperty
defaultAction :: Maybe (Value Text)
..}
    = EvaluationFormItemEnablementConfigurationProperty
        {condition :: EvaluationFormItemEnablementConditionProperty
condition = PropertyType
  "Condition" EvaluationFormItemEnablementConfigurationProperty
EvaluationFormItemEnablementConditionProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
action :: Value Text
defaultAction :: Maybe (Value Text)
haddock_workaround_ :: ()
action :: Value Text
defaultAction :: Maybe (Value Text)
..}
instance Property "DefaultAction" EvaluationFormItemEnablementConfigurationProperty where
  type PropertyType "DefaultAction" EvaluationFormItemEnablementConfigurationProperty = Value Prelude.Text
  set :: PropertyType
  "DefaultAction" EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConfigurationProperty
set PropertyType
  "DefaultAction" EvaluationFormItemEnablementConfigurationProperty
newValue EvaluationFormItemEnablementConfigurationProperty {Maybe (Value Text)
()
Value Text
EvaluationFormItemEnablementConditionProperty
haddock_workaround_ :: EvaluationFormItemEnablementConfigurationProperty -> ()
action :: EvaluationFormItemEnablementConfigurationProperty -> Value Text
condition :: EvaluationFormItemEnablementConfigurationProperty
-> EvaluationFormItemEnablementConditionProperty
defaultAction :: EvaluationFormItemEnablementConfigurationProperty
-> Maybe (Value Text)
haddock_workaround_ :: ()
action :: Value Text
condition :: EvaluationFormItemEnablementConditionProperty
defaultAction :: Maybe (Value Text)
..}
    = EvaluationFormItemEnablementConfigurationProperty
        {defaultAction :: Maybe (Value Text)
defaultAction = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "DefaultAction" EvaluationFormItemEnablementConfigurationProperty
Value Text
newValue, ()
Value Text
EvaluationFormItemEnablementConditionProperty
haddock_workaround_ :: ()
action :: Value Text
condition :: EvaluationFormItemEnablementConditionProperty
haddock_workaround_ :: ()
action :: Value Text
condition :: EvaluationFormItemEnablementConditionProperty
..}