module Stratosphere.IoTSiteWise.AssetModel.AssetModelHierarchyProperty (
AssetModelHierarchyProperty(..), mkAssetModelHierarchyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AssetModelHierarchyProperty
=
AssetModelHierarchyProperty {AssetModelHierarchyProperty -> ()
haddock_workaround_ :: (),
AssetModelHierarchyProperty -> Value Text
childAssetModelId :: (Value Prelude.Text),
AssetModelHierarchyProperty -> Maybe (Value Text)
externalId :: (Prelude.Maybe (Value Prelude.Text)),
AssetModelHierarchyProperty -> Maybe (Value Text)
id :: (Prelude.Maybe (Value Prelude.Text)),
AssetModelHierarchyProperty -> Maybe (Value Text)
logicalId :: (Prelude.Maybe (Value Prelude.Text)),
AssetModelHierarchyProperty -> Value Text
name :: (Value Prelude.Text)}
deriving stock (AssetModelHierarchyProperty -> AssetModelHierarchyProperty -> Bool
(AssetModelHierarchyProperty
-> AssetModelHierarchyProperty -> Bool)
-> (AssetModelHierarchyProperty
-> AssetModelHierarchyProperty -> Bool)
-> Eq AssetModelHierarchyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AssetModelHierarchyProperty -> AssetModelHierarchyProperty -> Bool
== :: AssetModelHierarchyProperty -> AssetModelHierarchyProperty -> Bool
$c/= :: AssetModelHierarchyProperty -> AssetModelHierarchyProperty -> Bool
/= :: AssetModelHierarchyProperty -> AssetModelHierarchyProperty -> Bool
Prelude.Eq, Int -> AssetModelHierarchyProperty -> ShowS
[AssetModelHierarchyProperty] -> ShowS
AssetModelHierarchyProperty -> String
(Int -> AssetModelHierarchyProperty -> ShowS)
-> (AssetModelHierarchyProperty -> String)
-> ([AssetModelHierarchyProperty] -> ShowS)
-> Show AssetModelHierarchyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AssetModelHierarchyProperty -> ShowS
showsPrec :: Int -> AssetModelHierarchyProperty -> ShowS
$cshow :: AssetModelHierarchyProperty -> String
show :: AssetModelHierarchyProperty -> String
$cshowList :: [AssetModelHierarchyProperty] -> ShowS
showList :: [AssetModelHierarchyProperty] -> ShowS
Prelude.Show)
mkAssetModelHierarchyProperty ::
Value Prelude.Text
-> Value Prelude.Text -> AssetModelHierarchyProperty
mkAssetModelHierarchyProperty :: Value Text -> Value Text -> AssetModelHierarchyProperty
mkAssetModelHierarchyProperty Value Text
childAssetModelId Value Text
name
= AssetModelHierarchyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), childAssetModelId :: Value Text
childAssetModelId = Value Text
childAssetModelId,
name :: Value Text
name = Value Text
name, externalId :: Maybe (Value Text)
externalId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, id :: Maybe (Value Text)
id = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
logicalId :: Maybe (Value Text)
logicalId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AssetModelHierarchyProperty where
toResourceProperties :: AssetModelHierarchyProperty -> ResourceProperties
toResourceProperties AssetModelHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetModelHierarchyProperty -> ()
childAssetModelId :: AssetModelHierarchyProperty -> Value Text
externalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
id :: AssetModelHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
name :: AssetModelHierarchyProperty -> Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTSiteWise::AssetModel.AssetModelHierarchy",
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
"ChildAssetModelId" 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
childAssetModelId,
Key
"Name" 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
name]
([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
"ExternalId" (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)
externalId,
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
"Id" (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)
id,
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
"LogicalId" (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)
logicalId]))}
instance JSON.ToJSON AssetModelHierarchyProperty where
toJSON :: AssetModelHierarchyProperty -> Value
toJSON AssetModelHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetModelHierarchyProperty -> ()
childAssetModelId :: AssetModelHierarchyProperty -> Value Text
externalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
id :: AssetModelHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
name :: AssetModelHierarchyProperty -> Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: 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
"ChildAssetModelId" 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
childAssetModelId,
Key
"Name" 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
name]
([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
"ExternalId" (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)
externalId,
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
"Id" (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)
id,
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
"LogicalId" (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)
logicalId])))
instance Property "ChildAssetModelId" AssetModelHierarchyProperty where
type PropertyType "ChildAssetModelId" AssetModelHierarchyProperty = Value Prelude.Text
set :: PropertyType "ChildAssetModelId" AssetModelHierarchyProperty
-> AssetModelHierarchyProperty -> AssetModelHierarchyProperty
set PropertyType "ChildAssetModelId" AssetModelHierarchyProperty
newValue AssetModelHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetModelHierarchyProperty -> ()
childAssetModelId :: AssetModelHierarchyProperty -> Value Text
externalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
id :: AssetModelHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
name :: AssetModelHierarchyProperty -> Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
= AssetModelHierarchyProperty {childAssetModelId :: Value Text
childAssetModelId = PropertyType "ChildAssetModelId" AssetModelHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
instance Property "ExternalId" AssetModelHierarchyProperty where
type PropertyType "ExternalId" AssetModelHierarchyProperty = Value Prelude.Text
set :: PropertyType "ExternalId" AssetModelHierarchyProperty
-> AssetModelHierarchyProperty -> AssetModelHierarchyProperty
set PropertyType "ExternalId" AssetModelHierarchyProperty
newValue AssetModelHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetModelHierarchyProperty -> ()
childAssetModelId :: AssetModelHierarchyProperty -> Value Text
externalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
id :: AssetModelHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
name :: AssetModelHierarchyProperty -> Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
= AssetModelHierarchyProperty
{externalId :: Maybe (Value Text)
externalId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ExternalId" AssetModelHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Id" AssetModelHierarchyProperty where
type PropertyType "Id" AssetModelHierarchyProperty = Value Prelude.Text
set :: PropertyType "Id" AssetModelHierarchyProperty
-> AssetModelHierarchyProperty -> AssetModelHierarchyProperty
set PropertyType "Id" AssetModelHierarchyProperty
newValue AssetModelHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetModelHierarchyProperty -> ()
childAssetModelId :: AssetModelHierarchyProperty -> Value Text
externalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
id :: AssetModelHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
name :: AssetModelHierarchyProperty -> Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
= AssetModelHierarchyProperty {id :: Maybe (Value Text)
id = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Id" AssetModelHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
instance Property "LogicalId" AssetModelHierarchyProperty where
type PropertyType "LogicalId" AssetModelHierarchyProperty = Value Prelude.Text
set :: PropertyType "LogicalId" AssetModelHierarchyProperty
-> AssetModelHierarchyProperty -> AssetModelHierarchyProperty
set PropertyType "LogicalId" AssetModelHierarchyProperty
newValue AssetModelHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetModelHierarchyProperty -> ()
childAssetModelId :: AssetModelHierarchyProperty -> Value Text
externalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
id :: AssetModelHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
name :: AssetModelHierarchyProperty -> Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
= AssetModelHierarchyProperty
{logicalId :: Maybe (Value Text)
logicalId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogicalId" AssetModelHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Name" AssetModelHierarchyProperty where
type PropertyType "Name" AssetModelHierarchyProperty = Value Prelude.Text
set :: PropertyType "Name" AssetModelHierarchyProperty
-> AssetModelHierarchyProperty -> AssetModelHierarchyProperty
set PropertyType "Name" AssetModelHierarchyProperty
newValue AssetModelHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetModelHierarchyProperty -> ()
childAssetModelId :: AssetModelHierarchyProperty -> Value Text
externalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
id :: AssetModelHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetModelHierarchyProperty -> Maybe (Value Text)
name :: AssetModelHierarchyProperty -> Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
name :: Value Text
..}
= AssetModelHierarchyProperty {name :: Value Text
name = PropertyType "Name" AssetModelHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
haddock_workaround_ :: ()
childAssetModelId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}