module Stratosphere.IoTTwinMaker.ComponentType.RelationshipProperty (
RelationshipProperty(..), mkRelationshipProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RelationshipProperty
=
RelationshipProperty {RelationshipProperty -> ()
haddock_workaround_ :: (),
RelationshipProperty -> Maybe (Value Text)
relationshipType :: (Prelude.Maybe (Value Prelude.Text)),
RelationshipProperty -> Maybe (Value Text)
targetComponentTypeId :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (RelationshipProperty -> RelationshipProperty -> Bool
(RelationshipProperty -> RelationshipProperty -> Bool)
-> (RelationshipProperty -> RelationshipProperty -> Bool)
-> Eq RelationshipProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RelationshipProperty -> RelationshipProperty -> Bool
== :: RelationshipProperty -> RelationshipProperty -> Bool
$c/= :: RelationshipProperty -> RelationshipProperty -> Bool
/= :: RelationshipProperty -> RelationshipProperty -> Bool
Prelude.Eq, Int -> RelationshipProperty -> ShowS
[RelationshipProperty] -> ShowS
RelationshipProperty -> String
(Int -> RelationshipProperty -> ShowS)
-> (RelationshipProperty -> String)
-> ([RelationshipProperty] -> ShowS)
-> Show RelationshipProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RelationshipProperty -> ShowS
showsPrec :: Int -> RelationshipProperty -> ShowS
$cshow :: RelationshipProperty -> String
show :: RelationshipProperty -> String
$cshowList :: [RelationshipProperty] -> ShowS
showList :: [RelationshipProperty] -> ShowS
Prelude.Show)
mkRelationshipProperty :: RelationshipProperty
mkRelationshipProperty :: RelationshipProperty
mkRelationshipProperty
= RelationshipProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), relationshipType :: Maybe (Value Text)
relationshipType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
targetComponentTypeId :: Maybe (Value Text)
targetComponentTypeId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RelationshipProperty where
toResourceProperties :: RelationshipProperty -> ResourceProperties
toResourceProperties RelationshipProperty {Maybe (Value Text)
()
haddock_workaround_ :: RelationshipProperty -> ()
relationshipType :: RelationshipProperty -> Maybe (Value Text)
targetComponentTypeId :: RelationshipProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
relationshipType :: Maybe (Value Text)
targetComponentTypeId :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTTwinMaker::ComponentType.Relationship",
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 -> 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
"RelationshipType" (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)
relationshipType,
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
"TargetComponentTypeId"
(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)
targetComponentTypeId])}
instance JSON.ToJSON RelationshipProperty where
toJSON :: RelationshipProperty -> Value
toJSON RelationshipProperty {Maybe (Value Text)
()
haddock_workaround_ :: RelationshipProperty -> ()
relationshipType :: RelationshipProperty -> Maybe (Value Text)
targetComponentTypeId :: RelationshipProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
relationshipType :: Maybe (Value Text)
targetComponentTypeId :: Maybe (Value Text)
..}
= [(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 -> 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
"RelationshipType" (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)
relationshipType,
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
"TargetComponentTypeId"
(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)
targetComponentTypeId]))
instance Property "RelationshipType" RelationshipProperty where
type PropertyType "RelationshipType" RelationshipProperty = Value Prelude.Text
set :: PropertyType "RelationshipType" RelationshipProperty
-> RelationshipProperty -> RelationshipProperty
set PropertyType "RelationshipType" RelationshipProperty
newValue RelationshipProperty {Maybe (Value Text)
()
haddock_workaround_ :: RelationshipProperty -> ()
relationshipType :: RelationshipProperty -> Maybe (Value Text)
targetComponentTypeId :: RelationshipProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
relationshipType :: Maybe (Value Text)
targetComponentTypeId :: Maybe (Value Text)
..}
= RelationshipProperty
{relationshipType :: Maybe (Value Text)
relationshipType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RelationshipType" RelationshipProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
targetComponentTypeId :: Maybe (Value Text)
haddock_workaround_ :: ()
targetComponentTypeId :: Maybe (Value Text)
..}
instance Property "TargetComponentTypeId" RelationshipProperty where
type PropertyType "TargetComponentTypeId" RelationshipProperty = Value Prelude.Text
set :: PropertyType "TargetComponentTypeId" RelationshipProperty
-> RelationshipProperty -> RelationshipProperty
set PropertyType "TargetComponentTypeId" RelationshipProperty
newValue RelationshipProperty {Maybe (Value Text)
()
haddock_workaround_ :: RelationshipProperty -> ()
relationshipType :: RelationshipProperty -> Maybe (Value Text)
targetComponentTypeId :: RelationshipProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
relationshipType :: Maybe (Value Text)
targetComponentTypeId :: Maybe (Value Text)
..}
= RelationshipProperty
{targetComponentTypeId :: Maybe (Value Text)
targetComponentTypeId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetComponentTypeId" RelationshipProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
relationshipType :: Maybe (Value Text)
haddock_workaround_ :: ()
relationshipType :: Maybe (Value Text)
..}