{-# 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.LogDelivery where
import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.Types.WorkerLogDelivery
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LogDelivery = LogDelivery'
{
LogDelivery -> WorkerLogDelivery
workerLogDelivery :: WorkerLogDelivery
}
deriving (LogDelivery -> LogDelivery -> Bool
(LogDelivery -> LogDelivery -> Bool)
-> (LogDelivery -> LogDelivery -> Bool) -> Eq LogDelivery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogDelivery -> LogDelivery -> Bool
$c/= :: LogDelivery -> LogDelivery -> Bool
== :: LogDelivery -> LogDelivery -> Bool
$c== :: LogDelivery -> LogDelivery -> Bool
Prelude.Eq, ReadPrec [LogDelivery]
ReadPrec LogDelivery
Int -> ReadS LogDelivery
ReadS [LogDelivery]
(Int -> ReadS LogDelivery)
-> ReadS [LogDelivery]
-> ReadPrec LogDelivery
-> ReadPrec [LogDelivery]
-> Read LogDelivery
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogDelivery]
$creadListPrec :: ReadPrec [LogDelivery]
readPrec :: ReadPrec LogDelivery
$creadPrec :: ReadPrec LogDelivery
readList :: ReadS [LogDelivery]
$creadList :: ReadS [LogDelivery]
readsPrec :: Int -> ReadS LogDelivery
$creadsPrec :: Int -> ReadS LogDelivery
Prelude.Read, Int -> LogDelivery -> ShowS
[LogDelivery] -> ShowS
LogDelivery -> String
(Int -> LogDelivery -> ShowS)
-> (LogDelivery -> String)
-> ([LogDelivery] -> ShowS)
-> Show LogDelivery
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogDelivery] -> ShowS
$cshowList :: [LogDelivery] -> ShowS
show :: LogDelivery -> String
$cshow :: LogDelivery -> String
showsPrec :: Int -> LogDelivery -> ShowS
$cshowsPrec :: Int -> LogDelivery -> ShowS
Prelude.Show, (forall x. LogDelivery -> Rep LogDelivery x)
-> (forall x. Rep LogDelivery x -> LogDelivery)
-> Generic LogDelivery
forall x. Rep LogDelivery x -> LogDelivery
forall x. LogDelivery -> Rep LogDelivery x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LogDelivery x -> LogDelivery
$cfrom :: forall x. LogDelivery -> Rep LogDelivery x
Prelude.Generic)
newLogDelivery ::
WorkerLogDelivery ->
LogDelivery
newLogDelivery :: WorkerLogDelivery -> LogDelivery
newLogDelivery WorkerLogDelivery
pWorkerLogDelivery_ =
LogDelivery' :: WorkerLogDelivery -> LogDelivery
LogDelivery'
{ $sel:workerLogDelivery:LogDelivery' :: WorkerLogDelivery
workerLogDelivery =
WorkerLogDelivery
pWorkerLogDelivery_
}
logDelivery_workerLogDelivery :: Lens.Lens' LogDelivery WorkerLogDelivery
logDelivery_workerLogDelivery :: (WorkerLogDelivery -> f WorkerLogDelivery)
-> LogDelivery -> f LogDelivery
logDelivery_workerLogDelivery = (LogDelivery -> WorkerLogDelivery)
-> (LogDelivery -> WorkerLogDelivery -> LogDelivery)
-> Lens LogDelivery LogDelivery WorkerLogDelivery WorkerLogDelivery
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogDelivery' {WorkerLogDelivery
workerLogDelivery :: WorkerLogDelivery
$sel:workerLogDelivery:LogDelivery' :: LogDelivery -> WorkerLogDelivery
workerLogDelivery} -> WorkerLogDelivery
workerLogDelivery) (\s :: LogDelivery
s@LogDelivery' {} WorkerLogDelivery
a -> LogDelivery
s {$sel:workerLogDelivery:LogDelivery' :: WorkerLogDelivery
workerLogDelivery = WorkerLogDelivery
a} :: LogDelivery)
instance Prelude.Hashable LogDelivery
instance Prelude.NFData LogDelivery
instance Core.ToJSON LogDelivery where
toJSON :: LogDelivery -> Value
toJSON LogDelivery' {WorkerLogDelivery
workerLogDelivery :: WorkerLogDelivery
$sel:workerLogDelivery:LogDelivery' :: LogDelivery -> WorkerLogDelivery
..} =
[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
"workerLogDelivery" Text -> WorkerLogDelivery -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= WorkerLogDelivery
workerLogDelivery)
]
)