{-# 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.GlueDataCatalogConfigurationUpdate
-- 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.GlueDataCatalogConfigurationUpdate 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

-- | Updates to the configuration of the Glue Data Catalog that you use for
-- SQL queries that you write in a Kinesis Data Analytics Studio notebook.
--
-- /See:/ 'newGlueDataCatalogConfigurationUpdate' smart constructor.
data GlueDataCatalogConfigurationUpdate = GlueDataCatalogConfigurationUpdate'
  { -- | The updated Amazon Resource Name (ARN) of the database.
    GlueDataCatalogConfigurationUpdate -> Text
databaseARNUpdate :: Prelude.Text
  }
  deriving (GlueDataCatalogConfigurationUpdate
-> GlueDataCatalogConfigurationUpdate -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GlueDataCatalogConfigurationUpdate
-> GlueDataCatalogConfigurationUpdate -> Bool
$c/= :: GlueDataCatalogConfigurationUpdate
-> GlueDataCatalogConfigurationUpdate -> Bool
== :: GlueDataCatalogConfigurationUpdate
-> GlueDataCatalogConfigurationUpdate -> Bool
$c== :: GlueDataCatalogConfigurationUpdate
-> GlueDataCatalogConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [GlueDataCatalogConfigurationUpdate]
ReadPrec GlueDataCatalogConfigurationUpdate
Int -> ReadS GlueDataCatalogConfigurationUpdate
ReadS [GlueDataCatalogConfigurationUpdate]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GlueDataCatalogConfigurationUpdate]
$creadListPrec :: ReadPrec [GlueDataCatalogConfigurationUpdate]
readPrec :: ReadPrec GlueDataCatalogConfigurationUpdate
$creadPrec :: ReadPrec GlueDataCatalogConfigurationUpdate
readList :: ReadS [GlueDataCatalogConfigurationUpdate]
$creadList :: ReadS [GlueDataCatalogConfigurationUpdate]
readsPrec :: Int -> ReadS GlueDataCatalogConfigurationUpdate
$creadsPrec :: Int -> ReadS GlueDataCatalogConfigurationUpdate
Prelude.Read, Int -> GlueDataCatalogConfigurationUpdate -> ShowS
[GlueDataCatalogConfigurationUpdate] -> ShowS
GlueDataCatalogConfigurationUpdate -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GlueDataCatalogConfigurationUpdate] -> ShowS
$cshowList :: [GlueDataCatalogConfigurationUpdate] -> ShowS
show :: GlueDataCatalogConfigurationUpdate -> String
$cshow :: GlueDataCatalogConfigurationUpdate -> String
showsPrec :: Int -> GlueDataCatalogConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> GlueDataCatalogConfigurationUpdate -> ShowS
Prelude.Show, forall x.
Rep GlueDataCatalogConfigurationUpdate x
-> GlueDataCatalogConfigurationUpdate
forall x.
GlueDataCatalogConfigurationUpdate
-> Rep GlueDataCatalogConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GlueDataCatalogConfigurationUpdate x
-> GlueDataCatalogConfigurationUpdate
$cfrom :: forall x.
GlueDataCatalogConfigurationUpdate
-> Rep GlueDataCatalogConfigurationUpdate x
Prelude.Generic)

-- |
-- Create a value of 'GlueDataCatalogConfigurationUpdate' 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:
--
-- 'databaseARNUpdate', 'glueDataCatalogConfigurationUpdate_databaseARNUpdate' - The updated Amazon Resource Name (ARN) of the database.
newGlueDataCatalogConfigurationUpdate ::
  -- | 'databaseARNUpdate'
  Prelude.Text ->
  GlueDataCatalogConfigurationUpdate
newGlueDataCatalogConfigurationUpdate :: Text -> GlueDataCatalogConfigurationUpdate
newGlueDataCatalogConfigurationUpdate
  Text
pDatabaseARNUpdate_ =
    GlueDataCatalogConfigurationUpdate'
      { $sel:databaseARNUpdate:GlueDataCatalogConfigurationUpdate' :: Text
databaseARNUpdate =
          Text
pDatabaseARNUpdate_
      }

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

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

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

instance
  Data.ToJSON
    GlueDataCatalogConfigurationUpdate
  where
  toJSON :: GlueDataCatalogConfigurationUpdate -> Value
toJSON GlueDataCatalogConfigurationUpdate' {Text
databaseARNUpdate :: Text
$sel:databaseARNUpdate:GlueDataCatalogConfigurationUpdate' :: GlueDataCatalogConfigurationUpdate -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just
              (Key
"DatabaseARNUpdate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
databaseARNUpdate)
          ]
      )