{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Glue.CreateSchema
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a new schema set and registers the schema definition. Returns an
-- error if the schema set already exists without actually registering the
-- version.
--
-- When the schema set is created, a version checkpoint will be set to the
-- first version. Compatibility mode \"DISABLED\" restricts any additional
-- schema versions from being added after the first schema version. For all
-- other compatibility modes, validation of compatibility settings will be
-- applied only from the second version onwards when the
-- @RegisterSchemaVersion@ API is used.
--
-- When this API is called without a @RegistryId@, this will create an
-- entry for a \"default-registry\" in the registry database tables, if it
-- is not already present.
module Amazonka.Glue.CreateSchema
  ( -- * Creating a Request
    CreateSchema (..),
    newCreateSchema,

    -- * Request Lenses
    createSchema_schemaDefinition,
    createSchema_registryId,
    createSchema_description,
    createSchema_compatibility,
    createSchema_tags,
    createSchema_schemaName,
    createSchema_dataFormat,

    -- * Destructuring the Response
    CreateSchemaResponse (..),
    newCreateSchemaResponse,

    -- * Response Lenses
    createSchemaResponse_schemaVersionStatus,
    createSchemaResponse_registryName,
    createSchemaResponse_schemaStatus,
    createSchemaResponse_registryArn,
    createSchemaResponse_latestSchemaVersion,
    createSchemaResponse_dataFormat,
    createSchemaResponse_schemaCheckpoint,
    createSchemaResponse_schemaName,
    createSchemaResponse_schemaVersionId,
    createSchemaResponse_schemaArn,
    createSchemaResponse_nextSchemaVersion,
    createSchemaResponse_description,
    createSchemaResponse_compatibility,
    createSchemaResponse_tags,
    createSchemaResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateSchema' smart constructor.
data CreateSchema = CreateSchema'
  { -- | The schema definition using the @DataFormat@ setting for @SchemaName@.
    CreateSchema -> Maybe Text
schemaDefinition :: Prelude.Maybe Prelude.Text,
    -- | This is a wrapper shape to contain the registry identity fields. If this
    -- is not provided, the default registry will be used. The ARN format for
    -- the same will be:
    -- @arn:aws:glue:us-east-2:\<customer id>:registry\/default-registry:random-5-letter-id@.
    CreateSchema -> Maybe RegistryId
registryId :: Prelude.Maybe RegistryId,
    -- | An optional description of the schema. If description is not provided,
    -- there will not be any automatic default value for this.
    CreateSchema -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The compatibility mode of the schema. The possible values are:
    --
    -- -   /NONE/: No compatibility mode applies. You can use this choice in
    --     development scenarios or if you do not know the compatibility mode
    --     that you want to apply to schemas. Any new version added will be
    --     accepted without undergoing a compatibility check.
    --
    -- -   /DISABLED/: This compatibility choice prevents versioning for a
    --     particular schema. You can use this choice to prevent future
    --     versioning of a schema.
    --
    -- -   /BACKWARD/: This compatibility choice is recommended as it allows
    --     data receivers to read both the current and one previous schema
    --     version. This means that for instance, a new schema version cannot
    --     drop data fields or change the type of these fields, so they can\'t
    --     be read by readers using the previous version.
    --
    -- -   /BACKWARD_ALL/: This compatibility choice allows data receivers to
    --     read both the current and all previous schema versions. You can use
    --     this choice when you need to delete fields or add optional fields,
    --     and check compatibility against all previous schema versions.
    --
    -- -   /FORWARD/: This compatibility choice allows data receivers to read
    --     both the current and one next schema version, but not necessarily
    --     later versions. You can use this choice when you need to add fields
    --     or delete optional fields, but only check compatibility against the
    --     last schema version.
    --
    -- -   /FORWARD_ALL/: This compatibility choice allows data receivers to
    --     read written by producers of any new registered schema. You can use
    --     this choice when you need to add fields or delete optional fields,
    --     and check compatibility against all previous schema versions.
    --
    -- -   /FULL/: This compatibility choice allows data receivers to read data
    --     written by producers using the previous or next version of the
    --     schema, but not necessarily earlier or later versions. You can use
    --     this choice when you need to add or remove optional fields, but only
    --     check compatibility against the last schema version.
    --
    -- -   /FULL_ALL/: This compatibility choice allows data receivers to read
    --     data written by producers using all previous schema versions. You
    --     can use this choice when you need to add or remove optional fields,
    --     and check compatibility against all previous schema versions.
    CreateSchema -> Maybe Compatibility
compatibility :: Prelude.Maybe Compatibility,
    -- | Amazon Web Services tags that contain a key value pair and may be
    -- searched by console, command line, or API. If specified, follows the
    -- Amazon Web Services tags-on-create pattern.
    CreateSchema -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Name of the schema to be created of max length of 255, and may only
    -- contain letters, numbers, hyphen, underscore, dollar sign, or hash mark.
    -- No whitespace.
    CreateSchema -> Text
schemaName :: Prelude.Text,
    -- | The data format of the schema definition. Currently @AVRO@ and @JSON@
    -- are supported.
    CreateSchema -> DataFormat
dataFormat :: DataFormat
  }
  deriving (CreateSchema -> CreateSchema -> Bool
(CreateSchema -> CreateSchema -> Bool)
-> (CreateSchema -> CreateSchema -> Bool) -> Eq CreateSchema
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]
(Int -> ReadS CreateSchema)
-> ReadS [CreateSchema]
-> ReadPrec CreateSchema
-> ReadPrec [CreateSchema]
-> Read 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
(Int -> CreateSchema -> ShowS)
-> (CreateSchema -> String)
-> ([CreateSchema] -> ShowS)
-> Show CreateSchema
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. CreateSchema -> Rep CreateSchema x)
-> (forall x. Rep CreateSchema x -> CreateSchema)
-> Generic CreateSchema
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)

