{-# 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.WorkerLogDeliveryDescription where
import qualified Amazonka.Core as Core
import Amazonka.KafkaConnect.Types.CloudWatchLogsLogDeliveryDescription
import Amazonka.KafkaConnect.Types.FirehoseLogDeliveryDescription
import Amazonka.KafkaConnect.Types.S3LogDeliveryDescription
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data WorkerLogDeliveryDescription = WorkerLogDeliveryDescription'
{
WorkerLogDeliveryDescription
-> Maybe CloudWatchLogsLogDeliveryDescription
cloudWatchLogs :: Prelude.Maybe CloudWatchLogsLogDeliveryDescription,
WorkerLogDeliveryDescription
-> Maybe FirehoseLogDeliveryDescription
firehose :: Prelude.Maybe FirehoseLogDeliveryDescription,
WorkerLogDeliveryDescription -> Maybe S3LogDeliveryDescription
s3 :: Prelude.Maybe S3LogDeliveryDescription
}
deriving (WorkerLogDeliveryDescription
-> WorkerLogDeliveryDescription -> Bool
(WorkerLogDeliveryDescription
-> WorkerLogDeliveryDescription -> Bool)
-> (WorkerLogDeliveryDescription
-> WorkerLogDeliveryDescription -> Bool)
-> Eq WorkerLogDeliveryDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkerLogDeliveryDescription
-> WorkerLogDeliveryDescription -> Bool
$c/= :: WorkerLogDeliveryDescription
-> WorkerLogDeliveryDescription -> Bool
== :: WorkerLogDeliveryDescription
-> WorkerLogDeliveryDescription -> Bool
$c== :: WorkerLogDeliveryDescription
-> WorkerLogDeliveryDescription -> Bool
Prelude.Eq, ReadPrec [WorkerLogDeliveryDescription]
ReadPrec WorkerLogDeliveryDescription
Int -> ReadS WorkerLogDeliveryDescription
ReadS [WorkerLogDeliveryDescription]
(Int -> ReadS WorkerLogDeliveryDescription)
-> ReadS [WorkerLogDeliveryDescription]
-> ReadPrec WorkerLogDeliveryDescription
-> ReadPrec [WorkerLogDeliveryDescription]
-> Read WorkerLogDeliveryDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkerLogDeliveryDescription]
$creadListPrec :: ReadPrec [WorkerLogDeliveryDescription]
readPrec :: ReadPrec WorkerLogDeliveryDescription
$creadPrec :: ReadPrec WorkerLogDeliveryDescription
readList :: ReadS [WorkerLogDeliveryDescription]
$creadList :: ReadS [WorkerLogDeliveryDescription]
readsPrec :: Int -> ReadS WorkerLogDeliveryDescription
$creadsPrec :: Int -> ReadS WorkerLogDeliveryDescription
Prelude.Read, Int -> WorkerLogDeliveryDescription -> ShowS
[WorkerLogDeliveryDescription] -> ShowS
WorkerLogDeliveryDescription -> String
(Int -> WorkerLogDeliveryDescription -> ShowS)
-> (WorkerLogDeliveryDescription -> String)
-> ([WorkerLogDeliveryDescription] -> ShowS)
-> Show WorkerLogDeliveryDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkerLogDeliveryDescription] -> ShowS
$cshowList :: [WorkerLogDeliveryDescription] -> ShowS
show :: WorkerLogDeliveryDescription -> String
$cshow :: WorkerLogDeliveryDescription -> String
showsPrec :: Int -> WorkerLogDeliveryDescription -> ShowS
$cshowsPrec :: Int -> WorkerLogDeliveryDescription -> ShowS
Prelude.Show, (forall x.
WorkerLogDeliveryDescription -> Rep WorkerLogDeliveryDescription x)
-> (forall x.
Rep WorkerLogDeliveryDescription x -> WorkerLogDeliveryDescription)
-> Generic WorkerLogDeliveryDescription
forall x.
Rep WorkerLogDeliveryDescription x -> WorkerLogDeliveryDescription
forall x.
WorkerLogDeliveryDescription -> Rep WorkerLogDeliveryDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkerLogDeliveryDescription x -> WorkerLogDeliveryDescription
$cfrom :: forall x.
WorkerLogDeliveryDescription -> Rep WorkerLogDeliveryDescription x
Prelude.Generic)
newWorkerLogDeliveryDescription ::
WorkerLogDeliveryDescription
newWorkerLogDeliveryDescription :: WorkerLogDeliveryDescription
newWorkerLogDeliveryDescription =
WorkerLogDeliveryDescription' :: Maybe CloudWatchLogsLogDeliveryDescription
-> Maybe FirehoseLogDeliveryDescription
-> Maybe S3LogDeliveryDescription
-> WorkerLogDeliveryDescription
WorkerLogDeliveryDescription'
{ $sel:cloudWatchLogs:WorkerLogDeliveryDescription' :: Maybe CloudWatchLogsLogDeliveryDescription
cloudWatchLogs =
Maybe CloudWatchLogsLogDeliveryDescription
forall a. Maybe a
Prelude.Nothing,
$sel:firehose:WorkerLogDeliveryDescription' :: Maybe FirehoseLogDeliveryDescription
firehose = Maybe FirehoseLogDeliveryDescription
forall a. Maybe a
Prelude.Nothing,
$sel:s3:WorkerLogDeliveryDescription' :: Maybe S3LogDeliveryDescription
s3 = Maybe S3LogDeliveryDescription
forall a. Maybe a
Prelude.Nothing
}
workerLogDeliveryDescription_cloudWatchLogs :: Lens.Lens' WorkerLogDeliveryDescription (Prelude.Maybe CloudWatchLogsLogDeliveryDescription)
workerLogDeliveryDescription_cloudWatchLogs :: (Maybe CloudWatchLogsLogDeliveryDescription
-> f (Maybe CloudWatchLogsLogDeliveryDescription))
-> WorkerLogDeliveryDescription -> f WorkerLogDeliveryDescription
workerLogDeliveryDescription_cloudWatchLogs = (WorkerLogDeliveryDescription
-> Maybe CloudWatchLogsLogDeliveryDescription)
-> (WorkerLogDeliveryDescription
-> Maybe CloudWatchLogsLogDeliveryDescription
-> WorkerLogDeliveryDescription)
-> Lens
WorkerLogDeliveryDescription
WorkerLogDeliveryDescription
(Maybe CloudWatchLogsLogDeliveryDescription)
(Maybe CloudWatchLogsLogDeliveryDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkerLogDeliveryDescription' {Maybe CloudWatchLogsLogDeliveryDescription
cloudWatchLogs :: Maybe CloudWatchLogsLogDeliveryDescription
$sel:cloudWatchLogs:WorkerLogDeliveryDescription' :: WorkerLogDeliveryDescription
-> Maybe CloudWatchLogsLogDeliveryDescription
cloudWatchLogs} -> Maybe CloudWatchLogsLogDeliveryDescription
cloudWatchLogs) (\s :: WorkerLogDeliveryDescription
s@WorkerLogDeliveryDescription' {} Maybe CloudWatchLogsLogDeliveryDescription
a -> WorkerLogDeliveryDescription
s {$sel:cloudWatchLogs:WorkerLogDeliveryDescription' :: Maybe CloudWatchLogsLogDeliveryDescription
cloudWatchLogs = Maybe CloudWatchLogsLogDeliveryDescription
a} :: WorkerLogDeliveryDescription)
workerLogDeliveryDescription_firehose :: Lens.Lens' WorkerLogDeliveryDescription (Prelude.Maybe FirehoseLogDeliveryDescription)
workerLogDeliveryDescription_firehose :: (Maybe FirehoseLogDeliveryDescription
-> f (Maybe FirehoseLogDeliveryDescription))
-> WorkerLogDeliveryDescription -> f WorkerLogDeliveryDescription
workerLogDeliveryDescription_firehose = (WorkerLogDeliveryDescription
-> Maybe FirehoseLogDeliveryDescription)
-> (WorkerLogDeliveryDescription
-> Maybe FirehoseLogDeliveryDescription
-> WorkerLogDeliveryDescription)
-> Lens
WorkerLogDeliveryDescription
WorkerLogDeliveryDescription
(Maybe FirehoseLogDeliveryDescription)
(Maybe FirehoseLogDeliveryDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkerLogDeliveryDescription' {Maybe FirehoseLogDeliveryDescription
firehose :: Maybe FirehoseLogDeliveryDescription
$sel:firehose:WorkerLogDeliveryDescription' :: WorkerLogDeliveryDescription
-> Maybe FirehoseLogDeliveryDescription
firehose} -> Maybe FirehoseLogDeliveryDescription
firehose) (\s :: WorkerLogDeliveryDescription
s@WorkerLogDeliveryDescription' {} Maybe FirehoseLogDeliveryDescription
a -> WorkerLogDeliveryDescription
s {$sel:firehose:WorkerLogDeliveryDescription' :: Maybe FirehoseLogDeliveryDescription
firehose = Maybe FirehoseLogDeliveryDescription
a} :: WorkerLogDeliveryDescription)
workerLogDeliveryDescription_s3 :: Lens.Lens' WorkerLogDeliveryDescription (Prelude.Maybe S3LogDeliveryDescription)
workerLogDeliveryDescription_s3 :: (Maybe S3LogDeliveryDescription
-> f (Maybe S3LogDeliveryDescription))
-> WorkerLogDeliveryDescription -> f WorkerLogDeliveryDescription
workerLogDeliveryDescription_s3 = (WorkerLogDeliveryDescription -> Maybe S3LogDeliveryDescription)
-> (WorkerLogDeliveryDescription
-> Maybe S3LogDeliveryDescription -> WorkerLogDeliveryDescription)
-> Lens
WorkerLogDeliveryDescription
WorkerLogDeliveryDescription
(Maybe S3LogDeliveryDescription)
(Maybe S3LogDeliveryDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkerLogDeliveryDescription' {Maybe S3LogDeliveryDescription
s3 :: Maybe S3LogDeliveryDescription
$sel:s3:WorkerLogDeliveryDescription' :: WorkerLogDeliveryDescription -> Maybe S3LogDeliveryDescription
s3} -> Maybe S3LogDeliveryDescription
s3) (\s :: WorkerLogDeliveryDescription
s@WorkerLogDeliveryDescription' {} Maybe S3LogDeliveryDescription
a -> WorkerLogDeliveryDescription
s {$sel:s3:WorkerLogDeliveryDescription' :: Maybe S3LogDeliveryDescription
s3 = Maybe S3LogDeliveryDescription
a} :: WorkerLogDeliveryDescription)
instance Core.FromJSON WorkerLogDeliveryDescription where
parseJSON :: Value -> Parser WorkerLogDeliveryDescription
parseJSON =
String
-> (Object -> Parser WorkerLogDeliveryDescription)
-> Value
-> Parser WorkerLogDeliveryDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"WorkerLogDeliveryDescription"
( \Object
x ->
Maybe CloudWatchLogsLogDeliveryDescription
-> Maybe FirehoseLogDeliveryDescription
-> Maybe S3LogDeliveryDescription
-> WorkerLogDeliveryDescription
WorkerLogDeliveryDescription'
(Maybe CloudWatchLogsLogDeliveryDescription
-> Maybe FirehoseLogDeliveryDescription
-> Maybe S3LogDeliveryDescription
-> WorkerLogDeliveryDescription)
-> Parser (Maybe CloudWatchLogsLogDeliveryDescription)
-> Parser
(Maybe FirehoseLogDeliveryDescription
-> Maybe S3LogDeliveryDescription -> WorkerLogDeliveryDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe CloudWatchLogsLogDeliveryDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cloudWatchLogs")
Parser
(Maybe FirehoseLogDeliveryDescription
-> Maybe S3LogDeliveryDescription -> WorkerLogDeliveryDescription)
-> Parser (Maybe FirehoseLogDeliveryDescription)
-> Parser
(Maybe S3LogDeliveryDescription -> WorkerLogDeliveryDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FirehoseLogDeliveryDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"firehose")
Parser
(Maybe S3LogDeliveryDescription -> WorkerLogDeliveryDescription)
-> Parser (Maybe S3LogDeliveryDescription)
-> Parser WorkerLogDeliveryDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe S3LogDeliveryDescription)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3")
)
instance
Prelude.Hashable
WorkerLogDeliveryDescription
instance Prelude.NFData WorkerLogDeliveryDescription