{-# 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.TrialComponentSourceDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ProcessingJob
import Amazonka.SageMaker.Types.TrainingJob
import Amazonka.SageMaker.Types.TransformJob
data TrialComponentSourceDetail = TrialComponentSourceDetail'
{
TrialComponentSourceDetail -> Maybe TrainingJob
trainingJob :: Prelude.Maybe TrainingJob,
TrialComponentSourceDetail -> Maybe Text
sourceArn :: Prelude.Maybe Prelude.Text,
TrialComponentSourceDetail -> Maybe ProcessingJob
processingJob :: Prelude.Maybe ProcessingJob,
TrialComponentSourceDetail -> Maybe TransformJob
transformJob :: Prelude.Maybe TransformJob
}
deriving (TrialComponentSourceDetail -> TrialComponentSourceDetail -> Bool
(TrialComponentSourceDetail -> TrialComponentSourceDetail -> Bool)
-> (TrialComponentSourceDetail
-> TrialComponentSourceDetail -> Bool)
-> Eq TrialComponentSourceDetail
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrialComponentSourceDetail -> TrialComponentSourceDetail -> Bool
$c/= :: TrialComponentSourceDetail -> TrialComponentSourceDetail -> Bool
== :: TrialComponentSourceDetail -> TrialComponentSourceDetail -> Bool
$c== :: TrialComponentSourceDetail -> TrialComponentSourceDetail -> Bool
Prelude.Eq, ReadPrec [TrialComponentSourceDetail]
ReadPrec TrialComponentSourceDetail
Int -> ReadS TrialComponentSourceDetail
ReadS [TrialComponentSourceDetail]
(Int -> ReadS TrialComponentSourceDetail)
-> ReadS [TrialComponentSourceDetail]
-> ReadPrec TrialComponentSourceDetail
-> ReadPrec [TrialComponentSourceDetail]
-> Read TrialComponentSourceDetail
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrialComponentSourceDetail]
$creadListPrec :: ReadPrec [TrialComponentSourceDetail]
readPrec :: ReadPrec TrialComponentSourceDetail
$creadPrec :: ReadPrec TrialComponentSourceDetail
readList :: ReadS [TrialComponentSourceDetail]
$creadList :: ReadS [TrialComponentSourceDetail]
readsPrec :: Int -> ReadS TrialComponentSourceDetail
$creadsPrec :: Int -> ReadS TrialComponentSourceDetail
Prelude.Read, Int -> TrialComponentSourceDetail -> ShowS
[TrialComponentSourceDetail] -> ShowS
TrialComponentSourceDetail -> String
(Int -> TrialComponentSourceDetail -> ShowS)
-> (TrialComponentSourceDetail -> String)
-> ([TrialComponentSourceDetail] -> ShowS)
-> Show TrialComponentSourceDetail
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrialComponentSourceDetail] -> ShowS
$cshowList :: [TrialComponentSourceDetail] -> ShowS
show :: TrialComponentSourceDetail -> String
$cshow :: TrialComponentSourceDetail -> String
showsPrec :: Int -> TrialComponentSourceDetail -> ShowS
$cshowsPrec :: Int -> TrialComponentSourceDetail -> ShowS
Prelude.Show, (forall x.
TrialComponentSourceDetail -> Rep TrialComponentSourceDetail x)
-> (forall x.
Rep TrialComponentSourceDetail x -> TrialComponentSourceDetail)
-> Generic TrialComponentSourceDetail
forall x.
Rep TrialComponentSourceDetail x -> TrialComponentSourceDetail
forall x.
TrialComponentSourceDetail -> Rep TrialComponentSourceDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrialComponentSourceDetail x -> TrialComponentSourceDetail
$cfrom :: forall x.
TrialComponentSourceDetail -> Rep TrialComponentSourceDetail x
Prelude.Generic)
newTrialComponentSourceDetail ::
TrialComponentSourceDetail
newTrialComponentSourceDetail :: TrialComponentSourceDetail
newTrialComponentSourceDetail =
TrialComponentSourceDetail' :: Maybe TrainingJob
-> Maybe Text
-> Maybe ProcessingJob
-> Maybe TransformJob
-> TrialComponentSourceDetail
TrialComponentSourceDetail'
{ $sel:trainingJob:TrialComponentSourceDetail' :: Maybe TrainingJob
trainingJob =
Maybe TrainingJob
forall a. Maybe a
Prelude.Nothing,
$sel:sourceArn:TrialComponentSourceDetail' :: Maybe Text
sourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:processingJob:TrialComponentSourceDetail' :: Maybe ProcessingJob
processingJob = Maybe ProcessingJob
forall a. Maybe a
Prelude.Nothing,
$sel:transformJob:TrialComponentSourceDetail' :: Maybe TransformJob
transformJob = Maybe TransformJob
forall a. Maybe a
Prelude.Nothing
}
trialComponentSourceDetail_trainingJob :: Lens.Lens' TrialComponentSourceDetail (Prelude.Maybe TrainingJob)
trialComponentSourceDetail_trainingJob :: (Maybe TrainingJob -> f (Maybe TrainingJob))
-> TrialComponentSourceDetail -> f TrialComponentSourceDetail
trialComponentSourceDetail_trainingJob = (TrialComponentSourceDetail -> Maybe TrainingJob)
-> (TrialComponentSourceDetail
-> Maybe TrainingJob -> TrialComponentSourceDetail)
-> Lens
TrialComponentSourceDetail
TrialComponentSourceDetail
(Maybe TrainingJob)
(Maybe TrainingJob)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSourceDetail' {Maybe TrainingJob
trainingJob :: Maybe TrainingJob
$sel:trainingJob:TrialComponentSourceDetail' :: TrialComponentSourceDetail -> Maybe TrainingJob
trainingJob} -> Maybe TrainingJob
trainingJob) (\s :: TrialComponentSourceDetail
s@TrialComponentSourceDetail' {} Maybe TrainingJob
a -> TrialComponentSourceDetail
s {$sel:trainingJob:TrialComponentSourceDetail' :: Maybe TrainingJob
trainingJob = Maybe TrainingJob
a} :: TrialComponentSourceDetail)
trialComponentSourceDetail_sourceArn :: Lens.Lens' TrialComponentSourceDetail (Prelude.Maybe Prelude.Text)
trialComponentSourceDetail_sourceArn :: (Maybe Text -> f (Maybe Text))
-> TrialComponentSourceDetail -> f TrialComponentSourceDetail
trialComponentSourceDetail_sourceArn = (TrialComponentSourceDetail -> Maybe Text)
-> (TrialComponentSourceDetail
-> Maybe Text -> TrialComponentSourceDetail)
-> Lens
TrialComponentSourceDetail
TrialComponentSourceDetail
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSourceDetail' {Maybe Text
sourceArn :: Maybe Text
$sel:sourceArn:TrialComponentSourceDetail' :: TrialComponentSourceDetail -> Maybe Text
sourceArn} -> Maybe Text
sourceArn) (\s :: TrialComponentSourceDetail
s@TrialComponentSourceDetail' {} Maybe Text
a -> TrialComponentSourceDetail
s {$sel:sourceArn:TrialComponentSourceDetail' :: Maybe Text
sourceArn = Maybe Text
a} :: TrialComponentSourceDetail)
trialComponentSourceDetail_processingJob :: Lens.Lens' TrialComponentSourceDetail (Prelude.Maybe ProcessingJob)
trialComponentSourceDetail_processingJob :: (Maybe ProcessingJob -> f (Maybe ProcessingJob))
-> TrialComponentSourceDetail -> f TrialComponentSourceDetail
trialComponentSourceDetail_processingJob = (TrialComponentSourceDetail -> Maybe ProcessingJob)
-> (TrialComponentSourceDetail
-> Maybe ProcessingJob -> TrialComponentSourceDetail)
-> Lens
TrialComponentSourceDetail
TrialComponentSourceDetail
(Maybe ProcessingJob)
(Maybe ProcessingJob)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSourceDetail' {Maybe ProcessingJob
processingJob :: Maybe ProcessingJob
$sel:processingJob:TrialComponentSourceDetail' :: TrialComponentSourceDetail -> Maybe ProcessingJob
processingJob} -> Maybe ProcessingJob
processingJob) (\s :: TrialComponentSourceDetail
s@TrialComponentSourceDetail' {} Maybe ProcessingJob
a -> TrialComponentSourceDetail
s {$sel:processingJob:TrialComponentSourceDetail' :: Maybe ProcessingJob
processingJob = Maybe ProcessingJob
a} :: TrialComponentSourceDetail)
trialComponentSourceDetail_transformJob :: Lens.Lens' TrialComponentSourceDetail (Prelude.Maybe TransformJob)
trialComponentSourceDetail_transformJob :: (Maybe TransformJob -> f (Maybe TransformJob))
-> TrialComponentSourceDetail -> f TrialComponentSourceDetail
trialComponentSourceDetail_transformJob = (TrialComponentSourceDetail -> Maybe TransformJob)
-> (TrialComponentSourceDetail
-> Maybe TransformJob -> TrialComponentSourceDetail)
-> Lens
TrialComponentSourceDetail
TrialComponentSourceDetail
(Maybe TransformJob)
(Maybe TransformJob)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrialComponentSourceDetail' {Maybe TransformJob
transformJob :: Maybe TransformJob
$sel:transformJob:TrialComponentSourceDetail' :: TrialComponentSourceDetail -> Maybe TransformJob
transformJob} -> Maybe TransformJob
transformJob) (\s :: TrialComponentSourceDetail
s@TrialComponentSourceDetail' {} Maybe TransformJob
a -> TrialComponentSourceDetail
s {$sel:transformJob:TrialComponentSourceDetail' :: Maybe TransformJob
transformJob = Maybe TransformJob
a} :: TrialComponentSourceDetail)
instance Core.FromJSON TrialComponentSourceDetail where
parseJSON :: Value -> Parser TrialComponentSourceDetail
parseJSON =
String
-> (Object -> Parser TrialComponentSourceDetail)
-> Value
-> Parser TrialComponentSourceDetail
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TrialComponentSourceDetail"
( \Object
x ->
Maybe TrainingJob
-> Maybe Text
-> Maybe ProcessingJob
-> Maybe TransformJob
-> TrialComponentSourceDetail
TrialComponentSourceDetail'
(Maybe TrainingJob
-> Maybe Text
-> Maybe ProcessingJob
-> Maybe TransformJob
-> TrialComponentSourceDetail)
-> Parser (Maybe TrainingJob)
-> Parser
(Maybe Text
-> Maybe ProcessingJob
-> Maybe TransformJob
-> TrialComponentSourceDetail)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TrainingJob)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TrainingJob")
Parser
(Maybe Text
-> Maybe ProcessingJob
-> Maybe TransformJob
-> TrialComponentSourceDetail)
-> Parser (Maybe Text)
-> Parser
(Maybe ProcessingJob
-> Maybe TransformJob -> TrialComponentSourceDetail)
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
"SourceArn")
Parser
(Maybe ProcessingJob
-> Maybe TransformJob -> TrialComponentSourceDetail)
-> Parser (Maybe ProcessingJob)
-> Parser (Maybe TransformJob -> TrialComponentSourceDetail)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProcessingJob)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProcessingJob")
Parser (Maybe TransformJob -> TrialComponentSourceDetail)
-> Parser (Maybe TransformJob) -> Parser TrialComponentSourceDetail
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TransformJob)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TransformJob")
)
instance Prelude.Hashable TrialComponentSourceDetail
instance Prelude.NFData TrialComponentSourceDetail