{-# 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.UpdateSchema
-- 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)
--
-- Updates the description, compatibility setting, or version checkpoint
-- for a schema set.
--
-- For updating the compatibility setting, the call will not validate
-- compatibility for the entire set of schema versions with the new
-- compatibility setting. If the value for @Compatibility@ is provided, the
-- @VersionNumber@ (a checkpoint) is also required. The API will validate
-- the checkpoint version number for consistency.
--
-- If the value for the @VersionNumber@ (checkpoint) is provided,
-- @Compatibility@ is optional and this can be used to set\/reset a
-- checkpoint for the schema.
--
-- This update will happen only if the schema is in the AVAILABLE state.
module Amazonka.Glue.UpdateSchema
  ( -- * Creating a Request
    UpdateSchema (..),
    newUpdateSchema,

    -- * Request Lenses
    updateSchema_schemaVersionNumber,
    updateSchema_description,
    updateSchema_compatibility,
    updateSchema_schemaId,

    -- * Destructuring the Response
    UpdateSchemaResponse (..),
    newUpdateSchemaResponse,

    -- * Response Lenses
    updateSchemaResponse_registryName,
    updateSchemaResponse_schemaName,
    updateSchemaResponse_schemaArn,
    updateSchemaResponse_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:/ 'newUpdateSchema' smart constructor.
data UpdateSchema = UpdateSchema'
  { -- | Version number required for check pointing. One of @VersionNumber@ or
    -- @Compatibility@ has to be provided.
    UpdateSchema -> Maybe SchemaVersionNumber
schemaVersionNumber :: Prelude.Maybe SchemaVersionNumber,
    -- | The new description for the schema.
    UpdateSchema -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The new compatibility setting for the schema.
    UpdateSchema -> Maybe Compatibility
compatibility :: Prelude.Maybe Compatibility,
    -- | This is a wrapper structure to contain schema identity fields. The
    -- structure contains:
    --
    -- -   SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema.
    --     One of @SchemaArn@ or @SchemaName@ has to be provided.
    --
    -- -   SchemaId$SchemaName: The name of the schema. One of @SchemaArn@ or
    --     @SchemaName@ has to be provided.
    UpdateSchema -> SchemaId
schemaId :: SchemaId
  }
  deriving (UpdateSchema -> UpdateSchema -> Bool
(UpdateSchema -> UpdateSchema -> Bool)
-> (UpdateSchema -> UpdateSchema -> Bool) -> Eq UpdateSchema
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSchema -> UpdateSchema -> Bool
$c/= :: UpdateSchema -> UpdateSchema -> Bool
== :: UpdateSchema -> UpdateSchema -> Bool
$c== :: UpdateSchema -> UpdateSchema -> Bool
Prelude.Eq, ReadPrec [UpdateSchema]
ReadPrec UpdateSchema
Int -> ReadS UpdateSchema
ReadS [UpdateSchema]
(Int -> ReadS UpdateSchema)
-> ReadS [UpdateSchema]
-> ReadPrec UpdateSchema
-> ReadPrec [UpdateSchema]
-> Read UpdateSchema
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSchema]
$creadListPrec :: ReadPrec [UpdateSchema]
readPrec :: ReadPrec UpdateSchema
$creadPrec :: ReadPrec UpdateSchema
readList :: ReadS [UpdateSchema]
$creadList :: ReadS [UpdateSchema]
readsPrec :: Int -> ReadS UpdateSchema
$creadsPrec :: Int -> ReadS UpdateSchema
Prelude.Read, Int -> UpdateSchema -> ShowS
[UpdateSchema] -> ShowS
UpdateSchema -> String
(Int -> UpdateSchema -> ShowS)
-> (UpdateSchema -> String)
-> ([UpdateSchema] -> ShowS)
-> Show UpdateSchema
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSchema] -> ShowS
$cshowList :: [UpdateSchema] -> ShowS
show :: UpdateSchema -> String
$cshow :: UpdateSchema -> String
showsPrec :: Int -> UpdateSchema -> ShowS
$cshowsPrec :: Int -> UpdateSchema -> ShowS
Prelude.Show, (forall x. UpdateSchema -> Rep UpdateSchema x)
-> (forall x. Rep UpdateSchema x -> UpdateSchema)
-> Generic UpdateSchema
forall x. Rep UpdateSchema x -> UpdateSchema
forall x. UpdateSchema -> Rep UpdateSchema x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSchema x -> UpdateSchema
$cfrom :: forall x. UpdateSchema -> Rep UpdateSchema x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSchema' 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:
--
-- 'schemaVersionNumber', 'updateSchema_schemaVersionNumber' - Version number required for check pointing. One of @VersionNumber@ or
-- @Compatibility@ has to be provided.
--
-- 'description', 'updateSchema_description' - The new description for the schema.
--
-- 'compatibility', 'updateSchema_compatibility' - The new compatibility setting for the schema.
--
-- 'schemaId', 'updateSchema_schemaId' - This is a wrapper structure to contain schema identity fields. The
-- structure contains:
--
-- -   SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema.
--     One of @SchemaArn@ or @SchemaName@ has to be provided.
--
-- -   SchemaId$SchemaName: The name of the schema. One of @SchemaArn@ or
--     @SchemaName@ has to be provided.
newUpdateSchema ::
  -- | 'schemaId'
  SchemaId ->
  UpdateSchema
