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

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

-- | The configuration parameters for the default Amazon Glue database. You
-- use this database for Apache Flink SQL queries and table API transforms
-- that you write in a Kinesis Data Analytics Studio notebook.
--
-- /See:/ 'newCatalogConfigurationDescription' smart constructor.
data CatalogConfigurationDescription = CatalogConfigurationDescription'
  { -- | 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.
    CatalogConfigurationDescription
-> GlueDataCatalogConfigurationDescription
glueDataCatalogConfigurationDescription :: GlueDataCatalogConfigurationDescription
  }
  deriving (CatalogConfigurationDescription
-> CatalogConfigurationDescription -> Bool
(CatalogConfigurationDescription
 -> CatalogConfigurationDescription -> Bool)
-> (CatalogConfigurationDescription
    -> CatalogConfigurationDescription -> Bool)
-> Eq CatalogConfigurationDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CatalogConfigurationDescription
-> CatalogConfigurationDescription -> Bool
$c/= :: CatalogConfigurationDescription
-> CatalogConfigurationDescription -> Bool
== :: CatalogConfigurationDescription
-> CatalogConfigurationDescription -> Bool
$c== :: CatalogConfigurationDescription
-> CatalogConfigurationDescription -> Bool
Prelude.Eq, ReadPrec [CatalogConfigurationDescription]
ReadPrec CatalogConfigurationDescription
Int -> ReadS CatalogConfigurationDescription
ReadS [CatalogConfigurationDescription]
(Int -> ReadS CatalogConfigurationDescription)
-> ReadS [CatalogConfigurationDescription]
-> ReadPrec CatalogConfigurationDescription
-> ReadPrec [CatalogConfigurationDescription]
-> Read CatalogConfigurationDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CatalogConfigurationDescription]
$creadListPrec :: ReadPrec [CatalogConfigurationDescription]
readPrec :: ReadPrec CatalogConfigurationDescription
$creadPrec :: ReadPrec CatalogConfigurationDescription
readList :: ReadS [CatalogConfigurationDescription]
$creadList :: ReadS [CatalogConfigurationDescription]
readsPrec :: Int -> ReadS CatalogConfigurationDescription
$creadsPrec :: Int -> ReadS CatalogConfigurationDescription
Prelude.Read, Int -> CatalogConfigurationDescription -> ShowS
[CatalogConfigurationDescription] -> ShowS
CatalogConfigurationDescription -> String
(Int -> CatalogConfigurationDescription -> ShowS)
-> (CatalogConfigurationDescription -> String)
-> ([CatalogConfigurationDescription] -> ShowS)
-> Show CatalogConfigurationDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CatalogConfigurationDescription] -> ShowS
$cshowList :: [CatalogConfigurationDescription] -> ShowS
show :: CatalogConfigurationDescription -> String
$cshow :: CatalogConfigurationDescription -> String
showsPrec :: Int -> CatalogConfigurationDescription -> ShowS
$cshowsPrec :: Int -> CatalogConfigurationDescription -> ShowS
Prelude.Show, (forall x.
 CatalogConfigurationDescription
 -> Rep CatalogConfigurationDescription x)
-> (forall x.
    Rep CatalogConfigurationDescription x
    -> CatalogConfigurationDescription)
-> Generic CatalogConfigurationDescription
forall x.
Rep CatalogConfigurationDescription x
-> CatalogConfigurationDescription
forall x.
CatalogConfigurationDescription
-> Rep CatalogConfigurationDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CatalogConfigurationDescription x
-> CatalogConfigurationDescription
$cfrom :: forall x.
CatalogConfigurationDescription
-> Rep CatalogConfigurationDescription x
Prelude.Generic)

-- |
-- Create a value of 'CatalogConfigurationDescription' 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:
--
-- 'glueDataCatalogConfigurationDescription', 'catalogConfigurationDescription_glueDataCatalogConfigurationDescription' - 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.
newCatalogConfigurationDescription ::
  -- | 'glueDataCatalogConfigurationDescription'
  GlueDataCatalogConfigurationDescription ->
  CatalogConfigurationDescription
newCatalogConfigurationDescription :: GlueDataCatalogConfigurationDescription
-> CatalogConfigurationDescription
newCatalogConfigurationDescription
  GlueDataCatalogConfigurationDescription
pGlueDataCatalogConfigurationDescription_ =
    CatalogConfigurationDescription' :: GlueDataCatalogConfigurationDescription
-> CatalogConfigurationDescription
CatalogConfigurationDescription'
      { $sel:glueDataCatalogConfigurationDescription:CatalogConfigurationDescription' :: GlueDataCatalogConfigurationDescription
glueDataCatalogConfigurationDescription =
          GlueDataCatalogConfigurationDescription
pGlueDataCatalogConfigurationDescription_
      }

-- | 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.
catalogConfigurationDescription_glueDataCatalogConfigurationDescription :: Lens.Lens' CatalogConfigurationDescription GlueDataCatalogConfigurationDescription
catalogConfigurationDescription_glueDataCatalogConfigurationDescription :: (GlueDataCatalogConfigurationDescription
 -> f GlueDataCatalogConfigurationDescription)
-> CatalogConfigurationDescription
-> f CatalogConfigurationDescription
catalogConfigurationDescription_glueDataCatalogConfigurationDescription = (CatalogConfigurationDescription
 -> GlueDataCatalogConfigurationDescription)
-> (CatalogConfigurationDescription
    -> GlueDataCatalogConfigurationDescription
    -> CatalogConfigurationDescription)
-> Lens
     CatalogConfigurationDescription
     CatalogConfigurationDescription
     GlueDataCatalogConfigurationDescription
     GlueDataCatalogConfigurationDescription
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CatalogConfigurationDescription' {GlueDataCatalogConfigurationDescription
glueDataCatalogConfigurationDescription :: GlueDataCatalogConfigurationDescription
$sel:glueDataCatalogConfigurationDescription:CatalogConfigurationDescription' :: CatalogConfigurationDescription
-> GlueDataCatalogConfigurationDescription
glueDataCatalogConfigurationDescription} -> GlueDataCatalogConfigurationDescription
glueDataCatalogConfigurationDescription) (\s :: CatalogConfigurationDescription
s@CatalogConfigurationDescription' {} GlueDataCatalogConfigurationDescription
a -> CatalogConfigurationDescription
s {$sel:glueDataCatalogConfigurationDescription:CatalogConfigurationDescription' :: GlueDataCatalogConfigurationDescription
glueDataCatalogConfigurationDescription = GlueDataCatalogConfigurationDescription
a} :: CatalogConfigurationDescription)

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

instance
  Prelude.Hashable
    CatalogConfigurationDescription

instance
  Prelude.NFData
    CatalogConfigurationDescription