module Stratosphere.Glue.SchemaVersion (
module Exports, SchemaVersion(..), mkSchemaVersion
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Glue.SchemaVersion.SchemaProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SchemaVersion
=
SchemaVersion {SchemaVersion -> ()
haddock_workaround_ :: (),
SchemaVersion -> SchemaProperty
schema :: SchemaProperty,
SchemaVersion -> Value Text
schemaDefinition :: (Value Prelude.Text)}
deriving stock (SchemaVersion -> SchemaVersion -> Bool
(SchemaVersion -> SchemaVersion -> Bool)
-> (SchemaVersion -> SchemaVersion -> Bool) -> Eq SchemaVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SchemaVersion -> SchemaVersion -> Bool
== :: SchemaVersion -> SchemaVersion -> Bool
$c/= :: SchemaVersion -> SchemaVersion -> Bool
/= :: SchemaVersion -> SchemaVersion -> Bool
Prelude.Eq, Int -> SchemaVersion -> ShowS
[SchemaVersion] -> ShowS
SchemaVersion -> String
(Int -> SchemaVersion -> ShowS)
-> (SchemaVersion -> String)
-> ([SchemaVersion] -> ShowS)
-> Show SchemaVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SchemaVersion -> ShowS
showsPrec :: Int -> SchemaVersion -> ShowS
$cshow :: SchemaVersion -> String
show :: SchemaVersion -> String
$cshowList :: [SchemaVersion] -> ShowS
showList :: [SchemaVersion] -> ShowS
Prelude.Show)
mkSchemaVersion ::
SchemaProperty -> Value Prelude.Text -> SchemaVersion
mkSchemaVersion :: SchemaProperty -> Value Text -> SchemaVersion
mkSchemaVersion SchemaProperty
schema Value Text
schemaDefinition
= SchemaVersion
{haddock_workaround_ :: ()
haddock_workaround_ = (), schema :: SchemaProperty
schema = SchemaProperty
schema,
schemaDefinition :: Value Text
schemaDefinition = Value Text
schemaDefinition}
instance ToResourceProperties SchemaVersion where
toResourceProperties :: SchemaVersion -> ResourceProperties
toResourceProperties SchemaVersion {()
Value Text
SchemaProperty
haddock_workaround_ :: SchemaVersion -> ()
schema :: SchemaVersion -> SchemaProperty
schemaDefinition :: SchemaVersion -> Value Text
haddock_workaround_ :: ()
schema :: SchemaProperty
schemaDefinition :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Glue::SchemaVersion",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"Schema" Key -> SchemaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SchemaProperty
schema,
Key
"SchemaDefinition" 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
schemaDefinition]}
instance JSON.ToJSON SchemaVersion where
toJSON :: SchemaVersion -> Value
toJSON SchemaVersion {()
Value Text
SchemaProperty
haddock_workaround_ :: SchemaVersion -> ()
schema :: SchemaVersion -> SchemaProperty
schemaDefinition :: SchemaVersion -> Value Text
haddock_workaround_ :: ()
schema :: SchemaProperty
schemaDefinition :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"Schema" Key -> SchemaProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= SchemaProperty
schema,
Key
"SchemaDefinition" 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
schemaDefinition]
instance Property "Schema" SchemaVersion where
type PropertyType "Schema" SchemaVersion = SchemaProperty
set :: PropertyType "Schema" SchemaVersion
-> SchemaVersion -> SchemaVersion
set PropertyType "Schema" SchemaVersion
newValue SchemaVersion {()
Value Text
SchemaProperty
haddock_workaround_ :: SchemaVersion -> ()
schema :: SchemaVersion -> SchemaProperty
schemaDefinition :: SchemaVersion -> Value Text
haddock_workaround_ :: ()
schema :: SchemaProperty
schemaDefinition :: Value Text
..}
= SchemaVersion {schema :: SchemaProperty
schema = PropertyType "Schema" SchemaVersion
SchemaProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
schemaDefinition :: Value Text
haddock_workaround_ :: ()
schemaDefinition :: Value Text
..}
instance Property "SchemaDefinition" SchemaVersion where
type PropertyType "SchemaDefinition" SchemaVersion = Value Prelude.Text
set :: PropertyType "SchemaDefinition" SchemaVersion
-> SchemaVersion -> SchemaVersion
set PropertyType "SchemaDefinition" SchemaVersion
newValue SchemaVersion {()
Value Text
SchemaProperty
haddock_workaround_ :: SchemaVersion -> ()
schema :: SchemaVersion -> SchemaProperty
schemaDefinition :: SchemaVersion -> Value Text
haddock_workaround_ :: ()
schema :: SchemaProperty
schemaDefinition :: Value Text
..}
= SchemaVersion {schemaDefinition :: Value Text
schemaDefinition = PropertyType "SchemaDefinition" SchemaVersion
Value Text
newValue, ()
SchemaProperty
haddock_workaround_ :: ()
schema :: SchemaProperty
haddock_workaround_ :: ()
schema :: SchemaProperty
..}