newUpdateSchema :: SchemaId -> UpdateSchema
newUpdateSchema SchemaId
pSchemaId_ =
  UpdateSchema' :: Maybe SchemaVersionNumber
-> Maybe Text -> Maybe Compatibility -> SchemaId -> UpdateSchema
UpdateSchema'
    { $sel:schemaVersionNumber:UpdateSchema' :: Maybe SchemaVersionNumber
schemaVersionNumber =
        Maybe SchemaVersionNumber
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateSchema' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:compatibility:UpdateSchema' :: Maybe Compatibility
compatibility = Maybe Compatibility
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaId:UpdateSchema' :: SchemaId
schemaId = SchemaId
pSchemaId_
    }

-- | Version number required for check pointing. One of @VersionNumber@ or
-- @Compatibility@ has to be provided.
updateSchema_schemaVersionNumber :: Lens.Lens' UpdateSchema (Prelude.Maybe SchemaVersionNumber)
updateSchema_schemaVersionNumber :: (Maybe SchemaVersionNumber -> f (Maybe SchemaVersionNumber))
-> UpdateSchema -> f UpdateSchema
updateSchema_schemaVersionNumber = (UpdateSchema -> Maybe SchemaVersionNumber)
-> (UpdateSchema -> Maybe SchemaVersionNumber -> UpdateSchema)
-> Lens
     UpdateSchema
     UpdateSchema
     (Maybe SchemaVersionNumber)
     (Maybe SchemaVersionNumber)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSchema' {Maybe SchemaVersionNumber
schemaVersionNumber :: Maybe SchemaVersionNumber
$sel:schemaVersionNumber:UpdateSchema' :: UpdateSchema -> Maybe SchemaVersionNumber
schemaVersionNumber} -> Maybe SchemaVersionNumber
schemaVersionNumber) (\s :: UpdateSchema
s@UpdateSchema' {} Maybe SchemaVersionNumber
a -> UpdateSchema
s {$sel:schemaVersionNumber:UpdateSchema' :: Maybe SchemaVersionNumber
schemaVersionNumber = Maybe SchemaVersionNumber
a} :: UpdateSchema)

-- | The new description for the schema.
updateSchema_description :: Lens.Lens' UpdateSchema (Prelude.Maybe Prelude.Text)
updateSchema_description :: (Maybe Text -> f (Maybe Text)) -> UpdateSchema -> f UpdateSchema
updateSchema_description = (UpdateSchema -> Maybe Text)
-> (UpdateSchema -> Maybe Text -> UpdateSchema)
-> Lens UpdateSchema UpdateSchema (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSchema' {Maybe Text
description :: Maybe Text
$sel:description:UpdateSchema' :: UpdateSchema -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateSchema
s@UpdateSchema' {} Maybe Text
a -> UpdateSchema
s {$sel:description:UpdateSchema' :: Maybe Text
description = Maybe Text
a} :: UpdateSchema)

