{-# 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.AppFlow.Types.MetadataCatalogDetail where
import Amazonka.AppFlow.Types.CatalogType
import Amazonka.AppFlow.Types.RegistrationOutput
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 MetadataCatalogDetail = MetadataCatalogDetail'
{
MetadataCatalogDetail -> Maybe CatalogType
catalogType :: Prelude.Maybe CatalogType,
MetadataCatalogDetail -> Maybe RegistrationOutput
partitionRegistrationOutput :: Prelude.Maybe RegistrationOutput,
MetadataCatalogDetail -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text,
MetadataCatalogDetail -> Maybe RegistrationOutput
tableRegistrationOutput :: Prelude.Maybe RegistrationOutput
}
deriving (MetadataCatalogDetail -> MetadataCatalogDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MetadataCatalogDetail -> MetadataCatalogDetail -> Bool
$c/= :: MetadataCatalogDetail -> MetadataCatalogDetail -> Bool
== :: MetadataCatalogDetail -> MetadataCatalogDetail -> Bool
$c== :: MetadataCatalogDetail -> MetadataCatalogDetail -> Bool
Prelude.Eq, ReadPrec [MetadataCatalogDetail]
ReadPrec MetadataCatalogDetail
Int -> ReadS MetadataCatalogDetail
ReadS [MetadataCatalogDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MetadataCatalogDetail]
$creadListPrec :: ReadPrec [MetadataCatalogDetail]
readPrec :: ReadPrec MetadataCatalogDetail
$creadPrec :: ReadPrec MetadataCatalogDetail
readList :: ReadS [MetadataCatalogDetail]
$creadList :: ReadS [MetadataCatalogDetail]
readsPrec :: Int -> ReadS MetadataCatalogDetail
$creadsPrec :: Int -> ReadS MetadataCatalogDetail
Prelude.Read, Int -> MetadataCatalogDetail -> ShowS
[MetadataCatalogDetail] -> ShowS
MetadataCatalogDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MetadataCatalogDetail] -> ShowS
$cshowList :: [MetadataCatalogDetail] -> ShowS
show :: MetadataCatalogDetail -> String
$cshow :: MetadataCatalogDetail -> String
showsPrec :: Int -> MetadataCatalogDetail -> ShowS
$cshowsPrec :: Int -> MetadataCatalogDetail -> ShowS
Prelude.Show, forall x. Rep MetadataCatalogDetail x -> MetadataCatalogDetail
forall x. MetadataCatalogDetail -> Rep MetadataCatalogDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MetadataCatalogDetail x -> MetadataCatalogDetail
$cfrom :: forall x. MetadataCatalogDetail -> Rep MetadataCatalogDetail x
Prelude.Generic)
newMetadataCatalogDetail ::
MetadataCatalogDetail
newMetadataCatalogDetail :: MetadataCatalogDetail
newMetadataCatalogDetail =
MetadataCatalogDetail'
{ $sel:catalogType:MetadataCatalogDetail' :: Maybe CatalogType
catalogType =
forall a. Maybe a
Prelude.Nothing,
$sel:partitionRegistrationOutput:MetadataCatalogDetail' :: Maybe RegistrationOutput
partitionRegistrationOutput = forall a. Maybe a
Prelude.Nothing,
$sel:tableName:MetadataCatalogDetail' :: Maybe Text
tableName = forall a. Maybe a
Prelude.Nothing,
$sel:tableRegistrationOutput:MetadataCatalogDetail' :: Maybe RegistrationOutput
tableRegistrationOutput = forall a. Maybe a
Prelude.Nothing
}
metadataCatalogDetail_catalogType :: Lens.Lens' MetadataCatalogDetail (Prelude.Maybe CatalogType)
metadataCatalogDetail_catalogType :: Lens' MetadataCatalogDetail (Maybe CatalogType)
metadataCatalogDetail_catalogType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetadataCatalogDetail' {Maybe CatalogType
catalogType :: Maybe CatalogType
$sel:catalogType:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe CatalogType
catalogType} -> Maybe CatalogType
catalogType) (\s :: MetadataCatalogDetail
s@MetadataCatalogDetail' {} Maybe CatalogType
a -> MetadataCatalogDetail
s {$sel:catalogType:MetadataCatalogDetail' :: Maybe CatalogType
catalogType = Maybe CatalogType
a} :: MetadataCatalogDetail)
metadataCatalogDetail_partitionRegistrationOutput :: Lens.Lens' MetadataCatalogDetail (Prelude.Maybe RegistrationOutput)
metadataCatalogDetail_partitionRegistrationOutput :: Lens' MetadataCatalogDetail (Maybe RegistrationOutput)
metadataCatalogDetail_partitionRegistrationOutput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetadataCatalogDetail' {Maybe RegistrationOutput
partitionRegistrationOutput :: Maybe RegistrationOutput
$sel:partitionRegistrationOutput:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe RegistrationOutput
partitionRegistrationOutput} -> Maybe RegistrationOutput
partitionRegistrationOutput) (\s :: MetadataCatalogDetail
s@MetadataCatalogDetail' {} Maybe RegistrationOutput
a -> MetadataCatalogDetail
s {$sel:partitionRegistrationOutput:MetadataCatalogDetail' :: Maybe RegistrationOutput
partitionRegistrationOutput = Maybe RegistrationOutput
a} :: MetadataCatalogDetail)
metadataCatalogDetail_tableName :: Lens.Lens' MetadataCatalogDetail (Prelude.Maybe Prelude.Text)
metadataCatalogDetail_tableName :: Lens' MetadataCatalogDetail (Maybe Text)
metadataCatalogDetail_tableName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetadataCatalogDetail' {Maybe Text
tableName :: Maybe Text
$sel:tableName:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: MetadataCatalogDetail
s@MetadataCatalogDetail' {} Maybe Text
a -> MetadataCatalogDetail
s {$sel:tableName:MetadataCatalogDetail' :: Maybe Text
tableName = Maybe Text
a} :: MetadataCatalogDetail)
metadataCatalogDetail_tableRegistrationOutput :: Lens.Lens' MetadataCatalogDetail (Prelude.Maybe RegistrationOutput)
metadataCatalogDetail_tableRegistrationOutput :: Lens' MetadataCatalogDetail (Maybe RegistrationOutput)
metadataCatalogDetail_tableRegistrationOutput = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MetadataCatalogDetail' {Maybe RegistrationOutput
tableRegistrationOutput :: Maybe RegistrationOutput
$sel:tableRegistrationOutput:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe RegistrationOutput
tableRegistrationOutput} -> Maybe RegistrationOutput
tableRegistrationOutput) (\s :: MetadataCatalogDetail
s@MetadataCatalogDetail' {} Maybe RegistrationOutput
a -> MetadataCatalogDetail
s {$sel:tableRegistrationOutput:MetadataCatalogDetail' :: Maybe RegistrationOutput
tableRegistrationOutput = Maybe RegistrationOutput
a} :: MetadataCatalogDetail)
instance Data.FromJSON MetadataCatalogDetail where
parseJSON :: Value -> Parser MetadataCatalogDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MetadataCatalogDetail"
( \Object
x ->
Maybe CatalogType
-> Maybe RegistrationOutput
-> Maybe Text
-> Maybe RegistrationOutput
-> MetadataCatalogDetail
MetadataCatalogDetail'
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
"catalogType")
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
"partitionRegistrationOutput")
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
"tableName")
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
"tableRegistrationOutput")
)
instance Prelude.Hashable MetadataCatalogDetail where
hashWithSalt :: Int -> MetadataCatalogDetail -> Int
hashWithSalt Int
_salt MetadataCatalogDetail' {Maybe Text
Maybe CatalogType
Maybe RegistrationOutput
tableRegistrationOutput :: Maybe RegistrationOutput
tableName :: Maybe Text
partitionRegistrationOutput :: Maybe RegistrationOutput
catalogType :: Maybe CatalogType
$sel:tableRegistrationOutput:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe RegistrationOutput
$sel:tableName:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe Text
$sel:partitionRegistrationOutput:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe RegistrationOutput
$sel:catalogType:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe CatalogType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CatalogType
catalogType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RegistrationOutput
partitionRegistrationOutput
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tableName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RegistrationOutput
tableRegistrationOutput
instance Prelude.NFData MetadataCatalogDetail where
rnf :: MetadataCatalogDetail -> ()
rnf MetadataCatalogDetail' {Maybe Text
Maybe CatalogType
Maybe RegistrationOutput
tableRegistrationOutput :: Maybe RegistrationOutput
tableName :: Maybe Text
partitionRegistrationOutput :: Maybe RegistrationOutput
catalogType :: Maybe CatalogType
$sel:tableRegistrationOutput:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe RegistrationOutput
$sel:tableName:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe Text
$sel:partitionRegistrationOutput:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe RegistrationOutput
$sel:catalogType:MetadataCatalogDetail' :: MetadataCatalogDetail -> Maybe CatalogType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CatalogType
catalogType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RegistrationOutput
partitionRegistrationOutput
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tableName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RegistrationOutput
tableRegistrationOutput