module Stratosphere.CustomerProfiles.EventTrigger.ObjectAttributeProperty (
        ObjectAttributeProperty(..), mkObjectAttributeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ObjectAttributeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-eventtrigger-objectattribute.html>
    ObjectAttributeProperty {ObjectAttributeProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-eventtrigger-objectattribute.html#cfn-customerprofiles-eventtrigger-objectattribute-comparisonoperator>
                             ObjectAttributeProperty -> Value Text
comparisonOperator :: (Value Prelude.Text),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-eventtrigger-objectattribute.html#cfn-customerprofiles-eventtrigger-objectattribute-fieldname>
                             ObjectAttributeProperty -> Maybe (Value Text)
fieldName :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-eventtrigger-objectattribute.html#cfn-customerprofiles-eventtrigger-objectattribute-source>
                             ObjectAttributeProperty -> Maybe (Value Text)
source :: (Prelude.Maybe (Value Prelude.Text)),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-customerprofiles-eventtrigger-objectattribute.html#cfn-customerprofiles-eventtrigger-objectattribute-values>
                             ObjectAttributeProperty -> ValueList Text
values :: (ValueList Prelude.Text)}
  deriving stock (ObjectAttributeProperty -> ObjectAttributeProperty -> Bool
(ObjectAttributeProperty -> ObjectAttributeProperty -> Bool)
-> (ObjectAttributeProperty -> ObjectAttributeProperty -> Bool)
-> Eq ObjectAttributeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ObjectAttributeProperty -> ObjectAttributeProperty -> Bool
== :: ObjectAttributeProperty -> ObjectAttributeProperty -> Bool
$c/= :: ObjectAttributeProperty -> ObjectAttributeProperty -> Bool
/= :: ObjectAttributeProperty -> ObjectAttributeProperty -> Bool
Prelude.Eq, Int -> ObjectAttributeProperty -> ShowS
[ObjectAttributeProperty] -> ShowS
ObjectAttributeProperty -> String
(Int -> ObjectAttributeProperty -> ShowS)
-> (ObjectAttributeProperty -> String)
-> ([ObjectAttributeProperty] -> ShowS)
-> Show ObjectAttributeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ObjectAttributeProperty -> ShowS
showsPrec :: Int -> ObjectAttributeProperty -> ShowS
$cshow :: ObjectAttributeProperty -> String
show :: ObjectAttributeProperty -> String
$cshowList :: [ObjectAttributeProperty] -> ShowS
showList :: [ObjectAttributeProperty] -> ShowS
Prelude.Show)
mkObjectAttributeProperty ::
  Value Prelude.Text
  -> ValueList Prelude.Text -> ObjectAttributeProperty
mkObjectAttributeProperty :: Value Text -> ValueList Text -> ObjectAttributeProperty
mkObjectAttributeProperty Value Text
comparisonOperator ValueList Text
values
  = ObjectAttributeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), comparisonOperator :: Value Text
comparisonOperator = Value Text
comparisonOperator,
       values :: ValueList Text
values = ValueList Text
values, fieldName :: Maybe (Value Text)
fieldName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       source :: Maybe (Value Text)
source = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ObjectAttributeProperty where
  toResourceProperties :: ObjectAttributeProperty -> ResourceProperties
toResourceProperties ObjectAttributeProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ObjectAttributeProperty -> ()
comparisonOperator :: ObjectAttributeProperty -> Value Text
fieldName :: ObjectAttributeProperty -> Maybe (Value Text)
source :: ObjectAttributeProperty -> Maybe (Value Text)
values :: ObjectAttributeProperty -> ValueList Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
values :: ValueList Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::CustomerProfiles::EventTrigger.ObjectAttribute",
         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
"ComparisonOperator" 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
comparisonOperator,
                            Key
"Values" 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..= ValueList Text
values]
                           ([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
"FieldName" (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)
fieldName,
                               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
"Source" (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)
source]))}
instance JSON.ToJSON ObjectAttributeProperty where
  toJSON :: ObjectAttributeProperty -> Value
toJSON ObjectAttributeProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ObjectAttributeProperty -> ()
comparisonOperator :: ObjectAttributeProperty -> Value Text
fieldName :: ObjectAttributeProperty -> Maybe (Value Text)
source :: ObjectAttributeProperty -> Maybe (Value Text)
values :: ObjectAttributeProperty -> ValueList Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
values :: ValueList 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
"ComparisonOperator" 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
comparisonOperator,
               Key
