{-# 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.Athena.CreateDataCatalog
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates (registers) a data catalog with the specified name and
-- properties. Catalogs created are visible to all users of the same Amazon
-- Web Services account.
module Amazonka.Athena.CreateDataCatalog
  ( -- * Creating a Request
    CreateDataCatalog (..),
    newCreateDataCatalog,

    -- * Request Lenses
    createDataCatalog_description,
    createDataCatalog_parameters,
    createDataCatalog_tags,
    createDataCatalog_name,
    createDataCatalog_type,

    -- * Destructuring the Response
    CreateDataCatalogResponse (..),
    newCreateDataCatalogResponse,

    -- * Response Lenses
    createDataCatalogResponse_httpStatus,
  )
where

import Amazonka.Athena.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateDataCatalog' smart constructor.
data CreateDataCatalog = CreateDataCatalog'
  { -- | A description of the data catalog to be created.
    CreateDataCatalog -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Specifies the Lambda function or functions to use for creating the data
    -- catalog. This is a mapping whose values depend on the catalog type.
    --
    -- -   For the @HIVE@ data catalog type, use the following syntax. The
    --     @metadata-function@ parameter is required. @The sdk-version@
    --     parameter is optional and defaults to the currently supported
    --     version.
    --
    --     @metadata-function=@/@lambda_arn@/@, sdk-version=@/@version_number@/@ @
    --
    -- -   For the @LAMBDA@ data catalog type, use one of the following sets of
    --     required parameters, but not both.
    --
    --     -   If you have one Lambda function that processes metadata and
    --         another for reading the actual data, use the following syntax.
    --         Both parameters are required.
    --
    --         @metadata-function=@/@lambda_arn@/@, record-function=@/@lambda_arn@/@ @
    --
    --     -   If you have a composite Lambda function that processes both
    --         metadata and data, use the following syntax to specify your
    --         Lambda function.
    --
    --         @function=@/@lambda_arn@/@ @
    --
    -- -   The @GLUE@ type takes a catalog ID parameter and is required. The
    --     @ @/@catalog_id@/@ @ is the account ID of the Amazon Web Services
    --     account to which the Glue Data Catalog belongs.
    --
    --     @catalog-id=@/@catalog_id@/@ @
    --
    --     -   The @GLUE@ data catalog type also applies to the default
    --         @AwsDataCatalog@ that already exists in your account, of which
    --         you can have only one and cannot modify.
    --
    --     -   Queries that specify a Glue Data Catalog other than the default
    --         @AwsDataCatalog@ must be run on Athena engine version 2.
    --
    --     -   In Regions where Athena engine version 2 is not available,
    --         creating new Glue data catalogs results in an @INVALID_INPUT@
    --         error.
    CreateDataCatalog -> Maybe (HashMap Text Text)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A list of comma separated tags to add to the data catalog that is
    -- created.
    CreateDataCatalog -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the data catalog to create. The catalog name must be unique
    -- for the Amazon Web Services account and can use a maximum of 127
    -- alphanumeric, underscore, at sign, or hyphen characters. The remainder
    -- of the length constraint of 256 is reserved for use by Athena.
    CreateDataCatalog -> Text
name :: Prelude.Text,
    -- | The type of data catalog to create: @LAMBDA@ for a federated catalog,
    -- @HIVE@ for an external hive metastore, or @GLUE@ for an Glue Data
    -- Catalog.
    CreateDataCatalog -> DataCatalogType
type' :: DataCatalogType
  }
  deriving (CreateDataCatalog -> CreateDataCatalog -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDataCatalog -> CreateDataCatalog -> Bool
$c/= :: CreateDataCatalog -> CreateDataCatalog -> Bool
== :: CreateDataCatalog -> CreateDataCatalog -> Bool
$c== :: CreateDataCatalog -> CreateDataCatalog -> Bool
Prelude.Eq, ReadPrec [CreateDataCatalog]
ReadPrec CreateDataCatalog
Int -> ReadS CreateDataCatalog
ReadS [CreateDataCatalog]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDataCatalog]
$creadListPrec :: ReadPrec [CreateDataCatalog]
readPrec :: ReadPrec CreateDataCatalog
$creadPrec :: ReadPrec CreateDataCatalog
readList :: ReadS [CreateDataCatalog]
$creadList :: ReadS [CreateDataCatalog]
readsPrec :: Int -> ReadS CreateDataCatalog
$creadsPrec :: Int -> ReadS CreateDataCatalog
Prelude.Read, Int -> CreateDataCatalog -> ShowS
[CreateDataCatalog] -> ShowS
CreateDataCatalog -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDataCatalog] -> ShowS
$cshowList :: [CreateDataCatalog] -> ShowS
show :: CreateDataCatalog -> String
$cshow :: CreateDataCatalog -> String
showsPrec :: Int -> CreateDataCatalog -> ShowS
$cshowsPrec :: Int -> CreateDataCatalog -> ShowS
Prelude.Show, forall x. Rep CreateDataCatalog x -> CreateDataCatalog
forall x. CreateDataCatalog -> Rep CreateDataCatalog x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDataCatalog x -> CreateDataCatalog
$cfrom :: forall x. CreateDataCatalog -> Rep CreateDataCatalog x
Prelude.Generic)

-- |
-- Create a value of 'CreateDataCatalog' 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:
--
-- 'description', 'createDataCatalog_description' - A description of the data catalog to be created.
--
-- 'parameters', 'createDataCatalog_parameters' - Specifies the Lambda function or functions to use for creating the data
-- catalog. This is a mapping whose values depend on the catalog type.
--
-- -   For the @HIVE@ data catalog type, use the following syntax. The
--     @metadata-function@ parameter is required. @The sdk-version@
--     parameter is optional and defaults to the currently supported
--     version.
--
--     @metadata-function=@/@lambda_arn@/@, sdk-version=@/@version_number@/@ @
--
-- -   For the @LAMBDA@ data catalog type, use one of the following sets of
--     required parameters, but not both.
--
--     -   If you have one Lambda function that processes metadata and
--         another for reading the actual data, use the following syntax.
--         Both parameters are required.
--
--         @metadata-function=@/@lambda_arn@/@, record-function=@/@lambda_arn@/@ @
--
--     -   If you have a composite Lambda function that processes both
--         metadata and data, use the following syntax to specify your
--         Lambda function.
--
--         @function=@/@lambda_arn@/@ @
--
-- -   The @GLUE@ type takes a catalog ID parameter and is required. The
--     @ @/@catalog_id@/@ @ is the account ID of the Amazon Web Services
--     account to which the Glue Data Catalog belongs.
--
--     @catalog-id=@/@catalog_id@/@ @
--
--     -   The @GLUE@ data catalog type also applies to the default
--         @AwsDataCatalog@ that already exists in your account, of which
--         you can have only one and cannot modify.
--
--     -   Queries that specify a Glue Data Catalog other than the default
--         @AwsDataCatalog@ must be run on Athena engine version 2.
--
--     -   In Regions where Athena engine version 2 is not available,
--         creating new Glue data catalogs results in an @INVALID_INPUT@
--         error.
--
-- 'tags', 'createDataCatalog_tags' - A list of comma separated tags to add to the data catalog that is
-- created.
--
-- 'name', 'createDataCatalog_name' - The name of the data catalog to create. The catalog name must be unique
-- for the Amazon Web Services account and can use a maximum of 127
-- alphanumeric, underscore, at sign, or hyphen characters. The remainder
-- of the length constraint of 256 is reserved for use by Athena.
--
-- 'type'', 'createDataCatalog_type' - The type of data catalog to create: @LAMBDA@ for a federated catalog,
-- @HIVE@ for an external hive metastore, or @GLUE@ for an Glue Data
-- Catalog.
newCreateDataCatalog ::
  -- | 'name'
  Prelude.Text ->
  -- | 'type''
  DataCatalogType ->
  CreateDataCatalog
