{-# 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.ProcessingOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ProcessingFeatureStoreOutput
import Amazonka.SageMaker.Types.ProcessingS3Output
data ProcessingOutput = ProcessingOutput'
{
ProcessingOutput -> Maybe ProcessingFeatureStoreOutput
featureStoreOutput :: Prelude.Maybe ProcessingFeatureStoreOutput,
ProcessingOutput -> Maybe ProcessingS3Output
s3Output :: Prelude.Maybe ProcessingS3Output,
ProcessingOutput -> Maybe Bool
appManaged :: Prelude.Maybe Prelude.Bool,
ProcessingOutput -> Text
outputName :: Prelude.Text
}
deriving (ProcessingOutput -> ProcessingOutput -> Bool
(ProcessingOutput -> ProcessingOutput -> Bool)
-> (ProcessingOutput -> ProcessingOutput -> Bool)
-> Eq ProcessingOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProcessingOutput -> ProcessingOutput -> Bool
$c/= :: ProcessingOutput -> ProcessingOutput -> Bool
== :: ProcessingOutput -> ProcessingOutput -> Bool
$c== :: ProcessingOutput -> ProcessingOutput -> Bool
Prelude.Eq, ReadPrec [ProcessingOutput]
ReadPrec ProcessingOutput
Int -> ReadS ProcessingOutput
ReadS [ProcessingOutput]
(Int -> ReadS ProcessingOutput)
-> ReadS [ProcessingOutput]
-> ReadPrec ProcessingOutput
-> ReadPrec [ProcessingOutput]
-> Read ProcessingOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProcessingOutput]
$creadListPrec :: ReadPrec [ProcessingOutput]
readPrec :: ReadPrec ProcessingOutput
$creadPrec :: ReadPrec ProcessingOutput
readList :: ReadS [ProcessingOutput]
$creadList :: ReadS [ProcessingOutput]
readsPrec :: Int -> ReadS ProcessingOutput
$creadsPrec :: Int -> ReadS ProcessingOutput
Prelude.Read, Int -> ProcessingOutput -> ShowS
[ProcessingOutput] -> ShowS
ProcessingOutput -> String
(Int -> ProcessingOutput -> ShowS)
-> (ProcessingOutput -> String)
-> ([ProcessingOutput] -> ShowS)
-> Show ProcessingOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProcessingOutput] -> ShowS
$cshowList :: [ProcessingOutput] -> ShowS
show :: ProcessingOutput -> String
$cshow :: ProcessingOutput -> String
showsPrec :: Int -> ProcessingOutput -> ShowS
$cshowsPrec :: Int -> ProcessingOutput -> ShowS
Prelude.Show, (forall x. ProcessingOutput -> Rep ProcessingOutput x)
-> (forall x. Rep ProcessingOutput x -> ProcessingOutput)
-> Generic ProcessingOutput
forall x. Rep ProcessingOutput x -> ProcessingOutput
forall x. ProcessingOutput -> Rep ProcessingOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProcessingOutput x -> ProcessingOutput
$cfrom :: forall x. ProcessingOutput -> Rep ProcessingOutput x
Prelude.Generic)
newProcessingOutput ::
Prelude.Text ->
ProcessingOutput
newProcessingOutput :: Text -> ProcessingOutput
newProcessingOutput Text
pOutputName_ =
ProcessingOutput' :: Maybe ProcessingFeatureStoreOutput
-> Maybe ProcessingS3Output
-> Maybe Bool
-> Text
-> ProcessingOutput
ProcessingOutput'
{ $sel:featureStoreOutput:ProcessingOutput' :: Maybe ProcessingFeatureStoreOutput
featureStoreOutput =
Maybe ProcessingFeatureStoreOutput
forall a. Maybe a
Prelude.Nothing,
$sel:s3Output:ProcessingOutput' :: Maybe ProcessingS3Output
s3Output = Maybe ProcessingS3Output
forall a. Maybe a
Prelude.Nothing,
$sel:appManaged:ProcessingOutput' :: Maybe Bool
appManaged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:outputName:ProcessingOutput' :: Text
outputName = Text
pOutputName_
}
processingOutput_featureStoreOutput :: Lens.Lens' ProcessingOutput (Prelude.Maybe ProcessingFeatureStoreOutput)
processingOutput_featureStoreOutput :: (Maybe ProcessingFeatureStoreOutput
-> f (Maybe ProcessingFeatureStoreOutput))
-> ProcessingOutput -> f ProcessingOutput
processingOutput_featureStoreOutput = (ProcessingOutput -> Maybe ProcessingFeatureStoreOutput)
-> (ProcessingOutput
-> Maybe ProcessingFeatureStoreOutput -> ProcessingOutput)
-> Lens
ProcessingOutput
ProcessingOutput
(Maybe ProcessingFeatureStoreOutput)
(Maybe ProcessingFeatureStoreOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingOutput' {Maybe ProcessingFeatureStoreOutput
featureStoreOutput :: Maybe ProcessingFeatureStoreOutput
$sel:featureStoreOutput:ProcessingOutput' :: ProcessingOutput -> Maybe ProcessingFeatureStoreOutput
featureStoreOutput} -> Maybe ProcessingFeatureStoreOutput
featureStoreOutput) (\s :: ProcessingOutput
s@ProcessingOutput' {} Maybe ProcessingFeatureStoreOutput
a -> ProcessingOutput
s {$sel:featureStoreOutput:ProcessingOutput' :: Maybe ProcessingFeatureStoreOutput
featureStoreOutput = Maybe ProcessingFeatureStoreOutput
a} :: ProcessingOutput)
processingOutput_s3Output :: Lens.Lens' ProcessingOutput (Prelude.Maybe ProcessingS3Output)
processingOutput_s3Output :: (Maybe ProcessingS3Output -> f (Maybe ProcessingS3Output))
-> ProcessingOutput -> f ProcessingOutput
processingOutput_s3Output = (ProcessingOutput -> Maybe ProcessingS3Output)
-> (ProcessingOutput
-> Maybe ProcessingS3Output -> ProcessingOutput)
-> Lens
ProcessingOutput
ProcessingOutput
(Maybe ProcessingS3Output)
(Maybe ProcessingS3Output)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingOutput' {Maybe ProcessingS3Output
s3Output :: Maybe ProcessingS3Output
$sel:s3Output:ProcessingOutput' :: ProcessingOutput -> Maybe ProcessingS3Output
s3Output} -> Maybe ProcessingS3Output
s3Output) (\s :: ProcessingOutput
s@ProcessingOutput' {} Maybe ProcessingS3Output
a -> ProcessingOutput
s {$sel:s3Output:ProcessingOutput' :: Maybe ProcessingS3Output
s3Output = Maybe ProcessingS3Output
a} :: ProcessingOutput)
processingOutput_appManaged :: Lens.Lens' ProcessingOutput (Prelude.Maybe Prelude.Bool)
processingOutput_appManaged :: (Maybe Bool -> f (Maybe Bool))
-> ProcessingOutput -> f ProcessingOutput
processingOutput_appManaged = (ProcessingOutput -> Maybe Bool)
-> (ProcessingOutput -> Maybe Bool -> ProcessingOutput)
-> Lens ProcessingOutput ProcessingOutput (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingOutput' {Maybe Bool
appManaged :: Maybe Bool
$sel:appManaged:ProcessingOutput' :: ProcessingOutput -> Maybe Bool
appManaged} -> Maybe Bool
appManaged) (\s :: ProcessingOutput
s@ProcessingOutput' {} Maybe Bool
a -> ProcessingOutput
s {$sel:appManaged:ProcessingOutput' :: Maybe Bool
appManaged = Maybe Bool
a} :: ProcessingOutput)
processingOutput_outputName :: Lens.Lens' ProcessingOutput Prelude.Text
processingOutput_outputName :: (Text -> f Text) -> ProcessingOutput -> f ProcessingOutput
processingOutput_outputName = (ProcessingOutput -> Text)
-> (ProcessingOutput -> Text -> ProcessingOutput)
-> Lens ProcessingOutput ProcessingOutput Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingOutput' {Text
outputName :: Text
$sel:outputName:ProcessingOutput' :: ProcessingOutput -> Text
outputName} -> Text
outputName) (\s :: ProcessingOutput
s@ProcessingOutput' {} Text
a -> ProcessingOutput
s {$sel:outputName:ProcessingOutput' :: Text
outputName = Text
a} :: ProcessingOutput)
instance Core.FromJSON ProcessingOutput where
parseJSON :: Value -> Parser ProcessingOutput
parseJSON =
String
-> (Object -> Parser ProcessingOutput)
-> Value
-> Parser ProcessingOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProcessingOutput"
( \Object
x ->
Maybe ProcessingFeatureStoreOutput
-> Maybe ProcessingS3Output
-> Maybe Bool
-> Text
-> ProcessingOutput
ProcessingOutput'
(Maybe ProcessingFeatureStoreOutput
-> Maybe ProcessingS3Output
-> Maybe Bool
-> Text
-> ProcessingOutput)
-> Parser (Maybe ProcessingFeatureStoreOutput)
-> Parser
(Maybe ProcessingS3Output
-> Maybe Bool -> Text -> ProcessingOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ProcessingFeatureStoreOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FeatureStoreOutput")
Parser
(Maybe ProcessingS3Output
-> Maybe Bool -> Text -> ProcessingOutput)
-> Parser (Maybe ProcessingS3Output)
-> Parser (Maybe Bool -> Text -> ProcessingOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProcessingS3Output)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3Output")
Parser (Maybe Bool -> Text -> ProcessingOutput)
-> Parser (Maybe Bool) -> Parser (Text -> ProcessingOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AppManaged")
Parser (Text -> ProcessingOutput)
-> Parser Text -> Parser ProcessingOutput
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
"OutputName")
)
instance Prelude.Hashable ProcessingOutput
instance Prelude.NFData ProcessingOutput
instance Core.ToJSON ProcessingOutput where
toJSON :: ProcessingOutput -> Value
toJSON ProcessingOutput' {Maybe Bool
Maybe ProcessingFeatureStoreOutput
Maybe ProcessingS3Output
Text
outputName :: Text
appManaged :: Maybe Bool
s3Output :: Maybe ProcessingS3Output
featureStoreOutput :: Maybe ProcessingFeatureStoreOutput
$sel:outputName:ProcessingOutput' :: ProcessingOutput -> Text
$sel:appManaged:ProcessingOutput' :: ProcessingOutput -> Maybe Bool
$sel:s3Output:ProcessingOutput' :: ProcessingOutput -> Maybe ProcessingS3Output
$sel:featureStoreOutput:ProcessingOutput' :: ProcessingOutput -> Maybe ProcessingFeatureStoreOutput
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FeatureStoreOutput" Text -> ProcessingFeatureStoreOutput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ProcessingFeatureStoreOutput -> Pair)
-> Maybe ProcessingFeatureStoreOutput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingFeatureStoreOutput
featureStoreOutput,
(Text
"S3Output" Text -> ProcessingS3Output -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ProcessingS3Output -> Pair)
-> Maybe ProcessingS3Output -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3Output
s3Output,
(Text
"AppManaged" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
appManaged,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"OutputName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
outputName)
]
)