{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Glue.CreateSchema
(
CreateSchema (..),
newCreateSchema,
createSchema_compatibility,
createSchema_description,
createSchema_registryId,
createSchema_schemaDefinition,
createSchema_tags,
createSchema_schemaName,
createSchema_dataFormat,
CreateSchemaResponse (..),
newCreateSchemaResponse,
createSchemaResponse_compatibility,
createSchemaResponse_dataFormat,
createSchemaResponse_description,
createSchemaResponse_latestSchemaVersion,
createSchemaResponse_nextSchemaVersion,
createSchemaResponse_registryArn,
createSchemaResponse_registryName,
createSchemaResponse_schemaArn,
createSchemaResponse_schemaCheckpoint,
createSchemaResponse_schemaName,
createSchemaResponse_schemaStatus,
createSchemaResponse_schemaVersionId,
createSchemaResponse_schemaVersionStatus,
createSchemaResponse_tags,
createSchemaResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateSchema = CreateSchema'
{
CreateSchema -> Maybe Compatibility
compatibility :: Prelude.Maybe Compatibility,
CreateSchema -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateSchema -> Maybe RegistryId
registryId :: Prelude.Maybe RegistryId,
CreateSchema -> Maybe Text
schemaDefinition :: Prelude.Maybe Prelude.Text,
CreateSchema -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateSchema -> Text
schemaName :: Prelude.Text,
CreateSchema -> DataFormat
dataFormat :: DataFormat
}
deriving (CreateSchema -> CreateSchema -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSchema -> CreateSchema -> Bool
$c/= :: CreateSchema -> CreateSchema -> Bool
== :: CreateSchema -> CreateSchema -> Bool
$c== :: CreateSchema -> CreateSchema -> Bool
Prelude.Eq, ReadPrec [CreateSchema]
ReadPrec CreateSchema
Int -> ReadS CreateSchema
ReadS [CreateSchema]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSchema]
$creadListPrec :: ReadPrec [CreateSchema]
readPrec :: ReadPrec CreateSchema
$creadPrec :: ReadPrec CreateSchema
readList :: ReadS [CreateSchema]
$creadList :: ReadS [CreateSchema]
readsPrec :: Int -> ReadS CreateSchema
$creadsPrec :: Int -> ReadS CreateSchema
Prelude.Read, Int -> CreateSchema -> ShowS
[CreateSchema] -> ShowS
CreateSchema -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSchema] -> ShowS
$cshowList :: [CreateSchema] -> ShowS
show :: CreateSchema -> String
$cshow :: CreateSchema -> String
showsPrec :: Int -> CreateSchema -> ShowS
$cshowsPrec :: Int -> CreateSchema -> ShowS
Prelude.Show, forall x. Rep CreateSchema x -> CreateSchema
forall x. CreateSchema -> Rep CreateSchema x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSchema x -> CreateSchema
$cfrom :: forall x. CreateSchema -> Rep CreateSchema x
Prelude.Generic)
newCreateSchema ::
Prelude.Text ->
DataFormat ->
CreateSchema
newCreateSchema :: Text -> DataFormat -> CreateSchema
newCreateSchema Text
pSchemaName_ DataFormat
pDataFormat_ =
CreateSchema'
{ $sel:compatibility:CreateSchema' :: Maybe Compatibility
compatibility = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateSchema' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:registryId:CreateSchema' :: Maybe RegistryId
registryId = forall a. Maybe a
Prelude.Nothing,
$sel:schemaDefinition:CreateSchema' :: Maybe Text
schemaDefinition = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateSchema' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:schemaName:CreateSchema' :: Text
schemaName = Text
pSchemaName_,
$sel:dataFormat:CreateSchema' :: DataFormat
dataFormat = DataFormat
pDataFormat_
}
createSchema_compatibility :: Lens.Lens' CreateSchema (Prelude.Maybe Compatibility)
createSchema_compatibility :: Lens' CreateSchema (Maybe Compatibility)
createSchema_compatibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchema' {Maybe Compatibility
compatibility :: Maybe Compatibility
$sel:compatibility:CreateSchema' :: CreateSchema -> Maybe Compatibility
compatibility} -> Maybe Compatibility
compatibility) (\s :: CreateSchema
s@CreateSchema' {} Maybe Compatibility
a -> CreateSchema
s {$sel:compatibility:CreateSchema' :: Maybe Compatibility
compatibility = Maybe Compatibility
a} :: CreateSchema)
createSchema_description :: Lens.Lens' CreateSchema (Prelude.Maybe Prelude.Text)
createSchema_description :: Lens' CreateSchema (Maybe Text)
createSchema_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchema' {Maybe Text
description :: Maybe Text
$sel:description:CreateSchema' :: CreateSchema -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateSchema
s@CreateSchema' {} Maybe Text
a -> CreateSchema
s {$sel:description:CreateSchema' :: Maybe Text
description = Maybe Text
a} :: CreateSchema)
createSchema_registryId :: Lens.Lens' CreateSchema (Prelude.Maybe RegistryId)
createSchema_registryId :: Lens' CreateSchema (Maybe RegistryId)
createSchema_registryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchema' {Maybe RegistryId
registryId :: Maybe RegistryId
$sel:registryId:CreateSchema' :: CreateSchema -> Maybe RegistryId
registryId} -> Maybe RegistryId
registryId) (\s :: CreateSchema
s@CreateSchema' {} Maybe RegistryId
a -> CreateSchema
s {$sel:registryId:CreateSchema' :: Maybe RegistryId
registryId = Maybe RegistryId
a} :: CreateSchema)
createSchema_schemaDefinition :: Lens.Lens' CreateSchema (Prelude.Maybe Prelude.Text)
createSchema_schemaDefinition :: Lens' CreateSchema (Maybe Text)
createSchema_schemaDefinition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchema' {Maybe Text
schemaDefinition :: Maybe Text
$sel:schemaDefinition:CreateSchema' :: CreateSchema -> Maybe Text
schemaDefinition} -> Maybe Text
schemaDefinition) (\s :: CreateSchema
s@CreateSchema' {} Maybe Text
a -> CreateSchema
s {$sel:schemaDefinition:CreateSchema' :: Maybe Text
schemaDefinition = Maybe Text
a} :: CreateSchema)
createSchema_tags :: Lens.Lens' CreateSchema (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createSchema_tags :: Lens' CreateSchema (Maybe (HashMap Text Text))
createSchema_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchema' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateSchema' :: CreateSchema -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateSchema
s@CreateSchema' {} Maybe (HashMap Text Text)
a -> CreateSchema
s {$sel:tags:CreateSchema' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateSchema) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createSchema_schemaName :: Lens.Lens' CreateSchema Prelude.Text
createSchema_schemaName :: Lens' CreateSchema Text
createSchema_schemaName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchema' {Text
schemaName :: Text
$sel:schemaName:CreateSchema' :: CreateSchema -> Text
schemaName} -> Text
schemaName) (\s :: CreateSchema
s@CreateSchema' {} Text
a -> CreateSchema
s {$sel:schemaName:CreateSchema' :: Text
schemaName = Text
a} :: CreateSchema)
createSchema_dataFormat :: Lens.Lens' CreateSchema DataFormat
createSchema_dataFormat :: Lens' CreateSchema DataFormat
createSchema_dataFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchema' {DataFormat
dataFormat :: DataFormat
$sel:dataFormat:CreateSchema' :: CreateSchema -> DataFormat
dataFormat} -> DataFormat
dataFormat) (\s :: CreateSchema
s@CreateSchema' {} DataFormat
a -> CreateSchema
s {$sel:dataFormat:CreateSchema' :: DataFormat
dataFormat = DataFormat
a} :: CreateSchema)
instance Core.AWSRequest CreateSchema where
type AWSResponse CreateSchema = CreateSchemaResponse
request :: (Service -> Service) -> CreateSchema -> Request CreateSchema
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateSchema
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateSchema)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Compatibility
-> Maybe DataFormat
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe SchemaStatus
-> Maybe Text
-> Maybe SchemaVersionStatus
-> Maybe (HashMap Text Text)
-> Int
-> CreateSchemaResponse
CreateSchemaResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Compatibility")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"DataFormat")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LatestSchemaVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextSchemaVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RegistryArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RegistryName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SchemaArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SchemaCheckpoint")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SchemaName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SchemaStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SchemaVersionId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SchemaVersionStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateSchema where
hashWithSalt :: Int -> CreateSchema -> Int
hashWithSalt Int
_salt CreateSchema' {Maybe Text
Maybe (HashMap Text Text)
Maybe Compatibility
Maybe RegistryId
Text
DataFormat
dataFormat :: DataFormat
schemaName :: Text
tags :: Maybe (HashMap Text Text)
schemaDefinition :: Maybe Text
registryId :: Maybe RegistryId
description :: Maybe Text
compatibility :: Maybe Compatibility
$sel:dataFormat:CreateSchema' :: CreateSchema -> DataFormat
$sel:schemaName:CreateSchema' :: CreateSchema -> Text
$sel:tags:CreateSchema' :: CreateSchema -> Maybe (HashMap Text Text)
$sel:schemaDefinition:CreateSchema' :: CreateSchema -> Maybe Text
$sel:registryId:CreateSchema' :: CreateSchema -> Maybe RegistryId
$sel:description:CreateSchema' :: CreateSchema -> Maybe Text
$sel:compatibility:CreateSchema' :: CreateSchema -> Maybe Compatibility
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Compatibility
compatibility
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RegistryId
registryId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
schemaDefinition
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
schemaName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DataFormat
dataFormat
instance Prelude.NFData CreateSchema where
rnf :: CreateSchema -> ()
rnf CreateSchema' {Maybe Text
Maybe (HashMap Text Text)
Maybe Compatibility
Maybe RegistryId
Text
DataFormat
dataFormat :: DataFormat
schemaName :: Text
tags :: Maybe (HashMap Text Text)
schemaDefinition :: Maybe Text
registryId :: Maybe RegistryId
description :: Maybe Text
compatibility :: Maybe Compatibility
$sel:dataFormat:CreateSchema' :: CreateSchema -> DataFormat
$sel:schemaName:CreateSchema' :: CreateSchema -> Text
$sel:tags:CreateSchema' :: CreateSchema -> Maybe (HashMap Text Text)
$sel:schemaDefinition:CreateSchema' :: CreateSchema -> Maybe Text
$sel:registryId:CreateSchema' :: CreateSchema -> Maybe RegistryId
$sel:description:CreateSchema' :: CreateSchema -> Maybe Text
$sel:compatibility:CreateSchema' :: CreateSchema -> Maybe Compatibility
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Compatibility
compatibility
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RegistryId
registryId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaDefinition
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
schemaName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DataFormat
dataFormat
instance Data.ToHeaders CreateSchema where
toHeaders :: CreateSchema -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# (ByteString
"AWSGlue.CreateSchema" :: Prelude.ByteString),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateSchema where
toJSON :: CreateSchema -> Value
toJSON CreateSchema' {Maybe Text
Maybe (HashMap Text Text)
Maybe Compatibility
Maybe RegistryId
Text
DataFormat
dataFormat :: DataFormat
schemaName :: Text
tags :: Maybe (HashMap Text Text)
schemaDefinition :: Maybe Text
registryId :: Maybe RegistryId
description :: Maybe Text
compatibility :: Maybe Compatibility
$sel:dataFormat:CreateSchema' :: CreateSchema -> DataFormat
$sel:schemaName:CreateSchema' :: CreateSchema -> Text
$sel:tags:CreateSchema' :: CreateSchema -> Maybe (HashMap Text Text)
$sel:schemaDefinition:CreateSchema' :: CreateSchema -> Maybe Text
$sel:registryId:CreateSchema' :: CreateSchema -> Maybe RegistryId
$sel:description:CreateSchema' :: CreateSchema -> Maybe Text
$sel:compatibility:CreateSchema' :: CreateSchema -> Maybe Compatibility
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Compatibility" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Compatibility
compatibility,
(Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"RegistryId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RegistryId
registryId,
(Key
"SchemaDefinition" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
schemaDefinition,
(Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
forall a. a -> Maybe a
Prelude.Just (Key
"SchemaName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
schemaName),
forall a. a -> Maybe a
Prelude.Just (Key
"DataFormat" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DataFormat
dataFormat)
]
)
instance Data.ToPath CreateSchema where
toPath :: CreateSchema -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateSchema where
toQuery :: CreateSchema -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateSchemaResponse = CreateSchemaResponse'
{
CreateSchemaResponse -> Maybe Compatibility
compatibility :: Prelude.Maybe Compatibility,
CreateSchemaResponse -> Maybe DataFormat
dataFormat :: Prelude.Maybe DataFormat,
CreateSchemaResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateSchemaResponse -> Maybe Natural
latestSchemaVersion :: Prelude.Maybe Prelude.Natural,
CreateSchemaResponse -> Maybe Natural
nextSchemaVersion :: Prelude.Maybe Prelude.Natural,
CreateSchemaResponse -> Maybe Text
registryArn :: Prelude.Maybe Prelude.Text,
CreateSchemaResponse -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text,
CreateSchemaResponse -> Maybe Text
schemaArn :: Prelude.Maybe Prelude.Text,
CreateSchemaResponse -> Maybe Natural
schemaCheckpoint :: Prelude.Maybe Prelude.Natural,
CreateSchemaResponse -> Maybe Text
schemaName :: Prelude.Maybe Prelude.Text,
CreateSchemaResponse -> Maybe SchemaStatus
schemaStatus :: Prelude.Maybe SchemaStatus,
CreateSchemaResponse -> Maybe Text
schemaVersionId :: Prelude.Maybe Prelude.Text,
CreateSchemaResponse -> Maybe SchemaVersionStatus
schemaVersionStatus :: Prelude.Maybe SchemaVersionStatus,
CreateSchemaResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateSchemaResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateSchemaResponse -> CreateSchemaResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSchemaResponse -> CreateSchemaResponse -> Bool
$c/= :: CreateSchemaResponse -> CreateSchemaResponse -> Bool
== :: CreateSchemaResponse -> CreateSchemaResponse -> Bool
$c== :: CreateSchemaResponse -> CreateSchemaResponse -> Bool
Prelude.Eq, ReadPrec [CreateSchemaResponse]
ReadPrec CreateSchemaResponse
Int -> ReadS CreateSchemaResponse
ReadS [CreateSchemaResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSchemaResponse]
$creadListPrec :: ReadPrec [CreateSchemaResponse]
readPrec :: ReadPrec CreateSchemaResponse
$creadPrec :: ReadPrec CreateSchemaResponse
readList :: ReadS [CreateSchemaResponse]
$creadList :: ReadS [CreateSchemaResponse]
readsPrec :: Int -> ReadS CreateSchemaResponse
$creadsPrec :: Int -> ReadS CreateSchemaResponse
Prelude.Read, Int -> CreateSchemaResponse -> ShowS
[CreateSchemaResponse] -> ShowS
CreateSchemaResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSchemaResponse] -> ShowS
$cshowList :: [CreateSchemaResponse] -> ShowS
show :: CreateSchemaResponse -> String
$cshow :: CreateSchemaResponse -> String
showsPrec :: Int -> CreateSchemaResponse -> ShowS
$cshowsPrec :: Int -> CreateSchemaResponse -> ShowS
Prelude.Show, forall x. Rep CreateSchemaResponse x -> CreateSchemaResponse
forall x. CreateSchemaResponse -> Rep CreateSchemaResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSchemaResponse x -> CreateSchemaResponse
$cfrom :: forall x. CreateSchemaResponse -> Rep CreateSchemaResponse x
Prelude.Generic)
newCreateSchemaResponse ::
Prelude.Int ->
CreateSchemaResponse
newCreateSchemaResponse :: Int -> CreateSchemaResponse
newCreateSchemaResponse Int
pHttpStatus_ =
CreateSchemaResponse'
{ $sel:compatibility:CreateSchemaResponse' :: Maybe Compatibility
compatibility =
forall a. Maybe a
Prelude.Nothing,
$sel:dataFormat:CreateSchemaResponse' :: Maybe DataFormat
dataFormat = forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateSchemaResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:latestSchemaVersion:CreateSchemaResponse' :: Maybe Natural
latestSchemaVersion = forall a. Maybe a
Prelude.Nothing,
$sel:nextSchemaVersion:CreateSchemaResponse' :: Maybe Natural
nextSchemaVersion = forall a. Maybe a
Prelude.Nothing,
$sel:registryArn:CreateSchemaResponse' :: Maybe Text
registryArn = forall a. Maybe a
Prelude.Nothing,
$sel:registryName:CreateSchemaResponse' :: Maybe Text
registryName = forall a. Maybe a
Prelude.Nothing,
$sel:schemaArn:CreateSchemaResponse' :: Maybe Text
schemaArn = forall a. Maybe a
Prelude.Nothing,
$sel:schemaCheckpoint:CreateSchemaResponse' :: Maybe Natural
schemaCheckpoint = forall a. Maybe a
Prelude.Nothing,
$sel:schemaName:CreateSchemaResponse' :: Maybe Text
schemaName = forall a. Maybe a
Prelude.Nothing,
$sel:schemaStatus:CreateSchemaResponse' :: Maybe SchemaStatus
schemaStatus = forall a. Maybe a
Prelude.Nothing,
$sel:schemaVersionId:CreateSchemaResponse' :: Maybe Text
schemaVersionId = forall a. Maybe a
Prelude.Nothing,
$sel:schemaVersionStatus:CreateSchemaResponse' :: Maybe SchemaVersionStatus
schemaVersionStatus = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateSchemaResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateSchemaResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createSchemaResponse_compatibility :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Compatibility)
createSchemaResponse_compatibility :: Lens' CreateSchemaResponse (Maybe Compatibility)
createSchemaResponse_compatibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Compatibility
compatibility :: Maybe Compatibility
$sel:compatibility:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Compatibility
compatibility} -> Maybe Compatibility
compatibility) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Compatibility
a -> CreateSchemaResponse
s {$sel:compatibility:CreateSchemaResponse' :: Maybe Compatibility
compatibility = Maybe Compatibility
a} :: CreateSchemaResponse)
createSchemaResponse_dataFormat :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe DataFormat)
createSchemaResponse_dataFormat :: Lens' CreateSchemaResponse (Maybe DataFormat)
createSchemaResponse_dataFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe DataFormat
dataFormat :: Maybe DataFormat
$sel:dataFormat:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe DataFormat
dataFormat} -> Maybe DataFormat
dataFormat) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe DataFormat
a -> CreateSchemaResponse
s {$sel:dataFormat:CreateSchemaResponse' :: Maybe DataFormat
dataFormat = Maybe DataFormat
a} :: CreateSchemaResponse)
createSchemaResponse_description :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_description :: Lens' CreateSchemaResponse (Maybe Text)
createSchemaResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Text
description :: Maybe Text
$sel:description:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Text
a -> CreateSchemaResponse
s {$sel:description:CreateSchemaResponse' :: Maybe Text
description = Maybe Text
a} :: CreateSchemaResponse)
createSchemaResponse_latestSchemaVersion :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Natural)
createSchemaResponse_latestSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural)
createSchemaResponse_latestSchemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Natural
latestSchemaVersion :: Maybe Natural
$sel:latestSchemaVersion:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Natural
latestSchemaVersion} -> Maybe Natural
latestSchemaVersion) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Natural
a -> CreateSchemaResponse
s {$sel:latestSchemaVersion:CreateSchemaResponse' :: Maybe Natural
latestSchemaVersion = Maybe Natural
a} :: CreateSchemaResponse)
createSchemaResponse_nextSchemaVersion :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Natural)
createSchemaResponse_nextSchemaVersion :: Lens' CreateSchemaResponse (Maybe Natural)
createSchemaResponse_nextSchemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Natural
nextSchemaVersion :: Maybe Natural
$sel:nextSchemaVersion:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Natural
nextSchemaVersion} -> Maybe Natural
nextSchemaVersion) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Natural
a -> CreateSchemaResponse
s {$sel:nextSchemaVersion:CreateSchemaResponse' :: Maybe Natural
nextSchemaVersion = Maybe Natural
a} :: CreateSchemaResponse)
createSchemaResponse_registryArn :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_registryArn :: Lens' CreateSchemaResponse (Maybe Text)
createSchemaResponse_registryArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Text
registryArn :: Maybe Text
$sel:registryArn:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
registryArn} -> Maybe Text
registryArn) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Text
a -> CreateSchemaResponse
s {$sel:registryArn:CreateSchemaResponse' :: Maybe Text
registryArn = Maybe Text
a} :: CreateSchemaResponse)
createSchemaResponse_registryName :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_registryName :: Lens' CreateSchemaResponse (Maybe Text)
createSchemaResponse_registryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Text
registryName :: Maybe Text
$sel:registryName:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
registryName} -> Maybe Text
registryName) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Text
a -> CreateSchemaResponse
s {$sel:registryName:CreateSchemaResponse' :: Maybe Text
registryName = Maybe Text
a} :: CreateSchemaResponse)
createSchemaResponse_schemaArn :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_schemaArn :: Lens' CreateSchemaResponse (Maybe Text)
createSchemaResponse_schemaArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Text
schemaArn :: Maybe Text
$sel:schemaArn:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
schemaArn} -> Maybe Text
schemaArn) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Text
a -> CreateSchemaResponse
s {$sel:schemaArn:CreateSchemaResponse' :: Maybe Text
schemaArn = Maybe Text
a} :: CreateSchemaResponse)
createSchemaResponse_schemaCheckpoint :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Natural)
createSchemaResponse_schemaCheckpoint :: Lens' CreateSchemaResponse (Maybe Natural)
createSchemaResponse_schemaCheckpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Natural
schemaCheckpoint :: Maybe Natural
$sel:schemaCheckpoint:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Natural
schemaCheckpoint} -> Maybe Natural
schemaCheckpoint) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Natural
a -> CreateSchemaResponse
s {$sel:schemaCheckpoint:CreateSchemaResponse' :: Maybe Natural
schemaCheckpoint = Maybe Natural
a} :: CreateSchemaResponse)
createSchemaResponse_schemaName :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_schemaName :: Lens' CreateSchemaResponse (Maybe Text)
createSchemaResponse_schemaName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Text
schemaName :: Maybe Text
$sel:schemaName:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
schemaName} -> Maybe Text
schemaName) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Text
a -> CreateSchemaResponse
s {$sel:schemaName:CreateSchemaResponse' :: Maybe Text
schemaName = Maybe Text
a} :: CreateSchemaResponse)
createSchemaResponse_schemaStatus :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe SchemaStatus)
createSchemaResponse_schemaStatus :: Lens' CreateSchemaResponse (Maybe SchemaStatus)
createSchemaResponse_schemaStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe SchemaStatus
schemaStatus :: Maybe SchemaStatus
$sel:schemaStatus:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe SchemaStatus
schemaStatus} -> Maybe SchemaStatus
schemaStatus) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe SchemaStatus
a -> CreateSchemaResponse
s {$sel:schemaStatus:CreateSchemaResponse' :: Maybe SchemaStatus
schemaStatus = Maybe SchemaStatus
a} :: CreateSchemaResponse)
createSchemaResponse_schemaVersionId :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_schemaVersionId :: Lens' CreateSchemaResponse (Maybe Text)
createSchemaResponse_schemaVersionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe Text
schemaVersionId :: Maybe Text
$sel:schemaVersionId:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
schemaVersionId} -> Maybe Text
schemaVersionId) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe Text
a -> CreateSchemaResponse
s {$sel:schemaVersionId:CreateSchemaResponse' :: Maybe Text
schemaVersionId = Maybe Text
a} :: CreateSchemaResponse)
createSchemaResponse_schemaVersionStatus :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe SchemaVersionStatus)
createSchemaResponse_schemaVersionStatus :: Lens' CreateSchemaResponse (Maybe SchemaVersionStatus)
createSchemaResponse_schemaVersionStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe SchemaVersionStatus
schemaVersionStatus :: Maybe SchemaVersionStatus
$sel:schemaVersionStatus:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe SchemaVersionStatus
schemaVersionStatus} -> Maybe SchemaVersionStatus
schemaVersionStatus) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe SchemaVersionStatus
a -> CreateSchemaResponse
s {$sel:schemaVersionStatus:CreateSchemaResponse' :: Maybe SchemaVersionStatus
schemaVersionStatus = Maybe SchemaVersionStatus
a} :: CreateSchemaResponse)
createSchemaResponse_tags :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createSchemaResponse_tags :: Lens' CreateSchemaResponse (Maybe (HashMap Text Text))
createSchemaResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Maybe (HashMap Text Text)
a -> CreateSchemaResponse
s {$sel:tags:CreateSchemaResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateSchemaResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createSchemaResponse_httpStatus :: Lens.Lens' CreateSchemaResponse Prelude.Int
createSchemaResponse_httpStatus :: Lens' CreateSchemaResponse Int
createSchemaResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSchemaResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateSchemaResponse' :: CreateSchemaResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateSchemaResponse
s@CreateSchemaResponse' {} Int
a -> CreateSchemaResponse
s {$sel:httpStatus:CreateSchemaResponse' :: Int
httpStatus = Int
a} :: CreateSchemaResponse)
instance Prelude.NFData CreateSchemaResponse where
rnf :: CreateSchemaResponse -> ()
rnf CreateSchemaResponse' {Int
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe Compatibility
Maybe DataFormat
Maybe SchemaStatus
Maybe SchemaVersionStatus
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
schemaVersionStatus :: Maybe SchemaVersionStatus
schemaVersionId :: Maybe Text
schemaStatus :: Maybe SchemaStatus
schemaName :: Maybe Text
schemaCheckpoint :: Maybe Natural
schemaArn :: Maybe Text
registryName :: Maybe Text
registryArn :: Maybe Text
nextSchemaVersion :: Maybe Natural
latestSchemaVersion :: Maybe Natural
description :: Maybe Text
dataFormat :: Maybe DataFormat
compatibility :: Maybe Compatibility
$sel:httpStatus:CreateSchemaResponse' :: CreateSchemaResponse -> Int
$sel:tags:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe (HashMap Text Text)
$sel:schemaVersionStatus:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe SchemaVersionStatus
$sel:schemaVersionId:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
$sel:schemaStatus:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe SchemaStatus
$sel:schemaName:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
$sel:schemaCheckpoint:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Natural
$sel:schemaArn:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
$sel:registryName:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
$sel:registryArn:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
$sel:nextSchemaVersion:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Natural
$sel:latestSchemaVersion:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Natural
$sel:description:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Text
$sel:dataFormat:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe DataFormat
$sel:compatibility:CreateSchemaResponse' :: CreateSchemaResponse -> Maybe Compatibility
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Compatibility
compatibility
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataFormat
dataFormat
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
latestSchemaVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
nextSchemaVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
registryArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
registryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
schemaCheckpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SchemaStatus
schemaStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
schemaVersionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SchemaVersionStatus
schemaVersionStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus