{-# 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.CreateAutoMLJob
(
CreateAutoMLJob (..),
newCreateAutoMLJob,
createAutoMLJob_generateCandidateDefinitionsOnly,
createAutoMLJob_problemType,
createAutoMLJob_autoMLJobConfig,
createAutoMLJob_autoMLJobObjective,
createAutoMLJob_modelDeployConfig,
createAutoMLJob_tags,
createAutoMLJob_autoMLJobName,
createAutoMLJob_inputDataConfig,
createAutoMLJob_outputDataConfig,
createAutoMLJob_roleArn,
CreateAutoMLJobResponse (..),
newCreateAutoMLJobResponse,
createAutoMLJobResponse_httpStatus,
createAutoMLJobResponse_autoMLJobArn,
)
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 CreateAutoMLJob = CreateAutoMLJob'
{
CreateAutoMLJob -> Maybe Bool
generateCandidateDefinitionsOnly :: Prelude.Maybe Prelude.Bool,
CreateAutoMLJob -> Maybe ProblemType
problemType :: Prelude.Maybe ProblemType,
CreateAutoMLJob -> Maybe AutoMLJobConfig
autoMLJobConfig :: Prelude.Maybe AutoMLJobConfig,
CreateAutoMLJob -> Maybe AutoMLJobObjective
autoMLJobObjective :: Prelude.Maybe AutoMLJobObjective,
CreateAutoMLJob -> Maybe ModelDeployConfig
modelDeployConfig :: Prelude.Maybe ModelDeployConfig,
CreateAutoMLJob -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateAutoMLJob -> Text
autoMLJobName :: Prelude.Text,
CreateAutoMLJob -> NonEmpty AutoMLChannel
inputDataConfig :: Prelude.NonEmpty AutoMLChannel,
CreateAutoMLJob -> AutoMLOutputDataConfig
outputDataConfig :: AutoMLOutputDataConfig,
CreateAutoMLJob -> Text
roleArn :: Prelude.Text
}
deriving (CreateAutoMLJob -> CreateAutoMLJob -> Bool
(CreateAutoMLJob -> CreateAutoMLJob -> Bool)
-> (CreateAutoMLJob -> CreateAutoMLJob -> Bool)
-> Eq CreateAutoMLJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAutoMLJob -> CreateAutoMLJob -> Bool
$c/= :: CreateAutoMLJob -> CreateAutoMLJob -> Bool
== :: CreateAutoMLJob -> CreateAutoMLJob -> Bool
$c== :: CreateAutoMLJob -> CreateAutoMLJob -> Bool
Prelude.Eq, ReadPrec [CreateAutoMLJob]
ReadPrec CreateAutoMLJob
Int -> ReadS CreateAutoMLJob
ReadS [CreateAutoMLJob]
(Int -> ReadS CreateAutoMLJob)
-> ReadS [CreateAutoMLJob]
-> ReadPrec CreateAutoMLJob
-> ReadPrec [CreateAutoMLJob]
-> Read CreateAutoMLJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAutoMLJob]
$creadListPrec :: ReadPrec [CreateAutoMLJob]
readPrec :: ReadPrec CreateAutoMLJob
$creadPrec :: ReadPrec CreateAutoMLJob
readList :: ReadS [CreateAutoMLJob]
$creadList :: ReadS [CreateAutoMLJob]
readsPrec :: Int -> ReadS CreateAutoMLJob
$creadsPrec :: Int -> ReadS CreateAutoMLJob
Prelude.Read, Int -> CreateAutoMLJob -> ShowS
[CreateAutoMLJob] -> ShowS
CreateAutoMLJob -> String
(Int -> CreateAutoMLJob -> ShowS)
-> (CreateAutoMLJob -> String)
-> ([CreateAutoMLJob] -> ShowS)
-> Show CreateAutoMLJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAutoMLJob] -> ShowS
$cshowList :: [CreateAutoMLJob] -> ShowS
show :: CreateAutoMLJob -> String
$cshow :: CreateAutoMLJob -> String
showsPrec :: Int -> CreateAutoMLJob -> ShowS
$cshowsPrec :: Int -> CreateAutoMLJob -> ShowS
Prelude.Show, (forall x. CreateAutoMLJob -> Rep CreateAutoMLJob x)
-> (forall x. Rep CreateAutoMLJob x -> CreateAutoMLJob)
-> Generic CreateAutoMLJob
forall x. Rep CreateAutoMLJob x -> CreateAutoMLJob
forall x. CreateAutoMLJob -> Rep CreateAutoMLJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAutoMLJob x -> CreateAutoMLJob
$cfrom :: forall x. CreateAutoMLJob -> Rep CreateAutoMLJob x
Prelude.Generic)
newCreateAutoMLJob ::
Prelude.Text ->
Prelude.NonEmpty AutoMLChannel ->
AutoMLOutputDataConfig ->
Prelude.Text ->
CreateAutoMLJob
newCreateAutoMLJob :: Text
-> NonEmpty AutoMLChannel
-> AutoMLOutputDataConfig
-> Text
-> CreateAutoMLJob
newCreateAutoMLJob
Text
pAutoMLJobName_
NonEmpty AutoMLChannel
pInputDataConfig_
AutoMLOutputDataConfig
pOutputDataConfig_
Text
pRoleArn_ =
CreateAutoMLJob' :: Maybe Bool
-> Maybe ProblemType
-> Maybe AutoMLJobConfig
-> Maybe AutoMLJobObjective
-> Maybe ModelDeployConfig
-> Maybe [Tag]
-> Text
-> NonEmpty AutoMLChannel
-> AutoMLOutputDataConfig
-> Text
-> CreateAutoMLJob
CreateAutoMLJob'
{ $sel:generateCandidateDefinitionsOnly:CreateAutoMLJob' :: Maybe Bool
generateCandidateDefinitionsOnly =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:problemType:CreateAutoMLJob' :: Maybe ProblemType
problemType = Maybe ProblemType
forall a. Maybe a
Prelude.Nothing,
$sel:autoMLJobConfig:CreateAutoMLJob' :: Maybe AutoMLJobConfig
autoMLJobConfig = Maybe AutoMLJobConfig
forall a. Maybe a
Prelude.Nothing,
$sel:autoMLJobObjective:CreateAutoMLJob' :: Maybe AutoMLJobObjective
autoMLJobObjective = Maybe AutoMLJobObjective
forall a. Maybe a
Prelude.Nothing,
$sel:modelDeployConfig:CreateAutoMLJob' :: Maybe ModelDeployConfig
modelDeployConfig = Maybe ModelDeployConfig
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateAutoMLJob' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:autoMLJobName:CreateAutoMLJob' :: Text
autoMLJobName = Text
pAutoMLJobName_,
$sel:inputDataConfig:CreateAutoMLJob' :: NonEmpty AutoMLChannel
inputDataConfig =
Tagged (NonEmpty AutoMLChannel) (Identity (NonEmpty AutoMLChannel))
-> Tagged
(NonEmpty AutoMLChannel) (Identity (NonEmpty AutoMLChannel))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
(NonEmpty AutoMLChannel) (Identity (NonEmpty AutoMLChannel))
-> Tagged
(NonEmpty AutoMLChannel) (Identity (NonEmpty AutoMLChannel)))
-> NonEmpty AutoMLChannel -> NonEmpty AutoMLChannel
forall t b. AReview t b -> b -> t
Lens.# NonEmpty AutoMLChannel
pInputDataConfig_,
$sel:outputDataConfig:CreateAutoMLJob' :: AutoMLOutputDataConfig
outputDataConfig = AutoMLOutputDataConfig
pOutputDataConfig_,
$sel:roleArn:CreateAutoMLJob' :: Text
roleArn = Text
pRoleArn_
}
createAutoMLJob_generateCandidateDefinitionsOnly :: Lens.Lens' CreateAutoMLJob (Prelude.Maybe Prelude.Bool)
createAutoMLJob_generateCandidateDefinitionsOnly :: (Maybe Bool -> f (Maybe Bool))
-> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_generateCandidateDefinitionsOnly = (CreateAutoMLJob -> Maybe Bool)
-> (CreateAutoMLJob -> Maybe Bool -> CreateAutoMLJob)
-> Lens CreateAutoMLJob CreateAutoMLJob (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {Maybe Bool
generateCandidateDefinitionsOnly :: Maybe Bool
$sel:generateCandidateDefinitionsOnly:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe Bool
generateCandidateDefinitionsOnly} -> Maybe Bool
generateCandidateDefinitionsOnly) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} Maybe Bool
a -> CreateAutoMLJob
s {$sel:generateCandidateDefinitionsOnly:CreateAutoMLJob' :: Maybe Bool
generateCandidateDefinitionsOnly = Maybe Bool
a} :: CreateAutoMLJob)
createAutoMLJob_problemType :: Lens.Lens' CreateAutoMLJob (Prelude.Maybe ProblemType)
createAutoMLJob_problemType :: (Maybe ProblemType -> f (Maybe ProblemType))
-> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_problemType = (CreateAutoMLJob -> Maybe ProblemType)
-> (CreateAutoMLJob -> Maybe ProblemType -> CreateAutoMLJob)
-> Lens
CreateAutoMLJob
CreateAutoMLJob
(Maybe ProblemType)
(Maybe ProblemType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {Maybe ProblemType
problemType :: Maybe ProblemType
$sel:problemType:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe ProblemType
problemType} -> Maybe ProblemType
problemType) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} Maybe ProblemType
a -> CreateAutoMLJob
s {$sel:problemType:CreateAutoMLJob' :: Maybe ProblemType
problemType = Maybe ProblemType
a} :: CreateAutoMLJob)
createAutoMLJob_autoMLJobConfig :: Lens.Lens' CreateAutoMLJob (Prelude.Maybe AutoMLJobConfig)
createAutoMLJob_autoMLJobConfig :: (Maybe AutoMLJobConfig -> f (Maybe AutoMLJobConfig))
-> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_autoMLJobConfig = (CreateAutoMLJob -> Maybe AutoMLJobConfig)
-> (CreateAutoMLJob -> Maybe AutoMLJobConfig -> CreateAutoMLJob)
-> Lens
CreateAutoMLJob
CreateAutoMLJob
(Maybe AutoMLJobConfig)
(Maybe AutoMLJobConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {Maybe AutoMLJobConfig
autoMLJobConfig :: Maybe AutoMLJobConfig
$sel:autoMLJobConfig:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe AutoMLJobConfig
autoMLJobConfig} -> Maybe AutoMLJobConfig
autoMLJobConfig) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} Maybe AutoMLJobConfig
a -> CreateAutoMLJob
s {$sel:autoMLJobConfig:CreateAutoMLJob' :: Maybe AutoMLJobConfig
autoMLJobConfig = Maybe AutoMLJobConfig
a} :: CreateAutoMLJob)
createAutoMLJob_autoMLJobObjective :: Lens.Lens' CreateAutoMLJob (Prelude.Maybe AutoMLJobObjective)
createAutoMLJob_autoMLJobObjective :: (Maybe AutoMLJobObjective -> f (Maybe AutoMLJobObjective))
-> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_autoMLJobObjective = (CreateAutoMLJob -> Maybe AutoMLJobObjective)
-> (CreateAutoMLJob -> Maybe AutoMLJobObjective -> CreateAutoMLJob)
-> Lens
CreateAutoMLJob
CreateAutoMLJob
(Maybe AutoMLJobObjective)
(Maybe AutoMLJobObjective)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {Maybe AutoMLJobObjective
autoMLJobObjective :: Maybe AutoMLJobObjective
$sel:autoMLJobObjective:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe AutoMLJobObjective
autoMLJobObjective} -> Maybe AutoMLJobObjective
autoMLJobObjective) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} Maybe AutoMLJobObjective
a -> CreateAutoMLJob
s {$sel:autoMLJobObjective:CreateAutoMLJob' :: Maybe AutoMLJobObjective
autoMLJobObjective = Maybe AutoMLJobObjective
a} :: CreateAutoMLJob)
createAutoMLJob_modelDeployConfig :: Lens.Lens' CreateAutoMLJob (Prelude.Maybe ModelDeployConfig)
createAutoMLJob_modelDeployConfig :: (Maybe ModelDeployConfig -> f (Maybe ModelDeployConfig))
-> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_modelDeployConfig = (CreateAutoMLJob -> Maybe ModelDeployConfig)
-> (CreateAutoMLJob -> Maybe ModelDeployConfig -> CreateAutoMLJob)
-> Lens
CreateAutoMLJob
CreateAutoMLJob
(Maybe ModelDeployConfig)
(Maybe ModelDeployConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {Maybe ModelDeployConfig
modelDeployConfig :: Maybe ModelDeployConfig
$sel:modelDeployConfig:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe ModelDeployConfig
modelDeployConfig} -> Maybe ModelDeployConfig
modelDeployConfig) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} Maybe ModelDeployConfig
a -> CreateAutoMLJob
s {$sel:modelDeployConfig:CreateAutoMLJob' :: Maybe ModelDeployConfig
modelDeployConfig = Maybe ModelDeployConfig
a} :: CreateAutoMLJob)
createAutoMLJob_tags :: Lens.Lens' CreateAutoMLJob (Prelude.Maybe [Tag])
createAutoMLJob_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_tags = (CreateAutoMLJob -> Maybe [Tag])
-> (CreateAutoMLJob -> Maybe [Tag] -> CreateAutoMLJob)
-> Lens CreateAutoMLJob CreateAutoMLJob (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} Maybe [Tag]
a -> CreateAutoMLJob
s {$sel:tags:CreateAutoMLJob' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateAutoMLJob) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAutoMLJob -> f CreateAutoMLJob)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateAutoMLJob
-> f CreateAutoMLJob
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
createAutoMLJob_autoMLJobName :: Lens.Lens' CreateAutoMLJob Prelude.Text
createAutoMLJob_autoMLJobName :: (Text -> f Text) -> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_autoMLJobName = (CreateAutoMLJob -> Text)
-> (CreateAutoMLJob -> Text -> CreateAutoMLJob)
-> Lens CreateAutoMLJob CreateAutoMLJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {Text
autoMLJobName :: Text
$sel:autoMLJobName:CreateAutoMLJob' :: CreateAutoMLJob -> Text
autoMLJobName} -> Text
autoMLJobName) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} Text
a -> CreateAutoMLJob
s {$sel:autoMLJobName:CreateAutoMLJob' :: Text
autoMLJobName = Text
a} :: CreateAutoMLJob)
createAutoMLJob_inputDataConfig :: Lens.Lens' CreateAutoMLJob (Prelude.NonEmpty AutoMLChannel)
createAutoMLJob_inputDataConfig :: (NonEmpty AutoMLChannel -> f (NonEmpty AutoMLChannel))
-> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_inputDataConfig = (CreateAutoMLJob -> NonEmpty AutoMLChannel)
-> (CreateAutoMLJob -> NonEmpty AutoMLChannel -> CreateAutoMLJob)
-> Lens
CreateAutoMLJob
CreateAutoMLJob
(NonEmpty AutoMLChannel)
(NonEmpty AutoMLChannel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {NonEmpty AutoMLChannel
inputDataConfig :: NonEmpty AutoMLChannel
$sel:inputDataConfig:CreateAutoMLJob' :: CreateAutoMLJob -> NonEmpty AutoMLChannel
inputDataConfig} -> NonEmpty AutoMLChannel
inputDataConfig) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} NonEmpty AutoMLChannel
a -> CreateAutoMLJob
s {$sel:inputDataConfig:CreateAutoMLJob' :: NonEmpty AutoMLChannel
inputDataConfig = NonEmpty AutoMLChannel
a} :: CreateAutoMLJob) ((NonEmpty AutoMLChannel -> f (NonEmpty AutoMLChannel))
-> CreateAutoMLJob -> f CreateAutoMLJob)
-> ((NonEmpty AutoMLChannel -> f (NonEmpty AutoMLChannel))
-> NonEmpty AutoMLChannel -> f (NonEmpty AutoMLChannel))
-> (NonEmpty AutoMLChannel -> f (NonEmpty AutoMLChannel))
-> CreateAutoMLJob
-> f CreateAutoMLJob
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty AutoMLChannel -> f (NonEmpty AutoMLChannel))
-> NonEmpty AutoMLChannel -> f (NonEmpty AutoMLChannel)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAutoMLJob_outputDataConfig :: Lens.Lens' CreateAutoMLJob AutoMLOutputDataConfig
createAutoMLJob_outputDataConfig :: (AutoMLOutputDataConfig -> f AutoMLOutputDataConfig)
-> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_outputDataConfig = (CreateAutoMLJob -> AutoMLOutputDataConfig)
-> (CreateAutoMLJob -> AutoMLOutputDataConfig -> CreateAutoMLJob)
-> Lens
CreateAutoMLJob
CreateAutoMLJob
AutoMLOutputDataConfig
AutoMLOutputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {AutoMLOutputDataConfig
outputDataConfig :: AutoMLOutputDataConfig
$sel:outputDataConfig:CreateAutoMLJob' :: CreateAutoMLJob -> AutoMLOutputDataConfig
outputDataConfig} -> AutoMLOutputDataConfig
outputDataConfig) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} AutoMLOutputDataConfig
a -> CreateAutoMLJob
s {$sel:outputDataConfig:CreateAutoMLJob' :: AutoMLOutputDataConfig
outputDataConfig = AutoMLOutputDataConfig
a} :: CreateAutoMLJob)
createAutoMLJob_roleArn :: Lens.Lens' CreateAutoMLJob Prelude.Text
createAutoMLJob_roleArn :: (Text -> f Text) -> CreateAutoMLJob -> f CreateAutoMLJob
createAutoMLJob_roleArn = (CreateAutoMLJob -> Text)
-> (CreateAutoMLJob -> Text -> CreateAutoMLJob)
-> Lens CreateAutoMLJob CreateAutoMLJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJob' {Text
roleArn :: Text
$sel:roleArn:CreateAutoMLJob' :: CreateAutoMLJob -> Text
roleArn} -> Text
roleArn) (\s :: CreateAutoMLJob
s@CreateAutoMLJob' {} Text
a -> CreateAutoMLJob
s {$sel:roleArn:CreateAutoMLJob' :: Text
roleArn = Text
a} :: CreateAutoMLJob)
instance Core.AWSRequest CreateAutoMLJob where
type
AWSResponse CreateAutoMLJob =
CreateAutoMLJobResponse
request :: CreateAutoMLJob -> Request CreateAutoMLJob
request = Service -> CreateAutoMLJob -> Request CreateAutoMLJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateAutoMLJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAutoMLJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateAutoMLJob))
-> Logger
-> Service
-> Proxy CreateAutoMLJob
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAutoMLJob)))
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 -> CreateAutoMLJobResponse
CreateAutoMLJobResponse'
(Int -> Text -> CreateAutoMLJobResponse)
-> Either String Int
-> Either String (Text -> CreateAutoMLJobResponse)
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 -> CreateAutoMLJobResponse)
-> Either String Text -> Either String CreateAutoMLJobResponse
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
"AutoMLJobArn")
)
instance Prelude.Hashable CreateAutoMLJob
instance Prelude.NFData CreateAutoMLJob
instance Core.ToHeaders CreateAutoMLJob where
toHeaders :: CreateAutoMLJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateAutoMLJob -> 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.CreateAutoMLJob" :: 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 CreateAutoMLJob where
toJSON :: CreateAutoMLJob -> Value
toJSON CreateAutoMLJob' {Maybe Bool
Maybe [Tag]
Maybe AutoMLJobObjective
Maybe ModelDeployConfig
Maybe ProblemType
Maybe AutoMLJobConfig
NonEmpty AutoMLChannel
Text
AutoMLOutputDataConfig
roleArn :: Text
outputDataConfig :: AutoMLOutputDataConfig
inputDataConfig :: NonEmpty AutoMLChannel
autoMLJobName :: Text
tags :: Maybe [Tag]
modelDeployConfig :: Maybe ModelDeployConfig
autoMLJobObjective :: Maybe AutoMLJobObjective
autoMLJobConfig :: Maybe AutoMLJobConfig
problemType :: Maybe ProblemType
generateCandidateDefinitionsOnly :: Maybe Bool
$sel:roleArn:CreateAutoMLJob' :: CreateAutoMLJob -> Text
$sel:outputDataConfig:CreateAutoMLJob' :: CreateAutoMLJob -> AutoMLOutputDataConfig
$sel:inputDataConfig:CreateAutoMLJob' :: CreateAutoMLJob -> NonEmpty AutoMLChannel
$sel:autoMLJobName:CreateAutoMLJob' :: CreateAutoMLJob -> Text
$sel:tags:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe [Tag]
$sel:modelDeployConfig:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe ModelDeployConfig
$sel:autoMLJobObjective:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe AutoMLJobObjective
$sel:autoMLJobConfig:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe AutoMLJobConfig
$sel:problemType:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe ProblemType
$sel:generateCandidateDefinitionsOnly:CreateAutoMLJob' :: CreateAutoMLJob -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"GenerateCandidateDefinitionsOnly" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
generateCandidateDefinitionsOnly,
(Text
"ProblemType" Text -> ProblemType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ProblemType -> Pair) -> Maybe ProblemType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProblemType
problemType,
(Text
"AutoMLJobConfig" Text -> AutoMLJobConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AutoMLJobConfig -> Pair) -> Maybe AutoMLJobConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoMLJobConfig
autoMLJobConfig,
(Text
"AutoMLJobObjective" Text -> AutoMLJobObjective -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AutoMLJobObjective -> Pair)
-> Maybe AutoMLJobObjective -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoMLJobObjective
autoMLJobObjective,
(Text
"ModelDeployConfig" Text -> ModelDeployConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ModelDeployConfig -> Pair)
-> Maybe ModelDeployConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ModelDeployConfig
modelDeployConfig,
(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
"AutoMLJobName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
autoMLJobName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"InputDataConfig" Text -> NonEmpty AutoMLChannel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty AutoMLChannel
inputDataConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"OutputDataConfig" Text -> AutoMLOutputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AutoMLOutputDataConfig
outputDataConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn)
]
)
instance Core.ToPath CreateAutoMLJob where
toPath :: CreateAutoMLJob -> ByteString
toPath = ByteString -> CreateAutoMLJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateAutoMLJob where
toQuery :: CreateAutoMLJob -> QueryString
toQuery = QueryString -> CreateAutoMLJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateAutoMLJobResponse = CreateAutoMLJobResponse'
{
CreateAutoMLJobResponse -> Int
httpStatus :: Prelude.Int,
CreateAutoMLJobResponse -> Text
autoMLJobArn :: Prelude.Text
}
deriving (CreateAutoMLJobResponse -> CreateAutoMLJobResponse -> Bool
(CreateAutoMLJobResponse -> CreateAutoMLJobResponse -> Bool)
-> (CreateAutoMLJobResponse -> CreateAutoMLJobResponse -> Bool)
-> Eq CreateAutoMLJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAutoMLJobResponse -> CreateAutoMLJobResponse -> Bool
$c/= :: CreateAutoMLJobResponse -> CreateAutoMLJobResponse -> Bool
== :: CreateAutoMLJobResponse -> CreateAutoMLJobResponse -> Bool
$c== :: CreateAutoMLJobResponse -> CreateAutoMLJobResponse -> Bool
Prelude.Eq, ReadPrec [CreateAutoMLJobResponse]
ReadPrec CreateAutoMLJobResponse
Int -> ReadS CreateAutoMLJobResponse
ReadS [CreateAutoMLJobResponse]
(Int -> ReadS CreateAutoMLJobResponse)
-> ReadS [CreateAutoMLJobResponse]
-> ReadPrec CreateAutoMLJobResponse
-> ReadPrec [CreateAutoMLJobResponse]
-> Read CreateAutoMLJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAutoMLJobResponse]
$creadListPrec :: ReadPrec [CreateAutoMLJobResponse]
readPrec :: ReadPrec CreateAutoMLJobResponse
$creadPrec :: ReadPrec CreateAutoMLJobResponse
readList :: ReadS [CreateAutoMLJobResponse]
$creadList :: ReadS [CreateAutoMLJobResponse]
readsPrec :: Int -> ReadS CreateAutoMLJobResponse
$creadsPrec :: Int -> ReadS CreateAutoMLJobResponse
Prelude.Read, Int -> CreateAutoMLJobResponse -> ShowS
[CreateAutoMLJobResponse] -> ShowS
CreateAutoMLJobResponse -> String
(Int -> CreateAutoMLJobResponse -> ShowS)
-> (CreateAutoMLJobResponse -> String)
-> ([CreateAutoMLJobResponse] -> ShowS)
-> Show CreateAutoMLJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAutoMLJobResponse] -> ShowS
$cshowList :: [CreateAutoMLJobResponse] -> ShowS
show :: CreateAutoMLJobResponse -> String
$cshow :: CreateAutoMLJobResponse -> String
showsPrec :: Int -> CreateAutoMLJobResponse -> ShowS
$cshowsPrec :: Int -> CreateAutoMLJobResponse -> ShowS
Prelude.Show, (forall x.
CreateAutoMLJobResponse -> Rep CreateAutoMLJobResponse x)
-> (forall x.
Rep CreateAutoMLJobResponse x -> CreateAutoMLJobResponse)
-> Generic CreateAutoMLJobResponse
forall x. Rep CreateAutoMLJobResponse x -> CreateAutoMLJobResponse
forall x. CreateAutoMLJobResponse -> Rep CreateAutoMLJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAutoMLJobResponse x -> CreateAutoMLJobResponse
$cfrom :: forall x. CreateAutoMLJobResponse -> Rep CreateAutoMLJobResponse x
Prelude.Generic)
newCreateAutoMLJobResponse ::
Prelude.Int ->
Prelude.Text ->
CreateAutoMLJobResponse
newCreateAutoMLJobResponse :: Int -> Text -> CreateAutoMLJobResponse
newCreateAutoMLJobResponse
Int
pHttpStatus_
Text
pAutoMLJobArn_ =
CreateAutoMLJobResponse' :: Int -> Text -> CreateAutoMLJobResponse
CreateAutoMLJobResponse'
{ $sel:httpStatus:CreateAutoMLJobResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:autoMLJobArn:CreateAutoMLJobResponse' :: Text
autoMLJobArn = Text
pAutoMLJobArn_
}
createAutoMLJobResponse_httpStatus :: Lens.Lens' CreateAutoMLJobResponse Prelude.Int
createAutoMLJobResponse_httpStatus :: (Int -> f Int)
-> CreateAutoMLJobResponse -> f CreateAutoMLJobResponse
createAutoMLJobResponse_httpStatus = (CreateAutoMLJobResponse -> Int)
-> (CreateAutoMLJobResponse -> Int -> CreateAutoMLJobResponse)
-> Lens CreateAutoMLJobResponse CreateAutoMLJobResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAutoMLJobResponse' :: CreateAutoMLJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAutoMLJobResponse
s@CreateAutoMLJobResponse' {} Int
a -> CreateAutoMLJobResponse
s {$sel:httpStatus:CreateAutoMLJobResponse' :: Int
httpStatus = Int
a} :: CreateAutoMLJobResponse)
createAutoMLJobResponse_autoMLJobArn :: Lens.Lens' CreateAutoMLJobResponse Prelude.Text
createAutoMLJobResponse_autoMLJobArn :: (Text -> f Text)
-> CreateAutoMLJobResponse -> f CreateAutoMLJobResponse
createAutoMLJobResponse_autoMLJobArn = (CreateAutoMLJobResponse -> Text)
-> (CreateAutoMLJobResponse -> Text -> CreateAutoMLJobResponse)
-> Lens CreateAutoMLJobResponse CreateAutoMLJobResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAutoMLJobResponse' {Text
autoMLJobArn :: Text
$sel:autoMLJobArn:CreateAutoMLJobResponse' :: CreateAutoMLJobResponse -> Text
autoMLJobArn} -> Text
autoMLJobArn) (\s :: CreateAutoMLJobResponse
s@CreateAutoMLJobResponse' {} Text
a -> CreateAutoMLJobResponse
s {$sel:autoMLJobArn:CreateAutoMLJobResponse' :: Text
autoMLJobArn = Text
a} :: CreateAutoMLJobResponse)
instance Prelude.NFData CreateAutoMLJobResponse