module Stratosphere.DataBrew.Recipe.ConditionExpressionProperty (
        ConditionExpressionProperty(..), mkConditionExpressionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConditionExpressionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html>
    ConditionExpressionProperty {ConditionExpressionProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-condition>
                                 ConditionExpressionProperty -> Value Text
condition :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-targetcolumn>
                                 ConditionExpressionProperty -> Value Text
targetColumn :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-recipe-conditionexpression.html#cfn-databrew-recipe-conditionexpression-value>
                                 ConditionExpressionProperty -> Maybe (Value Text)
value :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ConditionExpressionProperty -> ConditionExpressionProperty -> Bool
(ConditionExpressionProperty
 -> ConditionExpressionProperty -> Bool)
-> (ConditionExpressionProperty
    -> ConditionExpressionProperty -> Bool)
-> Eq ConditionExpressionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionExpressionProperty -> ConditionExpressionProperty -> Bool
== :: ConditionExpressionProperty -> ConditionExpressionProperty -> Bool
$c/= :: ConditionExpressionProperty -> ConditionExpressionProperty -> Bool
/= :: ConditionExpressionProperty -> ConditionExpressionProperty -> Bool
Prelude.Eq, Int -> ConditionExpressionProperty -> ShowS
[ConditionExpressionProperty] -> ShowS
ConditionExpressionProperty -> String
(Int -> ConditionExpressionProperty -> ShowS)
-> (ConditionExpressionProperty -> String)
-> ([ConditionExpressionProperty] -> ShowS)
-> Show ConditionExpressionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionExpressionProperty -> ShowS
showsPrec :: Int -> ConditionExpressionProperty -> ShowS
$cshow :: ConditionExpressionProperty -> String
show :: ConditionExpressionProperty -> String
$cshowList :: [ConditionExpressionProperty] -> ShowS
showList :: [ConditionExpressionProperty] -> ShowS
Prelude.Show)
mkConditionExpressionProperty ::
  Value Prelude.Text
  -> Value Prelude.Text -> ConditionExpressionProperty
mkConditionExpressionProperty :: Value Text -> Value Text -> ConditionExpressionProperty
mkConditionExpressionProperty Value Text
condition Value Text
targetColumn
  = ConditionExpressionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), condition :: Value Text
condition = Value Text
condition,
       targetColumn :: Value Text
targetColumn = Value Text
targetColumn, value :: Maybe (Value Text)
value = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionExpressionProperty where
  toResourceProperties :: ConditionExpressionProperty -> ResourceProperties
toResourceProperties ConditionExpressionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionExpressionProperty -> ()
condition :: ConditionExpressionProperty -> Value Text
targetColumn :: ConditionExpressionProperty -> Value Text
value :: ConditionExpressionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
condition :: Value Text
targetColumn :: Value Text
value :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataBrew::Recipe.ConditionExpression",
         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
"Condition" 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
condition,
                            Key
"TargetColumn" 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
targetColumn]
                           ([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
"Value" (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)
value]))}
instance JSON.ToJSON ConditionExpressionProperty where
  toJSON :: ConditionExpressionProperty -> Value
toJSON ConditionExpressionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionExpressionProperty -> ()
condition :: ConditionExpressionProperty -> Value Text
targetColumn :: ConditionExpressionProperty -> Value Text
value :: ConditionExpressionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
condition :: Value Text
targetColumn :: Value Text
value :: 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
"Condition" 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
condition,
               Key
"TargetColumn" 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
targetColumn]
              ([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
"Value" (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)
value])))
instance Property "Condition" ConditionExpressionProperty where
  type PropertyType "Condition" ConditionExpressionProperty = Value Prelude.Text
  set :: PropertyType "Condition" ConditionExpressionProperty
-> ConditionExpressionProperty -> ConditionExpressionProperty
set PropertyType "Condition" ConditionExpressionProperty
newValue ConditionExpressionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionExpressionProperty -> ()
condition :: ConditionExpressionProperty -> Value Text
targetColumn :: ConditionExpressionProperty -> Value Text
value :: ConditionExpressionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
condition :: Value Text
targetColumn :: Value Text
value :: Maybe (Value Text)
..}
    = ConditionExpressionProperty {condition :: Value Text
condition = PropertyType "Condition" ConditionExpressionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
targetColumn :: Value Text
value :: Maybe (Value Text)
haddock_workaround_ :: ()
targetColumn :: Value Text
value :: Maybe (Value Text)
..}
instance Property "TargetColumn" ConditionExpressionProperty where
  type PropertyType "TargetColumn" ConditionExpressionProperty = Value Prelude.Text
  set :: PropertyType "TargetColumn" ConditionExpressionProperty
-> ConditionExpressionProperty -> ConditionExpressionProperty
set PropertyType "TargetColumn" ConditionExpressionProperty
newValue ConditionExpressionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionExpressionProperty -> ()
condition :: ConditionExpressionProperty -> Value Text
targetColumn :: ConditionExpressionProperty -> Value Text
value :: ConditionExpressionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
condition :: Value Text
targetColumn :: Value Text
value :: Maybe (Value Text)
..}
    = ConditionExpressionProperty {targetColumn :: Value Text
targetColumn = PropertyType "TargetColumn" ConditionExpressionProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
condition :: Value Text
value :: Maybe (Value Text)
haddock_workaround_ :: ()
condition :: Value Text
value :: Maybe (Value Text)
..}
instance Property "Value" ConditionExpressionProperty where
  type PropertyType "Value" ConditionExpressionProperty = Value Prelude.Text
  set :: PropertyType "Value" ConditionExpressionProperty
-> ConditionExpressionProperty -> ConditionExpressionProperty
set PropertyType "Value" ConditionExpressionProperty
newValue ConditionExpressionProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionExpressionProperty -> ()
condition :: ConditionExpressionProperty -> Value Text
targetColumn :: ConditionExpressionProperty -> Value Text
value :: ConditionExpressionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
condition :: Value Text
targetColumn :: Value Text
value :: Maybe (Value Text)
..}
    = ConditionExpressionProperty {value :: Maybe (Value Text)
value = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" ConditionExpressionProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
condition :: Value Text
targetColumn :: Value Text
haddock_workaround_ :: ()
condition :: Value Text
targetColumn :: Value Text
..}