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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(GlueDataCatalogConfigurationUpdate
 -> GlueDataCatalogConfigurationUpdate -> Bool)
-> (GlueDataCatalogConfigurationUpdate
    -> GlueDataCatalogConfigurationUpdate -> Bool)
-> Eq GlueDataCatalogConfigurationUpdate
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]
(Int -> ReadS GlueDataCatalogConfigurationUpdate)
-> ReadS [GlueDataCatalogConfigurationUpdate]
-> ReadPrec GlueDataCatalogConfigurationUpdate
-> ReadPrec [GlueDataCatalogConfigurationUpdate]
-> Read 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
(Int -> GlueDataCatalogConfigurationUpdate -> ShowS)
-> (GlueDataCatalogConfigurationUpdate -> String)
-> ([GlueDataCatalogConfigurationUpdate] -> ShowS)
-> Show GlueDataCatalogConfigurationUpdate
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.
 GlueDataCatalogConfigurationUpdate
 -> Rep GlueDataCatalogConfigurationUpdate x)
-> (forall x.
    Rep GlueDataCatalogConfigurationUpdate x
    -> GlueDataCatalogConfigurationUpdate)
-> Generic GlueDataCatalogConfigurationUpdate
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' :: Text -> GlueDataCatalogConfigurationUpdate
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 :: (Text -> f Text)
-> GlueDataCatalogConfigurationUpdate
-> f GlueDataCatalogConfigurationUpdate
glueDataCatalogConfigurationUpdate_databaseARNUpdate = (GlueDataCatalogConfigurationUpdate -> Text)
-> (GlueDataCatalogConfigurationUpdate
    -> Text -> GlueDataCatalogConfigurationUpdate)
-> Lens
     GlueDataCatalogConfigurationUpdate
     GlueDataCatalogConfigurationUpdate
     Text
     Text
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

instance
  Prelude.NFData
    GlueDataCatalogConfigurationUpdate

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