{-# 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.LambdaOutputDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LambdaOutputDescription = LambdaOutputDescription'
{
LambdaOutputDescription -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
LambdaOutputDescription -> Text
resourceARN :: Prelude.Text
}
deriving (LambdaOutputDescription -> LambdaOutputDescription -> Bool
(LambdaOutputDescription -> LambdaOutputDescription -> Bool)
-> (LambdaOutputDescription -> LambdaOutputDescription -> Bool)
-> Eq LambdaOutputDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaOutputDescription -> LambdaOutputDescription -> Bool
$c/= :: LambdaOutputDescription -> LambdaOutputDescription -> Bool
== :: LambdaOutputDescription -> LambdaOutputDescription -> Bool
$c== :: LambdaOutputDescription -> LambdaOutputDescription -> Bool
Prelude.Eq, ReadPrec [LambdaOutputDescription]
ReadPrec LambdaOutputDescription
Int -> ReadS LambdaOutputDescription
ReadS [LambdaOutputDescription]
(Int -> ReadS LambdaOutputDescription)
-> ReadS [LambdaOutputDescription]
-> ReadPrec LambdaOutputDescription
-> ReadPrec [LambdaOutputDescription]
-> Read LambdaOutputDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaOutputDescription]
$creadListPrec :: ReadPrec [LambdaOutputDescription]
readPrec :: ReadPrec LambdaOutputDescription
$creadPrec :: ReadPrec LambdaOutputDescription
readList :: ReadS [LambdaOutputDescription]
$creadList :: ReadS [LambdaOutputDescription]
readsPrec :: Int -> ReadS LambdaOutputDescription
$creadsPrec :: Int -> ReadS LambdaOutputDescription
Prelude.Read, Int -> LambdaOutputDescription -> ShowS
[LambdaOutputDescription] -> ShowS
LambdaOutputDescription -> String
(Int -> LambdaOutputDescription -> ShowS)
-> (LambdaOutputDescription -> String)
-> ([LambdaOutputDescription] -> ShowS)
-> Show LambdaOutputDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaOutputDescription] -> ShowS
$cshowList :: [LambdaOutputDescription] -> ShowS
show :: LambdaOutputDescription -> String
$cshow :: LambdaOutputDescription -> String
showsPrec :: Int -> LambdaOutputDescription -> ShowS
$cshowsPrec :: Int -> LambdaOutputDescription -> ShowS
Prelude.Show, (forall x.
LambdaOutputDescription -> Rep LambdaOutputDescription x)
-> (forall x.
Rep LambdaOutputDescription x -> LambdaOutputDescription)
-> Generic LambdaOutputDescription
forall x. Rep LambdaOutputDescription x -> LambdaOutputDescription
forall x. LambdaOutputDescription -> Rep LambdaOutputDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LambdaOutputDescription x -> LambdaOutputDescription
$cfrom :: forall x. LambdaOutputDescription -> Rep LambdaOutputDescription x
Prelude.Generic)
newLambdaOutputDescription ::
Prelude.Text ->
LambdaOutputDescription
newLambdaOutputDescription :: Text -> LambdaOutputDescription
newLambdaOutputDescription Text
pResourceARN_ =
LambdaOutputDescription' :: Maybe Text -> Text -> LambdaOutputDescription
LambdaOutputDescription'
{ $sel:roleARN:LambdaOutputDescription' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceARN:LambdaOutputDescription' :: Text
resourceARN = Text
pResourceARN_
}
lambdaOutputDescription_roleARN :: Lens.Lens' LambdaOutputDescription (Prelude.Maybe Prelude.Text)
lambdaOutputDescription_roleARN :: (Maybe Text -> f (Maybe Text))
-> LambdaOutputDescription -> f LambdaOutputDescription
lambdaOutputDescription_roleARN = (LambdaOutputDescription -> Maybe Text)
-> (LambdaOutputDescription
-> Maybe Text -> LambdaOutputDescription)
-> Lens
LambdaOutputDescription
LambdaOutputDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaOutputDescription' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:LambdaOutputDescription' :: LambdaOutputDescription -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: LambdaOutputDescription
s@LambdaOutputDescription' {} Maybe Text
a -> LambdaOutputDescription
s {$sel:roleARN:LambdaOutputDescription' :: Maybe Text
roleARN = Maybe Text
a} :: LambdaOutputDescription)
lambdaOutputDescription_resourceARN :: Lens.Lens' LambdaOutputDescription Prelude.Text
lambdaOutputDescription_resourceARN :: (Text -> f Text)
-> LambdaOutputDescription -> f LambdaOutputDescription
lambdaOutputDescription_resourceARN = (LambdaOutputDescription -> Text)
-> (LambdaOutputDescription -> Text -> LambdaOutputDescription)
-> Lens LambdaOutputDescription LambdaOutputDescription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaOutputDescription' {Text
resourceARN :: Text
$sel:resourceARN:LambdaOutputDescription' :: LambdaOutputDescription -> Text
resourceARN} -> Text
resourceARN) (\s :: LambdaOutputDescription
s@LambdaOutputDescription' {} Text
a -> LambdaOutputDescription
s {$sel:resourceARN:LambdaOutputDescription' :: Text
resourceARN = Text
a} :: LambdaOutputDescription)
instance Core.FromJSON LambdaOutputDescription where
parseJSON :: Value -> Parser LambdaOutputDescription
parseJSON =
String
-> (Object -> Parser LambdaOutputDescription)
-> Value
-> Parser LambdaOutputDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LambdaOutputDescription"
( \Object
x ->
Maybe Text -> Text -> LambdaOutputDescription
LambdaOutputDescription'
(Maybe Text -> Text -> LambdaOutputDescription)
-> Parser (Maybe Text) -> Parser (Text -> LambdaOutputDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RoleARN")
Parser (Text -> LambdaOutputDescription)
-> Parser Text -> Parser LambdaOutputDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ResourceARN")
)
instance Prelude.Hashable LambdaOutputDescription
instance Prelude.NFData LambdaOutputDescription