{-# 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.SageMaker.Types.LambdaStepMetadata where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.OutputParameter
data LambdaStepMetadata = LambdaStepMetadata'
{
LambdaStepMetadata -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
LambdaStepMetadata -> Maybe [OutputParameter]
outputParameters :: Prelude.Maybe [OutputParameter]
}
deriving (LambdaStepMetadata -> LambdaStepMetadata -> Bool
(LambdaStepMetadata -> LambdaStepMetadata -> Bool)
-> (LambdaStepMetadata -> LambdaStepMetadata -> Bool)
-> Eq LambdaStepMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LambdaStepMetadata -> LambdaStepMetadata -> Bool
$c/= :: LambdaStepMetadata -> LambdaStepMetadata -> Bool
== :: LambdaStepMetadata -> LambdaStepMetadata -> Bool
$c== :: LambdaStepMetadata -> LambdaStepMetadata -> Bool
Prelude.Eq, ReadPrec [LambdaStepMetadata]
ReadPrec LambdaStepMetadata
Int -> ReadS LambdaStepMetadata
ReadS [LambdaStepMetadata]
(Int -> ReadS LambdaStepMetadata)
-> ReadS [LambdaStepMetadata]
-> ReadPrec LambdaStepMetadata
-> ReadPrec [LambdaStepMetadata]
-> Read LambdaStepMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LambdaStepMetadata]
$creadListPrec :: ReadPrec [LambdaStepMetadata]
readPrec :: ReadPrec LambdaStepMetadata
$creadPrec :: ReadPrec LambdaStepMetadata
readList :: ReadS [LambdaStepMetadata]
$creadList :: ReadS [LambdaStepMetadata]
readsPrec :: Int -> ReadS LambdaStepMetadata
$creadsPrec :: Int -> ReadS LambdaStepMetadata
Prelude.Read, Int -> LambdaStepMetadata -> ShowS
[LambdaStepMetadata] -> ShowS
LambdaStepMetadata -> String
(Int -> LambdaStepMetadata -> ShowS)
-> (LambdaStepMetadata -> String)
-> ([LambdaStepMetadata] -> ShowS)
-> Show LambdaStepMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LambdaStepMetadata] -> ShowS
$cshowList :: [LambdaStepMetadata] -> ShowS
show :: LambdaStepMetadata -> String
$cshow :: LambdaStepMetadata -> String
showsPrec :: Int -> LambdaStepMetadata -> ShowS
$cshowsPrec :: Int -> LambdaStepMetadata -> ShowS
Prelude.Show, (forall x. LambdaStepMetadata -> Rep LambdaStepMetadata x)
-> (forall x. Rep LambdaStepMetadata x -> LambdaStepMetadata)
-> Generic LambdaStepMetadata
forall x. Rep LambdaStepMetadata x -> LambdaStepMetadata
forall x. LambdaStepMetadata -> Rep LambdaStepMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LambdaStepMetadata x -> LambdaStepMetadata
$cfrom :: forall x. LambdaStepMetadata -> Rep LambdaStepMetadata x
Prelude.Generic)
newLambdaStepMetadata ::
LambdaStepMetadata
newLambdaStepMetadata :: LambdaStepMetadata
newLambdaStepMetadata =
LambdaStepMetadata' :: Maybe Text -> Maybe [OutputParameter] -> LambdaStepMetadata
LambdaStepMetadata'
{ $sel:arn:LambdaStepMetadata' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:outputParameters:LambdaStepMetadata' :: Maybe [OutputParameter]
outputParameters = Maybe [OutputParameter]
forall a. Maybe a
Prelude.Nothing
}
lambdaStepMetadata_arn :: Lens.Lens' LambdaStepMetadata (Prelude.Maybe Prelude.Text)
lambdaStepMetadata_arn :: (Maybe Text -> f (Maybe Text))
-> LambdaStepMetadata -> f LambdaStepMetadata
lambdaStepMetadata_arn = (LambdaStepMetadata -> Maybe Text)
-> (LambdaStepMetadata -> Maybe Text -> LambdaStepMetadata)
-> Lens
LambdaStepMetadata LambdaStepMetadata (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaStepMetadata' {Maybe Text
arn :: Maybe Text
$sel:arn:LambdaStepMetadata' :: LambdaStepMetadata -> Maybe Text
arn} -> Maybe Text
arn) (\s :: LambdaStepMetadata
s@LambdaStepMetadata' {} Maybe Text
a -> LambdaStepMetadata
s {$sel:arn:LambdaStepMetadata' :: Maybe Text
arn = Maybe Text
a} :: LambdaStepMetadata)
lambdaStepMetadata_outputParameters :: Lens.Lens' LambdaStepMetadata (Prelude.Maybe [OutputParameter])
lambdaStepMetadata_outputParameters :: (Maybe [OutputParameter] -> f (Maybe [OutputParameter]))
-> LambdaStepMetadata -> f LambdaStepMetadata
lambdaStepMetadata_outputParameters = (LambdaStepMetadata -> Maybe [OutputParameter])
-> (LambdaStepMetadata
-> Maybe [OutputParameter] -> LambdaStepMetadata)
-> Lens
LambdaStepMetadata
LambdaStepMetadata
(Maybe [OutputParameter])
(Maybe [OutputParameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LambdaStepMetadata' {Maybe [OutputParameter]
outputParameters :: Maybe [OutputParameter]
$sel:outputParameters:LambdaStepMetadata' :: LambdaStepMetadata -> Maybe [OutputParameter]
outputParameters} -> Maybe [OutputParameter]
outputParameters) (\s :: LambdaStepMetadata
s@LambdaStepMetadata' {} Maybe [OutputParameter]
a -> LambdaStepMetadata
s {$sel:outputParameters:LambdaStepMetadata' :: Maybe [OutputParameter]
outputParameters = Maybe [OutputParameter]
a} :: LambdaStepMetadata) ((Maybe [OutputParameter] -> f (Maybe [OutputParameter]))
-> LambdaStepMetadata -> f LambdaStepMetadata)
-> ((Maybe [OutputParameter] -> f (Maybe [OutputParameter]))
-> Maybe [OutputParameter] -> f (Maybe [OutputParameter]))
-> (Maybe [OutputParameter] -> f (Maybe [OutputParameter]))
-> LambdaStepMetadata
-> f LambdaStepMetadata
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[OutputParameter]
[OutputParameter]
[OutputParameter]
[OutputParameter]
-> Iso
(Maybe [OutputParameter])
(Maybe [OutputParameter])
(Maybe [OutputParameter])
(Maybe [OutputParameter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[OutputParameter]
[OutputParameter]
[OutputParameter]
[OutputParameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON LambdaStepMetadata where
parseJSON :: Value -> Parser LambdaStepMetadata
parseJSON =
String
-> (Object -> Parser LambdaStepMetadata)
-> Value
-> Parser LambdaStepMetadata
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LambdaStepMetadata"
( \Object
x ->
Maybe Text -> Maybe [OutputParameter] -> LambdaStepMetadata
LambdaStepMetadata'
(Maybe Text -> Maybe [OutputParameter] -> LambdaStepMetadata)
-> Parser (Maybe Text)
-> Parser (Maybe [OutputParameter] -> LambdaStepMetadata)
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
"Arn")
Parser (Maybe [OutputParameter] -> LambdaStepMetadata)
-> Parser (Maybe [OutputParameter]) -> Parser LambdaStepMetadata
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [OutputParameter]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputParameters"
Parser (Maybe (Maybe [OutputParameter]))
-> Maybe [OutputParameter] -> Parser (Maybe [OutputParameter])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [OutputParameter]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable LambdaStepMetadata
instance Prelude.NFData LambdaStepMetadata