{-# 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.KafkaConnect.Types.LogDeliveryDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KafkaConnect.Types.WorkerLogDeliveryDescription
import qualified Amazonka.Prelude as Prelude
data LogDeliveryDescription = LogDeliveryDescription'
{
LogDeliveryDescription -> Maybe WorkerLogDeliveryDescription
workerLogDelivery :: Prelude.Maybe WorkerLogDeliveryDescription
}
deriving (LogDeliveryDescription -> LogDeliveryDescription -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogDeliveryDescription -> LogDeliveryDescription -> Bool
$c/= :: LogDeliveryDescription -> LogDeliveryDescription -> Bool
== :: LogDeliveryDescription -> LogDeliveryDescription -> Bool
$c== :: LogDeliveryDescription -> LogDeliveryDescription -> Bool
Prelude.Eq, ReadPrec [LogDeliveryDescription]
ReadPrec LogDeliveryDescription
Int -> ReadS LogDeliveryDescription
ReadS [LogDeliveryDescription]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogDeliveryDescription]
$creadListPrec :: ReadPrec [LogDeliveryDescription]
readPrec :: ReadPrec LogDeliveryDescription
$creadPrec :: ReadPrec LogDeliveryDescription
readList :: ReadS [LogDeliveryDescription]
$creadList :: ReadS [LogDeliveryDescription]
readsPrec :: Int -> ReadS LogDeliveryDescription
$creadsPrec :: Int -> ReadS LogDeliveryDescription
Prelude.Read, Int -> LogDeliveryDescription -> ShowS
[LogDeliveryDescription] -> ShowS
LogDeliveryDescription -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogDeliveryDescription] -> ShowS
$cshowList :: [LogDeliveryDescription] -> ShowS
show :: LogDeliveryDescription -> String
$cshow :: LogDeliveryDescription -> String
showsPrec :: Int -> LogDeliveryDescription -> ShowS
$cshowsPrec :: Int -> LogDeliveryDescription -> ShowS
Prelude.Show, forall x. Rep LogDeliveryDescription x -> LogDeliveryDescription
forall x. LogDeliveryDescription -> Rep LogDeliveryDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LogDeliveryDescription x -> LogDeliveryDescription
$cfrom :: forall x. LogDeliveryDescription -> Rep LogDeliveryDescription x
Prelude.Generic)
newLogDeliveryDescription ::
LogDeliveryDescription
newLogDeliveryDescription :: LogDeliveryDescription
newLogDeliveryDescription =
LogDeliveryDescription'
{ $sel:workerLogDelivery:LogDeliveryDescription' :: Maybe WorkerLogDeliveryDescription
workerLogDelivery =
forall a. Maybe a
Prelude.Nothing
}
logDeliveryDescription_workerLogDelivery :: Lens.Lens' LogDeliveryDescription (Prelude.Maybe WorkerLogDeliveryDescription)
logDeliveryDescription_workerLogDelivery :: Lens' LogDeliveryDescription (Maybe WorkerLogDeliveryDescription)
logDeliveryDescription_workerLogDelivery = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogDeliveryDescription' {Maybe WorkerLogDeliveryDescription
workerLogDelivery :: Maybe WorkerLogDeliveryDescription
$sel:workerLogDelivery:LogDeliveryDescription' :: LogDeliveryDescription -> Maybe WorkerLogDeliveryDescription
workerLogDelivery} -> Maybe WorkerLogDeliveryDescription
workerLogDelivery) (\s :: LogDeliveryDescription
s@LogDeliveryDescription' {} Maybe WorkerLogDeliveryDescription
a -> LogDeliveryDescription
s {$sel:workerLogDelivery:LogDeliveryDescription' :: Maybe WorkerLogDeliveryDescription
workerLogDelivery = Maybe WorkerLogDeliveryDescription
a} :: LogDeliveryDescription)
instance Data.FromJSON LogDeliveryDescription where
parseJSON :: Value -> Parser LogDeliveryDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LogDeliveryDescription"
( \Object
x ->
Maybe WorkerLogDeliveryDescription -> LogDeliveryDescription
LogDeliveryDescription'
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
"workerLogDelivery")
)
instance Prelude.Hashable LogDeliveryDescription where
hashWithSalt :: Int -> LogDeliveryDescription -> Int
hashWithSalt Int
_salt LogDeliveryDescription' {Maybe WorkerLogDeliveryDescription
workerLogDelivery :: Maybe WorkerLogDeliveryDescription
$sel:workerLogDelivery:LogDeliveryDescription' :: LogDeliveryDescription -> Maybe WorkerLogDeliveryDescription
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkerLogDeliveryDescription
workerLogDelivery
instance Prelude.NFData LogDeliveryDescription where
rnf :: LogDeliveryDescription -> ()
rnf LogDeliveryDescription' {Maybe WorkerLogDeliveryDescription
workerLogDelivery :: Maybe WorkerLogDeliveryDescription
$sel:workerLogDelivery:LogDeliveryDescription' :: LogDeliveryDescription -> Maybe WorkerLogDeliveryDescription
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkerLogDeliveryDescription
workerLogDelivery