{-# 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.S3LogDelivery where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data S3LogDelivery = S3LogDelivery'
{
S3LogDelivery -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
S3LogDelivery -> Maybe Text
bucket :: Prelude.Maybe Prelude.Text,
S3LogDelivery -> Bool
enabled :: Prelude.Bool
}
deriving (S3LogDelivery -> S3LogDelivery -> Bool
(S3LogDelivery -> S3LogDelivery -> Bool)
-> (S3LogDelivery -> S3LogDelivery -> Bool) -> Eq S3LogDelivery
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3LogDelivery -> S3LogDelivery -> Bool
$c/= :: S3LogDelivery -> S3LogDelivery -> Bool
== :: S3LogDelivery -> S3LogDelivery -> Bool
$c== :: S3LogDelivery -> S3LogDelivery -> Bool
Prelude.Eq, ReadPrec [S3LogDelivery]
ReadPrec S3LogDelivery
Int -> ReadS S3LogDelivery
ReadS [S3LogDelivery]
(Int -> ReadS S3LogDelivery)
-> ReadS [S3LogDelivery]
-> ReadPrec S3LogDelivery
-> ReadPrec [S3LogDelivery]
-> Read S3LogDelivery
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3LogDelivery]
$creadListPrec :: ReadPrec [S3LogDelivery]
readPrec :: ReadPrec S3LogDelivery
$creadPrec :: ReadPrec S3LogDelivery
readList :: ReadS [S3LogDelivery]
$creadList :: ReadS [S3LogDelivery]
readsPrec :: Int -> ReadS S3LogDelivery
$creadsPrec :: Int -> ReadS S3LogDelivery
Prelude.Read, Int -> S3LogDelivery -> ShowS
[S3LogDelivery] -> ShowS
S3LogDelivery -> String
(Int -> S3LogDelivery -> ShowS)
-> (S3LogDelivery -> String)
-> ([S3LogDelivery] -> ShowS)
-> Show S3LogDelivery
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3LogDelivery] -> ShowS
$cshowList :: [S3LogDelivery] -> ShowS
show :: S3LogDelivery -> String
$cshow :: S3LogDelivery -> String
showsPrec :: Int -> S3LogDelivery -> ShowS
$cshowsPrec :: Int -> S3LogDelivery -> ShowS
Prelude.Show, (forall x. S3LogDelivery -> Rep S3LogDelivery x)
-> (forall x. Rep S3LogDelivery x -> S3LogDelivery)
-> Generic S3LogDelivery
forall x. Rep S3LogDelivery x -> S3LogDelivery
forall x. S3LogDelivery -> Rep S3LogDelivery x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3LogDelivery x -> S3LogDelivery
$cfrom :: forall x. S3LogDelivery -> Rep S3LogDelivery x
Prelude.Generic)
newS3LogDelivery ::
Prelude.Bool ->
S3LogDelivery
newS3LogDelivery :: Bool -> S3LogDelivery
newS3LogDelivery Bool
pEnabled_ =
S3LogDelivery' :: Maybe Text -> Maybe Text -> Bool -> S3LogDelivery
S3LogDelivery'
{ $sel:prefix:S3LogDelivery' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucket:S3LogDelivery' :: Maybe Text
bucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:enabled:S3LogDelivery' :: Bool
enabled = Bool
pEnabled_
}
s3LogDelivery_prefix :: Lens.Lens' S3LogDelivery (Prelude.Maybe Prelude.Text)
s3LogDelivery_prefix :: (Maybe Text -> f (Maybe Text)) -> S3LogDelivery -> f S3LogDelivery
s3LogDelivery_prefix = (S3LogDelivery -> Maybe Text)
-> (S3LogDelivery -> Maybe Text -> S3LogDelivery)
-> Lens S3LogDelivery S3LogDelivery (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3LogDelivery' {Maybe Text
prefix :: Maybe Text
$sel:prefix:S3LogDelivery' :: S3LogDelivery -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: S3LogDelivery
s@S3LogDelivery' {} Maybe Text
a -> S3LogDelivery
s {$sel:prefix:S3LogDelivery' :: Maybe Text
prefix = Maybe Text
a} :: S3LogDelivery)
s3LogDelivery_bucket :: Lens.Lens' S3LogDelivery (Prelude.Maybe Prelude.Text)
s3LogDelivery_bucket :: (Maybe Text -> f (Maybe Text)) -> S3LogDelivery -> f S3LogDelivery
s3LogDelivery_bucket = (S3LogDelivery -> Maybe Text)
-> (S3LogDelivery -> Maybe Text -> S3LogDelivery)
-> Lens S3LogDelivery S3LogDelivery (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3LogDelivery' {Maybe Text
bucket :: Maybe Text
$sel:bucket:S3LogDelivery' :: S3LogDelivery -> Maybe Text
bucket} -> Maybe Text
bucket) (\s :: S3LogDelivery
s@S3LogDelivery' {} Maybe Text
a -> S3LogDelivery
s {$sel:bucket:S3LogDelivery' :: Maybe Text
bucket = Maybe Text
a} :: S3LogDelivery)
s3LogDelivery_enabled :: Lens.Lens' S3LogDelivery Prelude.Bool
s3LogDelivery_enabled :: (Bool -> f Bool) -> S3LogDelivery -> f S3LogDelivery
s3LogDelivery_enabled = (S3LogDelivery -> Bool)
-> (S3LogDelivery -> Bool -> S3LogDelivery)
-> Lens S3LogDelivery S3LogDelivery Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3LogDelivery' {Bool
enabled :: Bool
$sel:enabled:S3LogDelivery' :: S3LogDelivery -> Bool
enabled} -> Bool
enabled) (\s :: S3LogDelivery
s@S3LogDelivery' {} Bool
a -> S3LogDelivery
s {$sel:enabled:S3LogDelivery' :: Bool
enabled = Bool
a} :: S3LogDelivery)
instance Prelude.Hashable S3LogDelivery
instance Prelude.NFData S3LogDelivery
instance Core.ToJSON S3LogDelivery where
toJSON :: S3LogDelivery -> Value
toJSON S3LogDelivery' {Bool
Maybe Text
enabled :: Bool
bucket :: Maybe Text
prefix :: Maybe Text
$sel:enabled:S3LogDelivery' :: S3LogDelivery -> Bool
$sel:bucket:S3LogDelivery' :: S3LogDelivery -> Maybe Text
$sel:prefix:S3LogDelivery' :: S3LogDelivery -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"prefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
prefix,
(Text
"bucket" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
bucket,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"enabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
enabled)
]
)