-- |
-- Create a value of 'CreateSchema' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'schemaDefinition', 'createSchema_schemaDefinition' - The schema definition using the @DataFormat@ setting for @SchemaName@.
--
-- 'registryId', 'createSchema_registryId' - This is a wrapper shape to contain the registry identity fields. If this
-- is not provided, the default registry will be used. The ARN format for
-- the same will be:
-- @arn:aws:glue:us-east-2:\<customer id>:registry\/default-registry:random-5-letter-id@.
--
-- 'description', 'createSchema_description' - An optional description of the schema. If description is not provided,
-- there will not be any automatic default value for this.
--
-- 'compatibility', 'createSchema_compatibility' - The compatibility mode of the schema. The possible values are:
--
-- -   /NONE/: No compatibility mode applies. You can use this choice in
--     development scenarios or if you do not know the compatibility mode
--     that you want to apply to schemas. Any new version added will be
--     accepted without undergoing a compatibility check.
--
-- -   /DISABLED/: This compatibility choice prevents versioning for a
--     particular schema. You can use this choice to prevent future
--     versioning of a schema.
--
-- -   /BACKWARD/: This compatibility choice is recommended as it allows
--     data receivers to read both the current and one previous schema
--     version. This means that for instance, a new schema version cannot
--     drop data fields or change the type of these fields, so they can\'t
--     be read by readers using the previous version.
--
-- -   /BACKWARD_ALL/: This compatibility choice allows data receivers to
--     read both the current and all previous schema versions. You can use
--     this choice when you need to delete fields or add optional fields,
--     and check compatibility against all previous schema versions.
--
-- -   /FORWARD/: This compatibility choice allows data receivers to read
--     both the current and one next schema version, but not necessarily
--     later versions. You can use this choice when you need to add fields
--     or delete optional fields, but only check compatibility against the
--     last schema version.
--
-- -   /FORWARD_ALL/: This compatibility choice allows data receivers to
--     read written by producers of any new registered schema. You can use
--     this choice when you need to add fields or delete optional fields,
--     and check compatibility against all previous schema versions.
--
-- -   /FULL/: This compatibility choice allows data receivers to read data
--     written by producers using the previous or next version of the
--     schema, but not necessarily earlier or later versions. You can use
--     this choice when you need to add or remove optional fields, but only
--     check compatibility against the last schema version.
--
-- -   /FULL_ALL/: This compatibility choice allows data receivers to read
--     data written by producers using all previous schema versions. You
--     can use this choice when you need to add or remove optional fields,
--     and check compatibility against all previous schema versions.
--
-- 'tags', 'createSchema_tags' - Amazon Web Services tags that contain a key value pair and may be
-- searched by console, command line, or API. If specified, follows the
-- Amazon Web Services tags-on-create pattern.
--
-- 'schemaName', 'createSchema_schemaName' - Name of the schema to be created of max length of 255, and may only
-- contain letters, numbers, hyphen, underscore, dollar sign, or hash mark.
-- No whitespace.
--
-- 'dataFormat', 'createSchema_dataFormat' - The data format of the schema definition. Currently @AVRO@ and @JSON@
-- are supported.
newCreateSchema ::
  -- | 'schemaName'
  Prelude.Text ->
  -- | 'dataFormat'
  DataFormat ->
  CreateSchema
