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