{-# 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 #-}
module Amazonka.Athena.Types.DataCatalogSummary where
import Amazonka.Athena.Types.DataCatalogType
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
data DataCatalogSummary = DataCatalogSummary'
{
DataCatalogSummary -> Maybe Text
catalogName :: Prelude.Maybe Prelude.Text,
DataCatalogSummary -> Maybe DataCatalogType
type' :: Prelude.Maybe DataCatalogType
}
deriving (DataCatalogSummary -> DataCatalogSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataCatalogSummary -> DataCatalogSummary -> Bool
$c/= :: DataCatalogSummary -> DataCatalogSummary -> Bool
== :: DataCatalogSummary -> DataCatalogSummary -> Bool
$c== :: DataCatalogSummary -> DataCatalogSummary -> Bool
Prelude.Eq, ReadPrec [DataCatalogSummary]
ReadPrec DataCatalogSummary
Int -> ReadS DataCatalogSummary
ReadS [DataCatalogSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DataCatalogSummary]
$creadListPrec :: ReadPrec [DataCatalogSummary]
readPrec :: ReadPrec DataCatalogSummary
$creadPrec :: ReadPrec DataCatalogSummary
readList :: ReadS [DataCatalogSummary]
$creadList :: ReadS [DataCatalogSummary]
readsPrec :: Int -> ReadS DataCatalogSummary
$creadsPrec :: Int -> ReadS DataCatalogSummary
Prelude.Read, Int -> DataCatalogSummary -> ShowS
[DataCatalogSummary] -> ShowS
DataCatalogSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataCatalogSummary] -> ShowS
$cshowList :: [DataCatalogSummary] -> ShowS
show :: DataCatalogSummary -> String
$cshow :: DataCatalogSummary -> String
showsPrec :: Int -> DataCatalogSummary -> ShowS
$cshowsPrec :: Int -> DataCatalogSummary -> ShowS
Prelude.Show, forall x. Rep DataCatalogSummary x -> DataCatalogSummary
forall x. DataCatalogSummary -> Rep DataCatalogSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DataCatalogSummary x -> DataCatalogSummary
$cfrom :: forall x. DataCatalogSummary -> Rep DataCatalogSummary x
Prelude.Generic)
newDataCatalogSummary ::
DataCatalogSummary
newDataCatalogSummary :: DataCatalogSummary
newDataCatalogSummary =
DataCatalogSummary'
{ $sel:catalogName:DataCatalogSummary' :: Maybe Text
catalogName = forall a. Maybe a
Prelude.Nothing,
$sel:type':DataCatalogSummary' :: Maybe DataCatalogType
type' = forall a. Maybe a
Prelude.Nothing
}
dataCatalogSummary_catalogName :: Lens.Lens' DataCatalogSummary (Prelude.Maybe Prelude.Text)
dataCatalogSummary_catalogName :: Lens' DataCatalogSummary (Maybe Text)
dataCatalogSummary_catalogName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataCatalogSummary' {Maybe Text
catalogName :: Maybe Text
$sel:catalogName:DataCatalogSummary' :: DataCatalogSummary -> Maybe Text
catalogName} -> Maybe Text
catalogName) (\s :: DataCatalogSummary
s@DataCatalogSummary' {} Maybe Text
a -> DataCatalogSummary
s {$sel:catalogName:DataCatalogSummary' :: Maybe Text
catalogName = Maybe Text
a} :: DataCatalogSummary)
dataCatalogSummary_type :: Lens.Lens' DataCatalogSummary (Prelude.Maybe DataCatalogType)
dataCatalogSummary_type :: Lens' DataCatalogSummary (Maybe DataCatalogType)
dataCatalogSummary_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DataCatalogSummary' {Maybe DataCatalogType
type' :: Maybe DataCatalogType
$sel:type':DataCatalogSummary' :: DataCatalogSummary -> Maybe DataCatalogType
type'} -> Maybe DataCatalogType
type') (\s :: DataCatalogSummary
s@DataCatalogSummary' {} Maybe DataCatalogType
a -> DataCatalogSummary
s {$sel:type':DataCatalogSummary' :: Maybe DataCatalogType
type' = Maybe DataCatalogType
a} :: DataCatalogSummary)
instance Data.FromJSON DataCatalogSummary where
parseJSON :: Value -> Parser DataCatalogSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DataCatalogSummary"
( \Object
x ->
Maybe Text -> Maybe DataCatalogType -> DataCatalogSummary
DataCatalogSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CatalogName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Type")
)
instance Prelude.Hashable DataCatalogSummary where
hashWithSalt :: Int -> DataCatalogSummary -> Int
hashWithSalt Int
_salt DataCatalogSummary' {Maybe Text
Maybe DataCatalogType
type' :: Maybe DataCatalogType
catalogName :: Maybe Text
$sel:type':DataCatalogSummary' :: DataCatalogSummary -> Maybe DataCatalogType
$sel:catalogName:DataCatalogSummary' :: DataCatalogSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
catalogName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DataCatalogType
type'
instance Prelude.NFData DataCatalogSummary where
rnf :: DataCatalogSummary -> ()
rnf DataCatalogSummary' {Maybe Text
Maybe DataCatalogType
type' :: Maybe DataCatalogType
catalogName :: Maybe Text
$sel:type':DataCatalogSummary' :: DataCatalogSummary -> Maybe DataCatalogType
$sel:catalogName:DataCatalogSummary' :: DataCatalogSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
catalogName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DataCatalogType
type'