{-# 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.LookoutEquipment.CreateModel
(
CreateModel (..),
newCreateModel,
createModel_dataPreProcessingConfiguration,
createModel_trainingDataEndTime,
createModel_datasetSchema,
createModel_evaluationDataStartTime,
createModel_offCondition,
createModel_evaluationDataEndTime,
createModel_trainingDataStartTime,
createModel_labelsInputConfiguration,
createModel_tags,
createModel_serverSideKmsKeyId,
createModel_roleArn,
createModel_modelName,
createModel_datasetName,
createModel_clientToken,
CreateModelResponse (..),
newCreateModelResponse,
createModelResponse_status,
createModelResponse_modelArn,
createModelResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutEquipment.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateModel = CreateModel'
{
CreateModel -> Maybe DataPreProcessingConfiguration
dataPreProcessingConfiguration :: Prelude.Maybe DataPreProcessingConfiguration,
CreateModel -> Maybe POSIX
trainingDataEndTime :: Prelude.Maybe Core.POSIX,
CreateModel -> Maybe DatasetSchema
datasetSchema :: Prelude.Maybe DatasetSchema,
CreateModel -> Maybe POSIX
evaluationDataStartTime :: Prelude.Maybe Core.POSIX,
CreateModel -> Maybe Text
offCondition :: Prelude.Maybe Prelude.Text,
CreateModel -> Maybe POSIX
evaluationDataEndTime :: Prelude.Maybe Core.POSIX,
CreateModel -> Maybe POSIX
trainingDataStartTime :: Prelude.Maybe Core.POSIX,
CreateModel -> Maybe LabelsInputConfiguration
labelsInputConfiguration :: Prelude.Maybe LabelsInputConfiguration,
CreateModel -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateModel -> Maybe Text
serverSideKmsKeyId :: Prelude.Maybe Prelude.Text,
CreateModel -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
CreateModel -> Text
modelName :: Prelude.Text,
CreateModel -> Text
datasetName :: Prelude.Text,
CreateModel -> Text
clientToken :: Prelude.Text
}
deriving (CreateModel -> CreateModel -> Bool
(CreateModel -> CreateModel -> Bool)
-> (CreateModel -> CreateModel -> Bool) -> Eq CreateModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateModel -> CreateModel -> Bool
$c/= :: CreateModel -> CreateModel -> Bool
== :: CreateModel -> CreateModel -> Bool
$c== :: CreateModel -> CreateModel -> Bool
Prelude.Eq, ReadPrec [CreateModel]
ReadPrec CreateModel
Int -> ReadS CreateModel
ReadS [CreateModel]
(Int -> ReadS CreateModel)
-> ReadS [CreateModel]
-> ReadPrec CreateModel
-> ReadPrec [CreateModel]
-> Read CreateModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateModel]
$creadListPrec :: ReadPrec [CreateModel]
readPrec :: ReadPrec CreateModel
$creadPrec :: ReadPrec CreateModel
readList :: ReadS [CreateModel]
$creadList :: ReadS [CreateModel]
readsPrec :: Int -> ReadS CreateModel
$creadsPrec :: Int -> ReadS CreateModel
Prelude.Read, Int -> CreateModel -> ShowS
[CreateModel] -> ShowS
CreateModel -> String
(Int -> CreateModel -> ShowS)
-> (CreateModel -> String)
-> ([CreateModel] -> ShowS)
-> Show CreateModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateModel] -> ShowS
$cshowList :: [CreateModel] -> ShowS
show :: CreateModel -> String
$cshow :: CreateModel -> String
showsPrec :: Int -> CreateModel -> ShowS
$cshowsPrec :: Int -> CreateModel -> ShowS
Prelude.Show, (forall x. CreateModel -> Rep CreateModel x)
-> (forall x. Rep CreateModel x -> CreateModel)
-> Generic CreateModel
forall x. Rep CreateModel x -> CreateModel
forall x. CreateModel -> Rep CreateModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateModel x -> CreateModel
$cfrom :: forall x. CreateModel -> Rep CreateModel x
Prelude.Generic)
newCreateModel ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateModel
newCreateModel :: Text -> Text -> Text -> CreateModel
newCreateModel
Text
pModelName_
Text
pDatasetName_
Text
pClientToken_ =
CreateModel' :: Maybe DataPreProcessingConfiguration
-> Maybe POSIX
-> Maybe DatasetSchema
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe POSIX
-> Maybe LabelsInputConfiguration
-> Maybe [Tag]
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> CreateModel
CreateModel'
{ $sel:dataPreProcessingConfiguration:CreateModel' :: Maybe DataPreProcessingConfiguration
dataPreProcessingConfiguration =
Maybe DataPreProcessingConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:trainingDataEndTime:CreateModel' :: Maybe POSIX
trainingDataEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:datasetSchema:CreateModel' :: Maybe DatasetSchema
datasetSchema = Maybe DatasetSchema
forall a. Maybe a
Prelude.Nothing,
$sel:evaluationDataStartTime:CreateModel' :: Maybe POSIX
evaluationDataStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:offCondition:CreateModel' :: Maybe Text
offCondition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:evaluationDataEndTime:CreateModel' :: Maybe POSIX
evaluationDataEndTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:trainingDataStartTime:CreateModel' :: Maybe POSIX
trainingDataStartTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:labelsInputConfiguration:CreateModel' :: Maybe LabelsInputConfiguration
labelsInputConfiguration = Maybe LabelsInputConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateModel' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:serverSideKmsKeyId:CreateModel' :: Maybe Text
serverSideKmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:CreateModel' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:modelName:CreateModel' :: Text
modelName = Text
pModelName_,
$sel:datasetName:CreateModel' :: Text
datasetName = Text
pDatasetName_,
$sel:clientToken:CreateModel' :: Text
clientToken = Text
pClientToken_
}
createModel_dataPreProcessingConfiguration :: Lens.Lens' CreateModel (Prelude.Maybe DataPreProcessingConfiguration)
createModel_dataPreProcessingConfiguration :: (Maybe DataPreProcessingConfiguration
-> f (Maybe DataPreProcessingConfiguration))
-> CreateModel -> f CreateModel
createModel_dataPreProcessingConfiguration = (CreateModel -> Maybe DataPreProcessingConfiguration)
-> (CreateModel
-> Maybe DataPreProcessingConfiguration -> CreateModel)
-> Lens
CreateModel
CreateModel
(Maybe DataPreProcessingConfiguration)
(Maybe DataPreProcessingConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe DataPreProcessingConfiguration
dataPreProcessingConfiguration :: Maybe DataPreProcessingConfiguration
$sel:dataPreProcessingConfiguration:CreateModel' :: CreateModel -> Maybe DataPreProcessingConfiguration
dataPreProcessingConfiguration} -> Maybe DataPreProcessingConfiguration
dataPreProcessingConfiguration) (\s :: CreateModel
s@CreateModel' {} Maybe DataPreProcessingConfiguration
a -> CreateModel
s {$sel:dataPreProcessingConfiguration:CreateModel' :: Maybe DataPreProcessingConfiguration
dataPreProcessingConfiguration = Maybe DataPreProcessingConfiguration
a} :: CreateModel)
createModel_trainingDataEndTime :: Lens.Lens' CreateModel (Prelude.Maybe Prelude.UTCTime)
createModel_trainingDataEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateModel -> f CreateModel
createModel_trainingDataEndTime = (CreateModel -> Maybe POSIX)
-> (CreateModel -> Maybe POSIX -> CreateModel)
-> Lens CreateModel CreateModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe POSIX
trainingDataEndTime :: Maybe POSIX
$sel:trainingDataEndTime:CreateModel' :: CreateModel -> Maybe POSIX
trainingDataEndTime} -> Maybe POSIX
trainingDataEndTime) (\s :: CreateModel
s@CreateModel' {} Maybe POSIX
a -> CreateModel
s {$sel:trainingDataEndTime:CreateModel' :: Maybe POSIX
trainingDataEndTime = Maybe POSIX
a} :: CreateModel) ((Maybe POSIX -> f (Maybe POSIX)) -> CreateModel -> f CreateModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateModel
-> f CreateModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createModel_datasetSchema :: Lens.Lens' CreateModel (Prelude.Maybe DatasetSchema)
createModel_datasetSchema :: (Maybe DatasetSchema -> f (Maybe DatasetSchema))
-> CreateModel -> f CreateModel
createModel_datasetSchema = (CreateModel -> Maybe DatasetSchema)
-> (CreateModel -> Maybe DatasetSchema -> CreateModel)
-> Lens
CreateModel CreateModel (Maybe DatasetSchema) (Maybe DatasetSchema)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe DatasetSchema
datasetSchema :: Maybe DatasetSchema
$sel:datasetSchema:CreateModel' :: CreateModel -> Maybe DatasetSchema
datasetSchema} -> Maybe DatasetSchema
datasetSchema) (\s :: CreateModel
s@CreateModel' {} Maybe DatasetSchema
a -> CreateModel
s {$sel:datasetSchema:CreateModel' :: Maybe DatasetSchema
datasetSchema = Maybe DatasetSchema
a} :: CreateModel)
createModel_evaluationDataStartTime :: Lens.Lens' CreateModel (Prelude.Maybe Prelude.UTCTime)
createModel_evaluationDataStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateModel -> f CreateModel
createModel_evaluationDataStartTime = (CreateModel -> Maybe POSIX)
-> (CreateModel -> Maybe POSIX -> CreateModel)
-> Lens CreateModel CreateModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe POSIX
evaluationDataStartTime :: Maybe POSIX
$sel:evaluationDataStartTime:CreateModel' :: CreateModel -> Maybe POSIX
evaluationDataStartTime} -> Maybe POSIX
evaluationDataStartTime) (\s :: CreateModel
s@CreateModel' {} Maybe POSIX
a -> CreateModel
s {$sel:evaluationDataStartTime:CreateModel' :: Maybe POSIX
evaluationDataStartTime = Maybe POSIX
a} :: CreateModel) ((Maybe POSIX -> f (Maybe POSIX)) -> CreateModel -> f CreateModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateModel
-> f CreateModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createModel_offCondition :: Lens.Lens' CreateModel (Prelude.Maybe Prelude.Text)
createModel_offCondition :: (Maybe Text -> f (Maybe Text)) -> CreateModel -> f CreateModel
createModel_offCondition = (CreateModel -> Maybe Text)
-> (CreateModel -> Maybe Text -> CreateModel)
-> Lens CreateModel CreateModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe Text
offCondition :: Maybe Text
$sel:offCondition:CreateModel' :: CreateModel -> Maybe Text
offCondition} -> Maybe Text
offCondition) (\s :: CreateModel
s@CreateModel' {} Maybe Text
a -> CreateModel
s {$sel:offCondition:CreateModel' :: Maybe Text
offCondition = Maybe Text
a} :: CreateModel)
createModel_evaluationDataEndTime :: Lens.Lens' CreateModel (Prelude.Maybe Prelude.UTCTime)
createModel_evaluationDataEndTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateModel -> f CreateModel
createModel_evaluationDataEndTime = (CreateModel -> Maybe POSIX)
-> (CreateModel -> Maybe POSIX -> CreateModel)
-> Lens CreateModel CreateModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe POSIX
evaluationDataEndTime :: Maybe POSIX
$sel:evaluationDataEndTime:CreateModel' :: CreateModel -> Maybe POSIX
evaluationDataEndTime} -> Maybe POSIX
evaluationDataEndTime) (\s :: CreateModel
s@CreateModel' {} Maybe POSIX
a -> CreateModel
s {$sel:evaluationDataEndTime:CreateModel' :: Maybe POSIX
evaluationDataEndTime = Maybe POSIX
a} :: CreateModel) ((Maybe POSIX -> f (Maybe POSIX)) -> CreateModel -> f CreateModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateModel
-> f CreateModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createModel_trainingDataStartTime :: Lens.Lens' CreateModel (Prelude.Maybe Prelude.UTCTime)
createModel_trainingDataStartTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateModel -> f CreateModel
createModel_trainingDataStartTime = (CreateModel -> Maybe POSIX)
-> (CreateModel -> Maybe POSIX -> CreateModel)
-> Lens CreateModel CreateModel (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe POSIX
trainingDataStartTime :: Maybe POSIX
$sel:trainingDataStartTime:CreateModel' :: CreateModel -> Maybe POSIX
trainingDataStartTime} -> Maybe POSIX
trainingDataStartTime) (\s :: CreateModel
s@CreateModel' {} Maybe POSIX
a -> CreateModel
s {$sel:trainingDataStartTime:CreateModel' :: Maybe POSIX
trainingDataStartTime = Maybe POSIX
a} :: CreateModel) ((Maybe POSIX -> f (Maybe POSIX)) -> CreateModel -> f CreateModel)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateModel
-> f CreateModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createModel_labelsInputConfiguration :: Lens.Lens' CreateModel (Prelude.Maybe LabelsInputConfiguration)
createModel_labelsInputConfiguration :: (Maybe LabelsInputConfiguration
-> f (Maybe LabelsInputConfiguration))
-> CreateModel -> f CreateModel
createModel_labelsInputConfiguration = (CreateModel -> Maybe LabelsInputConfiguration)
-> (CreateModel -> Maybe LabelsInputConfiguration -> CreateModel)
-> Lens
CreateModel
CreateModel
(Maybe LabelsInputConfiguration)
(Maybe LabelsInputConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe LabelsInputConfiguration
labelsInputConfiguration :: Maybe LabelsInputConfiguration
$sel:labelsInputConfiguration:CreateModel' :: CreateModel -> Maybe LabelsInputConfiguration
labelsInputConfiguration} -> Maybe LabelsInputConfiguration
labelsInputConfiguration) (\s :: CreateModel
s@CreateModel' {} Maybe LabelsInputConfiguration
a -> CreateModel
s {$sel:labelsInputConfiguration:CreateModel' :: Maybe LabelsInputConfiguration
labelsInputConfiguration = Maybe LabelsInputConfiguration
a} :: CreateModel)
createModel_tags :: Lens.Lens' CreateModel (Prelude.Maybe [Tag])
createModel_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> CreateModel -> f CreateModel
createModel_tags = (CreateModel -> Maybe [Tag])
-> (CreateModel -> Maybe [Tag] -> CreateModel)
-> Lens CreateModel CreateModel (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateModel' :: CreateModel -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateModel
s@CreateModel' {} Maybe [Tag]
a -> CreateModel
s {$sel:tags:CreateModel' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateModel) ((Maybe [Tag] -> f (Maybe [Tag])) -> CreateModel -> f CreateModel)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateModel
-> f CreateModel
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
createModel_serverSideKmsKeyId :: Lens.Lens' CreateModel (Prelude.Maybe Prelude.Text)
createModel_serverSideKmsKeyId :: (Maybe Text -> f (Maybe Text)) -> CreateModel -> f CreateModel
createModel_serverSideKmsKeyId = (CreateModel -> Maybe Text)
-> (CreateModel -> Maybe Text -> CreateModel)
-> Lens CreateModel CreateModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe Text
serverSideKmsKeyId :: Maybe Text
$sel:serverSideKmsKeyId:CreateModel' :: CreateModel -> Maybe Text
serverSideKmsKeyId} -> Maybe Text
serverSideKmsKeyId) (\s :: CreateModel
s@CreateModel' {} Maybe Text
a -> CreateModel
s {$sel:serverSideKmsKeyId:CreateModel' :: Maybe Text
serverSideKmsKeyId = Maybe Text
a} :: CreateModel)
createModel_roleArn :: Lens.Lens' CreateModel (Prelude.Maybe Prelude.Text)
createModel_roleArn :: (Maybe Text -> f (Maybe Text)) -> CreateModel -> f CreateModel
createModel_roleArn = (CreateModel -> Maybe Text)
-> (CreateModel -> Maybe Text -> CreateModel)
-> Lens CreateModel CreateModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:CreateModel' :: CreateModel -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: CreateModel
s@CreateModel' {} Maybe Text
a -> CreateModel
s {$sel:roleArn:CreateModel' :: Maybe Text
roleArn = Maybe Text
a} :: CreateModel)
createModel_modelName :: Lens.Lens' CreateModel Prelude.Text
createModel_modelName :: (Text -> f Text) -> CreateModel -> f CreateModel
createModel_modelName = (CreateModel -> Text)
-> (CreateModel -> Text -> CreateModel)
-> Lens CreateModel CreateModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Text
modelName :: Text
$sel:modelName:CreateModel' :: CreateModel -> Text
modelName} -> Text
modelName) (\s :: CreateModel
s@CreateModel' {} Text
a -> CreateModel
s {$sel:modelName:CreateModel' :: Text
modelName = Text
a} :: CreateModel)
createModel_datasetName :: Lens.Lens' CreateModel Prelude.Text
createModel_datasetName :: (Text -> f Text) -> CreateModel -> f CreateModel
createModel_datasetName = (CreateModel -> Text)
-> (CreateModel -> Text -> CreateModel)
-> Lens CreateModel CreateModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Text
datasetName :: Text
$sel:datasetName:CreateModel' :: CreateModel -> Text
datasetName} -> Text
datasetName) (\s :: CreateModel
s@CreateModel' {} Text
a -> CreateModel
s {$sel:datasetName:CreateModel' :: Text
datasetName = Text
a} :: CreateModel)
createModel_clientToken :: Lens.Lens' CreateModel Prelude.Text
createModel_clientToken :: (Text -> f Text) -> CreateModel -> f CreateModel
createModel_clientToken = (CreateModel -> Text)
-> (CreateModel -> Text -> CreateModel)
-> Lens CreateModel CreateModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModel' {Text
clientToken :: Text
$sel:clientToken:CreateModel' :: CreateModel -> Text
clientToken} -> Text
clientToken) (\s :: CreateModel
s@CreateModel' {} Text
a -> CreateModel
s {$sel:clientToken:CreateModel' :: Text
clientToken = Text
a} :: CreateModel)
instance Core.AWSRequest CreateModel where
type AWSResponse CreateModel = CreateModelResponse
request :: CreateModel -> Request CreateModel
request = Service -> CreateModel -> Request CreateModel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateModel)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateModel))
-> Logger
-> Service
-> Proxy CreateModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateModel)))
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 ModelStatus -> Maybe Text -> Int -> CreateModelResponse
CreateModelResponse'
(Maybe ModelStatus -> Maybe Text -> Int -> CreateModelResponse)
-> Either String (Maybe ModelStatus)
-> Either String (Maybe Text -> Int -> CreateModelResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ModelStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
Either String (Maybe Text -> Int -> CreateModelResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateModelResponse)
forall (f :: * -> *) a b. Applicative f => 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
"ModelArn")
Either String (Int -> CreateModelResponse)
-> Either String Int -> Either String CreateModelResponse
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 CreateModel
instance Prelude.NFData CreateModel
instance Core.ToHeaders CreateModel where
toHeaders :: CreateModel -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateModel -> 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
"AWSLookoutEquipmentFrontendService.CreateModel" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateModel where
toJSON :: CreateModel -> Value
toJSON CreateModel' {Maybe [Tag]
Maybe Text
Maybe POSIX
Maybe DatasetSchema
Maybe LabelsInputConfiguration
Maybe DataPreProcessingConfiguration
Text
clientToken :: Text
datasetName :: Text
modelName :: Text
roleArn :: Maybe Text
serverSideKmsKeyId :: Maybe Text
tags :: Maybe [Tag]
labelsInputConfiguration :: Maybe LabelsInputConfiguration
trainingDataStartTime :: Maybe POSIX
evaluationDataEndTime :: Maybe POSIX
offCondition :: Maybe Text
evaluationDataStartTime :: Maybe POSIX
datasetSchema :: Maybe DatasetSchema
trainingDataEndTime :: Maybe POSIX
dataPreProcessingConfiguration :: Maybe DataPreProcessingConfiguration
$sel:clientToken:CreateModel' :: CreateModel -> Text
$sel:datasetName:CreateModel' :: CreateModel -> Text
$sel:modelName:CreateModel' :: CreateModel -> Text
$sel:roleArn:CreateModel' :: CreateModel -> Maybe Text
$sel:serverSideKmsKeyId:CreateModel' :: CreateModel -> Maybe Text
$sel:tags:CreateModel' :: CreateModel -> Maybe [Tag]
$sel:labelsInputConfiguration:CreateModel' :: CreateModel -> Maybe LabelsInputConfiguration
$sel:trainingDataStartTime:CreateModel' :: CreateModel -> Maybe POSIX
$sel:evaluationDataEndTime:CreateModel' :: CreateModel -> Maybe POSIX
$sel:offCondition:CreateModel' :: CreateModel -> Maybe Text
$sel:evaluationDataStartTime:CreateModel' :: CreateModel -> Maybe POSIX
$sel:datasetSchema:CreateModel' :: CreateModel -> Maybe DatasetSchema
$sel:trainingDataEndTime:CreateModel' :: CreateModel -> Maybe POSIX
$sel:dataPreProcessingConfiguration:CreateModel' :: CreateModel -> Maybe DataPreProcessingConfiguration
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DataPreProcessingConfiguration" Text -> DataPreProcessingConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(DataPreProcessingConfiguration -> Pair)
-> Maybe DataPreProcessingConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataPreProcessingConfiguration
dataPreProcessingConfiguration,
(Text
"TrainingDataEndTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
trainingDataEndTime,
(Text
"DatasetSchema" Text -> DatasetSchema -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DatasetSchema -> Pair) -> Maybe DatasetSchema -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DatasetSchema
datasetSchema,
(Text
"EvaluationDataStartTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
evaluationDataStartTime,
(Text
"OffCondition" 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
offCondition,
(Text
"EvaluationDataEndTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
evaluationDataEndTime,
(Text
"TrainingDataStartTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
trainingDataStartTime,
(Text
"LabelsInputConfiguration" Text -> LabelsInputConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LabelsInputConfiguration -> Pair)
-> Maybe LabelsInputConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LabelsInputConfiguration
labelsInputConfiguration,
(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
"ServerSideKmsKeyId" 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
serverSideKmsKeyId,
(Text
"RoleArn" 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
roleArn,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ModelName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
modelName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DatasetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
datasetName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ClientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
]
)
instance Core.ToPath CreateModel where
toPath :: CreateModel -> ByteString
toPath = ByteString -> CreateModel -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateModel where
toQuery :: CreateModel -> QueryString
toQuery = QueryString -> CreateModel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateModelResponse = CreateModelResponse'
{
CreateModelResponse -> Maybe ModelStatus
status :: Prelude.Maybe ModelStatus,
CreateModelResponse -> Maybe Text
modelArn :: Prelude.Maybe Prelude.Text,
CreateModelResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateModelResponse -> CreateModelResponse -> Bool
(CreateModelResponse -> CreateModelResponse -> Bool)
-> (CreateModelResponse -> CreateModelResponse -> Bool)
-> Eq CreateModelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateModelResponse -> CreateModelResponse -> Bool
$c/= :: CreateModelResponse -> CreateModelResponse -> Bool
== :: CreateModelResponse -> CreateModelResponse -> Bool
$c== :: CreateModelResponse -> CreateModelResponse -> Bool
Prelude.Eq, ReadPrec [CreateModelResponse]
ReadPrec CreateModelResponse
Int -> ReadS CreateModelResponse
ReadS [CreateModelResponse]
(Int -> ReadS CreateModelResponse)
-> ReadS [CreateModelResponse]
-> ReadPrec CreateModelResponse
-> ReadPrec [CreateModelResponse]
-> Read CreateModelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateModelResponse]
$creadListPrec :: ReadPrec [CreateModelResponse]
readPrec :: ReadPrec CreateModelResponse
$creadPrec :: ReadPrec CreateModelResponse
readList :: ReadS [CreateModelResponse]
$creadList :: ReadS [CreateModelResponse]
readsPrec :: Int -> ReadS CreateModelResponse
$creadsPrec :: Int -> ReadS CreateModelResponse
Prelude.Read, Int -> CreateModelResponse -> ShowS
[CreateModelResponse] -> ShowS
CreateModelResponse -> String
(Int -> CreateModelResponse -> ShowS)
-> (CreateModelResponse -> String)
-> ([CreateModelResponse] -> ShowS)
-> Show CreateModelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateModelResponse] -> ShowS
$cshowList :: [CreateModelResponse] -> ShowS
show :: CreateModelResponse -> String
$cshow :: CreateModelResponse -> String
showsPrec :: Int -> CreateModelResponse -> ShowS
$cshowsPrec :: Int -> CreateModelResponse -> ShowS
Prelude.Show, (forall x. CreateModelResponse -> Rep CreateModelResponse x)
-> (forall x. Rep CreateModelResponse x -> CreateModelResponse)
-> Generic CreateModelResponse
forall x. Rep CreateModelResponse x -> CreateModelResponse
forall x. CreateModelResponse -> Rep CreateModelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateModelResponse x -> CreateModelResponse
$cfrom :: forall x. CreateModelResponse -> Rep CreateModelResponse x
Prelude.Generic)
newCreateModelResponse ::
Prelude.Int ->
CreateModelResponse
newCreateModelResponse :: Int -> CreateModelResponse
newCreateModelResponse Int
pHttpStatus_ =
CreateModelResponse' :: Maybe ModelStatus -> Maybe Text -> Int -> CreateModelResponse
CreateModelResponse'
{ $sel:status:CreateModelResponse' :: Maybe ModelStatus
status = Maybe ModelStatus
forall a. Maybe a
Prelude.Nothing,
$sel:modelArn:CreateModelResponse' :: Maybe Text
modelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateModelResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createModelResponse_status :: Lens.Lens' CreateModelResponse (Prelude.Maybe ModelStatus)
createModelResponse_status :: (Maybe ModelStatus -> f (Maybe ModelStatus))
-> CreateModelResponse -> f CreateModelResponse
createModelResponse_status = (CreateModelResponse -> Maybe ModelStatus)
-> (CreateModelResponse
-> Maybe ModelStatus -> CreateModelResponse)
-> Lens
CreateModelResponse
CreateModelResponse
(Maybe ModelStatus)
(Maybe ModelStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelResponse' {Maybe ModelStatus
status :: Maybe ModelStatus
$sel:status:CreateModelResponse' :: CreateModelResponse -> Maybe ModelStatus
status} -> Maybe ModelStatus
status) (\s :: CreateModelResponse
s@CreateModelResponse' {} Maybe ModelStatus
a -> CreateModelResponse
s {$sel:status:CreateModelResponse' :: Maybe ModelStatus
status = Maybe ModelStatus
a} :: CreateModelResponse)
createModelResponse_modelArn :: Lens.Lens' CreateModelResponse (Prelude.Maybe Prelude.Text)
createModelResponse_modelArn :: (Maybe Text -> f (Maybe Text))
-> CreateModelResponse -> f CreateModelResponse
createModelResponse_modelArn = (CreateModelResponse -> Maybe Text)
-> (CreateModelResponse -> Maybe Text -> CreateModelResponse)
-> Lens
CreateModelResponse CreateModelResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelResponse' {Maybe Text
modelArn :: Maybe Text
$sel:modelArn:CreateModelResponse' :: CreateModelResponse -> Maybe Text
modelArn} -> Maybe Text
modelArn) (\s :: CreateModelResponse
s@CreateModelResponse' {} Maybe Text
a -> CreateModelResponse
s {$sel:modelArn:CreateModelResponse' :: Maybe Text
modelArn = Maybe Text
a} :: CreateModelResponse)
createModelResponse_httpStatus :: Lens.Lens' CreateModelResponse Prelude.Int
createModelResponse_httpStatus :: (Int -> f Int) -> CreateModelResponse -> f CreateModelResponse
createModelResponse_httpStatus = (CreateModelResponse -> Int)
-> (CreateModelResponse -> Int -> CreateModelResponse)
-> Lens CreateModelResponse CreateModelResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateModelResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateModelResponse' :: CreateModelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateModelResponse
s@CreateModelResponse' {} Int
a -> CreateModelResponse
s {$sel:httpStatus:CreateModelResponse' :: Int
httpStatus = Int
a} :: CreateModelResponse)
instance Prelude.NFData CreateModelResponse