"Values" 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..= ValueList Text
values]
              ([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
"FieldName" (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)
fieldName,
                  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
"Source" (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)
source])))
instance Property "ComparisonOperator" ObjectAttributeProperty where
  type PropertyType "ComparisonOperator" ObjectAttributeProperty = Value Prelude.Text
  set :: PropertyType "ComparisonOperator" ObjectAttributeProperty
-> ObjectAttributeProperty -> ObjectAttributeProperty
set PropertyType "ComparisonOperator" ObjectAttributeProperty
newValue ObjectAttributeProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ObjectAttributeProperty -> ()
comparisonOperator :: ObjectAttributeProperty -> Value Text
fieldName :: ObjectAttributeProperty -> Maybe (Value Text)
source :: ObjectAttributeProperty -> Maybe (Value Text)
values :: ObjectAttributeProperty -> ValueList Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
values :: ValueList Text
..}
    = ObjectAttributeProperty {comparisonOperator :: Value Text
comparisonOperator = PropertyType "ComparisonOperator" ObjectAttributeProperty
Value Text
newValue, Maybe (Value Text)
()
ValueList Text
haddock_workaround_ :: ()
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
values :: ValueList Text
haddock_workaround_ :: ()
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
values :: ValueList Text
..}
instance Property "FieldName" ObjectAttributeProperty where
  type PropertyType "FieldName" ObjectAttributeProperty = Value Prelude.Text
  set :: PropertyType "FieldName" ObjectAttributeProperty
-> ObjectAttributeProperty -> ObjectAttributeProperty
set PropertyType "FieldName" ObjectAttributeProperty
newValue ObjectAttributeProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ObjectAttributeProperty -> ()
comparisonOperator :: ObjectAttributeProperty -> Value Text
fieldName :: ObjectAttributeProperty -> Maybe (Value Text)
source :: ObjectAttributeProperty -> Maybe (Value Text)
values :: ObjectAttributeProperty -> ValueList Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
values :: ValueList Text
..}
    = ObjectAttributeProperty {fieldName :: Maybe (Value Text)
fieldName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "FieldName" ObjectAttributeProperty
Value Text
newValue, Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
source :: Maybe (Value Text)
values :: ValueList Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
source :: Maybe (Value Text)
values :: ValueList Text
..}
instance Property "Source" ObjectAttributeProperty where
  type PropertyType "Source" ObjectAttributeProperty = Value Prelude.Text
  set :: PropertyType "Source" ObjectAttributeProperty
-> ObjectAttributeProperty -> ObjectAttributeProperty
set PropertyType "Source" ObjectAttributeProperty
newValue ObjectAttributeProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ObjectAttributeProperty -> ()
comparisonOperator :: ObjectAttributeProperty -> Value Text
fieldName :: ObjectAttributeProperty -> Maybe (Value Text)
source :: ObjectAttributeProperty -> Maybe (Value Text)
values :: ObjectAttributeProperty -> ValueList Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
values :: ValueList Text
..}
    = ObjectAttributeProperty {source :: Maybe (Value Text)
source = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Source" ObjectAttributeProperty
Value Text
newValue, Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
values :: ValueList Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
values :: ValueList Text
..}
instance Property "Values" ObjectAttributeProperty where
  type PropertyType "Values" ObjectAttributeProperty = ValueList Prelude.Text
  set :: PropertyType "Values" ObjectAttributeProperty
-> ObjectAttributeProperty -> ObjectAttributeProperty
set PropertyType "Values" ObjectAttributeProperty
newValue ObjectAttributeProperty {Maybe (Value Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ObjectAttributeProperty -> ()
comparisonOperator :: ObjectAttributeProperty -> Value Text
fieldName :: ObjectAttributeProperty -> Maybe (Value Text)
source :: ObjectAttributeProperty -> Maybe (Value Text)
values :: ObjectAttributeProperty -> ValueList Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
values :: ValueList Text
..}
    = ObjectAttributeProperty {values :: ValueList Text
values = PropertyType "Values" ObjectAttributeProperty
ValueList Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
haddock_workaround_ :: ()
comparisonOperator :: Value Text
fieldName :: Maybe (Value Text)
source :: Maybe (Value Text)
..}