{-# 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.GetSchema
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified schema in detail.
module Amazonka.Glue.GetSchema
  ( -- * Creating a Request
    GetSchema (..),
    newGetSchema,

    -- * Request Lenses
    getSchema_schemaId,

    -- * Destructuring the Response
    GetSchemaResponse (..),
    newGetSchemaResponse,

    -- * Response Lenses
    getSchemaResponse_compatibility,
    getSchemaResponse_createdTime,
    getSchemaResponse_dataFormat,
    getSchemaResponse_description,
    getSchemaResponse_latestSchemaVersion,
    getSchemaResponse_nextSchemaVersion,
    getSchemaResponse_registryArn,
    getSchemaResponse_registryName,
    getSchemaResponse_schemaArn,
    getSchemaResponse_schemaCheckpoint,
    getSchemaResponse_schemaName,
    getSchemaResponse_schemaStatus,
    getSchemaResponse_updatedTime,
    getSchemaResponse_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

-- | /See:/ 'newGetSchema' smart constructor.
data GetSchema = GetSchema'
  { -- | This is a wrapper structure to contain schema identity fields. The
    -- structure contains:
    --
    -- -   SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema.
    --     Either @SchemaArn@ or @SchemaName@ and @RegistryName@ has to be
    --     provided.
    --
    -- -   SchemaId$SchemaName: The name of the schema. Either @SchemaArn@ or
    --     @SchemaName@ and @RegistryName@ has to be provided.
    GetSchema -> SchemaId
schemaId :: SchemaId
  }
  deriving (GetSchema -> GetSchema -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSchema -> GetSchema -> Bool
$c/= :: GetSchema -> GetSchema -> Bool
== :: GetSchema -> GetSchema -> Bool
$c== :: GetSchema -> GetSchema -> Bool
Prelude.Eq, ReadPrec [GetSchema]
ReadPrec GetSchema
Int -> ReadS GetSchema
ReadS [GetSchema]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSchema]
$creadListPrec :: ReadPrec [GetSchema]
readPrec :: ReadPrec GetSchema
$creadPrec :: ReadPrec GetSchema
readList :: ReadS [GetSchema]
$creadList :: ReadS [GetSchema]
readsPrec :: Int -> ReadS GetSchema
$creadsPrec :: Int -> ReadS GetSchema
Prelude.Read, Int -> GetSchema -> ShowS
[GetSchema] -> ShowS
GetSchema -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSchema] -> ShowS
$cshowList :: [GetSchema] -> ShowS
show :: GetSchema -> String
$cshow :: GetSchema -> String
showsPrec :: Int -> GetSchema -> ShowS
$cshowsPrec :: Int -> GetSchema -> ShowS
Prelude.Show, forall x. Rep GetSchema x -> GetSchema
forall x. GetSchema -> Rep GetSchema x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSchema x -> GetSchema
$cfrom :: forall x. GetSchema -> Rep GetSchema x
Prelude.Generic)

-- |
-- Create a value of 'GetSchema' 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:
--
-- 'schemaId', 'getSchema_schemaId' - This is a wrapper structure to contain schema identity fields. The
-- structure contains:
--
-- -   SchemaId$SchemaArn: The Amazon Resource Name (ARN) of the schema.
--     Either @SchemaArn@ or @SchemaName@ and @RegistryName@ has to be
--     provided.
--
-- -   SchemaId$SchemaName: The name of the schema. Either @SchemaArn@ or
--     @SchemaName@ and @RegistryName@ has to be provided.
newGetSchema ::
  -- | 'schemaId'
  SchemaId ->
  GetSchema
newGetSchema :: SchemaId -> GetSchema
newGetSchema SchemaId
pSchemaId_ =
  GetSchema' {$sel:schemaId:GetSchema' :: SchemaId
schemaId = SchemaId
pSchemaId_}

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

instance Core.AWSRequest GetSchema where
  type AWSResponse GetSchema = GetSchemaResponse
  request :: (Service -> Service) -> GetSchema -> Request GetSchema
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 GetSchema
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetSchema)))
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 Text
-> Maybe DataFormat
-> Maybe Text
-> Maybe Natural
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe SchemaStatus
-> Maybe Text
-> Int
-> GetSchemaResponse
GetSchemaResponse'
            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
