{-# 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.MachineLearning.CreateMLModel
(
CreateMLModel (..),
newCreateMLModel,
createMLModel_recipe,
createMLModel_recipeUri,
createMLModel_mLModelName,
createMLModel_parameters,
createMLModel_mLModelId,
createMLModel_mLModelType,
createMLModel_trainingDataSourceId,
CreateMLModelResponse (..),
newCreateMLModelResponse,
createMLModelResponse_mLModelId,
createMLModelResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateMLModel = CreateMLModel'
{
CreateMLModel -> Maybe Text
recipe :: Prelude.Maybe Prelude.Text,
CreateMLModel -> Maybe Text
recipeUri :: Prelude.Maybe Prelude.Text,
CreateMLModel -> Maybe Text
mLModelName :: Prelude.Maybe Prelude.Text,
CreateMLModel -> Maybe (HashMap Text Text)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateMLModel -> Text
mLModelId :: Prelude.Text,
CreateMLModel -> MLModelType
mLModelType :: MLModelType,
CreateMLModel -> Text
trainingDataSourceId :: Prelude.Text
}
deriving (CreateMLModel -> CreateMLModel -> Bool
(CreateMLModel -> CreateMLModel -> Bool)
-> (CreateMLModel -> CreateMLModel -> Bool) -> Eq CreateMLModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMLModel -> CreateMLModel -> Bool
$c/= :: CreateMLModel -> CreateMLModel -> Bool
== :: CreateMLModel -> CreateMLModel -> Bool
$c== :: CreateMLModel -> CreateMLModel -> Bool
Prelude.Eq, ReadPrec [CreateMLModel]
ReadPrec CreateMLModel
Int -> ReadS CreateMLModel
ReadS [CreateMLModel]
(Int -> ReadS CreateMLModel)
-> ReadS [CreateMLModel]
-> ReadPrec CreateMLModel
-> ReadPrec [CreateMLModel]
-> Read CreateMLModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMLModel]
$creadListPrec :: ReadPrec [CreateMLModel]
readPrec :: ReadPrec CreateMLModel
$creadPrec :: ReadPrec CreateMLModel
readList :: ReadS [CreateMLModel]
$creadList :: ReadS [CreateMLModel]
readsPrec :: Int -> ReadS CreateMLModel
$creadsPrec :: Int -> ReadS CreateMLModel
Prelude.Read, Int -> CreateMLModel -> ShowS
[CreateMLModel] -> ShowS
CreateMLModel -> String
(Int -> CreateMLModel -> ShowS)
-> (CreateMLModel -> String)
-> ([CreateMLModel] -> ShowS)
-> Show CreateMLModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMLModel] -> ShowS
$cshowList :: [CreateMLModel] -> ShowS
show :: CreateMLModel -> String
$cshow :: CreateMLModel -> String
showsPrec :: Int -> CreateMLModel -> ShowS
$cshowsPrec :: Int -> CreateMLModel -> ShowS
Prelude.Show, (forall x. CreateMLModel -> Rep CreateMLModel x)
-> (forall x. Rep CreateMLModel x -> CreateMLModel)
-> Generic CreateMLModel
forall x. Rep CreateMLModel x -> CreateMLModel
forall x. CreateMLModel -> Rep CreateMLModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateMLModel x -> CreateMLModel
$cfrom :: forall x. CreateMLModel -> Rep CreateMLModel x
Prelude.Generic)
newCreateMLModel ::
Prelude.Text ->
MLModelType ->
Prelude.Text ->
CreateMLModel
newCreateMLModel :: Text -> MLModelType -> Text -> CreateMLModel
newCreateMLModel
Text
pMLModelId_
MLModelType
pMLModelType_
Text
pTrainingDataSourceId_ =
CreateMLModel' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> MLModelType
-> Text
-> CreateMLModel
CreateMLModel'
{ $sel:recipe:CreateMLModel' :: Maybe Text
recipe = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recipeUri:CreateMLModel' :: Maybe Text
recipeUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mLModelName:CreateMLModel' :: Maybe Text
mLModelName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:CreateMLModel' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:mLModelId:CreateMLModel' :: Text
mLModelId = Text
pMLModelId_,
$sel:mLModelType:CreateMLModel' :: MLModelType
mLModelType = MLModelType
pMLModelType_,
$sel:trainingDataSourceId:CreateMLModel' :: Text
trainingDataSourceId = Text
pTrainingDataSourceId_
}
createMLModel_recipe :: Lens.Lens' CreateMLModel (Prelude.Maybe Prelude.Text)
createMLModel_recipe :: (Maybe Text -> f (Maybe Text)) -> CreateMLModel -> f CreateMLModel
createMLModel_recipe = (CreateMLModel -> Maybe Text)
-> (CreateMLModel -> Maybe Text -> CreateMLModel)
-> Lens CreateMLModel CreateMLModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModel' {Maybe Text
recipe :: Maybe Text
$sel:recipe:CreateMLModel' :: CreateMLModel -> Maybe Text
recipe} -> Maybe Text
recipe) (\s :: CreateMLModel
s@CreateMLModel' {} Maybe Text
a -> CreateMLModel
s {$sel:recipe:CreateMLModel' :: Maybe Text
recipe = Maybe Text
a} :: CreateMLModel)
createMLModel_recipeUri :: Lens.Lens' CreateMLModel (Prelude.Maybe Prelude.Text)
createMLModel_recipeUri :: (Maybe Text -> f (Maybe Text)) -> CreateMLModel -> f CreateMLModel
createMLModel_recipeUri = (CreateMLModel -> Maybe Text)
-> (CreateMLModel -> Maybe Text -> CreateMLModel)
-> Lens CreateMLModel CreateMLModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModel' {Maybe Text
recipeUri :: Maybe Text
$sel:recipeUri:CreateMLModel' :: CreateMLModel -> Maybe Text
recipeUri} -> Maybe Text
recipeUri) (\s :: CreateMLModel
s@CreateMLModel' {} Maybe Text
a -> CreateMLModel
s {$sel:recipeUri:CreateMLModel' :: Maybe Text
recipeUri = Maybe Text
a} :: CreateMLModel)
createMLModel_mLModelName :: Lens.Lens' CreateMLModel (Prelude.Maybe Prelude.Text)
createMLModel_mLModelName :: (Maybe Text -> f (Maybe Text)) -> CreateMLModel -> f CreateMLModel
createMLModel_mLModelName = (CreateMLModel -> Maybe Text)
-> (CreateMLModel -> Maybe Text -> CreateMLModel)
-> Lens CreateMLModel CreateMLModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModel' {Maybe Text
mLModelName :: Maybe Text
$sel:mLModelName:CreateMLModel' :: CreateMLModel -> Maybe Text
mLModelName} -> Maybe Text
mLModelName) (\s :: CreateMLModel
s@CreateMLModel' {} Maybe Text
a -> CreateMLModel
s {$sel:mLModelName:CreateMLModel' :: Maybe Text
mLModelName = Maybe Text
a} :: CreateMLModel)
createMLModel_parameters :: Lens.Lens' CreateMLModel (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createMLModel_parameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateMLModel -> f CreateMLModel
createMLModel_parameters = (CreateMLModel -> Maybe (HashMap Text Text))
-> (CreateMLModel -> Maybe (HashMap Text Text) -> CreateMLModel)
-> Lens
CreateMLModel
CreateMLModel
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModel' {Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
$sel:parameters:CreateMLModel' :: CreateMLModel -> Maybe (HashMap Text Text)
parameters} -> Maybe (HashMap Text Text)
parameters) (\s :: CreateMLModel
s@CreateMLModel' {} Maybe (HashMap Text Text)
a -> CreateMLModel
s {$sel:parameters:CreateMLModel' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
a} :: CreateMLModel) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateMLModel -> f CreateMLModel)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateMLModel
-> f CreateMLModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createMLModel_mLModelId :: Lens.Lens' CreateMLModel Prelude.Text
createMLModel_mLModelId :: (Text -> f Text) -> CreateMLModel -> f CreateMLModel
createMLModel_mLModelId = (CreateMLModel -> Text)
-> (CreateMLModel -> Text -> CreateMLModel)
-> Lens CreateMLModel CreateMLModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModel' {Text
mLModelId :: Text
$sel:mLModelId:CreateMLModel' :: CreateMLModel -> Text
mLModelId} -> Text
mLModelId) (\s :: CreateMLModel
s@CreateMLModel' {} Text
a -> CreateMLModel
s {$sel:mLModelId:CreateMLModel' :: Text
mLModelId = Text
a} :: CreateMLModel)
createMLModel_mLModelType :: Lens.Lens' CreateMLModel MLModelType
createMLModel_mLModelType :: (MLModelType -> f MLModelType) -> CreateMLModel -> f CreateMLModel
createMLModel_mLModelType = (CreateMLModel -> MLModelType)
-> (CreateMLModel -> MLModelType -> CreateMLModel)
-> Lens CreateMLModel CreateMLModel MLModelType MLModelType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModel' {MLModelType
mLModelType :: MLModelType
$sel:mLModelType:CreateMLModel' :: CreateMLModel -> MLModelType
mLModelType} -> MLModelType
mLModelType) (\s :: CreateMLModel
s@CreateMLModel' {} MLModelType
a -> CreateMLModel
s {$sel:mLModelType:CreateMLModel' :: MLModelType
mLModelType = MLModelType
a} :: CreateMLModel)
createMLModel_trainingDataSourceId :: Lens.Lens' CreateMLModel Prelude.Text
createMLModel_trainingDataSourceId :: (Text -> f Text) -> CreateMLModel -> f CreateMLModel
createMLModel_trainingDataSourceId = (CreateMLModel -> Text)
-> (CreateMLModel -> Text -> CreateMLModel)
-> Lens CreateMLModel CreateMLModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModel' {Text
trainingDataSourceId :: Text
$sel:trainingDataSourceId:CreateMLModel' :: CreateMLModel -> Text
trainingDataSourceId} -> Text
trainingDataSourceId) (\s :: CreateMLModel
s@CreateMLModel' {} Text
a -> CreateMLModel
s {$sel:trainingDataSourceId:CreateMLModel' :: Text
trainingDataSourceId = Text
a} :: CreateMLModel)
instance Core.AWSRequest CreateMLModel where
type
AWSResponse CreateMLModel =
CreateMLModelResponse
request :: CreateMLModel -> Request CreateMLModel
request = Service -> CreateMLModel -> Request CreateMLModel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateMLModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateMLModel)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateMLModel))
-> Logger
-> Service
-> Proxy CreateMLModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateMLModel)))
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 -> CreateMLModelResponse
CreateMLModelResponse'
(Maybe Text -> Int -> CreateMLModelResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateMLModelResponse)
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
"MLModelId")
Either String (Int -> CreateMLModelResponse)
-> Either String Int -> Either String CreateMLModelResponse
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 CreateMLModel
instance Prelude.NFData CreateMLModel
instance Core.ToHeaders CreateMLModel where
toHeaders :: CreateMLModel -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateMLModel -> 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
"AmazonML_20141212.CreateMLModel" ::
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 CreateMLModel where
toJSON :: CreateMLModel -> Value
toJSON CreateMLModel' {Maybe Text
Maybe (HashMap Text Text)
Text
MLModelType
trainingDataSourceId :: Text
mLModelType :: MLModelType
mLModelId :: Text
parameters :: Maybe (HashMap Text Text)
mLModelName :: Maybe Text
recipeUri :: Maybe Text
recipe :: Maybe Text
$sel:trainingDataSourceId:CreateMLModel' :: CreateMLModel -> Text
$sel:mLModelType:CreateMLModel' :: CreateMLModel -> MLModelType
$sel:mLModelId:CreateMLModel' :: CreateMLModel -> Text
$sel:parameters:CreateMLModel' :: CreateMLModel -> Maybe (HashMap Text Text)
$sel:mLModelName:CreateMLModel' :: CreateMLModel -> Maybe Text
$sel:recipeUri:CreateMLModel' :: CreateMLModel -> Maybe Text
$sel:recipe:CreateMLModel' :: CreateMLModel -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Recipe" 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
recipe,
(Text
"RecipeUri" 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
recipeUri,
(Text
"MLModelName" 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
mLModelName,
(Text
"Parameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
parameters,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MLModelId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
mLModelId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MLModelType" Text -> MLModelType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MLModelType
mLModelType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"TrainingDataSourceId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
trainingDataSourceId
)
]
)
instance Core.ToPath CreateMLModel where
toPath :: CreateMLModel -> ByteString
toPath = ByteString -> CreateMLModel -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateMLModel where
toQuery :: CreateMLModel -> QueryString
toQuery = QueryString -> CreateMLModel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateMLModelResponse = CreateMLModelResponse'
{
CreateMLModelResponse -> Maybe Text
mLModelId :: Prelude.Maybe Prelude.Text,
CreateMLModelResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateMLModelResponse -> CreateMLModelResponse -> Bool
(CreateMLModelResponse -> CreateMLModelResponse -> Bool)
-> (CreateMLModelResponse -> CreateMLModelResponse -> Bool)
-> Eq CreateMLModelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateMLModelResponse -> CreateMLModelResponse -> Bool
$c/= :: CreateMLModelResponse -> CreateMLModelResponse -> Bool
== :: CreateMLModelResponse -> CreateMLModelResponse -> Bool
$c== :: CreateMLModelResponse -> CreateMLModelResponse -> Bool
Prelude.Eq, ReadPrec [CreateMLModelResponse]
ReadPrec CreateMLModelResponse
Int -> ReadS CreateMLModelResponse
ReadS [CreateMLModelResponse]
(Int -> ReadS CreateMLModelResponse)
-> ReadS [CreateMLModelResponse]
-> ReadPrec CreateMLModelResponse
-> ReadPrec [CreateMLModelResponse]
-> Read CreateMLModelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateMLModelResponse]
$creadListPrec :: ReadPrec [CreateMLModelResponse]
readPrec :: ReadPrec CreateMLModelResponse
$creadPrec :: ReadPrec CreateMLModelResponse
readList :: ReadS [CreateMLModelResponse]
$creadList :: ReadS [CreateMLModelResponse]
readsPrec :: Int -> ReadS CreateMLModelResponse
$creadsPrec :: Int -> ReadS CreateMLModelResponse
Prelude.Read, Int -> CreateMLModelResponse -> ShowS
[CreateMLModelResponse] -> ShowS
CreateMLModelResponse -> String
(Int -> CreateMLModelResponse -> ShowS)
-> (CreateMLModelResponse -> String)
-> ([CreateMLModelResponse] -> ShowS)
-> Show CreateMLModelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateMLModelResponse] -> ShowS
$cshowList :: [CreateMLModelResponse] -> ShowS
show :: CreateMLModelResponse -> String
$cshow :: CreateMLModelResponse -> String
showsPrec :: Int -> CreateMLModelResponse -> ShowS
$cshowsPrec :: Int -> CreateMLModelResponse -> ShowS
Prelude.Show, (forall x. CreateMLModelResponse -> Rep CreateMLModelResponse x)
-> (forall x. Rep CreateMLModelResponse x -> CreateMLModelResponse)
-> Generic CreateMLModelResponse
forall x. Rep CreateMLModelResponse x -> CreateMLModelResponse
forall x. CreateMLModelResponse -> Rep CreateMLModelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateMLModelResponse x -> CreateMLModelResponse
$cfrom :: forall x. CreateMLModelResponse -> Rep CreateMLModelResponse x
Prelude.Generic)
newCreateMLModelResponse ::
Prelude.Int ->
CreateMLModelResponse
newCreateMLModelResponse :: Int -> CreateMLModelResponse
newCreateMLModelResponse Int
pHttpStatus_ =
CreateMLModelResponse' :: Maybe Text -> Int -> CreateMLModelResponse
CreateMLModelResponse'
{ $sel:mLModelId:CreateMLModelResponse' :: Maybe Text
mLModelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateMLModelResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createMLModelResponse_mLModelId :: Lens.Lens' CreateMLModelResponse (Prelude.Maybe Prelude.Text)
createMLModelResponse_mLModelId :: (Maybe Text -> f (Maybe Text))
-> CreateMLModelResponse -> f CreateMLModelResponse
createMLModelResponse_mLModelId = (CreateMLModelResponse -> Maybe Text)
-> (CreateMLModelResponse -> Maybe Text -> CreateMLModelResponse)
-> Lens
CreateMLModelResponse
CreateMLModelResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModelResponse' {Maybe Text
mLModelId :: Maybe Text
$sel:mLModelId:CreateMLModelResponse' :: CreateMLModelResponse -> Maybe Text
mLModelId} -> Maybe Text
mLModelId) (\s :: CreateMLModelResponse
s@CreateMLModelResponse' {} Maybe Text
a -> CreateMLModelResponse
s {$sel:mLModelId:CreateMLModelResponse' :: Maybe Text
mLModelId = Maybe Text
a} :: CreateMLModelResponse)
createMLModelResponse_httpStatus :: Lens.Lens' CreateMLModelResponse Prelude.Int
createMLModelResponse_httpStatus :: (Int -> f Int) -> CreateMLModelResponse -> f CreateMLModelResponse
createMLModelResponse_httpStatus = (CreateMLModelResponse -> Int)
-> (CreateMLModelResponse -> Int -> CreateMLModelResponse)
-> Lens CreateMLModelResponse CreateMLModelResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateMLModelResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateMLModelResponse' :: CreateMLModelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateMLModelResponse
s@CreateMLModelResponse' {} Int
a -> CreateMLModelResponse
s {$sel:httpStatus:CreateMLModelResponse' :: Int
httpStatus = Int
a} :: CreateMLModelResponse)
instance Prelude.NFData CreateMLModelResponse