newCreateSchema :: Text -> DataFormat -> CreateSchema
newCreateSchema Text
pSchemaName_ DataFormat
pDataFormat_ =
  CreateSchema' :: Maybe Text
-> Maybe RegistryId
-> Maybe Text
-> Maybe Compatibility
-> Maybe (HashMap Text Text)
-> Text
-> DataFormat
-> CreateSchema
CreateSchema'
    { $sel:schemaDefinition:CreateSchema' :: Maybe Text
schemaDefinition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:registryId:CreateSchema' :: Maybe RegistryId
registryId = Maybe RegistryId
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateSchema' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:compatibility:CreateSchema' :: Maybe Compatibility
compatibility = Maybe Compatibility
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateSchema' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaName:CreateSchema' :: Text
schemaName = Text
pSchemaName_,
      $sel:dataFormat:CreateSchema' :: DataFormat
dataFormat = DataFormat
pDataFormat_
    }

-- | The schema definition using the @DataFormat@ setting for @SchemaName@.
createSchema_schemaDefinition :: Lens.Lens' CreateSchema (Prelude.Maybe Prelude.Text)
createSchema_schemaDefinition :: (Maybe Text -> f (Maybe Text)) -> CreateSchema -> f CreateSchema
createSchema_schemaDefinition = (CreateSchema -> Maybe Text)
-> (CreateSchema -> Maybe Text -> CreateSchema)
-> Lens CreateSchema CreateSchema (Maybe Text) (Maybe Text)
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)

-- | This is a wrapper shape to contain the registry identity fields. If this
-- is not provided, the default registry will be used. The ARN format for
-- the same will be:
-- @arn:aws:glue:us-east-2:\<customer id>:registry\/default-registry:random-5-letter-id@.
createSchema_registryId :: Lens.Lens' CreateSchema (Prelude.Maybe RegistryId)
createSchema_registryId :: (Maybe RegistryId -> f (Maybe RegistryId))
-> CreateSchema -> f CreateSchema
createSchema_registryId = (CreateSchema -> Maybe RegistryId)
-> (CreateSchema -> Maybe RegistryId -> CreateSchema)
-> Lens
     CreateSchema CreateSchema (Maybe RegistryId) (Maybe 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)

-- | An optional description of the schema. If description is not provided,
-- there will not be any automatic default value for this.
createSchema_description :: Lens.Lens' CreateSchema (Prelude.Maybe Prelude.Text)
createSchema_description :: (Maybe Text -> f (Maybe Text)) -> CreateSchema -> f CreateSchema
createSchema_description = (CreateSchema -> Maybe Text)
-> (CreateSchema -> Maybe Text -> CreateSchema)
-> Lens CreateSchema CreateSchema (Maybe Text) (Maybe Text)
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)

