{-# 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-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)
module Amazonka.KinesisAnalyticsV2.Types.GlueDataCatalogConfigurationDescription where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(GlueDataCatalogConfigurationDescription
 -> GlueDataCatalogConfigurationDescription -> Bool)
-> (GlueDataCatalogConfigurationDescription
    -> GlueDataCatalogConfigurationDescription -> Bool)
-> Eq GlueDataCatalogConfigurationDescription
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]
(Int -> ReadS GlueDataCatalogConfigurationDescription)
-> ReadS [GlueDataCatalogConfigurationDescription]
-> ReadPrec GlueDataCatalogConfigurationDescription
-> ReadPrec [GlueDataCatalogConfigurationDescription]
-> Read 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
(Int -> GlueDataCatalogConfigurationDescription -> ShowS)
-> (GlueDataCatalogConfigurationDescription -> String)
-> ([GlueDataCatalogConfigurationDescription] -> ShowS)
-> Show GlueDataCatalogConfigurationDescription
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.
 GlueDataCatalogConfigurationDescription
 -> Rep GlueDataCatalogConfigurationDescription x)
-> (forall x.
    Rep GlueDataCatalogConfigurationDescription x
    -> GlueDataCatalogConfigurationDescription)
-> Generic GlueDataCatalogConfigurationDescription
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' :: Text -> GlueDataCatalogConfigurationDescription
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 :: (Text -> f Text)
-> GlueDataCatalogConfigurationDescription
-> f GlueDataCatalogConfigurationDescription
glueDataCatalogConfigurationDescription_databaseARN = (GlueDataCatalogConfigurationDescription -> Text)
-> (GlueDataCatalogConfigurationDescription
    -> Text -> GlueDataCatalogConfigurationDescription)
-> Lens
     GlueDataCatalogConfigurationDescription
     GlueDataCatalogConfigurationDescription
     Text
     Text
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
  Core.FromJSON
    GlueDataCatalogConfigurationDescription
  where
  parseJSON :: Value -> Parser GlueDataCatalogConfigurationDescription
parseJSON =
    String
-> (Object -> Parser GlueDataCatalogConfigurationDescription)
-> Value
-> Parser GlueDataCatalogConfigurationDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"GlueDataCatalogConfigurationDescription"
      ( \Object
x ->
          Text -> GlueDataCatalogConfigurationDescription
GlueDataCatalogConfigurationDescription'
            (Text -> GlueDataCatalogConfigurationDescription)
-> Parser Text -> Parser GlueDataCatalogConfigurationDescription
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DatabaseARN")
      )

instance
  Prelude.Hashable
    GlueDataCatalogConfigurationDescription

instance
  Prelude.NFData
    GlueDataCatalogConfigurationDescription