module Stratosphere.IoTFleetWise.Campaign.SignalFetchConfigProperty (
module Exports, SignalFetchConfigProperty(..),
mkSignalFetchConfigProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTFleetWise.Campaign.ConditionBasedSignalFetchConfigProperty as Exports
import {-# SOURCE #-} Stratosphere.IoTFleetWise.Campaign.TimeBasedSignalFetchConfigProperty as Exports
import Stratosphere.ResourceProperties
data SignalFetchConfigProperty
=
SignalFetchConfigProperty {SignalFetchConfigProperty -> ()
haddock_workaround_ :: (),
SignalFetchConfigProperty
-> Maybe ConditionBasedSignalFetchConfigProperty
conditionBased :: (Prelude.Maybe ConditionBasedSignalFetchConfigProperty),
SignalFetchConfigProperty
-> Maybe TimeBasedSignalFetchConfigProperty
timeBased :: (Prelude.Maybe TimeBasedSignalFetchConfigProperty)}
deriving stock (SignalFetchConfigProperty -> SignalFetchConfigProperty -> Bool
(SignalFetchConfigProperty -> SignalFetchConfigProperty -> Bool)
-> (SignalFetchConfigProperty -> SignalFetchConfigProperty -> Bool)
-> Eq SignalFetchConfigProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SignalFetchConfigProperty -> SignalFetchConfigProperty -> Bool
== :: SignalFetchConfigProperty -> SignalFetchConfigProperty -> Bool
$c/= :: SignalFetchConfigProperty -> SignalFetchConfigProperty -> Bool
/= :: SignalFetchConfigProperty -> SignalFetchConfigProperty -> Bool
Prelude.Eq, Int -> SignalFetchConfigProperty -> ShowS
[SignalFetchConfigProperty] -> ShowS
SignalFetchConfigProperty -> String
(Int -> SignalFetchConfigProperty -> ShowS)
-> (SignalFetchConfigProperty -> String)
-> ([SignalFetchConfigProperty] -> ShowS)
-> Show SignalFetchConfigProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SignalFetchConfigProperty -> ShowS
showsPrec :: Int -> SignalFetchConfigProperty -> ShowS
$cshow :: SignalFetchConfigProperty -> String
show :: SignalFetchConfigProperty -> String
$cshowList :: [SignalFetchConfigProperty] -> ShowS
showList :: [SignalFetchConfigProperty] -> ShowS
Prelude.Show)
mkSignalFetchConfigProperty :: SignalFetchConfigProperty
mkSignalFetchConfigProperty :: SignalFetchConfigProperty
mkSignalFetchConfigProperty
= SignalFetchConfigProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), conditionBased :: Maybe ConditionBasedSignalFetchConfigProperty
conditionBased = Maybe ConditionBasedSignalFetchConfigProperty
forall a. Maybe a
Prelude.Nothing,
timeBased :: Maybe TimeBasedSignalFetchConfigProperty
timeBased = Maybe TimeBasedSignalFetchConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SignalFetchConfigProperty where
toResourceProperties :: SignalFetchConfigProperty -> ResourceProperties
toResourceProperties SignalFetchConfigProperty {Maybe ConditionBasedSignalFetchConfigProperty
Maybe TimeBasedSignalFetchConfigProperty
()
haddock_workaround_ :: SignalFetchConfigProperty -> ()
conditionBased :: SignalFetchConfigProperty
-> Maybe ConditionBasedSignalFetchConfigProperty
timeBased :: SignalFetchConfigProperty
-> Maybe TimeBasedSignalFetchConfigProperty
haddock_workaround_ :: ()
conditionBased :: Maybe ConditionBasedSignalFetchConfigProperty
timeBased :: Maybe TimeBasedSignalFetchConfigProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTFleetWise::Campaign.SignalFetchConfig",
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 -> ConditionBasedSignalFetchConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConditionBased" (ConditionBasedSignalFetchConfigProperty -> (Key, Value))
-> Maybe ConditionBasedSignalFetchConfigProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionBasedSignalFetchConfigProperty
conditionBased,
Key -> TimeBasedSignalFetchConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeBased" (TimeBasedSignalFetchConfigProperty -> (Key, Value))
-> Maybe TimeBasedSignalFetchConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeBasedSignalFetchConfigProperty
timeBased])}
instance JSON.ToJSON SignalFetchConfigProperty where
toJSON :: SignalFetchConfigProperty -> Value
toJSON SignalFetchConfigProperty {Maybe ConditionBasedSignalFetchConfigProperty
Maybe TimeBasedSignalFetchConfigProperty
()
haddock_workaround_ :: SignalFetchConfigProperty -> ()
conditionBased :: SignalFetchConfigProperty
-> Maybe ConditionBasedSignalFetchConfigProperty
timeBased :: SignalFetchConfigProperty
-> Maybe TimeBasedSignalFetchConfigProperty
haddock_workaround_ :: ()
conditionBased :: Maybe ConditionBasedSignalFetchConfigProperty
timeBased :: Maybe TimeBasedSignalFetchConfigProperty
..}
= [(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 -> ConditionBasedSignalFetchConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ConditionBased" (ConditionBasedSignalFetchConfigProperty -> (Key, Value))
-> Maybe ConditionBasedSignalFetchConfigProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConditionBasedSignalFetchConfigProperty
conditionBased,
Key -> TimeBasedSignalFetchConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TimeBased" (TimeBasedSignalFetchConfigProperty -> (Key, Value))
-> Maybe TimeBasedSignalFetchConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TimeBasedSignalFetchConfigProperty
timeBased]))
instance Property "ConditionBased" SignalFetchConfigProperty where
type PropertyType "ConditionBased" SignalFetchConfigProperty = ConditionBasedSignalFetchConfigProperty
set :: PropertyType "ConditionBased" SignalFetchConfigProperty
-> SignalFetchConfigProperty -> SignalFetchConfigProperty
set PropertyType "ConditionBased" SignalFetchConfigProperty
newValue SignalFetchConfigProperty {Maybe ConditionBasedSignalFetchConfigProperty
Maybe TimeBasedSignalFetchConfigProperty
()
haddock_workaround_ :: SignalFetchConfigProperty -> ()
conditionBased :: SignalFetchConfigProperty
-> Maybe ConditionBasedSignalFetchConfigProperty
timeBased :: SignalFetchConfigProperty
-> Maybe TimeBasedSignalFetchConfigProperty
haddock_workaround_ :: ()
conditionBased :: Maybe ConditionBasedSignalFetchConfigProperty
timeBased :: Maybe TimeBasedSignalFetchConfigProperty
..}
= SignalFetchConfigProperty
{conditionBased :: Maybe ConditionBasedSignalFetchConfigProperty
conditionBased = ConditionBasedSignalFetchConfigProperty
-> Maybe ConditionBasedSignalFetchConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ConditionBased" SignalFetchConfigProperty
ConditionBasedSignalFetchConfigProperty
newValue, Maybe TimeBasedSignalFetchConfigProperty
()
haddock_workaround_ :: ()
timeBased :: Maybe TimeBasedSignalFetchConfigProperty
haddock_workaround_ :: ()
timeBased :: Maybe TimeBasedSignalFetchConfigProperty
..}
instance Property "TimeBased" SignalFetchConfigProperty where
type PropertyType "TimeBased" SignalFetchConfigProperty = TimeBasedSignalFetchConfigProperty
set :: PropertyType "TimeBased" SignalFetchConfigProperty
-> SignalFetchConfigProperty -> SignalFetchConfigProperty
set PropertyType "TimeBased" SignalFetchConfigProperty
newValue SignalFetchConfigProperty {Maybe ConditionBasedSignalFetchConfigProperty
Maybe TimeBasedSignalFetchConfigProperty
()
haddock_workaround_ :: SignalFetchConfigProperty -> ()
conditionBased :: SignalFetchConfigProperty
-> Maybe ConditionBasedSignalFetchConfigProperty
timeBased :: SignalFetchConfigProperty
-> Maybe TimeBasedSignalFetchConfigProperty
haddock_workaround_ :: ()
conditionBased :: Maybe ConditionBasedSignalFetchConfigProperty
timeBased :: Maybe TimeBasedSignalFetchConfigProperty
..}
= SignalFetchConfigProperty {timeBased :: Maybe TimeBasedSignalFetchConfigProperty
timeBased = TimeBasedSignalFetchConfigProperty
-> Maybe TimeBasedSignalFetchConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TimeBased" SignalFetchConfigProperty
TimeBasedSignalFetchConfigProperty
newValue, Maybe ConditionBasedSignalFetchConfigProperty
()
haddock_workaround_ :: ()
conditionBased :: Maybe ConditionBasedSignalFetchConfigProperty
haddock_workaround_ :: ()
conditionBased :: Maybe ConditionBasedSignalFetchConfigProperty
..}