{-# 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.KinesisAnalytics.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,
CloudWatchLoggingOption -> Text
roleARN :: 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 ->
Prelude.Text ->
CloudWatchLoggingOption
newCloudWatchLoggingOption :: Text -> Text -> CloudWatchLoggingOption
newCloudWatchLoggingOption Text
pLogStreamARN_ Text
pRoleARN_ =
CloudWatchLoggingOption'
{ $sel:logStreamARN:CloudWatchLoggingOption' :: Text
logStreamARN =
Text
pLogStreamARN_,
$sel:roleARN:CloudWatchLoggingOption' :: Text
roleARN = Text
pRoleARN_
}
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)
cloudWatchLoggingOption_roleARN :: Lens.Lens' CloudWatchLoggingOption Prelude.Text
cloudWatchLoggingOption_roleARN :: Lens' CloudWatchLoggingOption Text
cloudWatchLoggingOption_roleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLoggingOption' {Text
roleARN :: Text
$sel:roleARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> Text
roleARN} -> Text
roleARN) (\s :: CloudWatchLoggingOption
s@CloudWatchLoggingOption' {} Text
a -> CloudWatchLoggingOption
s {$sel:roleARN:CloudWatchLoggingOption' :: Text
roleARN = Text
a} :: CloudWatchLoggingOption)
instance Prelude.Hashable CloudWatchLoggingOption where
hashWithSalt :: Int -> CloudWatchLoggingOption -> Int
hashWithSalt Int
_salt CloudWatchLoggingOption' {Text
roleARN :: Text
logStreamARN :: Text
$sel:roleARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> Text
$sel:logStreamARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
logStreamARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleARN
instance Prelude.NFData CloudWatchLoggingOption where
rnf :: CloudWatchLoggingOption -> ()
rnf CloudWatchLoggingOption' {Text
roleARN :: Text
logStreamARN :: Text
$sel:roleARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> Text
$sel:logStreamARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
logStreamARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleARN
instance Data.ToJSON CloudWatchLoggingOption where
toJSON :: CloudWatchLoggingOption -> Value
toJSON CloudWatchLoggingOption' {Text
roleARN :: Text
logStreamARN :: Text
$sel:roleARN:CloudWatchLoggingOption' :: CloudWatchLoggingOption -> 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),
forall a. a -> Maybe a
Prelude.Just (Key
"RoleARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleARN)
]
)