newCreateDataCatalog :: Text -> DataCatalogType -> CreateDataCatalog
newCreateDataCatalog Text
pName_ DataCatalogType
pType_ =
  CreateDataCatalog'
    { $sel:description:CreateDataCatalog' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:CreateDataCatalog' :: Maybe (HashMap Text Text)
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateDataCatalog' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateDataCatalog' :: Text
name = Text
pName_,
      $sel:type':CreateDataCatalog' :: DataCatalogType
type' = DataCatalogType
pType_
    }

-- | A description of the data catalog to be created.
createDataCatalog_description :: Lens.Lens' CreateDataCatalog (Prelude.Maybe Prelude.Text)
createDataCatalog_description :: Lens' CreateDataCatalog (Maybe Text)
createDataCatalog_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataCatalog' {Maybe Text
description :: Maybe Text
$sel:description:CreateDataCatalog' :: CreateDataCatalog -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateDataCatalog
s@CreateDataCatalog' {} Maybe Text
a -> CreateDataCatalog
s {$sel:description:CreateDataCatalog' :: Maybe Text
description = Maybe Text
a} :: CreateDataCatalog)

-- | Specifies the Lambda function or functions to use for creating the data
-- catalog. This is a mapping whose values depend on the catalog type.
--
-- -   For the @HIVE@ data catalog type, use the following syntax. The
--     @metadata-function@ parameter is required. @The sdk-version@
--     parameter is optional and defaults to the currently supported
--     version.
--
--     @metadata-function=@/@lambda_arn@/@, sdk-version=@/@version_number@/@ @
--
-- -   For the @LAMBDA@ data catalog type, use one of the following sets of
--     required parameters, but not both.
--
--     -   If you have one Lambda function that processes metadata and
--         another for reading the actual data, use the following syntax.
--         Both parameters are required.
--
--         @metadata-function=@/@lambda_arn@/@, record-function=@/@lambda_arn@/@ @
--
--     -   If you have a composite Lambda function that processes both
--         metadata and data, use the following syntax to specify your
--         Lambda function.
--
--         @function=@/@lambda_arn@/@ @
--
-- -   The @GLUE@ type takes a catalog ID parameter and is required. The
--     @ @/@catalog_id@/@ @ is the account ID of the Amazon Web Services
--     account to which the Glue Data Catalog belongs.
--
--     @catalog-id=@/@catalog_id@/@ @
--
--     -   The @GLUE@ data catalog type also applies to the default
--         @AwsDataCatalog@ that already exists in your account, of which
--         you can have only one and cannot modify.
--
--     -   Queries that specify a Glue Data Catalog other than the default
--         @AwsDataCatalog@ must be run on Athena engine version 2.
--
--     -   In Regions where Athena engine version 2 is not available,
--         creating new Glue data catalogs results in an @INVALID_INPUT@
--         error.
createDataCatalog_parameters :: Lens.Lens' CreateDataCatalog (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createDataCatalog_parameters :: Lens' CreateDataCatalog (Maybe (HashMap Text Text))
createDataCatalog_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataCatalog' {Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
$sel:parameters:CreateDataCatalog' :: CreateDataCatalog -> Maybe (HashMap Text Text)
parameters} -> Maybe (HashMap Text Text)
parameters) (\s :: CreateDataCatalog
s@CreateDataCatalog' {} Maybe (HashMap Text Text)
a -> CreateDataCatalog
s {$sel:parameters:CreateDataCatalog' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
a} :: CreateDataCatalog) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of comma separated tags to add to the data catalog that is
-- created.
createDataCatalog_tags :: Lens.Lens' CreateDataCatalog (Prelude.Maybe [Tag])
createDataCatalog_tags :: Lens' CreateDataCatalog (Maybe [Tag])
createDataCatalog_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataCatalog' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDataCatalog' :: CreateDataCatalog -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDataCatalog
s@CreateDataCatalog' {} Maybe [Tag]
a -> CreateDataCatalog
s {$sel:tags:CreateDataCatalog' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDataCatalog) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the data catalog to create. The catalog name must be unique
-- for the Amazon Web Services account and can use a maximum of 127
-- alphanumeric, underscore, at sign, or hyphen characters. The remainder
-- of the length constraint of 256 is reserved for use by Athena.
createDataCatalog_name :: Lens.Lens' CreateDataCatalog Prelude.Text
createDataCatalog_name :: Lens' CreateDataCatalog Text
createDataCatalog_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataCatalog' {Text
name :: Text
$sel:name:CreateDataCatalog' :: CreateDataCatalog -> Text
name} -> Text
name) (\s :: CreateDataCatalog
s@CreateDataCatalog' {} Text
a -> CreateDataCatalog
s {$sel:name:CreateDataCatalog' :: Text
name = Text
a} :: CreateDataCatalog)