-- | The compatibility mode of the schema. The possible values are:
--
-- -   /NONE/: No compatibility mode applies. You can use this choice in
--     development scenarios or if you do not know the compatibility mode
--     that you want to apply to schemas. Any new version added will be
--     accepted without undergoing a compatibility check.
--
-- -   /DISABLED/: This compatibility choice prevents versioning for a
--     particular schema. You can use this choice to prevent future
--     versioning of a schema.
--
-- -   /BACKWARD/: This compatibility choice is recommended as it allows
--     data receivers to read both the current and one previous schema
--     version. This means that for instance, a new schema version cannot
--     drop data fields or change the type of these fields, so they can\'t
--     be read by readers using the previous version.
--
-- -   /BACKWARD_ALL/: This compatibility choice allows data receivers to
--     read both the current and all previous schema versions. You can use
--     this choice when you need to delete fields or add optional fields,
--     and check compatibility against all previous schema versions.
--
-- -   /FORWARD/: This compatibility choice allows data receivers to read
--     both the current and one next schema version, but not necessarily
--     later versions. You can use this choice when you need to add fields
--     or delete optional fields, but only check compatibility against the
--     last schema version.
--
-- -   /FORWARD_ALL/: This compatibility choice allows data receivers to
--     read written by producers of any new registered schema. You can use
--     this choice when you need to add fields or delete optional fields,
--     and check compatibility against all previous schema versions.
--
-- -   /FULL/: This compatibility choice allows data receivers to read data
--     written by producers using the previous or next version of the
--     schema, but not necessarily earlier or later versions. You can use
--     this choice when you need to add or remove optional fields, but only
--     check compatibility against the last schema version.
--
-- -   /FULL_ALL/: This compatibility choice allows data receivers to read
--     data written by producers using all previous schema versions. You
--     can use this choice when you need to add or remove optional fields,
--     and check compatibility against all previous schema versions.
createSchema_compatibility :: Lens.Lens' CreateSchema (Prelude.Maybe Compatibility)
createSchema_compatibility :: (Maybe Compatibility -> f (Maybe Compatibility))
-> CreateSchema -> f CreateSchema
createSchema_compatibility = (CreateSchema -> Maybe Compatibility)
-> (CreateSchema -> Maybe Compatibility -> CreateSchema)
-> Lens
     CreateSchema
     CreateSchema
     (Maybe Compatibility)
     (Maybe 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)

-- | Amazon Web Services tags that contain a key value pair and may be
-- searched by console, command line, or API. If specified, follows the
-- Amazon Web Services tags-on-create pattern.
createSchema_tags :: Lens.Lens' CreateSchema (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createSchema_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateSchema -> f CreateSchema
createSchema_tags = (CreateSchema -> Maybe (HashMap Text Text))
-> (CreateSchema -> Maybe (HashMap Text Text) -> CreateSchema)
-> Lens
     CreateSchema
     CreateSchema
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateSchema -> f CreateSchema)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateSchema
-> f CreateSchema
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Name of the schema to be created of max length of 255, and may only
-- contain letters, numbers, hyphen, underscore, dollar sign, or hash mark.
-- No whitespace.
createSchema_schemaName :: Lens.Lens' CreateSchema Prelude.Text
createSchema_schemaName :: (Text -> f Text) -> CreateSchema -> f CreateSchema
createSchema_schemaName = (CreateSchema -> Text)
-> (CreateSchema -> Text -> CreateSchema)
-> Lens CreateSchema CreateSchema Text Text
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)

