{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SageMaker.CreateTrialComponent
(
CreateTrialComponent (..),
newCreateTrialComponent,
createTrialComponent_metadataProperties,
createTrialComponent_status,
createTrialComponent_outputArtifacts,
createTrialComponent_startTime,
createTrialComponent_endTime,
createTrialComponent_parameters,
createTrialComponent_displayName,
createTrialComponent_inputArtifacts,
createTrialComponent_tags,
createTrialComponent_trialComponentName,
CreateTrialComponentResponse (..),
newCreateTrialComponentResponse,
createTrialComponentResponse_trialComponentArn,
createTrialComponentResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types
data CreateTrialComponent = CreateTrialComponent'
{ CreateTrialComponent -> Maybe MetadataProperties
metadataProperties :: Prelude.Maybe MetadataProperties,
CreateTrialComponent -> Maybe TrialComponentStatus
status :: Prelude.Maybe TrialComponentStatus,
CreateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts :: Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentArtifact),
CreateTrialComponent -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
CreateTrialComponent -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX,
CreateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentParameterValue),
CreateTrialComponent -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
CreateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts :: Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentArtifact),
CreateTrialComponent -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateTrialComponent -> Text
trialComponentName :: Prelude.Text
}
deriving (CreateTrialComponent -> CreateTrialComponent -> Bool
(CreateTrialComponent -> CreateTrialComponent -> Bool)
-> (CreateTrialComponent -> CreateTrialComponent -> Bool)
-> Eq CreateTrialComponent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTrialComponent -> CreateTrialComponent -> Bool
$c/= :: CreateTrialComponent -> CreateTrialComponent -> Bool
== :: CreateTrialComponent -> CreateTrialComponent -> Bool
$c== :: CreateTrialComponent -> CreateTrialComponent -> Bool
Prelude.Eq, ReadPrec [CreateTrialComponent]
ReadPrec CreateTrialComponent
Int -> ReadS CreateTrialComponent
ReadS [CreateTrialComponent]
(Int -> ReadS CreateTrialComponent)
-> ReadS [CreateTrialComponent]
-> ReadPrec CreateTrialComponent
-> ReadPrec [CreateTrialComponent]
-> Read CreateTrialComponent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTrialComponent]
$creadListPrec :: ReadPrec [CreateTrialComponent]
readPrec :: ReadPrec CreateTrialComponent
$creadPrec :: ReadPrec CreateTrialComponent
readList :: ReadS [CreateTrialComponent]
$creadList :: ReadS [CreateTrialComponent]
readsPrec :: Int -> ReadS CreateTrialComponent
$creadsPrec :: Int -> ReadS CreateTrialComponent
Prelude.Read, Int -> CreateTrialComponent -> ShowS
[CreateTrialComponent] -> ShowS
CreateTrialComponent -> String
(Int -> CreateTrialComponent -> ShowS)
-> (CreateTrialComponent -> String)
-> ([CreateTrialComponent] -> ShowS)
-> Show CreateTrialComponent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTrialComponent] -> ShowS
$cshowList :: [CreateTrialComponent] -> ShowS
show :: CreateTrialComponent -> String
$cshow :: CreateTrialComponent -> String
showsPrec :: Int -> CreateTrialComponent -> ShowS
$cshowsPrec :: Int -> CreateTrialComponent -> ShowS
Prelude.Show, (forall x. CreateTrialComponent -> Rep CreateTrialComponent x)
-> (forall x. Rep CreateTrialComponent x -> CreateTrialComponent)
-> Generic CreateTrialComponent
forall x. Rep CreateTrialComponent x -> CreateTrialComponent
forall x. CreateTrialComponent -> Rep CreateTrialComponent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTrialComponent x -> CreateTrialComponent
$cfrom :: forall x. CreateTrialComponent -> Rep CreateTrialComponent x
Prelude.Generic)
newCreateTrialComponent ::
Prelude.Text ->
CreateTrialComponent
newCreateTrialComponent :: Text -> CreateTrialComponent
newCreateTrialComponent Text
pTrialComponentName_ =
CreateTrialComponent' :: Maybe MetadataProperties
-> Maybe TrialComponentStatus
-> Maybe (HashMap Text TrialComponentArtifact)
-> Maybe POSIX
-> Maybe POSIX
-> Maybe (HashMap Text TrialComponentParameterValue)
-> Maybe Text
-> Maybe (HashMap Text TrialComponentArtifact)
-> Maybe [Tag]
-> Text
-> CreateTrialComponent
CreateTrialComponent'
{ $sel:metadataProperties:CreateTrialComponent' :: Maybe MetadataProperties
metadataProperties =
Maybe MetadataProperties
forall a. Maybe a
Prelude.Nothing,
$sel:status:CreateTrialComponent' :: Maybe TrialComponentStatus
status = Maybe TrialComponentStatus
forall a. Maybe a
Prelude.Nothing,
$sel:outputArtifacts:CreateTrialComponent' :: Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts = Maybe (HashMap Text TrialComponentArtifact)
forall a. Maybe a
Prelude.Nothing,
$sel:startTime:CreateTrialComponent' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:CreateTrialComponent' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:CreateTrialComponent' :: Maybe (HashMap Text TrialComponentParameterValue)
parameters = Maybe (HashMap Text TrialComponentParameterValue)
forall a. Maybe a
Prelude.Nothing,
$sel:displayName:CreateTrialComponent' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:inputArtifacts:CreateTrialComponent' :: Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts = Maybe (HashMap Text TrialComponentArtifact)
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateTrialComponent' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:trialComponentName:CreateTrialComponent' :: Text
trialComponentName = Text
pTrialComponentName_
}
createTrialComponent_metadataProperties :: Lens.Lens' CreateTrialComponent (Prelude.Maybe MetadataProperties)
createTrialComponent_metadataProperties :: (Maybe MetadataProperties -> f (Maybe MetadataProperties))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_metadataProperties = (CreateTrialComponent -> Maybe MetadataProperties)
-> (CreateTrialComponent
-> Maybe MetadataProperties -> CreateTrialComponent)
-> Lens
CreateTrialComponent
CreateTrialComponent
(Maybe MetadataProperties)
(Maybe MetadataProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe MetadataProperties
metadataProperties :: Maybe MetadataProperties
$sel:metadataProperties:CreateTrialComponent' :: CreateTrialComponent -> Maybe MetadataProperties
metadataProperties} -> Maybe MetadataProperties
metadataProperties) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe MetadataProperties
a -> CreateTrialComponent
s {$sel:metadataProperties:CreateTrialComponent' :: Maybe MetadataProperties
metadataProperties = Maybe MetadataProperties
a} :: CreateTrialComponent)
createTrialComponent_status :: Lens.Lens' CreateTrialComponent (Prelude.Maybe TrialComponentStatus)
createTrialComponent_status :: (Maybe TrialComponentStatus -> f (Maybe TrialComponentStatus))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_status = (CreateTrialComponent -> Maybe TrialComponentStatus)
-> (CreateTrialComponent
-> Maybe TrialComponentStatus -> CreateTrialComponent)
-> Lens
CreateTrialComponent
CreateTrialComponent
(Maybe TrialComponentStatus)
(Maybe TrialComponentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe TrialComponentStatus
status :: Maybe TrialComponentStatus
$sel:status:CreateTrialComponent' :: CreateTrialComponent -> Maybe TrialComponentStatus
status} -> Maybe TrialComponentStatus
status) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe TrialComponentStatus
a -> CreateTrialComponent
s {$sel:status:CreateTrialComponent' :: Maybe TrialComponentStatus
status = Maybe TrialComponentStatus
a} :: CreateTrialComponent)
createTrialComponent_outputArtifacts :: Lens.Lens' CreateTrialComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentArtifact))
createTrialComponent_outputArtifacts :: (Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_outputArtifacts = (CreateTrialComponent
-> Maybe (HashMap Text TrialComponentArtifact))
-> (CreateTrialComponent
-> Maybe (HashMap Text TrialComponentArtifact)
-> CreateTrialComponent)
-> Lens
CreateTrialComponent
CreateTrialComponent
(Maybe (HashMap Text TrialComponentArtifact))
(Maybe (HashMap Text TrialComponentArtifact))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
$sel:outputArtifacts:CreateTrialComponent' :: CreateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts} -> Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe (HashMap Text TrialComponentArtifact)
a -> CreateTrialComponent
s {$sel:outputArtifacts:CreateTrialComponent' :: Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts = Maybe (HashMap Text TrialComponentArtifact)
a} :: CreateTrialComponent) ((Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> CreateTrialComponent -> f CreateTrialComponent)
-> ((Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> (Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> CreateTrialComponent
-> f CreateTrialComponent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
-> Iso
(Maybe (HashMap Text TrialComponentArtifact))
(Maybe (HashMap Text TrialComponentArtifact))
(Maybe (HashMap Text TrialComponentArtifact))
(Maybe (HashMap Text TrialComponentArtifact))
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
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTrialComponent_startTime :: Lens.Lens' CreateTrialComponent (Prelude.Maybe Prelude.UTCTime)
createTrialComponent_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_startTime = (CreateTrialComponent -> Maybe POSIX)
-> (CreateTrialComponent -> Maybe POSIX -> CreateTrialComponent)
-> Lens
CreateTrialComponent
CreateTrialComponent
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:CreateTrialComponent' :: CreateTrialComponent -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe POSIX
a -> CreateTrialComponent
s {$sel:startTime:CreateTrialComponent' :: Maybe POSIX
startTime = Maybe POSIX
a} :: CreateTrialComponent) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateTrialComponent -> f CreateTrialComponent)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateTrialComponent
-> f CreateTrialComponent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createTrialComponent_endTime :: Lens.Lens' CreateTrialComponent (Prelude.Maybe Prelude.UTCTime)
createTrialComponent_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_endTime = (CreateTrialComponent -> Maybe POSIX)
-> (CreateTrialComponent -> Maybe POSIX -> CreateTrialComponent)
-> Lens
CreateTrialComponent
CreateTrialComponent
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:CreateTrialComponent' :: CreateTrialComponent -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe POSIX
a -> CreateTrialComponent
s {$sel:endTime:CreateTrialComponent' :: Maybe POSIX
endTime = Maybe POSIX
a} :: CreateTrialComponent) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateTrialComponent -> f CreateTrialComponent)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateTrialComponent
-> f CreateTrialComponent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createTrialComponent_parameters :: Lens.Lens' CreateTrialComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentParameterValue))
createTrialComponent_parameters :: (Maybe (HashMap Text TrialComponentParameterValue)
-> f (Maybe (HashMap Text TrialComponentParameterValue)))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_parameters = (CreateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue))
-> (CreateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
-> CreateTrialComponent)
-> Lens
CreateTrialComponent
CreateTrialComponent
(Maybe (HashMap Text TrialComponentParameterValue))
(Maybe (HashMap Text TrialComponentParameterValue))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe (HashMap Text TrialComponentParameterValue)
parameters :: Maybe (HashMap Text TrialComponentParameterValue)
$sel:parameters:CreateTrialComponent' :: CreateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
parameters} -> Maybe (HashMap Text TrialComponentParameterValue)
parameters) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe (HashMap Text TrialComponentParameterValue)
a -> CreateTrialComponent
s {$sel:parameters:CreateTrialComponent' :: Maybe (HashMap Text TrialComponentParameterValue)
parameters = Maybe (HashMap Text TrialComponentParameterValue)
a} :: CreateTrialComponent) ((Maybe (HashMap Text TrialComponentParameterValue)
-> f (Maybe (HashMap Text TrialComponentParameterValue)))
-> CreateTrialComponent -> f CreateTrialComponent)
-> ((Maybe (HashMap Text TrialComponentParameterValue)
-> f (Maybe (HashMap Text TrialComponentParameterValue)))
-> Maybe (HashMap Text TrialComponentParameterValue)
-> f (Maybe (HashMap Text TrialComponentParameterValue)))
-> (Maybe (HashMap Text TrialComponentParameterValue)
-> f (Maybe (HashMap Text TrialComponentParameterValue)))
-> CreateTrialComponent
-> f CreateTrialComponent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text TrialComponentParameterValue)
(HashMap Text TrialComponentParameterValue)
(HashMap Text TrialComponentParameterValue)
(HashMap Text TrialComponentParameterValue)
-> Iso
(Maybe (HashMap Text TrialComponentParameterValue))
(Maybe (HashMap Text TrialComponentParameterValue))
(Maybe (HashMap Text TrialComponentParameterValue))
(Maybe (HashMap Text TrialComponentParameterValue))
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
(HashMap Text TrialComponentParameterValue)
(HashMap Text TrialComponentParameterValue)
(HashMap Text TrialComponentParameterValue)
(HashMap Text TrialComponentParameterValue)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTrialComponent_displayName :: Lens.Lens' CreateTrialComponent (Prelude.Maybe Prelude.Text)
createTrialComponent_displayName :: (Maybe Text -> f (Maybe Text))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_displayName = (CreateTrialComponent -> Maybe Text)
-> (CreateTrialComponent -> Maybe Text -> CreateTrialComponent)
-> Lens
CreateTrialComponent CreateTrialComponent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe Text
displayName :: Maybe Text
$sel:displayName:CreateTrialComponent' :: CreateTrialComponent -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe Text
a -> CreateTrialComponent
s {$sel:displayName:CreateTrialComponent' :: Maybe Text
displayName = Maybe Text
a} :: CreateTrialComponent)
createTrialComponent_inputArtifacts :: Lens.Lens' CreateTrialComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text TrialComponentArtifact))
createTrialComponent_inputArtifacts :: (Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_inputArtifacts = (CreateTrialComponent
-> Maybe (HashMap Text TrialComponentArtifact))
-> (CreateTrialComponent
-> Maybe (HashMap Text TrialComponentArtifact)
-> CreateTrialComponent)
-> Lens
CreateTrialComponent
CreateTrialComponent
(Maybe (HashMap Text TrialComponentArtifact))
(Maybe (HashMap Text TrialComponentArtifact))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
$sel:inputArtifacts:CreateTrialComponent' :: CreateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts} -> Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe (HashMap Text TrialComponentArtifact)
a -> CreateTrialComponent
s {$sel:inputArtifacts:CreateTrialComponent' :: Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts = Maybe (HashMap Text TrialComponentArtifact)
a} :: CreateTrialComponent) ((Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> CreateTrialComponent -> f CreateTrialComponent)
-> ((Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> (Maybe (HashMap Text TrialComponentArtifact)
-> f (Maybe (HashMap Text TrialComponentArtifact)))
-> CreateTrialComponent
-> f CreateTrialComponent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
-> Iso
(Maybe (HashMap Text TrialComponentArtifact))
(Maybe (HashMap Text TrialComponentArtifact))
(Maybe (HashMap Text TrialComponentArtifact))
(Maybe (HashMap Text TrialComponentArtifact))
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
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
(HashMap Text TrialComponentArtifact)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTrialComponent_tags :: Lens.Lens' CreateTrialComponent (Prelude.Maybe [Tag])
createTrialComponent_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_tags = (CreateTrialComponent -> Maybe [Tag])
-> (CreateTrialComponent -> Maybe [Tag] -> CreateTrialComponent)
-> Lens
CreateTrialComponent
CreateTrialComponent
(Maybe [Tag])
(Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateTrialComponent' :: CreateTrialComponent -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Maybe [Tag]
a -> CreateTrialComponent
s {$sel:tags:CreateTrialComponent' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateTrialComponent) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTrialComponent -> f CreateTrialComponent)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTrialComponent
-> f CreateTrialComponent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createTrialComponent_trialComponentName :: Lens.Lens' CreateTrialComponent Prelude.Text
createTrialComponent_trialComponentName :: (Text -> f Text) -> CreateTrialComponent -> f CreateTrialComponent
createTrialComponent_trialComponentName = (CreateTrialComponent -> Text)
-> (CreateTrialComponent -> Text -> CreateTrialComponent)
-> Lens CreateTrialComponent CreateTrialComponent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponent' {Text
trialComponentName :: Text
$sel:trialComponentName:CreateTrialComponent' :: CreateTrialComponent -> Text
trialComponentName} -> Text
trialComponentName) (\s :: CreateTrialComponent
s@CreateTrialComponent' {} Text
a -> CreateTrialComponent
s {$sel:trialComponentName:CreateTrialComponent' :: Text
trialComponentName = Text
a} :: CreateTrialComponent)
instance Core.AWSRequest CreateTrialComponent where
type
AWSResponse CreateTrialComponent =
CreateTrialComponentResponse
request :: CreateTrialComponent -> Request CreateTrialComponent
request = Service -> CreateTrialComponent -> Request CreateTrialComponent
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateTrialComponent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateTrialComponent)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateTrialComponent))
-> Logger
-> Service
-> Proxy CreateTrialComponent
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateTrialComponent)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Int -> CreateTrialComponentResponse
CreateTrialComponentResponse'
(Maybe Text -> Int -> CreateTrialComponentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateTrialComponentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TrialComponentArn")
Either String (Int -> CreateTrialComponentResponse)
-> Either String Int -> Either String CreateTrialComponentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateTrialComponent
instance Prelude.NFData CreateTrialComponent
instance Core.ToHeaders CreateTrialComponent where
toHeaders :: CreateTrialComponent -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateTrialComponent -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.CreateTrialComponent" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateTrialComponent where
toJSON :: CreateTrialComponent -> Value
toJSON CreateTrialComponent' {Maybe [Tag]
Maybe Text
Maybe (HashMap Text TrialComponentArtifact)
Maybe (HashMap Text TrialComponentParameterValue)
Maybe POSIX
Maybe MetadataProperties
Maybe TrialComponentStatus
Text
trialComponentName :: Text
tags :: Maybe [Tag]
inputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
displayName :: Maybe Text
parameters :: Maybe (HashMap Text TrialComponentParameterValue)
endTime :: Maybe POSIX
startTime :: Maybe POSIX
outputArtifacts :: Maybe (HashMap Text TrialComponentArtifact)
status :: Maybe TrialComponentStatus
metadataProperties :: Maybe MetadataProperties
$sel:trialComponentName:CreateTrialComponent' :: CreateTrialComponent -> Text
$sel:tags:CreateTrialComponent' :: CreateTrialComponent -> Maybe [Tag]
$sel:inputArtifacts:CreateTrialComponent' :: CreateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
$sel:displayName:CreateTrialComponent' :: CreateTrialComponent -> Maybe Text
$sel:parameters:CreateTrialComponent' :: CreateTrialComponent
-> Maybe (HashMap Text TrialComponentParameterValue)
$sel:endTime:CreateTrialComponent' :: CreateTrialComponent -> Maybe POSIX
$sel:startTime:CreateTrialComponent' :: CreateTrialComponent -> Maybe POSIX
$sel:outputArtifacts:CreateTrialComponent' :: CreateTrialComponent -> Maybe (HashMap Text TrialComponentArtifact)
$sel:status:CreateTrialComponent' :: CreateTrialComponent -> Maybe TrialComponentStatus
$sel:metadataProperties:CreateTrialComponent' :: CreateTrialComponent -> Maybe MetadataProperties
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"MetadataProperties" Text -> MetadataProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MetadataProperties -> Pair)
-> Maybe MetadataProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetadataProperties
metadataProperties,
(Text
"Status" Text -> TrialComponentStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TrialComponentStatus -> Pair)
-> Maybe TrialComponentStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TrialComponentStatus
status,
(Text
"OutputArtifacts" Text -> HashMap Text TrialComponentArtifact -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text TrialComponentArtifact -> Pair)
-> Maybe (HashMap Text TrialComponentArtifact) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text TrialComponentArtifact)
outputArtifacts,
(Text
"StartTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
startTime,
(Text
"EndTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
endTime,
(Text
"Parameters" Text -> HashMap Text TrialComponentParameterValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text TrialComponentParameterValue -> Pair)
-> Maybe (HashMap Text TrialComponentParameterValue) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text TrialComponentParameterValue)
parameters,
(Text
"DisplayName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
displayName,
(Text
"InputArtifacts" Text -> HashMap Text TrialComponentArtifact -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text TrialComponentArtifact -> Pair)
-> Maybe (HashMap Text TrialComponentArtifact) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text TrialComponentArtifact)
inputArtifacts,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TrialComponentName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
trialComponentName)
]
)
instance Core.ToPath CreateTrialComponent where
toPath :: CreateTrialComponent -> ByteString
toPath = ByteString -> CreateTrialComponent -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateTrialComponent where
toQuery :: CreateTrialComponent -> QueryString
toQuery = QueryString -> CreateTrialComponent -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateTrialComponentResponse = CreateTrialComponentResponse'
{
CreateTrialComponentResponse -> Maybe Text
trialComponentArn :: Prelude.Maybe Prelude.Text,
CreateTrialComponentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateTrialComponentResponse
-> CreateTrialComponentResponse -> Bool
(CreateTrialComponentResponse
-> CreateTrialComponentResponse -> Bool)
-> (CreateTrialComponentResponse
-> CreateTrialComponentResponse -> Bool)
-> Eq CreateTrialComponentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTrialComponentResponse
-> CreateTrialComponentResponse -> Bool
$c/= :: CreateTrialComponentResponse
-> CreateTrialComponentResponse -> Bool
== :: CreateTrialComponentResponse
-> CreateTrialComponentResponse -> Bool
$c== :: CreateTrialComponentResponse
-> CreateTrialComponentResponse -> Bool
Prelude.Eq, ReadPrec [CreateTrialComponentResponse]
ReadPrec CreateTrialComponentResponse
Int -> ReadS CreateTrialComponentResponse
ReadS [CreateTrialComponentResponse]
(Int -> ReadS CreateTrialComponentResponse)
-> ReadS [CreateTrialComponentResponse]
-> ReadPrec CreateTrialComponentResponse
-> ReadPrec [CreateTrialComponentResponse]
-> Read CreateTrialComponentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTrialComponentResponse]
$creadListPrec :: ReadPrec [CreateTrialComponentResponse]
readPrec :: ReadPrec CreateTrialComponentResponse
$creadPrec :: ReadPrec CreateTrialComponentResponse
readList :: ReadS [CreateTrialComponentResponse]
$creadList :: ReadS [CreateTrialComponentResponse]
readsPrec :: Int -> ReadS CreateTrialComponentResponse
$creadsPrec :: Int -> ReadS CreateTrialComponentResponse
Prelude.Read, Int -> CreateTrialComponentResponse -> ShowS
[CreateTrialComponentResponse] -> ShowS
CreateTrialComponentResponse -> String
(Int -> CreateTrialComponentResponse -> ShowS)
-> (CreateTrialComponentResponse -> String)
-> ([CreateTrialComponentResponse] -> ShowS)
-> Show CreateTrialComponentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTrialComponentResponse] -> ShowS
$cshowList :: [CreateTrialComponentResponse] -> ShowS
show :: CreateTrialComponentResponse -> String
$cshow :: CreateTrialComponentResponse -> String
showsPrec :: Int -> CreateTrialComponentResponse -> ShowS
$cshowsPrec :: Int -> CreateTrialComponentResponse -> ShowS
Prelude.Show, (forall x.
CreateTrialComponentResponse -> Rep CreateTrialComponentResponse x)
-> (forall x.
Rep CreateTrialComponentResponse x -> CreateTrialComponentResponse)
-> Generic CreateTrialComponentResponse
forall x.
Rep CreateTrialComponentResponse x -> CreateTrialComponentResponse
forall x.
CreateTrialComponentResponse -> Rep CreateTrialComponentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateTrialComponentResponse x -> CreateTrialComponentResponse
$cfrom :: forall x.
CreateTrialComponentResponse -> Rep CreateTrialComponentResponse x
Prelude.Generic)
newCreateTrialComponentResponse ::
Prelude.Int ->
CreateTrialComponentResponse
newCreateTrialComponentResponse :: Int -> CreateTrialComponentResponse
newCreateTrialComponentResponse Int
pHttpStatus_ =
CreateTrialComponentResponse' :: Maybe Text -> Int -> CreateTrialComponentResponse
CreateTrialComponentResponse'
{ $sel:trialComponentArn:CreateTrialComponentResponse' :: Maybe Text
trialComponentArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateTrialComponentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createTrialComponentResponse_trialComponentArn :: Lens.Lens' CreateTrialComponentResponse (Prelude.Maybe Prelude.Text)
createTrialComponentResponse_trialComponentArn :: (Maybe Text -> f (Maybe Text))
-> CreateTrialComponentResponse -> f CreateTrialComponentResponse
createTrialComponentResponse_trialComponentArn = (CreateTrialComponentResponse -> Maybe Text)
-> (CreateTrialComponentResponse
-> Maybe Text -> CreateTrialComponentResponse)
-> Lens
CreateTrialComponentResponse
CreateTrialComponentResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponentResponse' {Maybe Text
trialComponentArn :: Maybe Text
$sel:trialComponentArn:CreateTrialComponentResponse' :: CreateTrialComponentResponse -> Maybe Text
trialComponentArn} -> Maybe Text
trialComponentArn) (\s :: CreateTrialComponentResponse
s@CreateTrialComponentResponse' {} Maybe Text
a -> CreateTrialComponentResponse
s {$sel:trialComponentArn:CreateTrialComponentResponse' :: Maybe Text
trialComponentArn = Maybe Text
a} :: CreateTrialComponentResponse)
createTrialComponentResponse_httpStatus :: Lens.Lens' CreateTrialComponentResponse Prelude.Int
createTrialComponentResponse_httpStatus :: (Int -> f Int)
-> CreateTrialComponentResponse -> f CreateTrialComponentResponse
createTrialComponentResponse_httpStatus = (CreateTrialComponentResponse -> Int)
-> (CreateTrialComponentResponse
-> Int -> CreateTrialComponentResponse)
-> Lens
CreateTrialComponentResponse CreateTrialComponentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrialComponentResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateTrialComponentResponse' :: CreateTrialComponentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateTrialComponentResponse
s@CreateTrialComponentResponse' {} Int
a -> CreateTrialComponentResponse
s {$sel:httpStatus:CreateTrialComponentResponse' :: Int
httpStatus = Int
a} :: CreateTrialComponentResponse)
instance Prelude.NFData CreateTrialComponentResponse