module Stratosphere.IoTFleetWise.Campaign.ConditionBasedCollectionSchemeProperty (
        ConditionBasedCollectionSchemeProperty(..),
        mkConditionBasedCollectionSchemeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConditionBasedCollectionSchemeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotfleetwise-campaign-conditionbasedcollectionscheme.html>
    ConditionBasedCollectionSchemeProperty {ConditionBasedCollectionSchemeProperty -> ()
haddock_workaround_ :: (),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotfleetwise-campaign-conditionbasedcollectionscheme.html#cfn-iotfleetwise-campaign-conditionbasedcollectionscheme-conditionlanguageversion>
                                            ConditionBasedCollectionSchemeProperty -> Maybe (Value Integer)
conditionLanguageVersion :: (Prelude.Maybe (Value Prelude.Integer)),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotfleetwise-campaign-conditionbasedcollectionscheme.html#cfn-iotfleetwise-campaign-conditionbasedcollectionscheme-expression>
                                            ConditionBasedCollectionSchemeProperty -> Value Text
expression :: (Value Prelude.Text),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotfleetwise-campaign-conditionbasedcollectionscheme.html#cfn-iotfleetwise-campaign-conditionbasedcollectionscheme-minimumtriggerintervalms>
                                            ConditionBasedCollectionSchemeProperty -> Maybe (Value Double)
minimumTriggerIntervalMs :: (Prelude.Maybe (Value Prelude.Double)),
                                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotfleetwise-campaign-conditionbasedcollectionscheme.html#cfn-iotfleetwise-campaign-conditionbasedcollectionscheme-triggermode>
                                            ConditionBasedCollectionSchemeProperty -> Maybe (Value Text)
triggerMode :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty -> Bool
(ConditionBasedCollectionSchemeProperty
 -> ConditionBasedCollectionSchemeProperty -> Bool)
-> (ConditionBasedCollectionSchemeProperty
    -> ConditionBasedCollectionSchemeProperty -> Bool)
-> Eq ConditionBasedCollectionSchemeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty -> Bool
== :: ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty -> Bool
$c/= :: ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty -> Bool
/= :: ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty -> Bool
Prelude.Eq, Int -> ConditionBasedCollectionSchemeProperty -> ShowS
[ConditionBasedCollectionSchemeProperty] -> ShowS
ConditionBasedCollectionSchemeProperty -> String
(Int -> ConditionBasedCollectionSchemeProperty -> ShowS)
-> (ConditionBasedCollectionSchemeProperty -> String)
-> ([ConditionBasedCollectionSchemeProperty] -> ShowS)
-> Show ConditionBasedCollectionSchemeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConditionBasedCollectionSchemeProperty -> ShowS
showsPrec :: Int -> ConditionBasedCollectionSchemeProperty -> ShowS
$cshow :: ConditionBasedCollectionSchemeProperty -> String
show :: ConditionBasedCollectionSchemeProperty -> String
$cshowList :: [ConditionBasedCollectionSchemeProperty] -> ShowS
showList :: [ConditionBasedCollectionSchemeProperty] -> ShowS
Prelude.Show)
mkConditionBasedCollectionSchemeProperty ::
  Value Prelude.Text -> ConditionBasedCollectionSchemeProperty
mkConditionBasedCollectionSchemeProperty :: Value Text -> ConditionBasedCollectionSchemeProperty
mkConditionBasedCollectionSchemeProperty Value Text
expression
  = ConditionBasedCollectionSchemeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), expression :: Value Text
expression = Value Text
expression,
       conditionLanguageVersion :: Maybe (Value Integer)
conditionLanguageVersion = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
       minimumTriggerIntervalMs :: Maybe (Value Double)
minimumTriggerIntervalMs = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing,
       triggerMode :: Maybe (Value Text)
triggerMode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConditionBasedCollectionSchemeProperty where
  toResourceProperties :: ConditionBasedCollectionSchemeProperty -> ResourceProperties
toResourceProperties ConditionBasedCollectionSchemeProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionBasedCollectionSchemeProperty -> ()
conditionLanguageVersion :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Integer)
expression :: ConditionBasedCollectionSchemeProperty -> Value Text
minimumTriggerIntervalMs :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Double)
triggerMode :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTFleetWise::Campaign.ConditionBasedCollectionScheme",
         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
"Expression" 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
expression]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConditionLanguageVersion"
                                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
conditionLanguageVersion,
                               Key -> Value 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
"MinimumTriggerIntervalMs"
                                 (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
minimumTriggerIntervalMs,
                               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
"TriggerMode" (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)
triggerMode]))}
instance JSON.ToJSON ConditionBasedCollectionSchemeProperty where
  toJSON :: ConditionBasedCollectionSchemeProperty -> Value
toJSON ConditionBasedCollectionSchemeProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionBasedCollectionSchemeProperty -> ()
conditionLanguageVersion :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Integer)
expression :: ConditionBasedCollectionSchemeProperty -> Value Text
minimumTriggerIntervalMs :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Double)
triggerMode :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: 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
"Expression" 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
expression]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConditionLanguageVersion"
                    (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
conditionLanguageVersion,
                  Key -> Value 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
"MinimumTriggerIntervalMs"
                    (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
minimumTriggerIntervalMs,
                  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
"TriggerMode" (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)
triggerMode])))
instance Property "ConditionLanguageVersion" ConditionBasedCollectionSchemeProperty where
  type PropertyType "ConditionLanguageVersion" ConditionBasedCollectionSchemeProperty = Value Prelude.Integer
  set :: PropertyType
  "ConditionLanguageVersion" ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty
set PropertyType
  "ConditionLanguageVersion" ConditionBasedCollectionSchemeProperty
newValue ConditionBasedCollectionSchemeProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionBasedCollectionSchemeProperty -> ()
conditionLanguageVersion :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Integer)
expression :: ConditionBasedCollectionSchemeProperty -> Value Text
minimumTriggerIntervalMs :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Double)
triggerMode :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
..}
    = ConditionBasedCollectionSchemeProperty
        {conditionLanguageVersion :: Maybe (Value Integer)
conditionLanguageVersion = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ConditionLanguageVersion" ConditionBasedCollectionSchemeProperty
Value Integer
newValue, Maybe (Value Double)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
haddock_workaround_ :: ()
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
..}
instance Property "Expression" ConditionBasedCollectionSchemeProperty where
  type PropertyType "Expression" ConditionBasedCollectionSchemeProperty = Value Prelude.Text
  set :: PropertyType "Expression" ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty
set PropertyType "Expression" ConditionBasedCollectionSchemeProperty
newValue ConditionBasedCollectionSchemeProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionBasedCollectionSchemeProperty -> ()
conditionLanguageVersion :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Integer)
expression :: ConditionBasedCollectionSchemeProperty -> Value Text
minimumTriggerIntervalMs :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Double)
triggerMode :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
..}
    = ConditionBasedCollectionSchemeProperty
        {expression :: Value Text
expression = PropertyType "Expression" ConditionBasedCollectionSchemeProperty
Value Text
newValue, Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
..}
instance Property "MinimumTriggerIntervalMs" ConditionBasedCollectionSchemeProperty where
  type PropertyType "MinimumTriggerIntervalMs" ConditionBasedCollectionSchemeProperty = Value Prelude.Double
  set :: PropertyType
  "MinimumTriggerIntervalMs" ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty
set PropertyType
  "MinimumTriggerIntervalMs" ConditionBasedCollectionSchemeProperty
newValue ConditionBasedCollectionSchemeProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionBasedCollectionSchemeProperty -> ()
conditionLanguageVersion :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Integer)
expression :: ConditionBasedCollectionSchemeProperty -> Value Text
minimumTriggerIntervalMs :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Double)
triggerMode :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
..}
    = ConditionBasedCollectionSchemeProperty
        {minimumTriggerIntervalMs :: Maybe (Value Double)
minimumTriggerIntervalMs = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "MinimumTriggerIntervalMs" ConditionBasedCollectionSchemeProperty
Value Double
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
triggerMode :: Maybe (Value Text)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
triggerMode :: Maybe (Value Text)
..}
instance Property "TriggerMode" ConditionBasedCollectionSchemeProperty where
  type PropertyType "TriggerMode" ConditionBasedCollectionSchemeProperty = Value Prelude.Text
  set :: PropertyType "TriggerMode" ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty
-> ConditionBasedCollectionSchemeProperty
set PropertyType "TriggerMode" ConditionBasedCollectionSchemeProperty
newValue ConditionBasedCollectionSchemeProperty {Maybe (Value Double)
Maybe (Value Integer)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ConditionBasedCollectionSchemeProperty -> ()
conditionLanguageVersion :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Integer)
expression :: ConditionBasedCollectionSchemeProperty -> Value Text
minimumTriggerIntervalMs :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Double)
triggerMode :: ConditionBasedCollectionSchemeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
triggerMode :: Maybe (Value Text)
..}
    = ConditionBasedCollectionSchemeProperty
        {triggerMode :: Maybe (Value Text)
triggerMode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TriggerMode" ConditionBasedCollectionSchemeProperty
Value Text
newValue, Maybe (Value Double)
Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
haddock_workaround_ :: ()
conditionLanguageVersion :: Maybe (Value Integer)
expression :: Value Text
minimumTriggerIntervalMs :: Maybe (Value Double)
..}