{-# 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.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
resourceARN :: Prelude.Maybe Prelude.Text,
LambdaOutputDescription -> Maybe Text
roleARN :: Prelude.Maybe 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 ::
LambdaOutputDescription
newLambdaOutputDescription :: LambdaOutputDescription
newLambdaOutputDescription =
LambdaOutputDescription' :: Maybe Text -> Maybe Text -> LambdaOutputDescription
LambdaOutputDescription'
{ $sel:resourceARN:LambdaOutputDescription' :: Maybe Text
resourceARN =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:LambdaOutputDescription' :: Maybe Text
roleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
lambdaOutputDescription_resourceARN :: Lens.Lens' LambdaOutputDescription (Prelude.Maybe Prelude.Text)
lambdaOutputDescription_resourceARN :: (Maybe Text -> f (Maybe Text))
-> LambdaOutputDescription -> f LambdaOutputDescription
lambdaOutputDescription_resourceARN = (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
resourceARN :: Maybe Text
$sel:resourceARN:LambdaOutputDescription' :: LambdaOutputDescription -> Maybe Text
resourceARN} -> Maybe Text
resourceARN) (\s :: LambdaOutputDescription
s@LambdaOutputDescription' {} Maybe Text
a -> LambdaOutputDescription
s {$sel:resourceARN:LambdaOutputDescription' :: Maybe Text
resourceARN = Maybe Text
a} :: LambdaOutputDescription)
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)
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 -> Maybe Text -> LambdaOutputDescription
LambdaOutputDescription'
(Maybe Text -> Maybe Text -> LambdaOutputDescription)
-> Parser (Maybe Text)
-> Parser (Maybe 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
"ResourceARN")
Parser (Maybe Text -> LambdaOutputDescription)
-> Parser (Maybe Text) -> Parser LambdaOutputDescription
forall (f :: * -> *) a b. Applicative f => 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")
)
instance Prelude.Hashable LambdaOutputDescription
instance Prelude.NFData LambdaOutputDescription