-- | The type of data catalog to create: @LAMBDA@ for a federated catalog,
-- @HIVE@ for an external hive metastore, or @GLUE@ for an Glue Data
-- Catalog.
createDataCatalog_type :: Lens.Lens' CreateDataCatalog DataCatalogType
createDataCatalog_type :: Lens' CreateDataCatalog DataCatalogType
createDataCatalog_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDataCatalog' {DataCatalogType
type' :: DataCatalogType
$sel:type':CreateDataCatalog' :: CreateDataCatalog -> DataCatalogType
type'} -> DataCatalogType
type') (\s :: CreateDataCatalog
s@CreateDataCatalog' {} DataCatalogType
a -> CreateDataCatalog
s {$sel:type':CreateDataCatalog' :: DataCatalogType
type' = DataCatalogType
a} :: CreateDataCatalog)

instance Core.AWSRequest CreateDataCatalog where
  type
    AWSResponse CreateDataCatalog =
      CreateDataCatalogResponse
  request :: (Service -> Service)
-> CreateDataCatalog -> Request CreateDataCatalog
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 CreateDataCatalog
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateDataCatalog)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> CreateDataCatalogResponse
CreateDataCatalogResponse'
            forall (f :: * -> *) a b. Functor 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 CreateDataCatalog where
  hashWithSalt :: Int -> CreateDataCatalog -> Int
hashWithSalt Int
_salt CreateDataCatalog' {Maybe [Tag]
Maybe Text
Maybe (HashMap Text Text)
Text
DataCatalogType
type' :: DataCatalogType
name :: Text
tags :: Maybe [Tag]
parameters :: Maybe (HashMap Text Text)
description :: Maybe Text
$sel:type':CreateDataCatalog' :: CreateDataCatalog -> DataCatalogType
$sel:name:CreateDataCatalog' :: CreateDataCatalog -> Text
$sel:tags:CreateDataCatalog' :: CreateDataCatalog -> Maybe [Tag]
$sel:parameters:CreateDataCatalog' :: CreateDataCatalog -> Maybe (HashMap Text Text)
$sel:description:CreateDataCatalog' :: CreateDataCatalog -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
parameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DataCatalogType
type'

instance Prelude.NFData CreateDataCatalog where
  rnf :: CreateDataCatalog -> ()
rnf CreateDataCatalog' {Maybe [Tag]
Maybe Text
Maybe (HashMap Text Text)
Text
DataCatalogType
type' :: DataCatalogType
name :: Text
tags :: Maybe [Tag]
parameters :: Maybe (HashMap Text Text)
description :: Maybe Text
$sel:type':CreateDataCatalog' :: CreateDataCatalog -> DataCatalogType
$sel:name:CreateDataCatalog' :: CreateDataCatalog -> Text
$sel:tags:CreateDataCatalog' :: CreateDataCatalog -> Maybe [Tag]
$sel:parameters:CreateDataCatalog' :: CreateDataCatalog -> Maybe (HashMap Text Text)
$sel:description:CreateDataCatalog' :: CreateDataCatalog -> Maybe Text
..} =
    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 (HashMap Text Text)
parameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DataCatalogType
type'

