module Stratosphere.IoTTwinMaker.Entity.DataTypeProperty (
module Exports, DataTypeProperty(..), mkDataTypeProperty
) 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.RelationshipProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data DataTypeProperty
=
DataTypeProperty {DataTypeProperty -> ()
haddock_workaround_ :: (),
DataTypeProperty -> Maybe [DataValueProperty]
allowedValues :: (Prelude.Maybe [DataValueProperty]),
DataTypeProperty -> Maybe DataTypeProperty
nestedType :: (Prelude.Maybe DataTypeProperty),
DataTypeProperty -> Maybe RelationshipProperty
relationship :: (Prelude.Maybe RelationshipProperty),
DataTypeProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text)),
DataTypeProperty -> Maybe (Value Text)
unitOfMeasure :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (DataTypeProperty -> DataTypeProperty -> Bool
(DataTypeProperty -> DataTypeProperty -> Bool)
-> (DataTypeProperty -> DataTypeProperty -> Bool)
-> Eq DataTypeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DataTypeProperty -> DataTypeProperty -> Bool
== :: DataTypeProperty -> DataTypeProperty -> Bool
$c/= :: DataTypeProperty -> DataTypeProperty -> Bool
/= :: DataTypeProperty -> DataTypeProperty -> Bool
Prelude.Eq, Int -> DataTypeProperty -> ShowS
[DataTypeProperty] -> ShowS
DataTypeProperty -> String
(Int -> DataTypeProperty -> ShowS)
-> (DataTypeProperty -> String)
-> ([DataTypeProperty] -> ShowS)
-> Show DataTypeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DataTypeProperty -> ShowS
showsPrec :: Int -> DataTypeProperty -> ShowS
$cshow :: DataTypeProperty -> String
show :: DataTypeProperty -> String
$cshowList :: [DataTypeProperty] -> ShowS
showList :: [DataTypeProperty] -> ShowS
Prelude.Show)
mkDataTypeProperty :: DataTypeProperty
mkDataTypeProperty :: DataTypeProperty
mkDataTypeProperty
= DataTypeProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), allowedValues :: Maybe [DataValueProperty]
allowedValues = Maybe [DataValueProperty]
forall a. Maybe a
Prelude.Nothing,
nestedType :: Maybe DataTypeProperty
nestedType = Maybe DataTypeProperty
forall a. Maybe a
Prelude.Nothing, relationship :: Maybe RelationshipProperty
relationship = Maybe RelationshipProperty
forall a. Maybe a
Prelude.Nothing,
type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, unitOfMeasure :: Maybe (Value Text)
unitOfMeasure = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties DataTypeProperty where
toResourceProperties :: DataTypeProperty -> ResourceProperties
toResourceProperties DataTypeProperty {Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: DataTypeProperty -> ()
allowedValues :: DataTypeProperty -> Maybe [DataValueProperty]
nestedType :: DataTypeProperty -> Maybe DataTypeProperty
relationship :: DataTypeProperty -> Maybe RelationshipProperty
type' :: DataTypeProperty -> Maybe (Value Text)
unitOfMeasure :: DataTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTTwinMaker::Entity.DataType",
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 -> [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
"AllowedValues" ([DataValueProperty] -> (Key, Value))
-> Maybe [DataValueProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DataValueProperty]
allowedValues,
Key -> DataTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NestedType" (DataTypeProperty -> (Key, Value))
-> Maybe DataTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataTypeProperty
nestedType,
Key -> RelationshipProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Relationship" (RelationshipProperty -> (Key, Value))
-> Maybe RelationshipProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RelationshipProperty
relationship,
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
"Type" (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)
type',
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
"UnitOfMeasure" (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)
unitOfMeasure])}
instance JSON.ToJSON DataTypeProperty where
toJSON :: DataTypeProperty -> Value
toJSON DataTypeProperty {Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: DataTypeProperty -> ()
allowedValues :: DataTypeProperty -> Maybe [DataValueProperty]
nestedType :: DataTypeProperty -> Maybe DataTypeProperty
relationship :: DataTypeProperty -> Maybe RelationshipProperty
type' :: DataTypeProperty -> Maybe (Value Text)
unitOfMeasure :: DataTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: 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 -> [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
"AllowedValues" ([DataValueProperty] -> (Key, Value))
-> Maybe [DataValueProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DataValueProperty]
allowedValues,
Key -> DataTypeProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"NestedType" (DataTypeProperty -> (Key, Value))
-> Maybe DataTypeProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataTypeProperty
nestedType,
Key -> RelationshipProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Relationship" (RelationshipProperty -> (Key, Value))
-> Maybe RelationshipProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RelationshipProperty
relationship,
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
"Type" (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)
type',
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
"UnitOfMeasure" (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)
unitOfMeasure]))
instance Property "AllowedValues" DataTypeProperty where
type PropertyType "AllowedValues" DataTypeProperty = [DataValueProperty]
set :: PropertyType "AllowedValues" DataTypeProperty
-> DataTypeProperty -> DataTypeProperty
set PropertyType "AllowedValues" DataTypeProperty
newValue DataTypeProperty {Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: DataTypeProperty -> ()
allowedValues :: DataTypeProperty -> Maybe [DataValueProperty]
nestedType :: DataTypeProperty -> Maybe DataTypeProperty
relationship :: DataTypeProperty -> Maybe RelationshipProperty
type' :: DataTypeProperty -> Maybe (Value Text)
unitOfMeasure :: DataTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
= DataTypeProperty {allowedValues :: Maybe [DataValueProperty]
allowedValues = [DataValueProperty] -> Maybe [DataValueProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [DataValueProperty]
PropertyType "AllowedValues" DataTypeProperty
newValue, Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: ()
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
haddock_workaround_ :: ()
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
instance Property "NestedType" DataTypeProperty where
type PropertyType "NestedType" DataTypeProperty = DataTypeProperty
set :: PropertyType "NestedType" DataTypeProperty
-> DataTypeProperty -> DataTypeProperty
set PropertyType "NestedType" DataTypeProperty
newValue DataTypeProperty {Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: DataTypeProperty -> ()
allowedValues :: DataTypeProperty -> Maybe [DataValueProperty]
nestedType :: DataTypeProperty -> Maybe DataTypeProperty
relationship :: DataTypeProperty -> Maybe RelationshipProperty
type' :: DataTypeProperty -> Maybe (Value Text)
unitOfMeasure :: DataTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
= DataTypeProperty {nestedType :: Maybe DataTypeProperty
nestedType = DataTypeProperty -> Maybe DataTypeProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NestedType" DataTypeProperty
DataTypeProperty
newValue, Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
()
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
instance Property "Relationship" DataTypeProperty where
type PropertyType "Relationship" DataTypeProperty = RelationshipProperty
set :: PropertyType "Relationship" DataTypeProperty
-> DataTypeProperty -> DataTypeProperty
set PropertyType "Relationship" DataTypeProperty
newValue DataTypeProperty {Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: DataTypeProperty -> ()
allowedValues :: DataTypeProperty -> Maybe [DataValueProperty]
nestedType :: DataTypeProperty -> Maybe DataTypeProperty
relationship :: DataTypeProperty -> Maybe RelationshipProperty
type' :: DataTypeProperty -> Maybe (Value Text)
unitOfMeasure :: DataTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
= DataTypeProperty {relationship :: Maybe RelationshipProperty
relationship = RelationshipProperty -> Maybe RelationshipProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Relationship" DataTypeProperty
RelationshipProperty
newValue, Maybe [DataValueProperty]
Maybe (Value Text)
Maybe DataTypeProperty
()
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
instance Property "Type" DataTypeProperty where
type PropertyType "Type" DataTypeProperty = Value Prelude.Text
set :: PropertyType "Type" DataTypeProperty
-> DataTypeProperty -> DataTypeProperty
set PropertyType "Type" DataTypeProperty
newValue DataTypeProperty {Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: DataTypeProperty -> ()
allowedValues :: DataTypeProperty -> Maybe [DataValueProperty]
nestedType :: DataTypeProperty -> Maybe DataTypeProperty
relationship :: DataTypeProperty -> Maybe RelationshipProperty
type' :: DataTypeProperty -> Maybe (Value Text)
unitOfMeasure :: DataTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
= DataTypeProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" DataTypeProperty
Value Text
newValue, Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
unitOfMeasure :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
unitOfMeasure :: Maybe (Value Text)
..}
instance Property "UnitOfMeasure" DataTypeProperty where
type PropertyType "UnitOfMeasure" DataTypeProperty = Value Prelude.Text
set :: PropertyType "UnitOfMeasure" DataTypeProperty
-> DataTypeProperty -> DataTypeProperty
set PropertyType "UnitOfMeasure" DataTypeProperty
newValue DataTypeProperty {Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: DataTypeProperty -> ()
allowedValues :: DataTypeProperty -> Maybe [DataValueProperty]
nestedType :: DataTypeProperty -> Maybe DataTypeProperty
relationship :: DataTypeProperty -> Maybe RelationshipProperty
type' :: DataTypeProperty -> Maybe (Value Text)
unitOfMeasure :: DataTypeProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
unitOfMeasure :: Maybe (Value Text)
..}
= DataTypeProperty {unitOfMeasure :: Maybe (Value Text)
unitOfMeasure = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "UnitOfMeasure" DataTypeProperty
Value Text
newValue, Maybe [DataValueProperty]
Maybe (Value Text)
Maybe RelationshipProperty
Maybe DataTypeProperty
()
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
allowedValues :: Maybe [DataValueProperty]
nestedType :: Maybe DataTypeProperty
relationship :: Maybe RelationshipProperty
type' :: Maybe (Value Text)
..}