{-# 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_trainingJobDefinition,
createHyperParameterTuningJob_warmStartConfig,
createHyperParameterTuningJob_tags,
createHyperParameterTuningJob_trainingJobDefinitions,
createHyperParameterTuningJob_hyperParameterTuningJobName,
createHyperParameterTuningJob_hyperParameterTuningJobConfig,
CreateHyperParameterTuningJobResponse (..),
newCreateHyperParameterTuningJobResponse,
createHyperParameterTuningJobResponse_httpStatus,
createHyperParameterTuningJobResponse_hyperParameterTuningJobArn,
)
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 CreateHyperParameterTuningJob = CreateHyperParameterTuningJob'
{
CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition :: Prelude.Maybe HyperParameterTrainingJobDefinition,
CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig :: Prelude.Maybe HyperParameterTuningJobWarmStartConfig,
CreateHyperParameterTuningJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions :: Prelude.Maybe (Prelude.NonEmpty HyperParameterTrainingJobDefinition),
CreateHyperParameterTuningJob -> Text
hyperParameterTuningJobName :: Prelude.Text,
CreateHyperParameterTuningJob -> HyperParameterTuningJobConfig
hyperParameterTuningJobConfig :: HyperParameterTuningJobConfig
}
deriving (CreateHyperParameterTuningJob
-> CreateHyperParameterTuningJob -> Bool
(CreateHyperParameterTuningJob
-> CreateHyperParameterTuningJob -> Bool)
-> (CreateHyperParameterTuningJob
-> CreateHyperParameterTuningJob -> Bool)
-> Eq CreateHyperParameterTuningJob
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]
(Int -> ReadS CreateHyperParameterTuningJob)
-> ReadS [CreateHyperParameterTuningJob]
-> ReadPrec CreateHyperParameterTuningJob
-> ReadPrec [CreateHyperParameterTuningJob]
-> Read 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
(Int -> CreateHyperParameterTuningJob -> ShowS)
-> (CreateHyperParameterTuningJob -> String)
-> ([CreateHyperParameterTuningJob] -> ShowS)
-> Show CreateHyperParameterTuningJob
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.
CreateHyperParameterTuningJob
-> Rep CreateHyperParameterTuningJob x)
-> (forall x.
Rep CreateHyperParameterTuningJob x
-> CreateHyperParameterTuningJob)
-> Generic CreateHyperParameterTuningJob
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' :: Maybe HyperParameterTrainingJobDefinition
-> Maybe HyperParameterTuningJobWarmStartConfig
-> Maybe [Tag]
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
-> Text
-> HyperParameterTuningJobConfig
-> CreateHyperParameterTuningJob
CreateHyperParameterTuningJob'
{ $sel:trainingJobDefinition:CreateHyperParameterTuningJob' :: Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition =
Maybe HyperParameterTrainingJobDefinition
forall a. Maybe a
Prelude.Nothing,
$sel:warmStartConfig:CreateHyperParameterTuningJob' :: Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig = Maybe HyperParameterTuningJobWarmStartConfig
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateHyperParameterTuningJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:trainingJobDefinitions:CreateHyperParameterTuningJob' :: Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions = Maybe (NonEmpty HyperParameterTrainingJobDefinition)
forall a. Maybe a
Prelude.Nothing,
$sel:hyperParameterTuningJobName:CreateHyperParameterTuningJob' :: Text
hyperParameterTuningJobName =
Text
pHyperParameterTuningJobName_,
$sel:hyperParameterTuningJobConfig:CreateHyperParameterTuningJob' :: HyperParameterTuningJobConfig
hyperParameterTuningJobConfig =
HyperParameterTuningJobConfig
pHyperParameterTuningJobConfig_
}
createHyperParameterTuningJob_trainingJobDefinition :: Lens.Lens' CreateHyperParameterTuningJob (Prelude.Maybe HyperParameterTrainingJobDefinition)
createHyperParameterTuningJob_trainingJobDefinition :: (Maybe HyperParameterTrainingJobDefinition
-> f (Maybe HyperParameterTrainingJobDefinition))
-> CreateHyperParameterTuningJob -> f CreateHyperParameterTuningJob
createHyperParameterTuningJob_trainingJobDefinition = (CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition)
-> (CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition
-> CreateHyperParameterTuningJob)
-> Lens
CreateHyperParameterTuningJob
CreateHyperParameterTuningJob
(Maybe HyperParameterTrainingJobDefinition)
(Maybe HyperParameterTrainingJobDefinition)
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_warmStartConfig :: Lens.Lens' CreateHyperParameterTuningJob (Prelude.Maybe HyperParameterTuningJobWarmStartConfig)
createHyperParameterTuningJob_warmStartConfig :: (Maybe HyperParameterTuningJobWarmStartConfig
-> f (Maybe HyperParameterTuningJobWarmStartConfig))
-> CreateHyperParameterTuningJob -> f CreateHyperParameterTuningJob
createHyperParameterTuningJob_warmStartConfig = (CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig)
-> (CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig
-> CreateHyperParameterTuningJob)
-> Lens
CreateHyperParameterTuningJob
CreateHyperParameterTuningJob
(Maybe HyperParameterTuningJobWarmStartConfig)
(Maybe HyperParameterTuningJobWarmStartConfig)
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_tags :: Lens.Lens' CreateHyperParameterTuningJob (Prelude.Maybe [Tag])
createHyperParameterTuningJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateHyperParameterTuningJob -> f CreateHyperParameterTuningJob
createHyperParameterTuningJob_tags = (CreateHyperParameterTuningJob -> Maybe [Tag])
-> (CreateHyperParameterTuningJob
-> Maybe [Tag] -> CreateHyperParameterTuningJob)
-> Lens
CreateHyperParameterTuningJob
CreateHyperParameterTuningJob
(Maybe [Tag])
(Maybe [Tag])
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) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateHyperParameterTuningJob
-> f CreateHyperParameterTuningJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateHyperParameterTuningJob
-> f CreateHyperParameterTuningJob
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
createHyperParameterTuningJob_trainingJobDefinitions :: Lens.Lens' CreateHyperParameterTuningJob (Prelude.Maybe (Prelude.NonEmpty HyperParameterTrainingJobDefinition))
createHyperParameterTuningJob_trainingJobDefinitions :: (Maybe (NonEmpty HyperParameterTrainingJobDefinition)
-> f (Maybe (NonEmpty HyperParameterTrainingJobDefinition)))
-> CreateHyperParameterTuningJob -> f CreateHyperParameterTuningJob
createHyperParameterTuningJob_trainingJobDefinitions = (CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition))
-> (CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
-> CreateHyperParameterTuningJob)
-> Lens
CreateHyperParameterTuningJob
CreateHyperParameterTuningJob
(Maybe (NonEmpty HyperParameterTrainingJobDefinition))
(Maybe (NonEmpty HyperParameterTrainingJobDefinition))
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) ((Maybe (NonEmpty HyperParameterTrainingJobDefinition)
-> f (Maybe (NonEmpty HyperParameterTrainingJobDefinition)))
-> CreateHyperParameterTuningJob
-> f CreateHyperParameterTuningJob)
-> ((Maybe (NonEmpty HyperParameterTrainingJobDefinition)
-> f (Maybe (NonEmpty HyperParameterTrainingJobDefinition)))
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
-> f (Maybe (NonEmpty HyperParameterTrainingJobDefinition)))
-> (Maybe (NonEmpty HyperParameterTrainingJobDefinition)
-> f (Maybe (NonEmpty HyperParameterTrainingJobDefinition)))
-> CreateHyperParameterTuningJob
-> f CreateHyperParameterTuningJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty HyperParameterTrainingJobDefinition)
(NonEmpty HyperParameterTrainingJobDefinition)
(NonEmpty HyperParameterTrainingJobDefinition)
(NonEmpty HyperParameterTrainingJobDefinition)
-> Iso
(Maybe (NonEmpty HyperParameterTrainingJobDefinition))
(Maybe (NonEmpty HyperParameterTrainingJobDefinition))
(Maybe (NonEmpty HyperParameterTrainingJobDefinition))
(Maybe (NonEmpty HyperParameterTrainingJobDefinition))
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
(NonEmpty HyperParameterTrainingJobDefinition)
(NonEmpty HyperParameterTrainingJobDefinition)
(NonEmpty HyperParameterTrainingJobDefinition)
(NonEmpty HyperParameterTrainingJobDefinition)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createHyperParameterTuningJob_hyperParameterTuningJobName :: Lens.Lens' CreateHyperParameterTuningJob Prelude.Text
createHyperParameterTuningJob_hyperParameterTuningJobName :: (Text -> f Text)
-> CreateHyperParameterTuningJob -> f CreateHyperParameterTuningJob
createHyperParameterTuningJob_hyperParameterTuningJobName = (CreateHyperParameterTuningJob -> Text)
-> (CreateHyperParameterTuningJob
-> Text -> CreateHyperParameterTuningJob)
-> Lens
CreateHyperParameterTuningJob
CreateHyperParameterTuningJob
Text
Text
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 :: (HyperParameterTuningJobConfig -> f HyperParameterTuningJobConfig)
-> CreateHyperParameterTuningJob -> f CreateHyperParameterTuningJob
createHyperParameterTuningJob_hyperParameterTuningJobConfig = (CreateHyperParameterTuningJob -> HyperParameterTuningJobConfig)
-> (CreateHyperParameterTuningJob
-> HyperParameterTuningJobConfig -> CreateHyperParameterTuningJob)
-> Lens
CreateHyperParameterTuningJob
CreateHyperParameterTuningJob
HyperParameterTuningJobConfig
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 :: CreateHyperParameterTuningJob
-> Request CreateHyperParameterTuningJob
request = Service
-> CreateHyperParameterTuningJob
-> Request CreateHyperParameterTuningJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateHyperParameterTuningJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateHyperParameterTuningJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateHyperParameterTuningJob))
-> Logger
-> Service
-> Proxy CreateHyperParameterTuningJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateHyperParameterTuningJob)))
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 ->
Int -> Text -> CreateHyperParameterTuningJobResponse
CreateHyperParameterTuningJobResponse'
(Int -> Text -> CreateHyperParameterTuningJobResponse)
-> Either String Int
-> Either String (Text -> CreateHyperParameterTuningJobResponse)
forall (f :: * -> *) a b. Functor 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))
Either String (Text -> CreateHyperParameterTuningJobResponse)
-> Either String Text
-> Either String CreateHyperParameterTuningJobResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"HyperParameterTuningJobArn")
)
instance
Prelude.Hashable
CreateHyperParameterTuningJob
instance Prelude.NFData CreateHyperParameterTuningJob
instance Core.ToHeaders CreateHyperParameterTuningJob where
toHeaders :: CreateHyperParameterTuningJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateHyperParameterTuningJob -> 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.CreateHyperParameterTuningJob" ::
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 CreateHyperParameterTuningJob where
toJSON :: CreateHyperParameterTuningJob -> Value
toJSON CreateHyperParameterTuningJob' {Maybe [Tag]
Maybe (NonEmpty HyperParameterTrainingJobDefinition)
Maybe HyperParameterTuningJobWarmStartConfig
Maybe HyperParameterTrainingJobDefinition
Text
HyperParameterTuningJobConfig
hyperParameterTuningJobConfig :: HyperParameterTuningJobConfig
hyperParameterTuningJobName :: Text
trainingJobDefinitions :: Maybe (NonEmpty HyperParameterTrainingJobDefinition)
tags :: Maybe [Tag]
warmStartConfig :: Maybe HyperParameterTuningJobWarmStartConfig
trainingJobDefinition :: Maybe HyperParameterTrainingJobDefinition
$sel:hyperParameterTuningJobConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> HyperParameterTuningJobConfig
$sel:hyperParameterTuningJobName:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Text
$sel:trainingJobDefinitions:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
$sel:tags:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob -> Maybe [Tag]
$sel:warmStartConfig:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTuningJobWarmStartConfig
$sel:trainingJobDefinition:CreateHyperParameterTuningJob' :: CreateHyperParameterTuningJob
-> Maybe HyperParameterTrainingJobDefinition
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"TrainingJobDefinition" Text -> HyperParameterTrainingJobDefinition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HyperParameterTrainingJobDefinition -> Pair)
-> Maybe HyperParameterTrainingJobDefinition -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HyperParameterTrainingJobDefinition
trainingJobDefinition,
(Text
"WarmStartConfig" Text -> HyperParameterTuningJobWarmStartConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HyperParameterTuningJobWarmStartConfig -> Pair)
-> Maybe HyperParameterTuningJobWarmStartConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HyperParameterTuningJobWarmStartConfig
warmStartConfig,
(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,
(Text
"TrainingJobDefinitions" Text -> NonEmpty HyperParameterTrainingJobDefinition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty HyperParameterTrainingJobDefinition -> Pair)
-> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
-> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty HyperParameterTrainingJobDefinition)
trainingJobDefinitions,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"HyperParameterTuningJobName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
hyperParameterTuningJobName
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"HyperParameterTuningJobConfig"
Text -> HyperParameterTuningJobConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= HyperParameterTuningJobConfig
hyperParameterTuningJobConfig
)
]
)
instance Core.ToPath CreateHyperParameterTuningJob where
toPath :: CreateHyperParameterTuningJob -> ByteString
toPath = ByteString -> CreateHyperParameterTuningJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateHyperParameterTuningJob where
toQuery :: CreateHyperParameterTuningJob -> QueryString
toQuery = QueryString -> CreateHyperParameterTuningJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateHyperParameterTuningJobResponse = CreateHyperParameterTuningJobResponse'
{
CreateHyperParameterTuningJobResponse -> Int
httpStatus :: Prelude.Int,
CreateHyperParameterTuningJobResponse -> Text
hyperParameterTuningJobArn :: Prelude.Text
}
deriving (CreateHyperParameterTuningJobResponse
-> CreateHyperParameterTuningJobResponse -> Bool
(CreateHyperParameterTuningJobResponse
-> CreateHyperParameterTuningJobResponse -> Bool)
-> (CreateHyperParameterTuningJobResponse
-> CreateHyperParameterTuningJobResponse -> Bool)
-> Eq CreateHyperParameterTuningJobResponse
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]
(Int -> ReadS CreateHyperParameterTuningJobResponse)
-> ReadS [CreateHyperParameterTuningJobResponse]
-> ReadPrec CreateHyperParameterTuningJobResponse
-> ReadPrec [CreateHyperParameterTuningJobResponse]
-> Read 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
(Int -> CreateHyperParameterTuningJobResponse -> ShowS)
-> (CreateHyperParameterTuningJobResponse -> String)
-> ([CreateHyperParameterTuningJobResponse] -> ShowS)
-> Show CreateHyperParameterTuningJobResponse
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.
CreateHyperParameterTuningJobResponse
-> Rep CreateHyperParameterTuningJobResponse x)
-> (forall x.
Rep CreateHyperParameterTuningJobResponse x
-> CreateHyperParameterTuningJobResponse)
-> Generic CreateHyperParameterTuningJobResponse
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' :: Int -> Text -> CreateHyperParameterTuningJobResponse
CreateHyperParameterTuningJobResponse'
{ $sel:httpStatus:CreateHyperParameterTuningJobResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:hyperParameterTuningJobArn:CreateHyperParameterTuningJobResponse' :: Text
hyperParameterTuningJobArn =
Text
pHyperParameterTuningJobArn_
}
createHyperParameterTuningJobResponse_httpStatus :: Lens.Lens' CreateHyperParameterTuningJobResponse Prelude.Int
createHyperParameterTuningJobResponse_httpStatus :: (Int -> f Int)
-> CreateHyperParameterTuningJobResponse
-> f CreateHyperParameterTuningJobResponse
createHyperParameterTuningJobResponse_httpStatus = (CreateHyperParameterTuningJobResponse -> Int)
-> (CreateHyperParameterTuningJobResponse
-> Int -> CreateHyperParameterTuningJobResponse)
-> Lens
CreateHyperParameterTuningJobResponse
CreateHyperParameterTuningJobResponse
Int
Int
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 :: (Text -> f Text)
-> CreateHyperParameterTuningJobResponse
-> f CreateHyperParameterTuningJobResponse
createHyperParameterTuningJobResponse_hyperParameterTuningJobArn = (CreateHyperParameterTuningJobResponse -> Text)
-> (CreateHyperParameterTuningJobResponse
-> Text -> CreateHyperParameterTuningJobResponse)
-> Lens
CreateHyperParameterTuningJobResponse
CreateHyperParameterTuningJobResponse
Text
Text
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