-- | The new compatibility setting for the schema.
updateSchema_compatibility :: Lens.Lens' UpdateSchema (Prelude.Maybe Compatibility)
updateSchema_compatibility :: (Maybe Compatibility -> f (Maybe Compatibility))
-> UpdateSchema -> f UpdateSchema
updateSchema_compatibility = (UpdateSchema -> Maybe Compatibility)
-> (UpdateSchema -> Maybe Compatibility -> UpdateSchema)
-> Lens
     UpdateSchema
     UpdateSchema
     (Maybe Compatibility)
     (Maybe Compatibility)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSchema' {Maybe Compatibility
compatibility :: Maybe Compatibility
$sel:compatibility:UpdateSchema' :: UpdateSchema -> Maybe Compatibility
compatibility} -> Maybe Compatibility
compatibility) (\s :: UpdateSchema
s@UpdateSchema' {} Maybe Compatibility
a -> UpdateSchema
s {$sel:compatibility:UpdateSchema' :: Maybe Compatibility
compatibility = Maybe Compatibility
a} :: UpdateSchema)

-- | This is a wrapper structure to contain schema identity fields. The
-- structure contains:
--
-- -   SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema.
--     One of @SchemaArn@ or @SchemaName@ has to be provided.
--
-- -   SchemaId$SchemaName: The name of the schema. One of @SchemaArn@ or
--     @SchemaName@ has to be provided.
updateSchema_schemaId :: Lens.Lens' UpdateSchema SchemaId
updateSchema_schemaId :: (SchemaId -> f SchemaId) -> UpdateSchema -> f UpdateSchema
updateSchema_schemaId = (UpdateSchema -> SchemaId)
-> (UpdateSchema -> SchemaId -> UpdateSchema)
-> Lens UpdateSchema UpdateSchema SchemaId SchemaId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSchema' {SchemaId
schemaId :: SchemaId
$sel:schemaId:UpdateSchema' :: UpdateSchema -> SchemaId
schemaId} -> SchemaId
schemaId) (\s :: UpdateSchema
s@UpdateSchema' {} SchemaId
a -> UpdateSchema
s {$sel:schemaId:UpdateSchema' :: SchemaId
schemaId = SchemaId
a} :: UpdateSchema)

instance Core.AWSRequest UpdateSchema where
  type AWSResponse UpdateSchema = UpdateSchemaResponse
  request :: UpdateSchema -> Request UpdateSchema
request = Service -> UpdateSchema -> Request UpdateSchema
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateSchema
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateSchema)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateSchema))
-> Logger
-> Service
-> Proxy UpdateSchema
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateSchema)))
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 Text
-> Maybe Text -> Maybe Text -> Int -> UpdateSchemaResponse
UpdateSchemaResponse'
            (Maybe Text
 -> Maybe Text -> Maybe Text -> Int -> UpdateSchemaResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> UpdateSchemaResponse)
forall (f :: * -> *) a b. Functor 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 Text -> Maybe Text -> Int -> UpdateSchemaResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> UpdateSchemaResponse)
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 -> Int -> UpdateSchemaResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateSchemaResponse)
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 (Int -> UpdateSchemaResponse)
-> Either String Int -> Either String UpdateSchemaResponse
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 UpdateSchema

instance Prelude.NFData UpdateSchema

instance Core.ToHeaders UpdateSchema where
  toHeaders :: UpdateSchema -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateSchema -> 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.UpdateSchema" :: 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 UpdateSchema where
  toJSON :: UpdateSchema -> Value
toJSON UpdateSchema' {Maybe Text
Maybe Compatibility
Maybe SchemaVersionNumber
SchemaId
schemaId :: SchemaId
compatibility :: Maybe Compatibility
description :: Maybe Text
schemaVersionNumber :: Maybe SchemaVersionNumber
$sel:schemaId:UpdateSchema' :: UpdateSchema -> SchemaId
$sel:compatibility:UpdateSchema' :: UpdateSchema -> Maybe Compatibility
$sel:description:UpdateSchema' :: UpdateSchema -> Maybe Text
$sel:schemaVersionNumber:UpdateSchema' :: UpdateSchema -> Maybe SchemaVersionNumber
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SchemaVersionNumber" Text -> SchemaVersionNumber -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SchemaVersionNumber -> Pair)
-> Maybe SchemaVersionNumber -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaVersionNumber
schemaVersionNumber,
            (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SchemaId" Text -> SchemaId -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= SchemaId
schemaId)
          ]
      )

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

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