-- | The data format of the schema definition. Currently @AVRO@ and @JSON@
-- are supported.
createSchema_dataFormat :: Lens.Lens' CreateSchema DataFormat
createSchema_dataFormat :: (DataFormat -> f DataFormat) -> CreateSchema -> f CreateSchema
createSchema_dataFormat = (CreateSchema -> DataFormat)
-> (CreateSchema -> DataFormat -> CreateSchema)
-> Lens CreateSchema CreateSchema DataFormat 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 :: CreateSchema -> Request CreateSchema
request = Service -> CreateSchema -> Request CreateSchema
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateSchema
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateSchema)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateSchema))
-> Logger
-> Service
-> Proxy CreateSchema
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateSchema)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe SchemaVersionStatus
-> Maybe Text
-> Maybe SchemaStatus
-> Maybe Text
-> Maybe Natural
-> Maybe DataFormat
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Compatibility
-> Maybe (HashMap Text Text)
-> Int
-> CreateSchemaResponse
CreateSchemaResponse'
            (Maybe SchemaVersionStatus
 -> Maybe Text
 -> Maybe SchemaStatus
 -> Maybe Text
 -> Maybe Natural
 -> Maybe DataFormat
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Compatibility
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateSchemaResponse)
-> Either String (Maybe SchemaVersionStatus)
-> Either
     String
     (Maybe Text
      -> Maybe SchemaStatus
      -> Maybe Text
      -> Maybe Natural
      -> Maybe DataFormat
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe SchemaVersionStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaVersionStatus")
            Either
  String
  (Maybe Text
   -> Maybe SchemaStatus
   -> Maybe Text
   -> Maybe Natural
   -> Maybe DataFormat
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe SchemaStatus
      -> Maybe Text
      -> Maybe Natural
      -> Maybe DataFormat
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RegistryName")
            Either
  String
  (Maybe SchemaStatus
   -> Maybe Text
   -> Maybe Natural
   -> Maybe DataFormat
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe SchemaStatus)
-> Either
     String
     (Maybe Text
      -> Maybe Natural
      -> Maybe DataFormat
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe SchemaStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaStatus")
            Either
  String
  (Maybe Text
   -> Maybe Natural
   -> Maybe DataFormat
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe DataFormat
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RegistryArn")
            Either
  String
  (Maybe Natural
   -> Maybe DataFormat
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe DataFormat
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LatestSchemaVersion")
            Either
  String
  (Maybe DataFormat
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe DataFormat)
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DataFormat)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DataFormat")
            Either
  String
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaCheckpoint")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaName")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaVersionId")
            Either
  String
  (Maybe Text
   -> Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SchemaArn")
            Either
  String
  (Maybe Natural
   -> Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Compatibility
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextSchemaVersion")
            Either
  String
  (Maybe Text
   -> Maybe Compatibility
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateSchemaResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Compatibility
      -> Maybe (HashMap Text Text) -> Int -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Description")
            Either
  String
  (Maybe Compatibility
   -> Maybe (HashMap Text Text) -> Int -> CreateSchemaResponse)
-> Either String (Maybe Compatibility)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Compatibility)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Compatibility")
            Either
  String (Maybe (HashMap Text Text) -> Int -> CreateSchemaResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateSchemaResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> CreateSchemaResponse)
-> Either String Int -> Either String CreateSchemaResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateSchema

instance Prelude.NFData CreateSchema

instance Core.ToHeaders CreateSchema where
  toHeaders :: CreateSchema -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateSchema -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"AWSGlue.CreateSchema" :: Prelude.ByteString),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.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)
compatibility :: Maybe Compatibility
description :: Maybe Text
registryId :: Maybe RegistryId
schemaDefinition :: Maybe Text
$sel:dataFormat:CreateSchema' :: CreateSchema -> DataFormat
$sel:schemaName:CreateSchema' :: CreateSchema -> Text
$sel:tags:CreateSchema' :: CreateSchema -> Maybe (HashMap Text Text)
$sel:compatibility:CreateSchema' :: CreateSchema -> Maybe Compatibility
$sel:description:CreateSchema' :: CreateSchema -> Maybe Text
$sel:registryId:CreateSchema' :: CreateSchema -> Maybe RegistryId
$sel:schemaDefinition:CreateSchema' :: CreateSchema -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SchemaDefinition" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
schemaDefinition,
            (Text
"RegistryId" Text -> RegistryId -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RegistryId -> Pair) -> Maybe RegistryId -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RegistryId
registryId,
            (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"Compatibility" Text -> Compatibility -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Compatibility -> Pair) -> Maybe Compatibility -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Compatibility
compatibility,
            (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SchemaName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
schemaName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DataFormat" Text -> DataFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DataFormat
dataFormat)
          ]
      )

instance Core.ToPath CreateSchema where
  toPath :: CreateSchema -> ByteString
toPath = ByteString -> CreateSchema -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery CreateSchema where
  toQuery :: CreateSchema -> QueryString
toQuery = QueryString -> CreateSchema -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateSchemaResponse' smart constructor.
data CreateSchemaResponse = CreateSchemaResponse'
  { -- | The status of the first schema version created.
    CreateSchemaResponse -> Maybe SchemaVersionStatus
schemaVersionStatus :: Prelude.Maybe SchemaVersionStatus,
    -- | The name of the registry.
    CreateSchemaResponse -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text,
    -- | The status of the schema.
    CreateSchemaResponse -> Maybe SchemaStatus
schemaStatus :: Prelude.Maybe SchemaStatus,
    -- | The Amazon Resource Name (ARN) of the registry.
    CreateSchemaResponse -> Maybe Text
registryArn :: Prelude.Maybe Prelude.Text,
    -- | The latest version of the schema associated with the returned schema
    -- definition.
    CreateSchemaResponse -> Maybe Natural
latestSchemaVersion :: Prelude.Maybe Prelude.Natural,
    -- | The data format of the schema definition. Currently @AVRO@ and @JSON@
    -- are supported.
    CreateSchemaResponse -> Maybe DataFormat
dataFormat :: Prelude.Maybe DataFormat,
    -- | The version number of the checkpoint (the last time the compatibility
    -- mode was changed).
    CreateSchemaResponse -> Maybe Natural
schemaCheckpoint :: Prelude.Maybe Prelude.Natural,
    -- | The name of the schema.
    CreateSchemaResponse -> Maybe Text
schemaName :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier of the first schema version.
    CreateSchemaResponse -> Maybe Text
schemaVersionId :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the schema.
    CreateSchemaResponse -> Maybe Text
schemaArn :: Prelude.Maybe Prelude.Text,
    -- | The next version of the schema associated with the returned schema
    -- definition.
    CreateSchemaResponse -> Maybe Natural
nextSchemaVersion :: Prelude.Maybe Prelude.Natural,
    -- | A description of the schema if specified when created.
    CreateSchemaResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The schema compatibility mode.
    CreateSchemaResponse -> Maybe Compatibility
compatibility :: Prelude.Maybe Compatibility,
    -- | The tags for the schema.
    CreateSchemaResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateSchemaResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateSchemaResponse -> CreateSchemaResponse -> Bool
(CreateSchemaResponse -> CreateSchemaResponse -> Bool)
-> (CreateSchemaResponse -> CreateSchemaResponse -> Bool)
-> Eq CreateSchemaResponse
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]
(Int -> ReadS CreateSchemaResponse)
-> ReadS [CreateSchemaResponse]
-> ReadPrec CreateSchemaResponse
-> ReadPrec [CreateSchemaResponse]
-> Read 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
(Int -> CreateSchemaResponse -> ShowS)
-> (CreateSchemaResponse -> String)
-> ([CreateSchemaResponse] -> ShowS)
-> Show CreateSchemaResponse
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. CreateSchemaResponse -> Rep CreateSchemaResponse x)
-> (forall x. Rep CreateSchemaResponse x -> CreateSchemaResponse)
-> Generic CreateSchemaResponse
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)

