{-# 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.CreateHyperParameterTuningJob
(
CreateHyperParameterTuningJob (..),
newCreateHyperParameterTuningJob,
createHyperParameterTuningJob_tags,
createHyperParameterTuningJob_trainingJobDefinition,
createHyperParameterTuningJob_trainingJobDefinitions,
createHyperParameterTuningJob_warmStartConfig,
createHyperParameterTuningJob_hyperParameterTuningJobName,
createHyperParameterTuningJob_hyperParameterTuningJobConfig,
CreateHyperParameterTuningJobResponse (..),
newCreateHyperParameterTuningJobResponse,
createHyperParameterTuningJobResponse_httpStatus,
createHyperParameterTuningJobResponse_hyperParameterTuningJobArn,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types
data CreateHyperParameterTuningJob = CreateHyperParameterTuningJob'
{
CreateHyperParameterTuningJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition :: Prelude.Maybe HyperParameterTrainingJobDefinition,
CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions :: Prelude.Maybe (Prelude.NonEmpty HyperParameterTrainingJobDefinition),
CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig :: Prelude.Maybe HyperParameterTuningJobWarmStartConfig,
CreateHyperParameterTuningJob -> Text
hyperParameterTuningJobName :: Prelude.Text,
CreateHyperParameterTuningJob -> HyperParameterTuningJobConfig
hyperParameterTuningJobConfig :: HyperParameterTuningJobConfig
}
deriving (CreateHyperParameterTuningJob
-> CreateHyperParameterTuningJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateHyperParameterTuningJob
-> CreateHyperParameterTuningJob -> Bool
$c/= :: CreateHyperParameterTuningJob
-> CreateHyperParameterTuningJob -> Bool
== :: CreateHyperParameterTuningJob
-> CreateHyperParameterTuningJob -> Bool
$c== :: CreateHyperParameterTuningJob
-> CreateHyperParameterTuningJob -> Bool
Prelude.Eq, ReadPrec [CreateHyperParameterTuningJob]
ReadPrec CreateHyperParameterTuningJob
Int -> ReadS CreateHyperParameterTuningJob
ReadS [CreateHyperParameterTuningJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateHyperParameterTuningJob]
$creadListPrec :: ReadPrec [CreateHyperParameterTuningJob]
readPrec :: ReadPrec CreateHyperParameterTuningJob
$creadPrec :: ReadPrec CreateHyperParameterTuningJob
readList :: ReadS [CreateHyperParameterTuningJob]
$creadList :: ReadS [CreateHyperParameterTuningJob]
readsPrec :: Int -> ReadS CreateHyperParameterTuningJob
$creadsPrec :: Int -> ReadS CreateHyperParameterTuningJob
Prelude.Read, Int -> CreateHyperParameterTuningJob -> ShowS
[CreateHyperParameterTuningJob] -> ShowS
CreateHyperParameterTuningJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateHyperParameterTuningJob] -> ShowS
$cshowList :: [CreateHyperParameterTuningJob] -> ShowS
show :: CreateHyperParameterTuningJob -> String
$cshow :: CreateHyperParameterTuningJob -> String
showsPrec :: Int -> CreateHyperParameterTuningJob -> ShowS
$cshowsPrec :: Int -> CreateHyperParameterTuningJob -> ShowS
Prelude.Show, forall x.
Rep CreateHyperParameterTuningJob x
-> CreateHyperParameterTuningJob
forall x.
CreateHyperParameterTuningJob
-> Rep CreateHyperParameterTuningJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateHyperParameterTuningJob x
-> CreateHyperParameterTuningJob
$cfrom :: forall x.
CreateHyperParameterTuningJob
-> Rep CreateHyperParameterTuningJob x
Prelude.Generic)
newCreateHyperParameterTuningJob ::
Prelude.Text ->
HyperParameterTuningJobConfig ->
CreateHyperParameterTuningJob
newCreateHyperParameterTuningJob :: Text
-> HyperParameterTuningJobConfig -> CreateHyperParameterTuningJob
newCreateHyperParameterTuningJob
Text
pHyperParameterTuningJobName_
HyperParameterTuningJobConfig
pHyperParameterTuningJobConfig_ =
CreateHyperParameterTuningJob'
{ $sel:tags:CreateHyperParameterTuningJob' :: Maybe [Tag]
tags =
forall a. Maybe a
Prelude.Nothing,
$sel:trainingJobDefinition:CreateHyperParameterTuningJob' :: Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition = forall a. Maybe a
Prelude.Nothing,
$sel:trainingJobDefinitions:CreateHyperParameterTuningJob' :: Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions = forall a. Maybe a
Prelude.Nothing,
$sel:warmStartConfig:CreateHyperParameterTuningJob' :: Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig = forall a. Maybe a
Prelude.Nothing,
$sel:hyperParameterTuningJobName:CreateHyperParameterTuningJob' :: Text
hyperParameterTuningJobName =
Text
pHyperParameterTuningJobName_,
$sel:hyperParameterTuningJobConfig:CreateHyperParameterTuningJob' :: HyperParameterTuningJobConfig
hyperParameterTuningJobConfig =
HyperParameterTuningJobConfig
pHyperParameterTuningJobConfig_
}
createHyperParameterTuningJob_tags :: Lens.Lens' CreateHyperParameterTuningJob (Prelude.Maybe [Tag])
createHyperParameterTuningJob_tags :: Lens' CreateHyperParameterTuningJob (Maybe [Tag])
createHyperParameterTuningJob_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHyperParameterTuningJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateHyperParameterTuningJob
s@CreateHyperParameterTuningJob' {} Maybe [Tag]
a -> CreateHyperParameterTuningJob
s {$sel:tags:CreateHyperParameterTuningJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateHyperParameterTuningJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createHyperParameterTuningJob_trainingJobDefinition :: Lens.Lens' CreateHyperParameterTuningJob (Prelude.Maybe HyperParameterTrainingJobDefinition)
createHyperParameterTuningJob_trainingJobDefinition :: Lens'
CreateHyperParameterTuningJob
(Maybe HyperParameterTrainingJobDefinition)
createHyperParameterTuningJob_trainingJobDefinition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHyperParameterTuningJob' {Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition :: Maybe HyperParameterTrainingJobDefinition
$sel:trainingJobDefinition:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition} -> Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition) (\s :: CreateHyperParameterTuningJob
s@CreateHyperParameterTuningJob' {} Maybe HyperParameterTrainingJobDefinition
a -> CreateHyperParameterTuningJob
s {$sel:trainingJobDefinition:CreateHyperParameterTuningJob' :: Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition = Maybe HyperParameterTrainingJobDefinition
a} :: CreateHyperParameterTuningJob)
createHyperParameterTuningJob_trainingJobDefinitions :: Lens.Lens' CreateHyperParameterTuningJob (Prelude.Maybe (Prelude.NonEmpty HyperParameterTrainingJobDefinition))
createHyperParameterTuningJob_trainingJobDefinitions :: Lens'
CreateHyperParameterTuningJob
(Maybe (NonEmpty HyperParameterTrainingJobDefinition))
createHyperParameterTuningJob_trainingJobDefinitions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHyperParameterTuningJob' {Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions :: Maybe (NonEmpty HyperParameterTrainingJobDefinition)
$sel:trainingJobDefinitions:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions} -> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions) (\s :: CreateHyperParameterTuningJob
s@CreateHyperParameterTuningJob' {} Maybe (NonEmpty HyperParameterTrainingJobDefinition)
a -> CreateHyperParameterTuningJob
s {$sel:trainingJobDefinitions:CreateHyperParameterTuningJob' :: Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions = Maybe (NonEmpty HyperParameterTrainingJobDefinition)
a} :: CreateHyperParameterTuningJob) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createHyperParameterTuningJob_warmStartConfig :: Lens.Lens' CreateHyperParameterTuningJob (Prelude.Maybe HyperParameterTuningJobWarmStartConfig)
createHyperParameterTuningJob_warmStartConfig :: Lens'
CreateHyperParameterTuningJob
(Maybe HyperParameterTuningJobWarmStartConfig)
createHyperParameterTuningJob_warmStartConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHyperParameterTuningJob' {Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig :: Maybe HyperParameterTuningJobWarmStartConfig
$sel:warmStartConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig} -> Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig) (\s :: CreateHyperParameterTuningJob
s@CreateHyperParameterTuningJob' {} Maybe HyperParameterTuningJobWarmStartConfig
a -> CreateHyperParameterTuningJob
s {$sel:warmStartConfig:CreateHyperParameterTuningJob' :: Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig = Maybe HyperParameterTuningJobWarmStartConfig
a} :: CreateHyperParameterTuningJob)
createHyperParameterTuningJob_hyperParameterTuningJobName :: Lens.Lens' CreateHyperParameterTuningJob Prelude.Text
createHyperParameterTuningJob_hyperParameterTuningJobName :: Lens' CreateHyperParameterTuningJob Text
createHyperParameterTuningJob_hyperParameterTuningJobName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHyperParameterTuningJob' {Text
hyperParameterTuningJobName :: Text
$sel:hyperParameterTuningJobName:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Text
hyperParameterTuningJobName} -> Text
hyperParameterTuningJobName) (\s :: CreateHyperParameterTuningJob
s@CreateHyperParameterTuningJob' {} Text
a -> CreateHyperParameterTuningJob
s {$sel:hyperParameterTuningJobName:CreateHyperParameterTuningJob' :: Text
hyperParameterTuningJobName = Text
a} :: CreateHyperParameterTuningJob)
createHyperParameterTuningJob_hyperParameterTuningJobConfig :: Lens.Lens' CreateHyperParameterTuningJob HyperParameterTuningJobConfig
createHyperParameterTuningJob_hyperParameterTuningJobConfig :: Lens' CreateHyperParameterTuningJob HyperParameterTuningJobConfig
createHyperParameterTuningJob_hyperParameterTuningJobConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHyperParameterTuningJob' {HyperParameterTuningJobConfig
hyperParameterTuningJobConfig :: HyperParameterTuningJobConfig
$sel:hyperParameterTuningJobConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> HyperParameterTuningJobConfig
hyperParameterTuningJobConfig} -> HyperParameterTuningJobConfig
hyperParameterTuningJobConfig) (\s :: CreateHyperParameterTuningJob
s@CreateHyperParameterTuningJob' {} HyperParameterTuningJobConfig
a -> CreateHyperParameterTuningJob
s {$sel:hyperParameterTuningJobConfig:CreateHyperParameterTuningJob' :: HyperParameterTuningJobConfig
hyperParameterTuningJobConfig = HyperParameterTuningJobConfig
a} :: CreateHyperParameterTuningJob)
instance
Core.AWSRequest
CreateHyperParameterTuningJob
where
type
AWSResponse CreateHyperParameterTuningJob =
CreateHyperParameterTuningJobResponse
request :: (Service -> Service)
-> CreateHyperParameterTuningJob
-> Request CreateHyperParameterTuningJob
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateHyperParameterTuningJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateHyperParameterTuningJob)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Text -> CreateHyperParameterTuningJobResponse
CreateHyperParameterTuningJobResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"HyperParameterTuningJobArn")
)
instance
Prelude.Hashable
CreateHyperParameterTuningJob
where
hashWithSalt :: Int -> CreateHyperParameterTuningJob -> Int
hashWithSalt Int
_salt CreateHyperParameterTuningJob' {Maybe [Tag]
Maybe (NonEmpty HyperParameterTrainingJobDefinition)
Maybe HyperParameterTuningJobWarmStartConfig
Maybe HyperParameterTrainingJobDefinition
Text
HyperParameterTuningJobConfig
hyperParameterTuningJobConfig :: HyperParameterTuningJobConfig
hyperParameterTuningJobName :: Text
warmStartConfig :: Maybe HyperParameterTuningJobWarmStartConfig
trainingJobDefinitions :: Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinition :: Maybe HyperParameterTrainingJobDefinition
tags :: Maybe [Tag]
$sel:hyperParameterTuningJobConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> HyperParameterTuningJobConfig
$sel:hyperParameterTuningJobName:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Text
$sel:warmStartConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig
$sel:trainingJobDefinitions:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
$sel:trainingJobDefinition:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition
$sel:tags:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Maybe [Tag]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
hyperParameterTuningJobName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HyperParameterTuningJobConfig
hyperParameterTuningJobConfig
instance Prelude.NFData CreateHyperParameterTuningJob where
rnf :: CreateHyperParameterTuningJob -> ()
rnf CreateHyperParameterTuningJob' {Maybe [Tag]
Maybe (NonEmpty HyperParameterTrainingJobDefinition)
Maybe HyperParameterTuningJobWarmStartConfig
Maybe HyperParameterTrainingJobDefinition
Text
HyperParameterTuningJobConfig
hyperParameterTuningJobConfig :: HyperParameterTuningJobConfig
hyperParameterTuningJobName :: Text
warmStartConfig :: Maybe HyperParameterTuningJobWarmStartConfig
trainingJobDefinitions :: Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinition :: Maybe HyperParameterTrainingJobDefinition
tags :: Maybe [Tag]
$sel:hyperParameterTuningJobConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> HyperParameterTuningJobConfig
$sel:hyperParameterTuningJobName:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Text
$sel:warmStartConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig
$sel:trainingJobDefinitions:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
$sel:trainingJobDefinition:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition
$sel:tags:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Maybe [Tag]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hyperParameterTuningJobName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HyperParameterTuningJobConfig
hyperParameterTuningJobConfig
instance Data.ToHeaders CreateHyperParameterTuningJob where
toHeaders :: CreateHyperParameterTuningJob -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"SageMaker.CreateHyperParameterTuningJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateHyperParameterTuningJob where
toJSON :: CreateHyperParameterTuningJob -> Value
toJSON CreateHyperParameterTuningJob' {Maybe [Tag]
Maybe (NonEmpty HyperParameterTrainingJobDefinition)
Maybe HyperParameterTuningJobWarmStartConfig
Maybe HyperParameterTrainingJobDefinition
Text
HyperParameterTuningJobConfig
hyperParameterTuningJobConfig :: HyperParameterTuningJobConfig
hyperParameterTuningJobName :: Text
warmStartConfig :: Maybe HyperParameterTuningJobWarmStartConfig
trainingJobDefinitions :: Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinition :: Maybe HyperParameterTrainingJobDefinition
tags :: Maybe [Tag]
$sel:hyperParameterTuningJobConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> HyperParameterTuningJobConfig
$sel:hyperParameterTuningJobName:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Text
$sel:warmStartConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig
$sel:trainingJobDefinitions:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
$sel:trainingJobDefinition:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition
$sel:tags:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Maybe [Tag]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Key
"TrainingJobDefinition" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition,
(Key
"TrainingJobDefinitions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions,
(Key
"WarmStartConfig" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig,
forall a. a -> Maybe a
Prelude.Just
( Key
"HyperParameterTuningJobName"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
hyperParameterTuningJobName
),
forall a. a -> Maybe a
Prelude.Just
( Key
"HyperParameterTuningJobConfig"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= HyperParameterTuningJobConfig
hyperParameterTuningJobConfig
)
]
)
instance Data.ToPath CreateHyperParameterTuningJob where
toPath :: CreateHyperParameterTuningJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateHyperParameterTuningJob where
toQuery :: CreateHyperParameterTuningJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateHyperParameterTuningJobResponse = CreateHyperParameterTuningJobResponse'
{
CreateHyperParameterTuningJobResponse -> Int
httpStatus :: Prelude.Int,
CreateHyperParameterTuningJobResponse -> Text
hyperParameterTuningJobArn :: Prelude.Text
}
deriving (CreateHyperParameterTuningJobResponse
-> CreateHyperParameterTuningJobResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateHyperParameterTuningJobResponse
-> CreateHyperParameterTuningJobResponse -> Bool
$c/= :: CreateHyperParameterTuningJobResponse
-> CreateHyperParameterTuningJobResponse -> Bool
== :: CreateHyperParameterTuningJobResponse
-> CreateHyperParameterTuningJobResponse -> Bool
$c== :: CreateHyperParameterTuningJobResponse
-> CreateHyperParameterTuningJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateHyperParameterTuningJobResponse]
ReadPrec CreateHyperParameterTuningJobResponse
Int -> ReadS CreateHyperParameterTuningJobResponse
ReadS [CreateHyperParameterTuningJobResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateHyperParameterTuningJobResponse]
$creadListPrec :: ReadPrec [CreateHyperParameterTuningJobResponse]
readPrec :: ReadPrec CreateHyperParameterTuningJobResponse
$creadPrec :: ReadPrec CreateHyperParameterTuningJobResponse
readList :: ReadS [CreateHyperParameterTuningJobResponse]
$creadList :: ReadS [CreateHyperParameterTuningJobResponse]
readsPrec :: Int -> ReadS CreateHyperParameterTuningJobResponse
$creadsPrec :: Int -> ReadS CreateHyperParameterTuningJobResponse
Prelude.Read, Int -> CreateHyperParameterTuningJobResponse -> ShowS
[CreateHyperParameterTuningJobResponse] -> ShowS
CreateHyperParameterTuningJobResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateHyperParameterTuningJobResponse] -> ShowS
$cshowList :: [CreateHyperParameterTuningJobResponse] -> ShowS
show :: CreateHyperParameterTuningJobResponse -> String
$cshow :: CreateHyperParameterTuningJobResponse -> String
showsPrec :: Int -> CreateHyperParameterTuningJobResponse -> ShowS
$cshowsPrec :: Int -> CreateHyperParameterTuningJobResponse -> ShowS
Prelude.Show, forall x.
Rep CreateHyperParameterTuningJobResponse x
-> CreateHyperParameterTuningJobResponse
forall x.
CreateHyperParameterTuningJobResponse
-> Rep CreateHyperParameterTuningJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateHyperParameterTuningJobResponse x
-> CreateHyperParameterTuningJobResponse
$cfrom :: forall x.
CreateHyperParameterTuningJobResponse
-> Rep CreateHyperParameterTuningJobResponse x
Prelude.Generic)
newCreateHyperParameterTuningJobResponse ::
Prelude.Int ->
Prelude.Text ->
CreateHyperParameterTuningJobResponse
newCreateHyperParameterTuningJobResponse :: Int -> Text -> CreateHyperParameterTuningJobResponse
newCreateHyperParameterTuningJobResponse
Int
pHttpStatus_
Text
pHyperParameterTuningJobArn_ =
CreateHyperParameterTuningJobResponse'
{ $sel:httpStatus:CreateHyperParameterTuningJobResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:hyperParameterTuningJobArn:CreateHyperParameterTuningJobResponse' :: Text
hyperParameterTuningJobArn =
Text
pHyperParameterTuningJobArn_
}
createHyperParameterTuningJobResponse_httpStatus :: Lens.Lens' CreateHyperParameterTuningJobResponse Prelude.Int
createHyperParameterTuningJobResponse_httpStatus :: Lens' CreateHyperParameterTuningJobResponse Int
createHyperParameterTuningJobResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHyperParameterTuningJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateHyperParameterTuningJobResponse' :: CreateHyperParameterTuningJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateHyperParameterTuningJobResponse
s@CreateHyperParameterTuningJobResponse' {} Int
a -> CreateHyperParameterTuningJobResponse
s {$sel:httpStatus:CreateHyperParameterTuningJobResponse' :: Int
httpStatus = Int
a} :: CreateHyperParameterTuningJobResponse)
createHyperParameterTuningJobResponse_hyperParameterTuningJobArn :: Lens.Lens' CreateHyperParameterTuningJobResponse Prelude.Text
createHyperParameterTuningJobResponse_hyperParameterTuningJobArn :: Lens' CreateHyperParameterTuningJobResponse Text
createHyperParameterTuningJobResponse_hyperParameterTuningJobArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHyperParameterTuningJobResponse' {Text
hyperParameterTuningJobArn :: Text
$sel:hyperParameterTuningJobArn:CreateHyperParameterTuningJobResponse' :: CreateHyperParameterTuningJobResponse -> Text
hyperParameterTuningJobArn} -> Text
hyperParameterTuningJobArn) (\s :: CreateHyperParameterTuningJobResponse
s@CreateHyperParameterTuningJobResponse' {} Text
a -> CreateHyperParameterTuningJobResponse
s {$sel:hyperParameterTuningJobArn:CreateHyperParameterTuningJobResponse' :: Text
hyperParameterTuningJobArn = Text
a} :: CreateHyperParameterTuningJobResponse)
instance
Prelude.NFData
CreateHyperParameterTuningJobResponse
where
rnf :: CreateHyperParameterTuningJobResponse -> ()
rnf CreateHyperParameterTuningJobResponse' {Int
Text
hyperParameterTuningJobArn :: Text
httpStatus :: Int
$sel:hyperParameterTuningJobArn:CreateHyperParameterTuningJobResponse' :: CreateHyperParameterTuningJobResponse -> Text
$sel:httpStatus:CreateHyperParameterTuningJobResponse' :: CreateHyperParameterTuningJobResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hyperParameterTuningJobArn