{-# 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.CodePipeline.Types.LambdaExecutorConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data LambdaExecutorConfiguration = LambdaExecutorConfiguration'
{
LambdaExecutorConfiguration -> Text
lambdaFunctionArn :: Prelude.Text
}
deriving (LambdaExecutorConfiguration -> LambdaExecutorConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaExecutorConfiguration -> LambdaExecutorConfiguration -> Bool
$c/= :: LambdaExecutorConfiguration -> LambdaExecutorConfiguration -> Bool
== :: LambdaExecutorConfiguration -> LambdaExecutorConfiguration -> Bool
$c== :: LambdaExecutorConfiguration -> LambdaExecutorConfiguration -> Bool
Prelude.Eq, ReadPrec [LambdaExecutorConfiguration]
ReadPrec LambdaExecutorConfiguration
Int -> ReadS LambdaExecutorConfiguration
ReadS [LambdaExecutorConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaExecutorConfiguration]
$creadListPrec :: ReadPrec [LambdaExecutorConfiguration]
readPrec :: ReadPrec LambdaExecutorConfiguration
$creadPrec :: ReadPrec LambdaExecutorConfiguration
readList :: ReadS [LambdaExecutorConfiguration]
$creadList :: ReadS [LambdaExecutorConfiguration]
readsPrec :: Int -> ReadS LambdaExecutorConfiguration
$creadsPrec :: Int -> ReadS LambdaExecutorConfiguration
Prelude.Read, Int -> LambdaExecutorConfiguration -> ShowS
[LambdaExecutorConfiguration] -> ShowS
LambdaExecutorConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaExecutorConfiguration] -> ShowS
$cshowList :: [LambdaExecutorConfiguration] -> ShowS
show :: LambdaExecutorConfiguration -> String
$cshow :: LambdaExecutorConfiguration -> String
showsPrec :: Int -> LambdaExecutorConfiguration -> ShowS
$cshowsPrec :: Int -> LambdaExecutorConfiguration -> ShowS
Prelude.Show, forall x.
Rep LambdaExecutorConfiguration x -> LambdaExecutorConfiguration
forall x.
LambdaExecutorConfiguration -> Rep LambdaExecutorConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LambdaExecutorConfiguration x -> LambdaExecutorConfiguration
$cfrom :: forall x.
LambdaExecutorConfiguration -> Rep LambdaExecutorConfiguration x
Prelude.Generic)
newLambdaExecutorConfiguration ::
Prelude.Text ->
LambdaExecutorConfiguration
newLambdaExecutorConfiguration :: Text -> LambdaExecutorConfiguration
newLambdaExecutorConfiguration Text
pLambdaFunctionArn_ =
LambdaExecutorConfiguration'
{ $sel:lambdaFunctionArn:LambdaExecutorConfiguration' :: Text
lambdaFunctionArn =
Text
pLambdaFunctionArn_
}
lambdaExecutorConfiguration_lambdaFunctionArn :: Lens.Lens' LambdaExecutorConfiguration Prelude.Text
lambdaExecutorConfiguration_lambdaFunctionArn :: Lens' LambdaExecutorConfiguration Text
lambdaExecutorConfiguration_lambdaFunctionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaExecutorConfiguration' {Text
lambdaFunctionArn :: Text
$sel:lambdaFunctionArn:LambdaExecutorConfiguration' :: LambdaExecutorConfiguration -> Text
lambdaFunctionArn} -> Text
lambdaFunctionArn) (\s :: LambdaExecutorConfiguration
s@LambdaExecutorConfiguration' {} Text
a -> LambdaExecutorConfiguration
s {$sel:lambdaFunctionArn:LambdaExecutorConfiguration' :: Text
lambdaFunctionArn = Text
a} :: LambdaExecutorConfiguration)
instance Data.FromJSON LambdaExecutorConfiguration where
parseJSON :: Value -> Parser LambdaExecutorConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LambdaExecutorConfiguration"
( \Object
x ->
Text -> LambdaExecutorConfiguration
LambdaExecutorConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"lambdaFunctionArn")
)
instance Prelude.Hashable LambdaExecutorConfiguration where
hashWithSalt :: Int -> LambdaExecutorConfiguration -> Int
hashWithSalt Int
_salt LambdaExecutorConfiguration' {Text
lambdaFunctionArn :: Text
$sel:lambdaFunctionArn:LambdaExecutorConfiguration' :: LambdaExecutorConfiguration -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lambdaFunctionArn
instance Prelude.NFData LambdaExecutorConfiguration where
rnf :: LambdaExecutorConfiguration -> ()
rnf LambdaExecutorConfiguration' {Text
lambdaFunctionArn :: Text
$sel:lambdaFunctionArn:LambdaExecutorConfiguration' :: LambdaExecutorConfiguration -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
lambdaFunctionArn
instance Data.ToJSON LambdaExecutorConfiguration where
toJSON :: LambdaExecutorConfiguration -> Value
toJSON LambdaExecutorConfiguration' {Text
lambdaFunctionArn :: Text
$sel:lambdaFunctionArn:LambdaExecutorConfiguration' :: LambdaExecutorConfiguration -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"lambdaFunctionArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
lambdaFunctionArn)
]
)