module Stratosphere.EventSchemas.Schema (
module Exports, Schema(..), mkSchema
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EventSchemas.Schema.TagsEntryProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Schema
=
Schema {Schema -> ()
haddock_workaround_ :: (),
Schema -> Value Text
content :: (Value Prelude.Text),
Schema -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
Schema -> Value Text
registryName :: (Value Prelude.Text),
Schema -> Maybe (Value Text)
schemaName :: (Prelude.Maybe (Value Prelude.Text)),
Schema -> Maybe [TagsEntryProperty]
tags :: (Prelude.Maybe [TagsEntryProperty]),
Schema -> Value Text
type' :: (Value Prelude.Text)}
deriving stock (Schema -> Schema -> Bool
(Schema -> Schema -> Bool)
-> (Schema -> Schema -> Bool) -> Eq Schema
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Schema -> Schema -> Bool
== :: Schema -> Schema -> Bool
$c/= :: Schema -> Schema -> Bool
/= :: Schema -> Schema -> Bool
Prelude.Eq, Int -> Schema -> ShowS
[Schema] -> ShowS
Schema -> String
(Int -> Schema -> ShowS)
-> (Schema -> String) -> ([Schema] -> ShowS) -> Show Schema
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Schema -> ShowS
showsPrec :: Int -> Schema -> ShowS
$cshow :: Schema -> String
show :: Schema -> String
$cshowList :: [Schema] -> ShowS
showList :: [Schema] -> ShowS
Prelude.Show)
mkSchema ::
Value Prelude.Text
-> Value Prelude.Text -> Value Prelude.Text -> Schema
mkSchema :: Value Text -> Value Text -> Value Text -> Schema
mkSchema Value Text
content Value Text
registryName Value Text
type'
= Schema
{haddock_workaround_ :: ()
haddock_workaround_ = (), content :: Value Text
content = Value Text
content,
registryName :: Value Text
registryName = Value Text
registryName, type' :: Value Text
type' = Value Text
type',
description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, schemaName :: Maybe (Value Text)
schemaName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [TagsEntryProperty]
tags = Maybe [TagsEntryProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Schema where
toResourceProperties :: Schema -> ResourceProperties
toResourceProperties Schema {Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Schema -> ()
content :: Schema -> Value Text
description :: Schema -> Maybe (Value Text)
registryName :: Schema -> Value Text
schemaName :: Schema -> Maybe (Value Text)
tags :: Schema -> Maybe [TagsEntryProperty]
type' :: Schema -> Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EventSchemas::Schema",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Content" 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..= Value Text
content, Key
"RegistryName" 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..= Value Text
registryName,
Key
"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..= Value Text
type']
([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
"Description" (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)
description,
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
"SchemaName" (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)
schemaName,
Key -> [TagsEntryProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsEntryProperty] -> (Key, Value))
-> Maybe [TagsEntryProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsEntryProperty]
tags]))}
instance JSON.ToJSON Schema where
toJSON :: Schema -> Value
toJSON Schema {Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Schema -> ()
content :: Schema -> Value Text
description :: Schema -> Maybe (Value Text)
registryName :: Schema -> Value Text
schemaName :: Schema -> Maybe (Value Text)
tags :: Schema -> Maybe [TagsEntryProperty]
type' :: Schema -> Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"Content" 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..= Value Text
content, Key
"RegistryName" 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..= Value Text
registryName,
Key
"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..= Value Text
type']
([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
"Description" (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)
description,
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
"SchemaName" (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)
schemaName,
Key -> [TagsEntryProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([TagsEntryProperty] -> (Key, Value))
-> Maybe [TagsEntryProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagsEntryProperty]
tags])))
instance Property "Content" Schema where
type PropertyType "Content" Schema = Value Prelude.Text
set :: PropertyType "Content" Schema -> Schema -> Schema
set PropertyType "Content" Schema
newValue Schema {Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Schema -> ()
content :: Schema -> Value Text
description :: Schema -> Maybe (Value Text)
registryName :: Schema -> Value Text
schemaName :: Schema -> Maybe (Value Text)
tags :: Schema -> Maybe [TagsEntryProperty]
type' :: Schema -> Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..} = Schema {content :: Value Text
content = PropertyType "Content" Schema
Value Text
newValue, Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
instance Property "Description" Schema where
type PropertyType "Description" Schema = Value Prelude.Text
set :: PropertyType "Description" Schema -> Schema -> Schema
set PropertyType "Description" Schema
newValue Schema {Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Schema -> ()
content :: Schema -> Value Text
description :: Schema -> Maybe (Value Text)
registryName :: Schema -> Value Text
schemaName :: Schema -> Maybe (Value Text)
tags :: Schema -> Maybe [TagsEntryProperty]
type' :: Schema -> Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
= Schema {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Schema
Value Text
newValue, Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Value Text
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
haddock_workaround_ :: ()
content :: Value Text
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
instance Property "RegistryName" Schema where
type PropertyType "RegistryName" Schema = Value Prelude.Text
set :: PropertyType "RegistryName" Schema -> Schema -> Schema
set PropertyType "RegistryName" Schema
newValue Schema {Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Schema -> ()
content :: Schema -> Value Text
description :: Schema -> Maybe (Value Text)
registryName :: Schema -> Value Text
schemaName :: Schema -> Maybe (Value Text)
tags :: Schema -> Maybe [TagsEntryProperty]
type' :: Schema -> Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..} = Schema {registryName :: Value Text
registryName = PropertyType "RegistryName" Schema
Value Text
newValue, Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
instance Property "SchemaName" Schema where
type PropertyType "SchemaName" Schema = Value Prelude.Text
set :: PropertyType "SchemaName" Schema -> Schema -> Schema
set PropertyType "SchemaName" Schema
newValue Schema {Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Schema -> ()
content :: Schema -> Value Text
description :: Schema -> Maybe (Value Text)
registryName :: Schema -> Value Text
schemaName :: Schema -> Maybe (Value Text)
tags :: Schema -> Maybe [TagsEntryProperty]
type' :: Schema -> Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
= Schema {schemaName :: Maybe (Value Text)
schemaName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SchemaName" Schema
Value Text
newValue, Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
instance Property "Tags" Schema where
type PropertyType "Tags" Schema = [TagsEntryProperty]
set :: PropertyType "Tags" Schema -> Schema -> Schema
set PropertyType "Tags" Schema
newValue Schema {Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Schema -> ()
content :: Schema -> Value Text
description :: Schema -> Maybe (Value Text)
registryName :: Schema -> Value Text
schemaName :: Schema -> Maybe (Value Text)
tags :: Schema -> Maybe [TagsEntryProperty]
type' :: Schema -> Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..}
= Schema {tags :: Maybe [TagsEntryProperty]
tags = [TagsEntryProperty] -> Maybe [TagsEntryProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [TagsEntryProperty]
PropertyType "Tags" Schema
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
type' :: Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
type' :: Value Text
..}
instance Property "Type" Schema where
type PropertyType "Type" Schema = Value Prelude.Text
set :: PropertyType "Type" Schema -> Schema -> Schema
set PropertyType "Type" Schema
newValue Schema {Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Schema -> ()
content :: Schema -> Value Text
description :: Schema -> Maybe (Value Text)
registryName :: Schema -> Value Text
schemaName :: Schema -> Maybe (Value Text)
tags :: Schema -> Maybe [TagsEntryProperty]
type' :: Schema -> Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
type' :: Value Text
..} = Schema {type' :: Value Text
type' = PropertyType "Type" Schema
Value Text
newValue, Maybe [TagsEntryProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
haddock_workaround_ :: ()
content :: Value Text
description :: Maybe (Value Text)
registryName :: Value Text
schemaName :: Maybe (Value Text)
tags :: Maybe [TagsEntryProperty]
..}