-- |
-- Create a value of 'CreateSchemaResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'schemaVersionStatus', 'createSchemaResponse_schemaVersionStatus' - The status of the first schema version created.
--
-- 'registryName', 'createSchemaResponse_registryName' - The name of the registry.
--
-- 'schemaStatus', 'createSchemaResponse_schemaStatus' - The status of the schema.
--
-- 'registryArn', 'createSchemaResponse_registryArn' - The Amazon Resource Name (ARN) of the registry.
--
-- 'latestSchemaVersion', 'createSchemaResponse_latestSchemaVersion' - The latest version of the schema associated with the returned schema
-- definition.
--
-- 'dataFormat', 'createSchemaResponse_dataFormat' - The data format of the schema definition. Currently @AVRO@ and @JSON@
-- are supported.
--
-- 'schemaCheckpoint', 'createSchemaResponse_schemaCheckpoint' - The version number of the checkpoint (the last time the compatibility
-- mode was changed).
--
-- 'schemaName', 'createSchemaResponse_schemaName' - The name of the schema.
--
-- 'schemaVersionId', 'createSchemaResponse_schemaVersionId' - The unique identifier of the first schema version.
--
-- 'schemaArn', 'createSchemaResponse_schemaArn' - The Amazon Resource Name (ARN) of the schema.
--
-- 'nextSchemaVersion', 'createSchemaResponse_nextSchemaVersion' - The next version of the schema associated with the returned schema
-- definition.
--
-- 'description', 'createSchemaResponse_description' - A description of the schema if specified when created.
--
-- 'compatibility', 'createSchemaResponse_compatibility' - The schema compatibility mode.
--
-- 'tags', 'createSchemaResponse_tags' - The tags for the schema.
--
-- 'httpStatus', 'createSchemaResponse_httpStatus' - The response's http status code.
newCreateSchemaResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateSchemaResponse
newCreateSchemaResponse :: Int -> CreateSchemaResponse
newCreateSchemaResponse Int
pHttpStatus_ =
  CreateSchemaResponse' :: Maybe SchemaVersionStatus
