module Stratosphere.Glue.SchemaVersion.SchemaProperty (
SchemaProperty(..), mkSchemaProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SchemaProperty
=
SchemaProperty {SchemaProperty -> ()
haddock_workaround_ :: (),
SchemaProperty -> Maybe (Value Text)
registryName :: (Prelude.Maybe (Value Prelude.Text)),
SchemaProperty -> Maybe (Value Text)
schemaArn :: (Prelude.Maybe (Value Prelude.Text)),
SchemaProperty -> Maybe (Value Text)
schemaName :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (SchemaProperty -> SchemaProperty -> Bool
(SchemaProperty -> SchemaProperty -> Bool)
-> (SchemaProperty -> SchemaProperty -> Bool) -> Eq SchemaProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SchemaProperty -> SchemaProperty -> Bool
== :: SchemaProperty -> SchemaProperty -> Bool
$c/= :: SchemaProperty -> SchemaProperty -> Bool
/= :: SchemaProperty -> SchemaProperty -> Bool
Prelude.Eq, Int -> SchemaProperty -> ShowS
[SchemaProperty] -> ShowS
SchemaProperty -> String
(Int -> SchemaProperty -> ShowS)
-> (SchemaProperty -> String)
-> ([SchemaProperty] -> ShowS)
-> Show SchemaProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SchemaProperty -> ShowS
showsPrec :: Int -> SchemaProperty -> ShowS
$cshow :: SchemaProperty -> String
show :: SchemaProperty -> String
$cshowList :: [SchemaProperty] -> ShowS
showList :: [SchemaProperty] -> ShowS
Prelude.Show)
mkSchemaProperty :: SchemaProperty
mkSchemaProperty :: SchemaProperty
mkSchemaProperty
= SchemaProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), registryName :: Maybe (Value Text)
registryName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
schemaArn :: Maybe (Value Text)
schemaArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, schemaName :: Maybe (Value Text)
schemaName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SchemaProperty where
toResourceProperties :: SchemaProperty -> ResourceProperties
toResourceProperties SchemaProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaProperty -> ()
registryName :: SchemaProperty -> Maybe (Value Text)
schemaArn :: SchemaProperty -> Maybe (Value Text)
schemaName :: SchemaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaArn :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Glue::SchemaVersion.Schema",
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
"RegistryName" (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)
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..=) Key
"SchemaArn" (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)
schemaArn,
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])}
instance JSON.ToJSON SchemaProperty where
toJSON :: SchemaProperty -> Value
toJSON SchemaProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaProperty -> ()
registryName :: SchemaProperty -> Maybe (Value Text)
schemaArn :: SchemaProperty -> Maybe (Value Text)
schemaName :: SchemaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaArn :: Maybe (Value Text)
schemaName :: 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
"RegistryName" (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)
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..=) Key
"SchemaArn" (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)
schemaArn,
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]))
instance Property "RegistryName" SchemaProperty where
type PropertyType "RegistryName" SchemaProperty = Value Prelude.Text
set :: PropertyType "RegistryName" SchemaProperty
-> SchemaProperty -> SchemaProperty
set PropertyType "RegistryName" SchemaProperty
newValue SchemaProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaProperty -> ()
registryName :: SchemaProperty -> Maybe (Value Text)
schemaArn :: SchemaProperty -> Maybe (Value Text)
schemaName :: SchemaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaArn :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
..}
= SchemaProperty {registryName :: Maybe (Value Text)
registryName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RegistryName" SchemaProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
schemaArn :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
haddock_workaround_ :: ()
schemaArn :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
..}
instance Property "SchemaArn" SchemaProperty where
type PropertyType "SchemaArn" SchemaProperty = Value Prelude.Text
set :: PropertyType "SchemaArn" SchemaProperty
-> SchemaProperty -> SchemaProperty
set PropertyType "SchemaArn" SchemaProperty
newValue SchemaProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaProperty -> ()
registryName :: SchemaProperty -> Maybe (Value Text)
schemaArn :: SchemaProperty -> Maybe (Value Text)
schemaName :: SchemaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaArn :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
..}
= SchemaProperty {schemaArn :: Maybe (Value Text)
schemaArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SchemaArn" SchemaProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
..}
instance Property "SchemaName" SchemaProperty where
type PropertyType "SchemaName" SchemaProperty = Value Prelude.Text
set :: PropertyType "SchemaName" SchemaProperty
-> SchemaProperty -> SchemaProperty
set PropertyType "SchemaName" SchemaProperty
newValue SchemaProperty {Maybe (Value Text)
()
haddock_workaround_ :: SchemaProperty -> ()
registryName :: SchemaProperty -> Maybe (Value Text)
schemaArn :: SchemaProperty -> Maybe (Value Text)
schemaName :: SchemaProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaArn :: Maybe (Value Text)
schemaName :: Maybe (Value Text)
..}
= SchemaProperty {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" SchemaProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaArn :: Maybe (Value Text)
haddock_workaround_ :: ()
registryName :: Maybe (Value Text)
schemaArn :: Maybe (Value Text)
..}