instance Data.ToHeaders CreateDataCatalog where
  toHeaders :: CreateDataCatalog -> 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
"AmazonAthena.CreateDataCatalog" ::
                          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 CreateDataCatalog where
  toJSON :: CreateDataCatalog -> Value
toJSON CreateDataCatalog' {Maybe [Tag]
Maybe Text
Maybe (HashMap Text Text)
Text
DataCatalogType
type' :: DataCatalogType
name :: Text
tags :: Maybe [Tag]
parameters :: Maybe (HashMap Text Text)
description :: Maybe Text
$sel:type':CreateDataCatalog' :: CreateDataCatalog -> DataCatalogType
$sel:name:CreateDataCatalog' :: CreateDataCatalog -> Text
$sel:tags:CreateDataCatalog' :: CreateDataCatalog -> Maybe [Tag]
$sel:parameters:CreateDataCatalog' :: CreateDataCatalog -> Maybe (HashMap Text Text)
$sel:description:CreateDataCatalog' :: CreateDataCatalog -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"Parameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
parameters,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"Type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DataCatalogType
type')
          ]
      )

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

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

-- | /See:/ 'newCreateDataCatalogResponse' smart constructor.
data CreateDataCatalogResponse = CreateDataCatalogResponse'
  { -- | The response's http status code.
    CreateDataCatalogResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateDataCatalogResponse -> CreateDataCatalogResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDataCatalogResponse -> CreateDataCatalogResponse -> Bool
$c/= :: CreateDataCatalogResponse -> CreateDataCatalogResponse -> Bool
== :: CreateDataCatalogResponse -> CreateDataCatalogResponse -> Bool
$c== :: CreateDataCatalogResponse -> CreateDataCatalogResponse -> Bool
Prelude.Eq, ReadPrec [CreateDataCatalogResponse]
ReadPrec CreateDataCatalogResponse
Int -> ReadS CreateDataCatalogResponse
ReadS [CreateDataCatalogResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDataCatalogResponse]
$creadListPrec :: ReadPrec [CreateDataCatalogResponse]
readPrec :: ReadPrec CreateDataCatalogResponse
$creadPrec :: ReadPrec CreateDataCatalogResponse
readList :: ReadS [CreateDataCatalogResponse]
$creadList :: ReadS [CreateDataCatalogResponse]
readsPrec :: Int -> ReadS CreateDataCatalogResponse
$creadsPrec :: Int -> ReadS CreateDataCatalogResponse
Prelude.Read, Int -> CreateDataCatalogResponse -> ShowS
[CreateDataCatalogResponse] -> ShowS
CreateDataCatalogResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDataCatalogResponse] -> ShowS
$cshowList :: [CreateDataCatalogResponse] -> ShowS
show :: CreateDataCatalogResponse -> String
$cshow :: CreateDataCatalogResponse -> String
showsPrec :: Int -> CreateDataCatalogResponse -> ShowS
$cshowsPrec :: Int -> CreateDataCatalogResponse -> ShowS
Prelude.Show, forall x.
Rep CreateDataCatalogResponse x -> CreateDataCatalogResponse
forall x.
CreateDataCatalogResponse -> Rep CreateDataCatalogResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateDataCatalogResponse x -> CreateDataCatalogResponse
$cfrom :: forall x.
CreateDataCatalogResponse -> Rep CreateDataCatalogResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDataCatalogResponse' 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:
--
-- 'httpStatus', 'createDataCatalogResponse_httpStatus' - The response's http status code.
newCreateDataCatalogResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDataCatalogResponse
newCreateDataCatalogResponse :: Int -> CreateDataCatalogResponse
newCreateDataCatalogResponse Int
pHttpStatus_ =
  CreateDataCatalogResponse'
    { $sel:httpStatus:CreateDataCatalogResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance Prelude.NFData CreateDataCatalogResponse where
  rnf :: CreateDataCatalogResponse -> ()
rnf CreateDataCatalogResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateDataCatalogResponse' :: CreateDataCatalogResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus