{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

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

-- |
-- Module      : Amazonka.KinesisAnalyticsV2.Types.GlueDataCatalogConfigurationDescription
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.KinesisAnalyticsV2.Types.GlueDataCatalogConfigurationDescription where

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

-- | The configuration of the Glue Data Catalog that you use for Apache Flink
-- SQL queries and table API transforms that you write in an application.
--
-- /See:/ 'newGlueDataCatalogConfigurationDescription' smart constructor.
data GlueDataCatalogConfigurationDescription = GlueDataCatalogConfigurationDescription'
  { -- | The Amazon Resource Name (ARN) of the database.
    GlueDataCatalogConfigurationDescription -> Text
databaseARN :: Prelude.Text
  }
  deriving (GlueDataCatalogConfigurationDescription
-> GlueDataCatalogConfigurationDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlueDataCatalogConfigurationDescription
-> GlueDataCatalogConfigurationDescription -> Bool
$c/= :: GlueDataCatalogConfigurationDescription
-> GlueDataCatalogConfigurationDescription -> Bool
== :: GlueDataCatalogConfigurationDescription
-> GlueDataCatalogConfigurationDescription -> Bool
$c== :: GlueDataCatalogConfigurationDescription
-> GlueDataCatalogConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [GlueDataCatalogConfigurationDescription]
ReadPrec GlueDataCatalogConfigurationDescription
Int -> ReadS GlueDataCatalogConfigurationDescription
ReadS [GlueDataCatalogConfigurationDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlueDataCatalogConfigurationDescription]
$creadListPrec :: ReadPrec [GlueDataCatalogConfigurationDescription]
readPrec :: ReadPrec GlueDataCatalogConfigurationDescription
$creadPrec :: ReadPrec GlueDataCatalogConfigurationDescription
readList :: ReadS [GlueDataCatalogConfigurationDescription]
$creadList :: ReadS [GlueDataCatalogConfigurationDescription]
readsPrec :: Int -> ReadS GlueDataCatalogConfigurationDescription
$creadsPrec :: Int -> ReadS GlueDataCatalogConfigurationDescription
Prelude.Read, Int -> GlueDataCatalogConfigurationDescription -> ShowS
[GlueDataCatalogConfigurationDescription] -> ShowS
GlueDataCatalogConfigurationDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlueDataCatalogConfigurationDescription] -> ShowS
$cshowList :: [GlueDataCatalogConfigurationDescription] -> ShowS
show :: GlueDataCatalogConfigurationDescription -> String
$cshow :: GlueDataCatalogConfigurationDescription -> String
showsPrec :: Int -> GlueDataCatalogConfigurationDescription -> ShowS
$cshowsPrec :: Int -> GlueDataCatalogConfigurationDescription -> ShowS
Prelude.Show, forall x.
Rep GlueDataCatalogConfigurationDescription x
-> GlueDataCatalogConfigurationDescription
forall x.
GlueDataCatalogConfigurationDescription
-> Rep GlueDataCatalogConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GlueDataCatalogConfigurationDescription x
-> GlueDataCatalogConfigurationDescription
$cfrom :: forall x.
GlueDataCatalogConfigurationDescription
-> Rep GlueDataCatalogConfigurationDescription x
Prelude.Generic)

-- |
-- Create a value of 'GlueDataCatalogConfigurationDescription' 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:
--
-- 'databaseARN', 'glueDataCatalogConfigurationDescription_databaseARN' - The Amazon Resource Name (ARN) of the database.
newGlueDataCatalogConfigurationDescription ::
  -- | 'databaseARN'
  Prelude.Text ->
  GlueDataCatalogConfigurationDescription
newGlueDataCatalogConfigurationDescription :: Text -> GlueDataCatalogConfigurationDescription
newGlueDataCatalogConfigurationDescription
  Text
pDatabaseARN_ =
    GlueDataCatalogConfigurationDescription'
      { $sel:databaseARN:GlueDataCatalogConfigurationDescription' :: Text
databaseARN =
          Text
pDatabaseARN_
      }

-- | The Amazon Resource Name (ARN) of the database.
glueDataCatalogConfigurationDescription_databaseARN :: Lens.Lens' GlueDataCatalogConfigurationDescription Prelude.Text
glueDataCatalogConfigurationDescription_databaseARN :: Lens' GlueDataCatalogConfigurationDescription Text
glueDataCatalogConfigurationDescription_databaseARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GlueDataCatalogConfigurationDescription' {Text
databaseARN :: Text
$sel:databaseARN:GlueDataCatalogConfigurationDescription' :: GlueDataCatalogConfigurationDescription -> Text
databaseARN} -> Text
databaseARN) (\s :: GlueDataCatalogConfigurationDescription
s@GlueDataCatalogConfigurationDescription' {} Text
a -> GlueDataCatalogConfigurationDescription
s {$sel:databaseARN:GlueDataCatalogConfigurationDescription' :: Text
databaseARN = Text
a} :: GlueDataCatalogConfigurationDescription)

instance
  Data.FromJSON
    GlueDataCatalogConfigurationDescription
  where
  parseJSON :: Value -> Parser GlueDataCatalogConfigurationDescription
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"GlueDataCatalogConfigurationDescription"
      ( \Object
x ->
          Text -> GlueDataCatalogConfigurationDescription
GlueDataCatalogConfigurationDescription'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"DatabaseARN")
      )

instance
  Prelude.Hashable
    GlueDataCatalogConfigurationDescription
  where
  hashWithSalt :: Int -> GlueDataCatalogConfigurationDescription -> Int
hashWithSalt
    Int
_salt
    GlueDataCatalogConfigurationDescription' {Text
databaseARN :: Text
$sel:databaseARN:GlueDataCatalogConfigurationDescription' :: GlueDataCatalogConfigurationDescription -> Text
..} =
      Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
databaseARN

instance
  Prelude.NFData
    GlueDataCatalogConfigurationDescription
  where
  rnf :: GlueDataCatalogConfigurationDescription -> ()
rnf GlueDataCatalogConfigurationDescription' {Text
databaseARN :: Text
$sel:databaseARN:GlueDataCatalogConfigurationDescription' :: GlueDataCatalogConfigurationDescription -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
databaseARN