"CreatedTime")
            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
"UpdatedTime")
            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 GetSchema where
  hashWithSalt :: Int -> GetSchema -> Int
hashWithSalt Int
_salt GetSchema' {SchemaId
schemaId :: SchemaId
$sel:schemaId:GetSchema' :: GetSchema -> SchemaId
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SchemaId
schemaId

instance Prelude.NFData GetSchema where
  rnf :: GetSchema -> ()
rnf GetSchema' {SchemaId
schemaId :: SchemaId
$sel:schemaId:GetSchema' :: GetSchema -> SchemaId
..} = forall a. NFData a => a -> ()
Prelude.rnf SchemaId
schemaId

instance Data.ToHeaders GetSchema where
  toHeaders :: GetSchema -> 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.GetSchema" :: 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 GetSchema where
  toJSON :: GetSchema -> Value
toJSON GetSchema' {SchemaId
schemaId :: SchemaId
$sel:schemaId:GetSchema' :: GetSchema -> SchemaId
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [forall a. a -> Maybe a
Prelude.Just (Key
"SchemaId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= SchemaId
schemaId)]
      )

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

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

-- | /See:/ 'newGetSchemaResponse' smart constructor.
data GetSchemaResponse = GetSchemaResponse'
  { -- | The compatibility mode of the schema.
    GetSchemaResponse -> Maybe Compatibility
compatibility :: Prelude.Maybe Compatibility,
    -- | The date and time the schema was created.
    GetSchemaResponse -> Maybe Text
createdTime :: Prelude.Maybe Prelude.Text,
    -- | The data format of the schema definition. Currently @AVRO@, @JSON@ and
    -- @PROTOBUF@ are supported.
    GetSchemaResponse -> Maybe DataFormat
dataFormat :: Prelude.Maybe DataFormat,
    -- | A description of schema if specified when created
    GetSchemaResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The latest version of the schema associated with the returned schema
    -- definition.
    GetSchemaResponse -> Maybe Natural
latestSchemaVersion :: Prelude.Maybe Prelude.Natural,
    -- | The next version of the schema associated with the returned schema
    -- definition.
    GetSchemaResponse -> Maybe Natural
nextSchemaVersion :: Prelude.Maybe Prelude.Natural,
    -- | The Amazon Resource Name (ARN) of the registry.
    GetSchemaResponse -> Maybe Text
registryArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the registry.
    GetSchemaResponse -> Maybe Text
registryName :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the schema.
    GetSchemaResponse -> Maybe Text
schemaArn :: Prelude.Maybe Prelude.Text,
    -- | The version number of the checkpoint (the last time the compatibility
    -- mode was changed).
    GetSchemaResponse -> Maybe Natural
schemaCheckpoint :: Prelude.Maybe Prelude.Natural,
    -- | The name of the schema.
    GetSchemaResponse -> Maybe Text
schemaName :: Prelude.Maybe Prelude.Text,
    -- | The status of the schema.
    GetSchemaResponse -> Maybe SchemaStatus
schemaStatus :: Prelude.Maybe SchemaStatus,
    -- | The date and time the schema was updated.
    GetSchemaResponse -> Maybe Text
updatedTime :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetSchemaResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetSchemaResponse -> GetSchemaResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSchemaResponse -> GetSchemaResponse -> Bool
$c/= :: GetSchemaResponse -> GetSchemaResponse -> Bool
== :: GetSchemaResponse -> GetSchemaResponse -> Bool
$c== :: GetSchemaResponse -> GetSchemaResponse -> Bool
Prelude.Eq, ReadPrec [GetSchemaResponse]
ReadPrec GetSchemaResponse
Int -> ReadS GetSchemaResponse
ReadS [GetSchemaResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSchemaResponse]
$creadListPrec :: ReadPrec [GetSchemaResponse]
readPrec :: ReadPrec GetSchemaResponse
$creadPrec :: ReadPrec GetSchemaResponse
readList :: ReadS [GetSchemaResponse]
$creadList :: ReadS [GetSchemaResponse]
readsPrec :: Int -> ReadS GetSchemaResponse
$creadsPrec :: Int -> ReadS GetSchemaResponse
Prelude.Read, Int -> GetSchemaResponse -> ShowS
[GetSchemaResponse] -> ShowS
GetSchemaResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSchemaResponse] -> ShowS
$cshowList :: [GetSchemaResponse] -> ShowS
show :: GetSchemaResponse -> String
$cshow :: GetSchemaResponse -> String
showsPrec :: Int -> GetSchemaResponse -> ShowS
$cshowsPrec :: Int -> GetSchemaResponse -> ShowS
Prelude.Show, forall x. Rep GetSchemaResponse x -> GetSchemaResponse
forall x. GetSchemaResponse -> Rep GetSchemaResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSchemaResponse x -> GetSchemaResponse
$cfrom :: forall x. GetSchemaResponse -> Rep GetSchemaResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetSchemaResponse' 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:
--
-- 'compatibility', 'getSchemaResponse_compatibility' - The compatibility mode of the schema.
--
-- 'createdTime', 'getSchemaResponse_createdTime' - The date and time the schema was created.
--
-- 'dataFormat', 'getSchemaResponse_dataFormat' - The data format of the schema definition. Currently @AVRO@, @JSON@ and
-- @PROTOBUF@ are supported.
--
-- 'description', 'getSchemaResponse_description' - A description of schema if specified when created
--
-- 'latestSchemaVersion', 'getSchemaResponse_latestSchemaVersion' - The latest version of the schema associated with the returned schema
-- definition.
--
-- 'nextSchemaVersion', 'getSchemaResponse_nextSchemaVersion' - The next version of the schema associated with the returned schema
-- definition.
--
-- 'registryArn', 'getSchemaResponse_registryArn' - The Amazon Resource Name (ARN) of the registry.
--
-- 'registryName', 'getSchemaResponse_registryName' - The name of the registry.
--
-- 'schemaArn', 'getSchemaResponse_schemaArn' - The Amazon Resource Name (ARN) of the schema.
--
-- 'schemaCheckpoint', 'getSchemaResponse_schemaCheckpoint' - The version number of the checkpoint (the last time the compatibility
-- mode was changed).
--
-- 'schemaName', 'getSchemaResponse_schemaName' - The name of the schema.
--
-- 'schemaStatus', 'getSchemaResponse_schemaStatus' - The status of the schema.
--
-- 'updatedTime', 'getSchemaResponse_updatedTime' - The date and time the schema was updated.
--
-- 'httpStatus', 'getSchemaResponse_httpStatus' - The response's http status code.
newGetSchemaResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetSchemaResponse
newGetSchemaResponse :: Int -> GetSchemaResponse
newGetSchemaResponse Int
pHttpStatus_ =
  GetSchemaResponse'
    { $sel:compatibility:GetSchemaResponse' :: Maybe Compatibility
compatibility = forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:GetSchemaResponse' :: Maybe Text
createdTime = forall a. Maybe a
Prelude.Nothing,
      $sel:dataFormat:GetSchemaResponse' :: Maybe DataFormat
dataFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetSchemaResponse' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:latestSchemaVersion:GetSchemaResponse' :: Maybe Natural
latestSchemaVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:nextSchemaVersion:GetSchemaResponse' :: Maybe Natural
nextSchemaVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:registryArn:GetSchemaResponse' :: Maybe Text
registryArn = forall a. Maybe a
Prelude.Nothing,
      $sel:registryName:GetSchemaResponse' :: Maybe Text
registryName = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaArn:GetSchemaResponse' :: Maybe Text
schemaArn = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaCheckpoint:GetSchemaResponse' :: Maybe Natural
schemaCheckpoint = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaName:GetSchemaResponse' :: Maybe Text
schemaName = forall a. Maybe a
Prelude.Nothing,
      $sel:schemaStatus:GetSchemaResponse' :: Maybe SchemaStatus
schemaStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedTime:GetSchemaResponse' :: Maybe Text
updatedTime = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetSchemaResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The compatibility mode of the schema.
getSchemaResponse_compatibility :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Compatibility)
getSchemaResponse_compatibility :: Lens' GetSchemaResponse (Maybe Compatibility)
getSchemaResponse_compatibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Compatibility
compatibility :: Maybe Compatibility
$sel:compatibility:GetSchemaResponse' :: GetSchemaResponse -> Maybe Compatibility
compatibility} -> Maybe Compatibility
compatibility) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Compatibility
a -> GetSchemaResponse
s {$sel:compatibility:GetSchemaResponse' :: Maybe Compatibility
compatibility = Maybe Compatibility
a} :: GetSchemaResponse)

