{-# 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.CodeDeploy.Types.LambdaFunctionInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LambdaFunctionInfo = LambdaFunctionInfo'
{
LambdaFunctionInfo -> Maybe Text
currentVersion :: Prelude.Maybe Prelude.Text,
LambdaFunctionInfo -> Maybe Text
functionAlias :: Prelude.Maybe Prelude.Text,
LambdaFunctionInfo -> Maybe Text
functionName :: Prelude.Maybe Prelude.Text,
LambdaFunctionInfo -> Maybe Text
targetVersion :: Prelude.Maybe Prelude.Text,
LambdaFunctionInfo -> Maybe Double
targetVersionWeight :: Prelude.Maybe Prelude.Double
}
deriving (LambdaFunctionInfo -> LambdaFunctionInfo -> Bool
(LambdaFunctionInfo -> LambdaFunctionInfo -> Bool)
-> (LambdaFunctionInfo -> LambdaFunctionInfo -> Bool)
-> Eq LambdaFunctionInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaFunctionInfo -> LambdaFunctionInfo -> Bool
$c/= :: LambdaFunctionInfo -> LambdaFunctionInfo -> Bool
== :: LambdaFunctionInfo -> LambdaFunctionInfo -> Bool
$c== :: LambdaFunctionInfo -> LambdaFunctionInfo -> Bool
Prelude.Eq, ReadPrec [LambdaFunctionInfo]
ReadPrec LambdaFunctionInfo
Int -> ReadS LambdaFunctionInfo
ReadS [LambdaFunctionInfo]
(Int -> ReadS LambdaFunctionInfo)
-> ReadS [LambdaFunctionInfo]
-> ReadPrec LambdaFunctionInfo
-> ReadPrec [LambdaFunctionInfo]
-> Read LambdaFunctionInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaFunctionInfo]
$creadListPrec :: ReadPrec [LambdaFunctionInfo]
readPrec :: ReadPrec LambdaFunctionInfo
$creadPrec :: ReadPrec LambdaFunctionInfo
readList :: ReadS [LambdaFunctionInfo]
$creadList :: ReadS [LambdaFunctionInfo]
readsPrec :: Int -> ReadS LambdaFunctionInfo
$creadsPrec :: Int -> ReadS LambdaFunctionInfo
Prelude.Read, Int -> LambdaFunctionInfo -> ShowS
[LambdaFunctionInfo] -> ShowS
LambdaFunctionInfo -> String
(Int -> LambdaFunctionInfo -> ShowS)
-> (LambdaFunctionInfo -> String)
-> ([LambdaFunctionInfo] -> ShowS)
-> Show LambdaFunctionInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaFunctionInfo] -> ShowS
$cshowList :: [LambdaFunctionInfo] -> ShowS
show :: LambdaFunctionInfo -> String
$cshow :: LambdaFunctionInfo -> String
showsPrec :: Int -> LambdaFunctionInfo -> ShowS
$cshowsPrec :: Int -> LambdaFunctionInfo -> ShowS
Prelude.Show, (forall x. LambdaFunctionInfo -> Rep LambdaFunctionInfo x)
-> (forall x. Rep LambdaFunctionInfo x -> LambdaFunctionInfo)
-> Generic LambdaFunctionInfo
forall x. Rep LambdaFunctionInfo x -> LambdaFunctionInfo
forall x. LambdaFunctionInfo -> Rep LambdaFunctionInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LambdaFunctionInfo x -> LambdaFunctionInfo
$cfrom :: forall x. LambdaFunctionInfo -> Rep LambdaFunctionInfo x
Prelude.Generic)
newLambdaFunctionInfo ::
LambdaFunctionInfo
newLambdaFunctionInfo :: LambdaFunctionInfo
newLambdaFunctionInfo =
LambdaFunctionInfo' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> LambdaFunctionInfo
LambdaFunctionInfo'
{ $sel:currentVersion:LambdaFunctionInfo' :: Maybe Text
currentVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:functionAlias:LambdaFunctionInfo' :: Maybe Text
functionAlias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:functionName:LambdaFunctionInfo' :: Maybe Text
functionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targetVersion:LambdaFunctionInfo' :: Maybe Text
targetVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:targetVersionWeight:LambdaFunctionInfo' :: Maybe Double
targetVersionWeight = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
lambdaFunctionInfo_currentVersion :: Lens.Lens' LambdaFunctionInfo (Prelude.Maybe Prelude.Text)
lambdaFunctionInfo_currentVersion :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionInfo -> f LambdaFunctionInfo
lambdaFunctionInfo_currentVersion = (LambdaFunctionInfo -> Maybe Text)
-> (LambdaFunctionInfo -> Maybe Text -> LambdaFunctionInfo)
-> Lens
LambdaFunctionInfo LambdaFunctionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionInfo' {Maybe Text
currentVersion :: Maybe Text
$sel:currentVersion:LambdaFunctionInfo' :: LambdaFunctionInfo -> Maybe Text
currentVersion} -> Maybe Text
currentVersion) (\s :: LambdaFunctionInfo
s@LambdaFunctionInfo' {} Maybe Text
a -> LambdaFunctionInfo
s {$sel:currentVersion:LambdaFunctionInfo' :: Maybe Text
currentVersion = Maybe Text
a} :: LambdaFunctionInfo)
lambdaFunctionInfo_functionAlias :: Lens.Lens' LambdaFunctionInfo (Prelude.Maybe Prelude.Text)
lambdaFunctionInfo_functionAlias :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionInfo -> f LambdaFunctionInfo
lambdaFunctionInfo_functionAlias = (LambdaFunctionInfo -> Maybe Text)
-> (LambdaFunctionInfo -> Maybe Text -> LambdaFunctionInfo)
-> Lens
LambdaFunctionInfo LambdaFunctionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionInfo' {Maybe Text
functionAlias :: Maybe Text
$sel:functionAlias:LambdaFunctionInfo' :: LambdaFunctionInfo -> Maybe Text
functionAlias} -> Maybe Text
functionAlias) (\s :: LambdaFunctionInfo
s@LambdaFunctionInfo' {} Maybe Text
a -> LambdaFunctionInfo
s {$sel:functionAlias:LambdaFunctionInfo' :: Maybe Text
functionAlias = Maybe Text
a} :: LambdaFunctionInfo)
lambdaFunctionInfo_functionName :: Lens.Lens' LambdaFunctionInfo (Prelude.Maybe Prelude.Text)
lambdaFunctionInfo_functionName :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionInfo -> f LambdaFunctionInfo
lambdaFunctionInfo_functionName = (LambdaFunctionInfo -> Maybe Text)
-> (LambdaFunctionInfo -> Maybe Text -> LambdaFunctionInfo)
-> Lens
LambdaFunctionInfo LambdaFunctionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionInfo' {Maybe Text
functionName :: Maybe Text
$sel:functionName:LambdaFunctionInfo' :: LambdaFunctionInfo -> Maybe Text
functionName} -> Maybe Text
functionName) (\s :: LambdaFunctionInfo
s@LambdaFunctionInfo' {} Maybe Text
a -> LambdaFunctionInfo
s {$sel:functionName:LambdaFunctionInfo' :: Maybe Text
functionName = Maybe Text
a} :: LambdaFunctionInfo)
lambdaFunctionInfo_targetVersion :: Lens.Lens' LambdaFunctionInfo (Prelude.Maybe Prelude.Text)
lambdaFunctionInfo_targetVersion :: (Maybe Text -> f (Maybe Text))
-> LambdaFunctionInfo -> f LambdaFunctionInfo
lambdaFunctionInfo_targetVersion = (LambdaFunctionInfo -> Maybe Text)
-> (LambdaFunctionInfo -> Maybe Text -> LambdaFunctionInfo)
-> Lens
LambdaFunctionInfo LambdaFunctionInfo (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionInfo' {Maybe Text
targetVersion :: Maybe Text
$sel:targetVersion:LambdaFunctionInfo' :: LambdaFunctionInfo -> Maybe Text
targetVersion} -> Maybe Text
targetVersion) (\s :: LambdaFunctionInfo
s@LambdaFunctionInfo' {} Maybe Text
a -> LambdaFunctionInfo
s {$sel:targetVersion:LambdaFunctionInfo' :: Maybe Text
targetVersion = Maybe Text
a} :: LambdaFunctionInfo)
lambdaFunctionInfo_targetVersionWeight :: Lens.Lens' LambdaFunctionInfo (Prelude.Maybe Prelude.Double)
lambdaFunctionInfo_targetVersionWeight :: (Maybe Double -> f (Maybe Double))
-> LambdaFunctionInfo -> f LambdaFunctionInfo
lambdaFunctionInfo_targetVersionWeight = (LambdaFunctionInfo -> Maybe Double)
-> (LambdaFunctionInfo -> Maybe Double -> LambdaFunctionInfo)
-> Lens
LambdaFunctionInfo LambdaFunctionInfo (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaFunctionInfo' {Maybe Double
targetVersionWeight :: Maybe Double
$sel:targetVersionWeight:LambdaFunctionInfo' :: LambdaFunctionInfo -> Maybe Double
targetVersionWeight} -> Maybe Double
targetVersionWeight) (\s :: LambdaFunctionInfo
s@LambdaFunctionInfo' {} Maybe Double
a -> LambdaFunctionInfo
s {$sel:targetVersionWeight:LambdaFunctionInfo' :: Maybe Double
targetVersionWeight = Maybe Double
a} :: LambdaFunctionInfo)
instance Core.FromJSON LambdaFunctionInfo where
parseJSON :: Value -> Parser LambdaFunctionInfo
parseJSON =
String
-> (Object -> Parser LambdaFunctionInfo)
-> Value
-> Parser LambdaFunctionInfo
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LambdaFunctionInfo"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> LambdaFunctionInfo
LambdaFunctionInfo'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Double
-> LambdaFunctionInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Double -> LambdaFunctionInfo)
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
"currentVersion")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Double -> LambdaFunctionInfo)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Double -> LambdaFunctionInfo)
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
"functionAlias")
Parser
(Maybe Text -> Maybe Text -> Maybe Double -> LambdaFunctionInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Double -> LambdaFunctionInfo)
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
"functionName")
Parser (Maybe Text -> Maybe Double -> LambdaFunctionInfo)
-> Parser (Maybe Text)
-> Parser (Maybe Double -> LambdaFunctionInfo)
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
"targetVersion")
Parser (Maybe Double -> LambdaFunctionInfo)
-> Parser (Maybe Double) -> Parser LambdaFunctionInfo
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"targetVersionWeight")
)
instance Prelude.Hashable LambdaFunctionInfo
instance Prelude.NFData LambdaFunctionInfo