module Stratosphere.IoTTwinMaker.Entity.PropertyProperty (
        module Exports, PropertyProperty(..), mkPropertyProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTTwinMaker.Entity.DataValueProperty as Exports
import {-# SOURCE #-} Stratosphere.IoTTwinMaker.Entity.DefinitionProperty as Exports
import Stratosphere.ResourceProperties
data PropertyProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-entity-property.html>
    PropertyProperty {PropertyProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-entity-property.html#cfn-iottwinmaker-entity-property-definition>
                      PropertyProperty -> Maybe DefinitionProperty
definition :: (Prelude.Maybe DefinitionProperty),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iottwinmaker-entity-property.html#cfn-iottwinmaker-entity-property-value>
                      PropertyProperty -> Maybe DataValueProperty
value :: (Prelude.Maybe DataValueProperty)}
  deriving stock (PropertyProperty -> PropertyProperty -> Bool
(PropertyProperty -> PropertyProperty -> Bool)
-> (PropertyProperty -> PropertyProperty -> Bool)
-> Eq PropertyProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PropertyProperty -> PropertyProperty -> Bool
== :: PropertyProperty -> PropertyProperty -> Bool
$c/= :: PropertyProperty -> PropertyProperty -> Bool
/= :: PropertyProperty -> PropertyProperty -> Bool
Prelude.Eq, Int -> PropertyProperty -> ShowS
[PropertyProperty] -> ShowS
PropertyProperty -> String
(Int -> PropertyProperty -> ShowS)
-> (PropertyProperty -> String)
-> ([PropertyProperty] -> ShowS)
-> Show PropertyProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PropertyProperty -> ShowS
showsPrec :: Int -> PropertyProperty -> ShowS
$cshow :: PropertyProperty -> String
show :: PropertyProperty -> String
$cshowList :: [PropertyProperty] -> ShowS
showList :: [PropertyProperty] -> ShowS
Prelude.Show)
mkPropertyProperty :: PropertyProperty
mkPropertyProperty :: PropertyProperty
mkPropertyProperty
  = PropertyProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), definition :: Maybe DefinitionProperty
definition = Maybe DefinitionProperty
forall a. Maybe a
Prelude.Nothing,
       value :: Maybe DataValueProperty
value = Maybe DataValueProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PropertyProperty where
  toResourceProperties :: PropertyProperty -> ResourceProperties
toResourceProperties PropertyProperty {Maybe DataValueProperty
Maybe DefinitionProperty
()
haddock_workaround_ :: PropertyProperty -> ()
definition :: PropertyProperty -> Maybe DefinitionProperty
value :: PropertyProperty -> Maybe DataValueProperty
haddock_workaround_ :: ()
definition :: Maybe DefinitionProperty
value :: Maybe DataValueProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTTwinMaker::Entity.Property",
         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 -> DefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Definition" (DefinitionProperty -> (Key, Value))
-> Maybe DefinitionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DefinitionProperty
definition,
                            Key -> DataValueProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Value" (DataValueProperty -> (Key, Value))
-> Maybe DataValueProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataValueProperty
value])}
instance JSON.ToJSON PropertyProperty where
  toJSON :: PropertyProperty -> Value
toJSON PropertyProperty {Maybe DataValueProperty
Maybe DefinitionProperty
()
haddock_workaround_ :: PropertyProperty -> ()
definition :: PropertyProperty -> Maybe DefinitionProperty
value :: PropertyProperty -> Maybe DataValueProperty
haddock_workaround_ :: ()
definition :: Maybe DefinitionProperty
value :: Maybe DataValueProperty
..}
    = [(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 -> DefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Definition" (DefinitionProperty -> (Key, Value))
-> Maybe DefinitionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DefinitionProperty
definition,
               Key -> DataValueProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Value" (DataValueProperty -> (Key, Value))
-> Maybe DataValueProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataValueProperty
value]))
instance Property "Definition" PropertyProperty where
  type PropertyType "Definition" PropertyProperty = DefinitionProperty
  set :: PropertyType "Definition" PropertyProperty
-> PropertyProperty -> PropertyProperty
set PropertyType "Definition" PropertyProperty
newValue PropertyProperty {Maybe DataValueProperty
Maybe DefinitionProperty
()
haddock_workaround_ :: PropertyProperty -> ()
definition :: PropertyProperty -> Maybe DefinitionProperty
value :: PropertyProperty -> Maybe DataValueProperty
haddock_workaround_ :: ()
definition :: Maybe DefinitionProperty
value :: Maybe DataValueProperty
..}
    = PropertyProperty {definition :: Maybe DefinitionProperty
definition = DefinitionProperty -> Maybe DefinitionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Definition" PropertyProperty
DefinitionProperty
newValue, Maybe DataValueProperty
()
haddock_workaround_ :: ()
value :: Maybe DataValueProperty
haddock_workaround_ :: ()
value :: Maybe DataValueProperty
..}
instance Property "Value" PropertyProperty where
  type PropertyType "Value" PropertyProperty = DataValueProperty
  set :: PropertyType "Value" PropertyProperty
-> PropertyProperty -> PropertyProperty
set PropertyType "Value" PropertyProperty
newValue PropertyProperty {Maybe DataValueProperty
Maybe DefinitionProperty
()
haddock_workaround_ :: PropertyProperty -> ()
definition :: PropertyProperty -> Maybe DefinitionProperty
value :: PropertyProperty -> Maybe DataValueProperty
haddock_workaround_ :: ()
definition :: Maybe DefinitionProperty
value :: Maybe DataValueProperty
..}
    = PropertyProperty {value :: Maybe DataValueProperty
value = DataValueProperty -> Maybe DataValueProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Value" PropertyProperty
DataValueProperty
newValue, Maybe DefinitionProperty
()
haddock_workaround_ :: ()
definition :: Maybe DefinitionProperty
haddock_workaround_ :: ()
definition :: Maybe DefinitionProperty
..}