{-# 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.CloudWatchLoggingOptionUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CloudWatchLoggingOptionUpdate = CloudWatchLoggingOptionUpdate'
{
CloudWatchLoggingOptionUpdate -> Maybe Text
roleARNUpdate :: Prelude.Maybe Prelude.Text,
CloudWatchLoggingOptionUpdate -> Maybe Text
logStreamARNUpdate :: Prelude.Maybe Prelude.Text,
CloudWatchLoggingOptionUpdate -> Text
cloudWatchLoggingOptionId :: Prelude.Text
}
deriving (CloudWatchLoggingOptionUpdate
-> CloudWatchLoggingOptionUpdate -> Bool
(CloudWatchLoggingOptionUpdate
-> CloudWatchLoggingOptionUpdate -> Bool)
-> (CloudWatchLoggingOptionUpdate
-> CloudWatchLoggingOptionUpdate -> Bool)
-> Eq CloudWatchLoggingOptionUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLoggingOptionUpdate
-> CloudWatchLoggingOptionUpdate -> Bool
$c/= :: CloudWatchLoggingOptionUpdate
-> CloudWatchLoggingOptionUpdate -> Bool
== :: CloudWatchLoggingOptionUpdate
-> CloudWatchLoggingOptionUpdate -> Bool
$c== :: CloudWatchLoggingOptionUpdate
-> CloudWatchLoggingOptionUpdate -> Bool
Prelude.Eq, ReadPrec [CloudWatchLoggingOptionUpdate]
ReadPrec CloudWatchLoggingOptionUpdate
Int -> ReadS CloudWatchLoggingOptionUpdate
ReadS [CloudWatchLoggingOptionUpdate]
(Int -> ReadS CloudWatchLoggingOptionUpdate)
-> ReadS [CloudWatchLoggingOptionUpdate]
-> ReadPrec CloudWatchLoggingOptionUpdate
-> ReadPrec [CloudWatchLoggingOptionUpdate]
-> Read CloudWatchLoggingOptionUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLoggingOptionUpdate]
$creadListPrec :: ReadPrec [CloudWatchLoggingOptionUpdate]
readPrec :: ReadPrec CloudWatchLoggingOptionUpdate
$creadPrec :: ReadPrec CloudWatchLoggingOptionUpdate
readList :: ReadS [CloudWatchLoggingOptionUpdate]
$creadList :: ReadS [CloudWatchLoggingOptionUpdate]
readsPrec :: Int -> ReadS CloudWatchLoggingOptionUpdate
$creadsPrec :: Int -> ReadS CloudWatchLoggingOptionUpdate
Prelude.Read, Int -> CloudWatchLoggingOptionUpdate -> ShowS
[CloudWatchLoggingOptionUpdate] -> ShowS
CloudWatchLoggingOptionUpdate -> String
(Int -> CloudWatchLoggingOptionUpdate -> ShowS)
-> (CloudWatchLoggingOptionUpdate -> String)
-> ([CloudWatchLoggingOptionUpdate] -> ShowS)
-> Show CloudWatchLoggingOptionUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLoggingOptionUpdate] -> ShowS
$cshowList :: [CloudWatchLoggingOptionUpdate] -> ShowS
show :: CloudWatchLoggingOptionUpdate -> String
$cshow :: CloudWatchLoggingOptionUpdate -> String
showsPrec :: Int -> CloudWatchLoggingOptionUpdate -> ShowS
$cshowsPrec :: Int -> CloudWatchLoggingOptionUpdate -> ShowS
Prelude.Show, (forall x.
CloudWatchLoggingOptionUpdate
-> Rep CloudWatchLoggingOptionUpdate x)
-> (forall x.
Rep CloudWatchLoggingOptionUpdate x
-> CloudWatchLoggingOptionUpdate)
-> Generic CloudWatchLoggingOptionUpdate
forall x.
Rep CloudWatchLoggingOptionUpdate x
-> CloudWatchLoggingOptionUpdate
forall x.
CloudWatchLoggingOptionUpdate
-> Rep CloudWatchLoggingOptionUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudWatchLoggingOptionUpdate x
-> CloudWatchLoggingOptionUpdate
$cfrom :: forall x.
CloudWatchLoggingOptionUpdate
-> Rep CloudWatchLoggingOptionUpdate x
Prelude.Generic)
newCloudWatchLoggingOptionUpdate ::
Prelude.Text ->
CloudWatchLoggingOptionUpdate
newCloudWatchLoggingOptionUpdate :: Text -> CloudWatchLoggingOptionUpdate
newCloudWatchLoggingOptionUpdate
Text
pCloudWatchLoggingOptionId_ =
CloudWatchLoggingOptionUpdate' :: Maybe Text -> Maybe Text -> Text -> CloudWatchLoggingOptionUpdate
CloudWatchLoggingOptionUpdate'
{ $sel:roleARNUpdate:CloudWatchLoggingOptionUpdate' :: Maybe Text
roleARNUpdate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:logStreamARNUpdate:CloudWatchLoggingOptionUpdate' :: Maybe Text
logStreamARNUpdate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionUpdate' :: Text
cloudWatchLoggingOptionId =
Text
pCloudWatchLoggingOptionId_
}
cloudWatchLoggingOptionUpdate_roleARNUpdate :: Lens.Lens' CloudWatchLoggingOptionUpdate (Prelude.Maybe Prelude.Text)
cloudWatchLoggingOptionUpdate_roleARNUpdate :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLoggingOptionUpdate -> f CloudWatchLoggingOptionUpdate
cloudWatchLoggingOptionUpdate_roleARNUpdate = (CloudWatchLoggingOptionUpdate -> Maybe Text)
-> (CloudWatchLoggingOptionUpdate
-> Maybe Text -> CloudWatchLoggingOptionUpdate)
-> Lens
CloudWatchLoggingOptionUpdate
CloudWatchLoggingOptionUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLoggingOptionUpdate' {Maybe Text
roleARNUpdate :: Maybe Text
$sel:roleARNUpdate:CloudWatchLoggingOptionUpdate' :: CloudWatchLoggingOptionUpdate -> Maybe Text
roleARNUpdate} -> Maybe Text
roleARNUpdate) (\s :: CloudWatchLoggingOptionUpdate
s@CloudWatchLoggingOptionUpdate' {} Maybe Text
a -> CloudWatchLoggingOptionUpdate
s {$sel:roleARNUpdate:CloudWatchLoggingOptionUpdate' :: Maybe Text
roleARNUpdate = Maybe Text
a} :: CloudWatchLoggingOptionUpdate)
cloudWatchLoggingOptionUpdate_logStreamARNUpdate :: Lens.Lens' CloudWatchLoggingOptionUpdate (Prelude.Maybe Prelude.Text)
cloudWatchLoggingOptionUpdate_logStreamARNUpdate :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLoggingOptionUpdate -> f CloudWatchLoggingOptionUpdate
cloudWatchLoggingOptionUpdate_logStreamARNUpdate = (CloudWatchLoggingOptionUpdate -> Maybe Text)
-> (CloudWatchLoggingOptionUpdate
-> Maybe Text -> CloudWatchLoggingOptionUpdate)
-> Lens
CloudWatchLoggingOptionUpdate
CloudWatchLoggingOptionUpdate
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLoggingOptionUpdate' {Maybe Text
logStreamARNUpdate :: Maybe Text
$sel:logStreamARNUpdate:CloudWatchLoggingOptionUpdate' :: CloudWatchLoggingOptionUpdate -> Maybe Text
logStreamARNUpdate} -> Maybe Text
logStreamARNUpdate) (\s :: CloudWatchLoggingOptionUpdate
s@CloudWatchLoggingOptionUpdate' {} Maybe Text
a -> CloudWatchLoggingOptionUpdate
s {$sel:logStreamARNUpdate:CloudWatchLoggingOptionUpdate' :: Maybe Text
logStreamARNUpdate = Maybe Text
a} :: CloudWatchLoggingOptionUpdate)
cloudWatchLoggingOptionUpdate_cloudWatchLoggingOptionId :: Lens.Lens' CloudWatchLoggingOptionUpdate Prelude.Text
cloudWatchLoggingOptionUpdate_cloudWatchLoggingOptionId :: (Text -> f Text)
-> CloudWatchLoggingOptionUpdate -> f CloudWatchLoggingOptionUpdate
cloudWatchLoggingOptionUpdate_cloudWatchLoggingOptionId = (CloudWatchLoggingOptionUpdate -> Text)
-> (CloudWatchLoggingOptionUpdate
-> Text -> CloudWatchLoggingOptionUpdate)
-> Lens
CloudWatchLoggingOptionUpdate
CloudWatchLoggingOptionUpdate
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLoggingOptionUpdate' {Text
cloudWatchLoggingOptionId :: Text
$sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionUpdate' :: CloudWatchLoggingOptionUpdate -> Text
cloudWatchLoggingOptionId} -> Text
cloudWatchLoggingOptionId) (\s :: CloudWatchLoggingOptionUpdate
s@CloudWatchLoggingOptionUpdate' {} Text
a -> CloudWatchLoggingOptionUpdate
s {$sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionUpdate' :: Text
cloudWatchLoggingOptionId = Text
a} :: CloudWatchLoggingOptionUpdate)
instance
Prelude.Hashable
CloudWatchLoggingOptionUpdate
instance Prelude.NFData CloudWatchLoggingOptionUpdate
instance Core.ToJSON CloudWatchLoggingOptionUpdate where
toJSON :: CloudWatchLoggingOptionUpdate -> Value
toJSON CloudWatchLoggingOptionUpdate' {Maybe Text
Text
cloudWatchLoggingOptionId :: Text
logStreamARNUpdate :: Maybe Text
roleARNUpdate :: Maybe Text
$sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionUpdate' :: CloudWatchLoggingOptionUpdate -> Text
$sel:logStreamARNUpdate:CloudWatchLoggingOptionUpdate' :: CloudWatchLoggingOptionUpdate -> Maybe Text
$sel:roleARNUpdate:CloudWatchLoggingOptionUpdate' :: CloudWatchLoggingOptionUpdate -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"RoleARNUpdate" 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
roleARNUpdate,
(Text
"LogStreamARNUpdate" 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
logStreamARNUpdate,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"CloudWatchLoggingOptionId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
cloudWatchLoggingOptionId
)
]
)