{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CloudWatchLoggingOption = CloudWatchLoggingOption'
{
CloudWatchLoggingOption -> Text
logStreamARN :: Prelude.Text
}
deriving (CloudWatchLoggingOption -> CloudWatchLoggingOption -> Bool
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]
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
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. 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'
{ $sel:logStreamARN:CloudWatchLoggingOption' :: Text
logStreamARN =
Text
pLogStreamARN_
}
cloudWatchLoggingOption_logStreamARN :: Lens.Lens' CloudWatchLoggingOption Prelude.Text
cloudWatchLoggingOption_logStreamARN :: Lens' CloudWatchLoggingOption Text
cloudWatchLoggingOption_logStreamARN = 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 where
hashWithSalt :: Int -> CloudWatchLoggingOption -> Int
hashWithSalt Int
_salt CloudWatchLoggingOption' {Text
logStreamARN :: Text
$sel:logStreamARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
logStreamARN
instance Prelude.NFData CloudWatchLoggingOption where
rnf :: CloudWatchLoggingOption -> ()
rnf CloudWatchLoggingOption' {Text
logStreamARN :: Text
$sel:logStreamARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
logStreamARN
instance Data.ToJSON CloudWatchLoggingOption where
toJSON :: CloudWatchLoggingOption -> Value
toJSON CloudWatchLoggingOption' {Text
logStreamARN :: Text
$sel:logStreamARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"LogStreamARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
logStreamARN)]
)