-> Maybe Text
-> Maybe SchemaStatus
-> Maybe Text
-> Maybe Natural
-> Maybe DataFormat
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Compatibility
-> Maybe (HashMap Text Text)
-> Int
-> CreateSchemaResponse
CreateSchemaResponse'
    { $sel:schemaVersionStatus:CreateSchemaResponse' :: Maybe SchemaVersionStatus
schemaVersionStatus =
        Maybe SchemaVersionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:registryName:CreateSchemaResponse' :: Maybe Text
registryName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaStatus:CreateSchemaResponse' :: Maybe SchemaStatus
schemaStatus = Maybe SchemaStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:registryArn:CreateSchemaResponse' :: Maybe Text
registryArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:latestSchemaVersion:CreateSchemaResponse' :: Maybe Natural
latestSchemaVersion = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:dataFormat:CreateSchemaResponse' :: Maybe DataFormat
dataFormat = Maybe DataFormat
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaCheckpoint:CreateSchemaResponse' :: Maybe Natural
schemaCheckpoint = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaName:CreateSchemaResponse' :: Maybe Text
schemaName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaVersionId:CreateSchemaResponse' :: Maybe Text
schemaVersionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaArn:CreateSchemaResponse' :: Maybe Text
schemaArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextSchemaVersion:CreateSchemaResponse' :: Maybe Natural
nextSchemaVersion = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateSchemaResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:compatibility:CreateSchemaResponse' :: Maybe Compatibility
compatibility = Maybe Compatibility
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateSchemaResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateSchemaResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the first schema version created.
createSchemaResponse_schemaVersionStatus :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe SchemaVersionStatus)
createSchemaResponse_schemaVersionStatus :: (Maybe SchemaVersionStatus -> f (Maybe SchemaVersionStatus))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_schemaVersionStatus = (CreateSchemaResponse -> Maybe SchemaVersionStatus)
-> (CreateSchemaResponse
    -> Maybe SchemaVersionStatus -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse
     CreateSchemaResponse
     (Maybe SchemaVersionStatus)
     (Maybe 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)

-- | The name of the registry.
createSchemaResponse_registryName :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_registryName :: (Maybe Text -> f (Maybe Text))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_registryName = (CreateSchemaResponse -> Maybe Text)
-> (CreateSchemaResponse -> Maybe Text -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse CreateSchemaResponse (Maybe Text) (Maybe Text)
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)

-- | The status of the schema.
createSchemaResponse_schemaStatus :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe SchemaStatus)
createSchemaResponse_schemaStatus :: (Maybe SchemaStatus -> f (Maybe SchemaStatus))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_schemaStatus = (CreateSchemaResponse -> Maybe SchemaStatus)
-> (CreateSchemaResponse
    -> Maybe SchemaStatus -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse
     CreateSchemaResponse
     (Maybe SchemaStatus)
     (Maybe 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)

-- | The Amazon Resource Name (ARN) of the registry.
createSchemaResponse_registryArn :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_registryArn :: (Maybe Text -> f (Maybe Text))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_registryArn = (CreateSchemaResponse -> Maybe Text)
-> (CreateSchemaResponse -> Maybe Text -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse CreateSchemaResponse (Maybe Text) (Maybe Text)
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)

-- | The latest version of the schema associated with the returned schema
-- definition.
createSchemaResponse_latestSchemaVersion :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Natural)
createSchemaResponse_latestSchemaVersion :: (Maybe Natural -> f (Maybe Natural))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_latestSchemaVersion = (CreateSchemaResponse -> Maybe Natural)
-> (CreateSchemaResponse -> Maybe Natural -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse
     CreateSchemaResponse
     (Maybe Natural)
     (Maybe Natural)
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)