-- | /See:/ 'newUpdateSchemaResponse' smart constructor.
data UpdateSchemaResponse = UpdateSchemaResponse'
  { -- | The name of the registry that contains the schema.
    UpdateSchemaResponse -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text,
    -- | The name of the schema.
    UpdateSchemaResponse -> Maybe Text
schemaName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the schema.
    UpdateSchemaResponse -> Maybe Text
schemaArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateSchemaResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateSchemaResponse -> UpdateSchemaResponse -> Bool
(UpdateSchemaResponse -> UpdateSchemaResponse -> Bool)
-> (UpdateSchemaResponse -> UpdateSchemaResponse -> Bool)
-> Eq UpdateSchemaResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateSchemaResponse -> UpdateSchemaResponse -> Bool
$c/= :: UpdateSchemaResponse -> UpdateSchemaResponse -> Bool
== :: UpdateSchemaResponse -> UpdateSchemaResponse -> Bool
$c== :: UpdateSchemaResponse -> UpdateSchemaResponse -> Bool
Prelude.Eq, ReadPrec [UpdateSchemaResponse]
ReadPrec UpdateSchemaResponse
Int -> ReadS UpdateSchemaResponse
ReadS [UpdateSchemaResponse]
(Int -> ReadS UpdateSchemaResponse)
-> ReadS [UpdateSchemaResponse]
-> ReadPrec UpdateSchemaResponse
-> ReadPrec [UpdateSchemaResponse]
-> Read UpdateSchemaResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateSchemaResponse]
$creadListPrec :: ReadPrec [UpdateSchemaResponse]
readPrec :: ReadPrec UpdateSchemaResponse
$creadPrec :: ReadPrec UpdateSchemaResponse
readList :: ReadS [UpdateSchemaResponse]
$creadList :: ReadS [UpdateSchemaResponse]
readsPrec :: Int -> ReadS UpdateSchemaResponse
$creadsPrec :: Int -> ReadS UpdateSchemaResponse
Prelude.Read, Int -> UpdateSchemaResponse -> ShowS
[UpdateSchemaResponse] -> ShowS
UpdateSchemaResponse -> String
(Int -> UpdateSchemaResponse -> ShowS)
-> (UpdateSchemaResponse -> String)
-> ([UpdateSchemaResponse] -> ShowS)
-> Show UpdateSchemaResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateSchemaResponse] -> ShowS
$cshowList :: [UpdateSchemaResponse] -> ShowS
show :: UpdateSchemaResponse -> String
$cshow :: UpdateSchemaResponse -> String
showsPrec :: Int -> UpdateSchemaResponse -> ShowS
$cshowsPrec :: Int -> UpdateSchemaResponse -> ShowS
Prelude.Show, (forall x. UpdateSchemaResponse -> Rep UpdateSchemaResponse x)
-> (forall x. Rep UpdateSchemaResponse x -> UpdateSchemaResponse)
-> Generic UpdateSchemaResponse
forall x. Rep UpdateSchemaResponse x -> UpdateSchemaResponse
forall x. UpdateSchemaResponse -> Rep UpdateSchemaResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateSchemaResponse x -> UpdateSchemaResponse
$cfrom :: forall x. UpdateSchemaResponse -> Rep UpdateSchemaResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateSchemaResponse' 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:
--
-- 'registryName', 'updateSchemaResponse_registryName' - The name of the registry that contains the schema.
--
-- 'schemaName', 'updateSchemaResponse_schemaName' - The name of the schema.
--
-- 'schemaArn', 'updateSchemaResponse_schemaArn' - The Amazon Resource Name (ARN) of the schema.
--
-- 'httpStatus', 'updateSchemaResponse_httpStatus' - The response's http status code.
newUpdateSchemaResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateSchemaResponse
newUpdateSchemaResponse :: Int -> UpdateSchemaResponse
newUpdateSchemaResponse Int
pHttpStatus_ =
  UpdateSchemaResponse' :: Maybe Text