-- | The date and time the schema was created.
getSchemaResponse_createdTime :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Prelude.Text)
getSchemaResponse_createdTime :: Lens' GetSchemaResponse (Maybe Text)
getSchemaResponse_createdTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Text
createdTime :: Maybe Text
$sel:createdTime:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
createdTime} -> Maybe Text
createdTime) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Text
a -> GetSchemaResponse
s {$sel:createdTime:GetSchemaResponse' :: Maybe Text
createdTime = Maybe Text
a} :: GetSchemaResponse)

-- | The data format of the schema definition. Currently @AVRO@, @JSON@ and
-- @PROTOBUF@ are supported.
getSchemaResponse_dataFormat :: Lens.Lens' GetSchemaResponse (Prelude.Maybe DataFormat)
getSchemaResponse_dataFormat :: Lens' GetSchemaResponse (Maybe DataFormat)
getSchemaResponse_dataFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe DataFormat
dataFormat :: Maybe DataFormat
$sel:dataFormat:GetSchemaResponse' :: GetSchemaResponse -> Maybe DataFormat
dataFormat} -> Maybe DataFormat
dataFormat) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe DataFormat
a -> GetSchemaResponse
s {$sel:dataFormat:GetSchemaResponse' :: Maybe DataFormat
dataFormat = Maybe DataFormat
a} :: GetSchemaResponse)

