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