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