module Stratosphere.IoTAnalytics.Datastore.SchemaDefinitionProperty (
module Exports, SchemaDefinitionProperty(..),
mkSchemaDefinitionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTAnalytics.Datastore.ColumnProperty as Exports
import Stratosphere.ResourceProperties
data SchemaDefinitionProperty
=
SchemaDefinitionProperty {SchemaDefinitionProperty -> ()
haddock_workaround_ :: (),
SchemaDefinitionProperty -> Maybe [ColumnProperty]
columns :: (Prelude.Maybe [ColumnProperty])}
deriving stock (SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
(SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool)
-> (SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool)
-> Eq SchemaDefinitionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
== :: SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
$c/= :: SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
/= :: SchemaDefinitionProperty -> SchemaDefinitionProperty -> Bool
Prelude.Eq, Int -> SchemaDefinitionProperty -> ShowS
[SchemaDefinitionProperty] -> ShowS
SchemaDefinitionProperty -> String
(Int -> SchemaDefinitionProperty -> ShowS)
-> (SchemaDefinitionProperty -> String)
-> ([SchemaDefinitionProperty] -> ShowS)
-> Show SchemaDefinitionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SchemaDefinitionProperty -> ShowS
showsPrec :: Int -> SchemaDefinitionProperty -> ShowS
$cshow :: SchemaDefinitionProperty -> String
show :: SchemaDefinitionProperty -> String
$cshowList :: [SchemaDefinitionProperty] -> ShowS
showList :: [SchemaDefinitionProperty] -> ShowS
Prelude.Show)
mkSchemaDefinitionProperty :: SchemaDefinitionProperty
mkSchemaDefinitionProperty :: SchemaDefinitionProperty
mkSchemaDefinitionProperty
= SchemaDefinitionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), columns :: Maybe [ColumnProperty]
columns = Maybe [ColumnProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SchemaDefinitionProperty where
toResourceProperties :: SchemaDefinitionProperty -> ResourceProperties
toResourceProperties SchemaDefinitionProperty {Maybe [ColumnProperty]
()
haddock_workaround_ :: SchemaDefinitionProperty -> ()
columns :: SchemaDefinitionProperty -> Maybe [ColumnProperty]
haddock_workaround_ :: ()
columns :: Maybe [ColumnProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::IoTAnalytics::Datastore.SchemaDefinition",
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 -> [ColumnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Columns" ([ColumnProperty] -> (Key, Value))
-> Maybe [ColumnProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ColumnProperty]
columns])}
instance JSON.ToJSON SchemaDefinitionProperty where
toJSON :: SchemaDefinitionProperty -> Value
toJSON SchemaDefinitionProperty {Maybe [ColumnProperty]
()
haddock_workaround_ :: SchemaDefinitionProperty -> ()
columns :: SchemaDefinitionProperty -> Maybe [ColumnProperty]
haddock_workaround_ :: ()
columns :: Maybe [ColumnProperty]
..}
= [(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 -> [ColumnProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Columns" ([ColumnProperty] -> (Key, Value))
-> Maybe [ColumnProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ColumnProperty]
columns]))
instance Property "Columns" SchemaDefinitionProperty where
type PropertyType "Columns" SchemaDefinitionProperty = [ColumnProperty]
set :: PropertyType "Columns" SchemaDefinitionProperty
-> SchemaDefinitionProperty -> SchemaDefinitionProperty
set PropertyType "Columns" SchemaDefinitionProperty
newValue SchemaDefinitionProperty {Maybe [ColumnProperty]
()
haddock_workaround_ :: SchemaDefinitionProperty -> ()
columns :: SchemaDefinitionProperty -> Maybe [ColumnProperty]
haddock_workaround_ :: ()
columns :: Maybe [ColumnProperty]
..}
= SchemaDefinitionProperty {columns :: Maybe [ColumnProperty]
columns = [ColumnProperty] -> Maybe [ColumnProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ColumnProperty]
PropertyType "Columns" SchemaDefinitionProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}