-- | A description of schema if specified when created
getSchemaResponse_description :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Prelude.Text)
getSchemaResponse_description :: Lens' GetSchemaResponse (Maybe Text)
getSchemaResponse_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Text
a -> GetSchemaResponse
s {$sel:description:GetSchemaResponse' :: Maybe Text
description = Maybe Text
a} :: GetSchemaResponse)

-- | The latest version of the schema associated with the returned schema
-- definition.
getSchemaResponse_latestSchemaVersion :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Prelude.Natural)
getSchemaResponse_latestSchemaVersion :: Lens' GetSchemaResponse (Maybe Natural)
getSchemaResponse_latestSchemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Natural
latestSchemaVersion :: Maybe Natural
$sel:latestSchemaVersion:GetSchemaResponse' :: GetSchemaResponse -> Maybe Natural
latestSchemaVersion} -> Maybe Natural
latestSchemaVersion) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Natural
a -> GetSchemaResponse
s {$sel:latestSchemaVersion:GetSchemaResponse' :: Maybe Natural
latestSchemaVersion = Maybe Natural
a} :: GetSchemaResponse)

-- | The next version of the schema associated with the returned schema
-- definition.
getSchemaResponse_nextSchemaVersion :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Prelude.Natural)
getSchemaResponse_nextSchemaVersion :: Lens' GetSchemaResponse (Maybe Natural)
getSchemaResponse_nextSchemaVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Natural
nextSchemaVersion :: Maybe Natural
$sel:nextSchemaVersion:GetSchemaResponse' :: GetSchemaResponse -> Maybe Natural
nextSchemaVersion} -> Maybe Natural
nextSchemaVersion) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Natural
a -> GetSchemaResponse
s {$sel:nextSchemaVersion:GetSchemaResponse' :: Maybe Natural
nextSchemaVersion = Maybe Natural
a} :: GetSchemaResponse)

-- | The Amazon Resource Name (ARN) of the registry.
getSchemaResponse_registryArn :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Prelude.Text)
getSchemaResponse_registryArn :: Lens' GetSchemaResponse (Maybe Text)
getSchemaResponse_registryArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Text
registryArn :: Maybe Text
$sel:registryArn:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
registryArn} -> Maybe Text
registryArn) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Text
a -> GetSchemaResponse
s {$sel:registryArn:GetSchemaResponse' :: Maybe Text
registryArn = Maybe Text
a} :: GetSchemaResponse)

