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

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.GlueDataCatalogConfigurationUpdate
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

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

-- |
-- Create a value of 'CatalogConfigurationUpdate' 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:
--
-- 'glueDataCatalogConfigurationUpdate', 'catalogConfigurationUpdate_glueDataCatalogConfigurationUpdate' - Updates to the configuration parameters for the default Amazon Glue
-- database. You use this database for SQL queries that you write in a
-- Kinesis Data Analytics Studio notebook.
newCatalogConfigurationUpdate ::
  -- | 'glueDataCatalogConfigurationUpdate'
  GlueDataCatalogConfigurationUpdate ->
  CatalogConfigurationUpdate
newCatalogConfigurationUpdate :: GlueDataCatalogConfigurationUpdate -> CatalogConfigurationUpdate
newCatalogConfigurationUpdate
  GlueDataCatalogConfigurationUpdate
pGlueDataCatalogConfigurationUpdate_ =
    CatalogConfigurationUpdate' :: GlueDataCatalogConfigurationUpdate -> CatalogConfigurationUpdate
CatalogConfigurationUpdate'
      { $sel:glueDataCatalogConfigurationUpdate:CatalogConfigurationUpdate' :: GlueDataCatalogConfigurationUpdate
glueDataCatalogConfigurationUpdate =
          GlueDataCatalogConfigurationUpdate
pGlueDataCatalogConfigurationUpdate_
      }

-- | Updates to the configuration parameters for the default Amazon Glue
-- database. You use this database for SQL queries that you write in a
-- Kinesis Data Analytics Studio notebook.
catalogConfigurationUpdate_glueDataCatalogConfigurationUpdate :: Lens.Lens' CatalogConfigurationUpdate GlueDataCatalogConfigurationUpdate
catalogConfigurationUpdate_glueDataCatalogConfigurationUpdate :: (GlueDataCatalogConfigurationUpdate
 -> f GlueDataCatalogConfigurationUpdate)
-> CatalogConfigurationUpdate -> f CatalogConfigurationUpdate
catalogConfigurationUpdate_glueDataCatalogConfigurationUpdate = (CatalogConfigurationUpdate -> GlueDataCatalogConfigurationUpdate)
-> (CatalogConfigurationUpdate
    -> GlueDataCatalogConfigurationUpdate
    -> CatalogConfigurationUpdate)
-> Lens
     CatalogConfigurationUpdate
     CatalogConfigurationUpdate
     GlueDataCatalogConfigurationUpdate
     GlueDataCatalogConfigurationUpdate
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CatalogConfigurationUpdate' {GlueDataCatalogConfigurationUpdate
glueDataCatalogConfigurationUpdate :: GlueDataCatalogConfigurationUpdate
$sel:glueDataCatalogConfigurationUpdate:CatalogConfigurationUpdate' :: CatalogConfigurationUpdate -> GlueDataCatalogConfigurationUpdate
glueDataCatalogConfigurationUpdate} -> GlueDataCatalogConfigurationUpdate
glueDataCatalogConfigurationUpdate) (\s :: CatalogConfigurationUpdate
s@CatalogConfigurationUpdate' {} GlueDataCatalogConfigurationUpdate
a -> CatalogConfigurationUpdate
s {$sel:glueDataCatalogConfigurationUpdate:CatalogConfigurationUpdate' :: GlueDataCatalogConfigurationUpdate
glueDataCatalogConfigurationUpdate = GlueDataCatalogConfigurationUpdate
a} :: CatalogConfigurationUpdate)

instance Prelude.Hashable CatalogConfigurationUpdate

instance Prelude.NFData CatalogConfigurationUpdate

instance Core.ToJSON CatalogConfigurationUpdate where
  toJSON :: CatalogConfigurationUpdate -> Value
toJSON CatalogConfigurationUpdate' {GlueDataCatalogConfigurationUpdate
glueDataCatalogConfigurationUpdate :: GlueDataCatalogConfigurationUpdate
$sel:glueDataCatalogConfigurationUpdate:CatalogConfigurationUpdate' :: CatalogConfigurationUpdate -> GlueDataCatalogConfigurationUpdate
..} =
    [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
"GlueDataCatalogConfigurationUpdate"
                  Text -> GlueDataCatalogConfigurationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= GlueDataCatalogConfigurationUpdate
glueDataCatalogConfigurationUpdate
              )
          ]
      )