module Stratosphere.IoTSiteWise.Asset.AssetHierarchyProperty (
AssetHierarchyProperty(..), mkAssetHierarchyProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AssetHierarchyProperty
=
AssetHierarchyProperty {AssetHierarchyProperty -> ()
haddock_workaround_ :: (),
AssetHierarchyProperty -> Value Text
childAssetId :: (Value Prelude.Text),
AssetHierarchyProperty -> Maybe (Value Text)
externalId :: (Prelude.Maybe (Value Prelude.Text)),
AssetHierarchyProperty -> Maybe (Value Text)
id :: (Prelude.Maybe (Value Prelude.Text)),
AssetHierarchyProperty -> Maybe (Value Text)
logicalId :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (AssetHierarchyProperty -> AssetHierarchyProperty -> Bool
(AssetHierarchyProperty -> AssetHierarchyProperty -> Bool)
-> (AssetHierarchyProperty -> AssetHierarchyProperty -> Bool)
-> Eq AssetHierarchyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AssetHierarchyProperty -> AssetHierarchyProperty -> Bool
== :: AssetHierarchyProperty -> AssetHierarchyProperty -> Bool
$c/= :: AssetHierarchyProperty -> AssetHierarchyProperty -> Bool
/= :: AssetHierarchyProperty -> AssetHierarchyProperty -> Bool
Prelude.Eq, Int -> AssetHierarchyProperty -> ShowS
[AssetHierarchyProperty] -> ShowS
AssetHierarchyProperty -> String
(Int -> AssetHierarchyProperty -> ShowS)
-> (AssetHierarchyProperty -> String)
-> ([AssetHierarchyProperty] -> ShowS)
-> Show AssetHierarchyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AssetHierarchyProperty -> ShowS
showsPrec :: Int -> AssetHierarchyProperty -> ShowS
$cshow :: AssetHierarchyProperty -> String
show :: AssetHierarchyProperty -> String
$cshowList :: [AssetHierarchyProperty] -> ShowS
showList :: [AssetHierarchyProperty] -> ShowS
Prelude.Show)
mkAssetHierarchyProperty ::
Value Prelude.Text -> AssetHierarchyProperty
mkAssetHierarchyProperty :: Value Text -> AssetHierarchyProperty
mkAssetHierarchyProperty Value Text
childAssetId
= AssetHierarchyProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), childAssetId :: Value Text
childAssetId = Value Text
childAssetId,
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 AssetHierarchyProperty where
toResourceProperties :: AssetHierarchyProperty -> ResourceProperties
toResourceProperties AssetHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetHierarchyProperty -> ()
childAssetId :: AssetHierarchyProperty -> Value Text
externalId :: AssetHierarchyProperty -> Maybe (Value Text)
id :: AssetHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetHierarchyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTSiteWise::Asset.AssetHierarchy",
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
"ChildAssetId" 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
childAssetId]
([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 AssetHierarchyProperty where
toJSON :: AssetHierarchyProperty -> Value
toJSON AssetHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetHierarchyProperty -> ()
childAssetId :: AssetHierarchyProperty -> Value Text
externalId :: AssetHierarchyProperty -> Maybe (Value Text)
id :: AssetHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetHierarchyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: 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
"ChildAssetId" 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
childAssetId]
([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 "ChildAssetId" AssetHierarchyProperty where
type PropertyType "ChildAssetId" AssetHierarchyProperty = Value Prelude.Text
set :: PropertyType "ChildAssetId" AssetHierarchyProperty
-> AssetHierarchyProperty -> AssetHierarchyProperty
set PropertyType "ChildAssetId" AssetHierarchyProperty
newValue AssetHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetHierarchyProperty -> ()
childAssetId :: AssetHierarchyProperty -> Value Text
externalId :: AssetHierarchyProperty -> Maybe (Value Text)
id :: AssetHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetHierarchyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}
= AssetHierarchyProperty {childAssetId :: Value Text
childAssetId = PropertyType "ChildAssetId" AssetHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
haddock_workaround_ :: ()
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}
instance Property "ExternalId" AssetHierarchyProperty where
type PropertyType "ExternalId" AssetHierarchyProperty = Value Prelude.Text
set :: PropertyType "ExternalId" AssetHierarchyProperty
-> AssetHierarchyProperty -> AssetHierarchyProperty
set PropertyType "ExternalId" AssetHierarchyProperty
newValue AssetHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetHierarchyProperty -> ()
childAssetId :: AssetHierarchyProperty -> Value Text
externalId :: AssetHierarchyProperty -> Maybe (Value Text)
id :: AssetHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetHierarchyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}
= AssetHierarchyProperty {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" AssetHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
childAssetId :: Value Text
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}
instance Property "Id" AssetHierarchyProperty where
type PropertyType "Id" AssetHierarchyProperty = Value Prelude.Text
set :: PropertyType "Id" AssetHierarchyProperty
-> AssetHierarchyProperty -> AssetHierarchyProperty
set PropertyType "Id" AssetHierarchyProperty
newValue AssetHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetHierarchyProperty -> ()
childAssetId :: AssetHierarchyProperty -> Value Text
externalId :: AssetHierarchyProperty -> Maybe (Value Text)
id :: AssetHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetHierarchyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}
= AssetHierarchyProperty {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" AssetHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}
instance Property "LogicalId" AssetHierarchyProperty where
type PropertyType "LogicalId" AssetHierarchyProperty = Value Prelude.Text
set :: PropertyType "LogicalId" AssetHierarchyProperty
-> AssetHierarchyProperty -> AssetHierarchyProperty
set PropertyType "LogicalId" AssetHierarchyProperty
newValue AssetHierarchyProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AssetHierarchyProperty -> ()
childAssetId :: AssetHierarchyProperty -> Value Text
externalId :: AssetHierarchyProperty -> Maybe (Value Text)
id :: AssetHierarchyProperty -> Maybe (Value Text)
logicalId :: AssetHierarchyProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
logicalId :: Maybe (Value Text)
..}
= AssetHierarchyProperty {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" AssetHierarchyProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
haddock_workaround_ :: ()
childAssetId :: Value Text
externalId :: Maybe (Value Text)
id :: Maybe (Value Text)
..}