module Stratosphere.IoTFleetWise.SignalCatalog.NodeProperty (
module Exports, NodeProperty(..), mkNodeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTFleetWise.SignalCatalog.ActuatorProperty as Exports
import {-# SOURCE #-} Stratosphere.IoTFleetWise.SignalCatalog.AttributeProperty as Exports
import {-# SOURCE #-} Stratosphere.IoTFleetWise.SignalCatalog.BranchProperty as Exports
import {-# SOURCE #-} Stratosphere.IoTFleetWise.SignalCatalog.SensorProperty as Exports
import Stratosphere.ResourceProperties
data NodeProperty
=
NodeProperty {NodeProperty -> ()
haddock_workaround_ :: (),
NodeProperty -> Maybe ActuatorProperty
actuator :: (Prelude.Maybe ActuatorProperty),
NodeProperty -> Maybe AttributeProperty
attribute :: (Prelude.Maybe AttributeProperty),
NodeProperty -> Maybe BranchProperty
branch :: (Prelude.Maybe BranchProperty),
NodeProperty -> Maybe SensorProperty
sensor :: (Prelude.Maybe SensorProperty)}
deriving stock (NodeProperty -> NodeProperty -> Bool
(NodeProperty -> NodeProperty -> Bool)
-> (NodeProperty -> NodeProperty -> Bool) -> Eq NodeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NodeProperty -> NodeProperty -> Bool
== :: NodeProperty -> NodeProperty -> Bool
$c/= :: NodeProperty -> NodeProperty -> Bool
/= :: NodeProperty -> NodeProperty -> Bool
Prelude.Eq, Int -> NodeProperty -> ShowS
[NodeProperty] -> ShowS
NodeProperty -> String
(Int -> NodeProperty -> ShowS)
-> (NodeProperty -> String)
-> ([NodeProperty] -> ShowS)
-> Show NodeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NodeProperty -> ShowS
showsPrec :: Int -> NodeProperty -> ShowS
$cshow :: NodeProperty -> String
show :: NodeProperty -> String
$cshowList :: [NodeProperty] -> ShowS
showList :: [NodeProperty] -> ShowS
Prelude.Show)
mkNodeProperty :: NodeProperty
mkNodeProperty :: NodeProperty
mkNodeProperty
= NodeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), actuator :: Maybe ActuatorProperty
actuator = Maybe ActuatorProperty
forall a. Maybe a
Prelude.Nothing,
attribute :: Maybe AttributeProperty
attribute = Maybe AttributeProperty
forall a. Maybe a
Prelude.Nothing, branch :: Maybe BranchProperty
branch = Maybe BranchProperty
forall a. Maybe a
Prelude.Nothing,
sensor :: Maybe SensorProperty
sensor = Maybe SensorProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NodeProperty where
toResourceProperties :: NodeProperty -> ResourceProperties
toResourceProperties NodeProperty {Maybe ActuatorProperty
Maybe AttributeProperty
Maybe BranchProperty
Maybe SensorProperty
()
haddock_workaround_ :: NodeProperty -> ()
actuator :: NodeProperty -> Maybe ActuatorProperty
attribute :: NodeProperty -> Maybe AttributeProperty
branch :: NodeProperty -> Maybe BranchProperty
sensor :: NodeProperty -> Maybe SensorProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTFleetWise::SignalCatalog.Node",
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 -> ActuatorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Actuator" (ActuatorProperty -> (Key, Value))
-> Maybe ActuatorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActuatorProperty
actuator,
Key -> AttributeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Attribute" (AttributeProperty -> (Key, Value))
-> Maybe AttributeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AttributeProperty
attribute,
Key -> BranchProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Branch" (BranchProperty -> (Key, Value))
-> Maybe BranchProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BranchProperty
branch,
Key -> SensorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Sensor" (SensorProperty -> (Key, Value))
-> Maybe SensorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SensorProperty
sensor])}
instance JSON.ToJSON NodeProperty where
toJSON :: NodeProperty -> Value
toJSON NodeProperty {Maybe ActuatorProperty
Maybe AttributeProperty
Maybe BranchProperty
Maybe SensorProperty
()
haddock_workaround_ :: NodeProperty -> ()
actuator :: NodeProperty -> Maybe ActuatorProperty
attribute :: NodeProperty -> Maybe AttributeProperty
branch :: NodeProperty -> Maybe BranchProperty
sensor :: NodeProperty -> Maybe SensorProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
..}
= [(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 -> ActuatorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Actuator" (ActuatorProperty -> (Key, Value))
-> Maybe ActuatorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActuatorProperty
actuator,
Key -> AttributeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Attribute" (AttributeProperty -> (Key, Value))
-> Maybe AttributeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AttributeProperty
attribute,
Key -> BranchProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Branch" (BranchProperty -> (Key, Value))
-> Maybe BranchProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BranchProperty
branch,
Key -> SensorProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Sensor" (SensorProperty -> (Key, Value))
-> Maybe SensorProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SensorProperty
sensor]))
instance Property "Actuator" NodeProperty where
type PropertyType "Actuator" NodeProperty = ActuatorProperty
set :: PropertyType "Actuator" NodeProperty
-> NodeProperty -> NodeProperty
set PropertyType "Actuator" NodeProperty
newValue NodeProperty {Maybe ActuatorProperty
Maybe AttributeProperty
Maybe BranchProperty
Maybe SensorProperty
()
haddock_workaround_ :: NodeProperty -> ()
actuator :: NodeProperty -> Maybe ActuatorProperty
attribute :: NodeProperty -> Maybe AttributeProperty
branch :: NodeProperty -> Maybe BranchProperty
sensor :: NodeProperty -> Maybe SensorProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
..}
= NodeProperty {actuator :: Maybe ActuatorProperty
actuator = ActuatorProperty -> Maybe ActuatorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Actuator" NodeProperty
ActuatorProperty
newValue, Maybe AttributeProperty
Maybe BranchProperty
Maybe SensorProperty
()
haddock_workaround_ :: ()
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
haddock_workaround_ :: ()
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
..}
instance Property "Attribute" NodeProperty where
type PropertyType "Attribute" NodeProperty = AttributeProperty
set :: PropertyType "Attribute" NodeProperty
-> NodeProperty -> NodeProperty
set PropertyType "Attribute" NodeProperty
newValue NodeProperty {Maybe ActuatorProperty
Maybe AttributeProperty
Maybe BranchProperty
Maybe SensorProperty
()
haddock_workaround_ :: NodeProperty -> ()
actuator :: NodeProperty -> Maybe ActuatorProperty
attribute :: NodeProperty -> Maybe AttributeProperty
branch :: NodeProperty -> Maybe BranchProperty
sensor :: NodeProperty -> Maybe SensorProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
..}
= NodeProperty {attribute :: Maybe AttributeProperty
attribute = AttributeProperty -> Maybe AttributeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Attribute" NodeProperty
AttributeProperty
newValue, Maybe ActuatorProperty
Maybe BranchProperty
Maybe SensorProperty
()
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
..}
instance Property "Branch" NodeProperty where
type PropertyType "Branch" NodeProperty = BranchProperty
set :: PropertyType "Branch" NodeProperty -> NodeProperty -> NodeProperty
set PropertyType "Branch" NodeProperty
newValue NodeProperty {Maybe ActuatorProperty
Maybe AttributeProperty
Maybe BranchProperty
Maybe SensorProperty
()
haddock_workaround_ :: NodeProperty -> ()
actuator :: NodeProperty -> Maybe ActuatorProperty
attribute :: NodeProperty -> Maybe AttributeProperty
branch :: NodeProperty -> Maybe BranchProperty
sensor :: NodeProperty -> Maybe SensorProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
..}
= NodeProperty {branch :: Maybe BranchProperty
branch = BranchProperty -> Maybe BranchProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Branch" NodeProperty
BranchProperty
newValue, Maybe ActuatorProperty
Maybe AttributeProperty
Maybe SensorProperty
()
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
sensor :: Maybe SensorProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
sensor :: Maybe SensorProperty
..}
instance Property "Sensor" NodeProperty where
type PropertyType "Sensor" NodeProperty = SensorProperty
set :: PropertyType "Sensor" NodeProperty -> NodeProperty -> NodeProperty
set PropertyType "Sensor" NodeProperty
newValue NodeProperty {Maybe ActuatorProperty
Maybe AttributeProperty
Maybe BranchProperty
Maybe SensorProperty
()
haddock_workaround_ :: NodeProperty -> ()
actuator :: NodeProperty -> Maybe ActuatorProperty
attribute :: NodeProperty -> Maybe AttributeProperty
branch :: NodeProperty -> Maybe BranchProperty
sensor :: NodeProperty -> Maybe SensorProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
sensor :: Maybe SensorProperty
..}
= NodeProperty {sensor :: Maybe SensorProperty
sensor = SensorProperty -> Maybe SensorProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Sensor" NodeProperty
SensorProperty
newValue, Maybe ActuatorProperty
Maybe AttributeProperty
Maybe BranchProperty
()
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
haddock_workaround_ :: ()
actuator :: Maybe ActuatorProperty
attribute :: Maybe AttributeProperty
branch :: Maybe BranchProperty
..}