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