-> Maybe Text -> Maybe Text -> Int -> UpdateSchemaResponse
UpdateSchemaResponse'
    { $sel:registryName:UpdateSchemaResponse' :: Maybe Text
registryName =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaName:UpdateSchemaResponse' :: Maybe Text
schemaName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:schemaArn:UpdateSchemaResponse' :: Maybe Text
schemaArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateSchemaResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the registry that contains the schema.
updateSchemaResponse_registryName :: Lens.Lens' UpdateSchemaResponse (Prelude.Maybe Prelude.Text)
updateSchemaResponse_registryName :: (Maybe Text -> f (Maybe Text))
-> UpdateSchemaResponse -> f UpdateSchemaResponse
updateSchemaResponse_registryName = (UpdateSchemaResponse -> Maybe Text)
-> (UpdateSchemaResponse -> Maybe Text -> UpdateSchemaResponse)
-> Lens
     UpdateSchemaResponse UpdateSchemaResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSchemaResponse' {Maybe Text
registryName :: Maybe Text
$sel:registryName:UpdateSchemaResponse' :: UpdateSchemaResponse -> Maybe Text
registryName} -> Maybe Text
registryName) (\s :: UpdateSchemaResponse
s@UpdateSchemaResponse' {} Maybe Text
a -> UpdateSchemaResponse
s {$sel:registryName:UpdateSchemaResponse' :: Maybe Text
registryName = Maybe Text
a} :: UpdateSchemaResponse)

-- | The name of the schema.
updateSchemaResponse_schemaName :: Lens.Lens' UpdateSchemaResponse (Prelude.Maybe Prelude.Text)
updateSchemaResponse_schemaName :: (Maybe Text -> f (Maybe Text))
-> UpdateSchemaResponse -> f UpdateSchemaResponse
updateSchemaResponse_schemaName = (UpdateSchemaResponse -> Maybe Text)
-> (UpdateSchemaResponse -> Maybe Text -> UpdateSchemaResponse)
-> Lens
     UpdateSchemaResponse UpdateSchemaResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSchemaResponse' {Maybe Text
schemaName :: Maybe Text
$sel:schemaName:UpdateSchemaResponse' :: UpdateSchemaResponse -> Maybe Text
schemaName} -> Maybe Text
schemaName) (\s :: UpdateSchemaResponse
s@UpdateSchemaResponse' {} Maybe Text
a -> UpdateSchemaResponse
s {$sel:schemaName:UpdateSchemaResponse' :: Maybe Text
schemaName = Maybe Text
a} :: UpdateSchemaResponse)

-- | The Amazon Resource Name (ARN) of the schema.
updateSchemaResponse_schemaArn :: Lens.Lens' UpdateSchemaResponse (Prelude.Maybe Prelude.Text)
updateSchemaResponse_schemaArn :: (Maybe Text -> f (Maybe Text))
-> UpdateSchemaResponse -> f UpdateSchemaResponse
updateSchemaResponse_schemaArn = (UpdateSchemaResponse -> Maybe Text)
-> (UpdateSchemaResponse -> Maybe Text -> UpdateSchemaResponse)
-> Lens
     UpdateSchemaResponse UpdateSchemaResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSchemaResponse' {Maybe Text
schemaArn :: Maybe Text
$sel:schemaArn:UpdateSchemaResponse' :: UpdateSchemaResponse -> Maybe Text
schemaArn} -> Maybe Text
schemaArn) (\s :: UpdateSchemaResponse
s@UpdateSchemaResponse' {} Maybe Text
a -> UpdateSchemaResponse
s {$sel:schemaArn:UpdateSchemaResponse' :: Maybe Text
schemaArn = Maybe Text
a} :: UpdateSchemaResponse)

-- | The response's http status code.
updateSchemaResponse_httpStatus :: Lens.Lens' UpdateSchemaResponse Prelude.Int
updateSchemaResponse_httpStatus :: (Int -> f Int) -> UpdateSchemaResponse -> f UpdateSchemaResponse
updateSchemaResponse_httpStatus = (UpdateSchemaResponse -> Int)
-> (UpdateSchemaResponse -> Int -> UpdateSchemaResponse)
-> Lens UpdateSchemaResponse UpdateSchemaResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateSchemaResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateSchemaResponse' :: UpdateSchemaResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateSchemaResponse
s@UpdateSchemaResponse' {} Int
a -> UpdateSchemaResponse
s {$sel:httpStatus:UpdateSchemaResponse' :: Int
httpStatus = Int
a} :: UpdateSchemaResponse)

instance Prelude.NFData UpdateSchemaResponse