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