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