-- | The data format of the schema definition. Currently @AVRO@ and @JSON@
-- are supported.
createSchemaResponse_dataFormat :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe DataFormat)
createSchemaResponse_dataFormat :: (Maybe DataFormat -> f (Maybe DataFormat))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_dataFormat = (CreateSchemaResponse -> Maybe DataFormat)
-> (CreateSchemaResponse
    -> Maybe DataFormat -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse
     CreateSchemaResponse
     (Maybe DataFormat)
     (Maybe 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)

-- | The version number of the checkpoint (the last time the compatibility
-- mode was changed).
createSchemaResponse_schemaCheckpoint :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Natural)
createSchemaResponse_schemaCheckpoint :: (Maybe Natural -> f (Maybe Natural))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_schemaCheckpoint = (CreateSchemaResponse -> Maybe Natural)
-> (CreateSchemaResponse -> Maybe Natural -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse
     CreateSchemaResponse
     (Maybe Natural)
     (Maybe Natural)
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)

-- | The name of the schema.
createSchemaResponse_schemaName :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_schemaName :: (Maybe Text -> f (Maybe Text))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_schemaName = (CreateSchemaResponse -> Maybe Text)
-> (CreateSchemaResponse -> Maybe Text -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse CreateSchemaResponse (Maybe Text) (Maybe Text)
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)

-- | The unique identifier of the first schema version.
createSchemaResponse_schemaVersionId :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_schemaVersionId :: (Maybe Text -> f (Maybe Text))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_schemaVersionId = (CreateSchemaResponse -> Maybe Text)
-> (CreateSchemaResponse -> Maybe Text -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse CreateSchemaResponse (Maybe Text) (Maybe Text)
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)

-- | The Amazon Resource Name (ARN) of the schema.
createSchemaResponse_schemaArn :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_schemaArn :: (Maybe Text -> f (Maybe Text))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_schemaArn = (CreateSchemaResponse -> Maybe Text)
-> (CreateSchemaResponse -> Maybe Text -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse CreateSchemaResponse (Maybe Text) (Maybe Text)
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)

-- | The next version of the schema associated with the returned schema
-- definition.
createSchemaResponse_nextSchemaVersion :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Natural)
createSchemaResponse_nextSchemaVersion :: (Maybe Natural -> f (Maybe Natural))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_nextSchemaVersion = (CreateSchemaResponse -> Maybe Natural)
-> (CreateSchemaResponse -> Maybe Natural -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse
     CreateSchemaResponse
     (Maybe Natural)
     (Maybe Natural)
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)

-- | A description of the schema if specified when created.
createSchemaResponse_description :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Prelude.Text)
createSchemaResponse_description :: (Maybe Text -> f (Maybe Text))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_description = (CreateSchemaResponse -> Maybe Text)
-> (CreateSchemaResponse -> Maybe Text -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse CreateSchemaResponse (Maybe Text) (Maybe Text)
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)

-- | The schema compatibility mode.
createSchemaResponse_compatibility :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe Compatibility)
createSchemaResponse_compatibility :: (Maybe Compatibility -> f (Maybe Compatibility))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_compatibility = (CreateSchemaResponse -> Maybe Compatibility)
-> (CreateSchemaResponse
    -> Maybe Compatibility -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse
     CreateSchemaResponse
     (Maybe Compatibility)
     (Maybe 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)

-- | The tags for the schema.
createSchemaResponse_tags :: Lens.Lens' CreateSchemaResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createSchemaResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_tags = (CreateSchemaResponse -> Maybe (HashMap Text Text))
-> (CreateSchemaResponse
    -> Maybe (HashMap Text Text) -> CreateSchemaResponse)
-> Lens
     CreateSchemaResponse
     CreateSchemaResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateSchemaResponse -> f CreateSchemaResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateSchemaResponse
-> f CreateSchemaResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
createSchemaResponse_httpStatus :: Lens.Lens' CreateSchemaResponse Prelude.Int
createSchemaResponse_httpStatus :: (Int -> f Int) -> CreateSchemaResponse -> f CreateSchemaResponse
createSchemaResponse_httpStatus = (CreateSchemaResponse -> Int)
-> (CreateSchemaResponse -> Int -> CreateSchemaResponse)
-> Lens CreateSchemaResponse CreateSchemaResponse Int Int
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