-- | The name of the registry.
getSchemaResponse_registryName :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Prelude.Text)
getSchemaResponse_registryName :: Lens' GetSchemaResponse (Maybe Text)
getSchemaResponse_registryName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Text
registryName :: Maybe Text
$sel:registryName:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
registryName} -> Maybe Text
registryName) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Text
a -> GetSchemaResponse
s {$sel:registryName:GetSchemaResponse' :: Maybe Text
registryName = Maybe Text
a} :: GetSchemaResponse)

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

-- | The version number of the checkpoint (the last time the compatibility
-- mode was changed).
getSchemaResponse_schemaCheckpoint :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Prelude.Natural)
getSchemaResponse_schemaCheckpoint :: Lens' GetSchemaResponse (Maybe Natural)
getSchemaResponse_schemaCheckpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Natural
schemaCheckpoint :: Maybe Natural
$sel:schemaCheckpoint:GetSchemaResponse' :: GetSchemaResponse -> Maybe Natural
schemaCheckpoint} -> Maybe Natural
schemaCheckpoint) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Natural
a -> GetSchemaResponse
s {$sel:schemaCheckpoint:GetSchemaResponse' :: Maybe Natural
schemaCheckpoint = Maybe Natural
a} :: GetSchemaResponse)

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

-- | The status of the schema.
getSchemaResponse_schemaStatus :: Lens.Lens' GetSchemaResponse (Prelude.Maybe SchemaStatus)
getSchemaResponse_schemaStatus :: Lens' GetSchemaResponse (Maybe SchemaStatus)
getSchemaResponse_schemaStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe SchemaStatus
schemaStatus :: Maybe SchemaStatus
$sel:schemaStatus:GetSchemaResponse' :: GetSchemaResponse -> Maybe SchemaStatus
schemaStatus} -> Maybe SchemaStatus
schemaStatus) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe SchemaStatus
a -> GetSchemaResponse
s {$sel:schemaStatus:GetSchemaResponse' :: Maybe SchemaStatus
schemaStatus = Maybe SchemaStatus
a} :: GetSchemaResponse)

-- | The date and time the schema was updated.
getSchemaResponse_updatedTime :: Lens.Lens' GetSchemaResponse (Prelude.Maybe Prelude.Text)
getSchemaResponse_updatedTime :: Lens' GetSchemaResponse (Maybe Text)
getSchemaResponse_updatedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSchemaResponse' {Maybe Text
updatedTime :: Maybe Text
$sel:updatedTime:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
updatedTime} -> Maybe Text
updatedTime) (\s :: GetSchemaResponse
s@GetSchemaResponse' {} Maybe Text
a -> GetSchemaResponse
s {$sel:updatedTime:GetSchemaResponse' :: Maybe Text
updatedTime = Maybe Text
a} :: GetSchemaResponse)

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

instance Prelude.NFData GetSchemaResponse where
  rnf :: GetSchemaResponse -> ()
rnf GetSchemaResponse' {Int
Maybe Natural
Maybe Text
Maybe Compatibility
Maybe DataFormat
Maybe SchemaStatus
httpStatus :: Int
updatedTime :: 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
createdTime :: Maybe Text
compatibility :: Maybe Compatibility
$sel:httpStatus:GetSchemaResponse' :: GetSchemaResponse -> Int
$sel:updatedTime:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
$sel:schemaStatus:GetSchemaResponse' :: GetSchemaResponse -> Maybe SchemaStatus
$sel:schemaName:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
$sel:schemaCheckpoint:GetSchemaResponse' :: GetSchemaResponse -> Maybe Natural
$sel:schemaArn:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
$sel:registryName:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
$sel:registryArn:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
$sel:nextSchemaVersion:GetSchemaResponse' :: GetSchemaResponse -> Maybe Natural
$sel:latestSchemaVersion:GetSchemaResponse' :: GetSchemaResponse -> Maybe Natural
$sel:description:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
$sel:dataFormat:GetSchemaResponse' :: GetSchemaResponse -> Maybe DataFormat
$sel:createdTime:GetSchemaResponse' :: GetSchemaResponse -> Maybe Text
$sel:compatibility:GetSchemaResponse' :: GetSchemaResponse -> 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
createdTime
      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
updatedTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus