module Stratosphere.IoTTwinMaker.Entity.RelationshipValueProperty (
        RelationshipValueProperty(..), mkRelationshipValueProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RelationshipValueProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-entity-relationshipvalue.html>
    RelationshipValueProperty {RelationshipValueProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-entity-relationshipvalue.html#cfn-iottwinmaker-entity-relationshipvalue-targetcomponentname>
                               RelationshipValueProperty -> Maybe (Value Text)
targetComponentName :: (Prelude.Maybe (Value Prelude.Text)),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-entity-relationshipvalue.html#cfn-iottwinmaker-entity-relationshipvalue-targetentityid>
                               RelationshipValueProperty -> Maybe (Value Text)
targetEntityId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RelationshipValueProperty -> RelationshipValueProperty -> Bool
(RelationshipValueProperty -> RelationshipValueProperty -> Bool)
-> (RelationshipValueProperty -> RelationshipValueProperty -> Bool)
-> Eq RelationshipValueProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RelationshipValueProperty -> RelationshipValueProperty -> Bool
== :: RelationshipValueProperty -> RelationshipValueProperty -> Bool
$c/= :: RelationshipValueProperty -> RelationshipValueProperty -> Bool
/= :: RelationshipValueProperty -> RelationshipValueProperty -> Bool
Prelude.Eq, Int -> RelationshipValueProperty -> ShowS
[RelationshipValueProperty] -> ShowS
RelationshipValueProperty -> String
(Int -> RelationshipValueProperty -> ShowS)
-> (RelationshipValueProperty -> String)
-> ([RelationshipValueProperty] -> ShowS)
-> Show RelationshipValueProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RelationshipValueProperty -> ShowS
showsPrec :: Int -> RelationshipValueProperty -> ShowS
$cshow :: RelationshipValueProperty -> String
show :: RelationshipValueProperty -> String
$cshowList :: [RelationshipValueProperty] -> ShowS
showList :: [RelationshipValueProperty] -> ShowS
Prelude.Show)
mkRelationshipValueProperty :: RelationshipValueProperty
mkRelationshipValueProperty :: RelationshipValueProperty
mkRelationshipValueProperty
  = RelationshipValueProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), targetComponentName :: Maybe (Value Text)
targetComponentName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       targetEntityId :: Maybe (Value Text)
targetEntityId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RelationshipValueProperty where
  toResourceProperties :: RelationshipValueProperty -> ResourceProperties
toResourceProperties RelationshipValueProperty {Maybe (Value Text)
()
haddock_workaround_ :: RelationshipValueProperty -> ()
targetComponentName :: RelationshipValueProperty -> Maybe (Value Text)
targetEntityId :: RelationshipValueProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetComponentName :: Maybe (Value Text)
targetEntityId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTTwinMaker::Entity.RelationshipValue",
         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
"TargetComponentName" (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)
targetComponentName,
                            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
"TargetEntityId" (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)
targetEntityId])}
instance JSON.ToJSON RelationshipValueProperty where
  toJSON :: RelationshipValueProperty -> Value
toJSON RelationshipValueProperty {Maybe (Value Text)
()
haddock_workaround_ :: RelationshipValueProperty -> ()
targetComponentName :: RelationshipValueProperty -> Maybe (Value Text)
targetEntityId :: RelationshipValueProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetComponentName :: Maybe (Value Text)
targetEntityId :: 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
"TargetComponentName" (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)
targetComponentName,
               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
"TargetEntityId" (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)
targetEntityId]))
instance Property "TargetComponentName" RelationshipValueProperty where
  type PropertyType "TargetComponentName" RelationshipValueProperty = Value Prelude.Text
  set :: PropertyType "TargetComponentName" RelationshipValueProperty
-> RelationshipValueProperty -> RelationshipValueProperty
set PropertyType "TargetComponentName" RelationshipValueProperty
newValue RelationshipValueProperty {Maybe (Value Text)
()
haddock_workaround_ :: RelationshipValueProperty -> ()
targetComponentName :: RelationshipValueProperty -> Maybe (Value Text)
targetEntityId :: RelationshipValueProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetComponentName :: Maybe (Value Text)
targetEntityId :: Maybe (Value Text)
..}
    = RelationshipValueProperty
        {targetComponentName :: Maybe (Value Text)
targetComponentName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetComponentName" RelationshipValueProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
targetEntityId :: Maybe (Value Text)
haddock_workaround_ :: ()
targetEntityId :: Maybe (Value Text)
..}
instance Property "TargetEntityId" RelationshipValueProperty where
  type PropertyType "TargetEntityId" RelationshipValueProperty = Value Prelude.Text
  set :: PropertyType "TargetEntityId" RelationshipValueProperty
-> RelationshipValueProperty -> RelationshipValueProperty
set PropertyType "TargetEntityId" RelationshipValueProperty
newValue RelationshipValueProperty {Maybe (Value Text)
()
haddock_workaround_ :: RelationshipValueProperty -> ()
targetComponentName :: RelationshipValueProperty -> Maybe (Value Text)
targetEntityId :: RelationshipValueProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
targetComponentName :: Maybe (Value Text)
targetEntityId :: Maybe (Value Text)
..}
    = RelationshipValueProperty
        {targetEntityId :: Maybe (Value Text)
targetEntityId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TargetEntityId" RelationshipValueProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
targetComponentName :: Maybe (Value Text)
haddock_workaround_ :: ()
targetComponentName :: Maybe (Value Text)
..}