{-# 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.Forecast.CreatePredictor
(
CreatePredictor (..),
newCreatePredictor,
createPredictor_performAutoML,
createPredictor_trainingParameters,
createPredictor_algorithmArn,
createPredictor_hPOConfig,
createPredictor_optimizationMetric,
createPredictor_autoMLOverrideStrategy,
createPredictor_evaluationParameters,
createPredictor_encryptionConfig,
createPredictor_forecastTypes,
createPredictor_performHPO,
createPredictor_tags,
createPredictor_predictorName,
createPredictor_forecastHorizon,
createPredictor_inputDataConfig,
createPredictor_featurizationConfig,
CreatePredictorResponse (..),
newCreatePredictorResponse,
createPredictorResponse_predictorArn,
createPredictorResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Forecast.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreatePredictor = CreatePredictor'
{
CreatePredictor -> Maybe Bool
performAutoML :: Prelude.Maybe Prelude.Bool,
CreatePredictor -> Maybe (HashMap Text Text)
trainingParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreatePredictor -> Maybe Text
algorithmArn :: Prelude.Maybe Prelude.Text,
CreatePredictor -> Maybe HyperParameterTuningJobConfig
hPOConfig :: Prelude.Maybe HyperParameterTuningJobConfig,
CreatePredictor -> Maybe OptimizationMetric
optimizationMetric :: Prelude.Maybe OptimizationMetric,
CreatePredictor -> Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy :: Prelude.Maybe AutoMLOverrideStrategy,
CreatePredictor -> Maybe EvaluationParameters
evaluationParameters :: Prelude.Maybe EvaluationParameters,
CreatePredictor -> Maybe EncryptionConfig
encryptionConfig :: Prelude.Maybe EncryptionConfig,
CreatePredictor -> Maybe (NonEmpty Text)
forecastTypes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreatePredictor -> Maybe Bool
performHPO :: Prelude.Maybe Prelude.Bool,
CreatePredictor -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreatePredictor -> Text
predictorName :: Prelude.Text,
CreatePredictor -> Int
forecastHorizon :: Prelude.Int,
CreatePredictor -> InputDataConfig
inputDataConfig :: InputDataConfig,
CreatePredictor -> FeaturizationConfig
featurizationConfig :: FeaturizationConfig
}
deriving (CreatePredictor -> CreatePredictor -> Bool
(CreatePredictor -> CreatePredictor -> Bool)
-> (CreatePredictor -> CreatePredictor -> Bool)
-> Eq CreatePredictor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePredictor -> CreatePredictor -> Bool
$c/= :: CreatePredictor -> CreatePredictor -> Bool
== :: CreatePredictor -> CreatePredictor -> Bool
$c== :: CreatePredictor -> CreatePredictor -> Bool
Prelude.Eq, Int -> CreatePredictor -> ShowS
[CreatePredictor] -> ShowS
CreatePredictor -> String
(Int -> CreatePredictor -> ShowS)
-> (CreatePredictor -> String)
-> ([CreatePredictor] -> ShowS)
-> Show CreatePredictor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePredictor] -> ShowS
$cshowList :: [CreatePredictor] -> ShowS
show :: CreatePredictor -> String
$cshow :: CreatePredictor -> String
showsPrec :: Int -> CreatePredictor -> ShowS
$cshowsPrec :: Int -> CreatePredictor -> ShowS
Prelude.Show, (forall x. CreatePredictor -> Rep CreatePredictor x)
-> (forall x. Rep CreatePredictor x -> CreatePredictor)
-> Generic CreatePredictor
forall x. Rep CreatePredictor x -> CreatePredictor
forall x. CreatePredictor -> Rep CreatePredictor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreatePredictor x -> CreatePredictor
$cfrom :: forall x. CreatePredictor -> Rep CreatePredictor x
Prelude.Generic)
newCreatePredictor ::
Prelude.Text ->
Prelude.Int ->
InputDataConfig ->
FeaturizationConfig ->
CreatePredictor
newCreatePredictor :: Text
-> Int -> InputDataConfig -> FeaturizationConfig -> CreatePredictor
newCreatePredictor
Text
pPredictorName_
Int
pForecastHorizon_
InputDataConfig
pInputDataConfig_
FeaturizationConfig
pFeaturizationConfig_ =
CreatePredictor' :: Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe HyperParameterTuningJobConfig
-> Maybe OptimizationMetric
-> Maybe AutoMLOverrideStrategy
-> Maybe EvaluationParameters
-> Maybe EncryptionConfig
-> Maybe (NonEmpty Text)
-> Maybe Bool
-> Maybe [Tag]
-> Text
-> Int
-> InputDataConfig
-> FeaturizationConfig
-> CreatePredictor
CreatePredictor'
{ $sel:performAutoML:CreatePredictor' :: Maybe Bool
performAutoML = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:trainingParameters:CreatePredictor' :: Maybe (HashMap Text Text)
trainingParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:algorithmArn:CreatePredictor' :: Maybe Text
algorithmArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hPOConfig:CreatePredictor' :: Maybe HyperParameterTuningJobConfig
hPOConfig = Maybe HyperParameterTuningJobConfig
forall a. Maybe a
Prelude.Nothing,
$sel:optimizationMetric:CreatePredictor' :: Maybe OptimizationMetric
optimizationMetric = Maybe OptimizationMetric
forall a. Maybe a
Prelude.Nothing,
$sel:autoMLOverrideStrategy:CreatePredictor' :: Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy = Maybe AutoMLOverrideStrategy
forall a. Maybe a
Prelude.Nothing,
$sel:evaluationParameters:CreatePredictor' :: Maybe EvaluationParameters
evaluationParameters = Maybe EvaluationParameters
forall a. Maybe a
Prelude.Nothing,
$sel:encryptionConfig:CreatePredictor' :: Maybe EncryptionConfig
encryptionConfig = Maybe EncryptionConfig
forall a. Maybe a
Prelude.Nothing,
$sel:forecastTypes:CreatePredictor' :: Maybe (NonEmpty Text)
forecastTypes = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:performHPO:CreatePredictor' :: Maybe Bool
performHPO = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreatePredictor' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:predictorName:CreatePredictor' :: Text
predictorName = Text
pPredictorName_,
$sel:forecastHorizon:CreatePredictor' :: Int
forecastHorizon = Int
pForecastHorizon_,
$sel:inputDataConfig:CreatePredictor' :: InputDataConfig
inputDataConfig = InputDataConfig
pInputDataConfig_,
$sel:featurizationConfig:CreatePredictor' :: FeaturizationConfig
featurizationConfig = FeaturizationConfig
pFeaturizationConfig_
}
createPredictor_performAutoML :: Lens.Lens' CreatePredictor (Prelude.Maybe Prelude.Bool)
createPredictor_performAutoML :: (Maybe Bool -> f (Maybe Bool))
-> CreatePredictor -> f CreatePredictor
createPredictor_performAutoML = (CreatePredictor -> Maybe Bool)
-> (CreatePredictor -> Maybe Bool -> CreatePredictor)
-> Lens CreatePredictor CreatePredictor (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe Bool
performAutoML :: Maybe Bool
$sel:performAutoML:CreatePredictor' :: CreatePredictor -> Maybe Bool
performAutoML} -> Maybe Bool
performAutoML) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe Bool
a -> CreatePredictor
s {$sel:performAutoML:CreatePredictor' :: Maybe Bool
performAutoML = Maybe Bool
a} :: CreatePredictor)
createPredictor_trainingParameters :: Lens.Lens' CreatePredictor (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createPredictor_trainingParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreatePredictor -> f CreatePredictor
createPredictor_trainingParameters = (CreatePredictor -> Maybe (HashMap Text Text))
-> (CreatePredictor
-> Maybe (HashMap Text Text) -> CreatePredictor)
-> Lens
CreatePredictor
CreatePredictor
(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 (\CreatePredictor' {Maybe (HashMap Text Text)
trainingParameters :: Maybe (HashMap Text Text)
$sel:trainingParameters:CreatePredictor' :: CreatePredictor -> Maybe (HashMap Text Text)
trainingParameters} -> Maybe (HashMap Text Text)
trainingParameters) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe (HashMap Text Text)
a -> CreatePredictor
s {$sel:trainingParameters:CreatePredictor' :: Maybe (HashMap Text Text)
trainingParameters = Maybe (HashMap Text Text)
a} :: CreatePredictor) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreatePredictor -> f CreatePredictor)
-> ((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)))
-> CreatePredictor
-> f CreatePredictor
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
createPredictor_algorithmArn :: Lens.Lens' CreatePredictor (Prelude.Maybe Prelude.Text)
createPredictor_algorithmArn :: (Maybe Text -> f (Maybe Text))
-> CreatePredictor -> f CreatePredictor
createPredictor_algorithmArn = (CreatePredictor -> Maybe Text)
-> (CreatePredictor -> Maybe Text -> CreatePredictor)
-> Lens CreatePredictor CreatePredictor (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe Text
algorithmArn :: Maybe Text
$sel:algorithmArn:CreatePredictor' :: CreatePredictor -> Maybe Text
algorithmArn} -> Maybe Text
algorithmArn) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe Text
a -> CreatePredictor
s {$sel:algorithmArn:CreatePredictor' :: Maybe Text
algorithmArn = Maybe Text
a} :: CreatePredictor)
createPredictor_hPOConfig :: Lens.Lens' CreatePredictor (Prelude.Maybe HyperParameterTuningJobConfig)
createPredictor_hPOConfig :: (Maybe HyperParameterTuningJobConfig
-> f (Maybe HyperParameterTuningJobConfig))
-> CreatePredictor -> f CreatePredictor
createPredictor_hPOConfig = (CreatePredictor -> Maybe HyperParameterTuningJobConfig)
-> (CreatePredictor
-> Maybe HyperParameterTuningJobConfig -> CreatePredictor)
-> Lens
CreatePredictor
CreatePredictor
(Maybe HyperParameterTuningJobConfig)
(Maybe HyperParameterTuningJobConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe HyperParameterTuningJobConfig
hPOConfig :: Maybe HyperParameterTuningJobConfig
$sel:hPOConfig:CreatePredictor' :: CreatePredictor -> Maybe HyperParameterTuningJobConfig
hPOConfig} -> Maybe HyperParameterTuningJobConfig
hPOConfig) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe HyperParameterTuningJobConfig
a -> CreatePredictor
s {$sel:hPOConfig:CreatePredictor' :: Maybe HyperParameterTuningJobConfig
hPOConfig = Maybe HyperParameterTuningJobConfig
a} :: CreatePredictor)
createPredictor_optimizationMetric :: Lens.Lens' CreatePredictor (Prelude.Maybe OptimizationMetric)
createPredictor_optimizationMetric :: (Maybe OptimizationMetric -> f (Maybe OptimizationMetric))
-> CreatePredictor -> f CreatePredictor
createPredictor_optimizationMetric = (CreatePredictor -> Maybe OptimizationMetric)
-> (CreatePredictor -> Maybe OptimizationMetric -> CreatePredictor)
-> Lens
CreatePredictor
CreatePredictor
(Maybe OptimizationMetric)
(Maybe OptimizationMetric)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe OptimizationMetric
optimizationMetric :: Maybe OptimizationMetric
$sel:optimizationMetric:CreatePredictor' :: CreatePredictor -> Maybe OptimizationMetric
optimizationMetric} -> Maybe OptimizationMetric
optimizationMetric) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe OptimizationMetric
a -> CreatePredictor
s {$sel:optimizationMetric:CreatePredictor' :: Maybe OptimizationMetric
optimizationMetric = Maybe OptimizationMetric
a} :: CreatePredictor)
createPredictor_autoMLOverrideStrategy :: Lens.Lens' CreatePredictor (Prelude.Maybe AutoMLOverrideStrategy)
createPredictor_autoMLOverrideStrategy :: (Maybe AutoMLOverrideStrategy -> f (Maybe AutoMLOverrideStrategy))
-> CreatePredictor -> f CreatePredictor
createPredictor_autoMLOverrideStrategy = (CreatePredictor -> Maybe AutoMLOverrideStrategy)
-> (CreatePredictor
-> Maybe AutoMLOverrideStrategy -> CreatePredictor)
-> Lens
CreatePredictor
CreatePredictor
(Maybe AutoMLOverrideStrategy)
(Maybe AutoMLOverrideStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy :: Maybe AutoMLOverrideStrategy
$sel:autoMLOverrideStrategy:CreatePredictor' :: CreatePredictor -> Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy} -> Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe AutoMLOverrideStrategy
a -> CreatePredictor
s {$sel:autoMLOverrideStrategy:CreatePredictor' :: Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy = Maybe AutoMLOverrideStrategy
a} :: CreatePredictor)
createPredictor_evaluationParameters :: Lens.Lens' CreatePredictor (Prelude.Maybe EvaluationParameters)
createPredictor_evaluationParameters :: (Maybe EvaluationParameters -> f (Maybe EvaluationParameters))
-> CreatePredictor -> f CreatePredictor
createPredictor_evaluationParameters = (CreatePredictor -> Maybe EvaluationParameters)
-> (CreatePredictor
-> Maybe EvaluationParameters -> CreatePredictor)
-> Lens
CreatePredictor
CreatePredictor
(Maybe EvaluationParameters)
(Maybe EvaluationParameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe EvaluationParameters
evaluationParameters :: Maybe EvaluationParameters
$sel:evaluationParameters:CreatePredictor' :: CreatePredictor -> Maybe EvaluationParameters
evaluationParameters} -> Maybe EvaluationParameters
evaluationParameters) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe EvaluationParameters
a -> CreatePredictor
s {$sel:evaluationParameters:CreatePredictor' :: Maybe EvaluationParameters
evaluationParameters = Maybe EvaluationParameters
a} :: CreatePredictor)
createPredictor_encryptionConfig :: Lens.Lens' CreatePredictor (Prelude.Maybe EncryptionConfig)
createPredictor_encryptionConfig :: (Maybe EncryptionConfig -> f (Maybe EncryptionConfig))
-> CreatePredictor -> f CreatePredictor
createPredictor_encryptionConfig = (CreatePredictor -> Maybe EncryptionConfig)
-> (CreatePredictor -> Maybe EncryptionConfig -> CreatePredictor)
-> Lens
CreatePredictor
CreatePredictor
(Maybe EncryptionConfig)
(Maybe EncryptionConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe EncryptionConfig
encryptionConfig :: Maybe EncryptionConfig
$sel:encryptionConfig:CreatePredictor' :: CreatePredictor -> Maybe EncryptionConfig
encryptionConfig} -> Maybe EncryptionConfig
encryptionConfig) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe EncryptionConfig
a -> CreatePredictor
s {$sel:encryptionConfig:CreatePredictor' :: Maybe EncryptionConfig
encryptionConfig = Maybe EncryptionConfig
a} :: CreatePredictor)
createPredictor_forecastTypes :: Lens.Lens' CreatePredictor (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createPredictor_forecastTypes :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreatePredictor -> f CreatePredictor
createPredictor_forecastTypes = (CreatePredictor -> Maybe (NonEmpty Text))
-> (CreatePredictor -> Maybe (NonEmpty Text) -> CreatePredictor)
-> Lens
CreatePredictor
CreatePredictor
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe (NonEmpty Text)
forecastTypes :: Maybe (NonEmpty Text)
$sel:forecastTypes:CreatePredictor' :: CreatePredictor -> Maybe (NonEmpty Text)
forecastTypes} -> Maybe (NonEmpty Text)
forecastTypes) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe (NonEmpty Text)
a -> CreatePredictor
s {$sel:forecastTypes:CreatePredictor' :: Maybe (NonEmpty Text)
forecastTypes = Maybe (NonEmpty Text)
a} :: CreatePredictor) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreatePredictor -> f CreatePredictor)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreatePredictor
-> f CreatePredictor
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createPredictor_performHPO :: Lens.Lens' CreatePredictor (Prelude.Maybe Prelude.Bool)
createPredictor_performHPO :: (Maybe Bool -> f (Maybe Bool))
-> CreatePredictor -> f CreatePredictor
createPredictor_performHPO = (CreatePredictor -> Maybe Bool)
-> (CreatePredictor -> Maybe Bool -> CreatePredictor)
-> Lens CreatePredictor CreatePredictor (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe Bool
performHPO :: Maybe Bool
$sel:performHPO:CreatePredictor' :: CreatePredictor -> Maybe Bool
performHPO} -> Maybe Bool
performHPO) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe Bool
a -> CreatePredictor
s {$sel:performHPO:CreatePredictor' :: Maybe Bool
performHPO = Maybe Bool
a} :: CreatePredictor)
createPredictor_tags :: Lens.Lens' CreatePredictor (Prelude.Maybe [Tag])
createPredictor_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePredictor -> f CreatePredictor
createPredictor_tags = (CreatePredictor -> Maybe [Tag])
-> (CreatePredictor -> Maybe [Tag] -> CreatePredictor)
-> Lens CreatePredictor CreatePredictor (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreatePredictor' :: CreatePredictor -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreatePredictor
s@CreatePredictor' {} Maybe [Tag]
a -> CreatePredictor
s {$sel:tags:CreatePredictor' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreatePredictor) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePredictor -> f CreatePredictor)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreatePredictor
-> f CreatePredictor
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
createPredictor_predictorName :: Lens.Lens' CreatePredictor Prelude.Text
createPredictor_predictorName :: (Text -> f Text) -> CreatePredictor -> f CreatePredictor
createPredictor_predictorName = (CreatePredictor -> Text)
-> (CreatePredictor -> Text -> CreatePredictor)
-> Lens CreatePredictor CreatePredictor Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Text
predictorName :: Text
$sel:predictorName:CreatePredictor' :: CreatePredictor -> Text
predictorName} -> Text
predictorName) (\s :: CreatePredictor
s@CreatePredictor' {} Text
a -> CreatePredictor
s {$sel:predictorName:CreatePredictor' :: Text
predictorName = Text
a} :: CreatePredictor)
createPredictor_forecastHorizon :: Lens.Lens' CreatePredictor Prelude.Int
createPredictor_forecastHorizon :: (Int -> f Int) -> CreatePredictor -> f CreatePredictor
createPredictor_forecastHorizon = (CreatePredictor -> Int)
-> (CreatePredictor -> Int -> CreatePredictor)
-> Lens CreatePredictor CreatePredictor Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {Int
forecastHorizon :: Int
$sel:forecastHorizon:CreatePredictor' :: CreatePredictor -> Int
forecastHorizon} -> Int
forecastHorizon) (\s :: CreatePredictor
s@CreatePredictor' {} Int
a -> CreatePredictor
s {$sel:forecastHorizon:CreatePredictor' :: Int
forecastHorizon = Int
a} :: CreatePredictor)
createPredictor_inputDataConfig :: Lens.Lens' CreatePredictor InputDataConfig
createPredictor_inputDataConfig :: (InputDataConfig -> f InputDataConfig)
-> CreatePredictor -> f CreatePredictor
createPredictor_inputDataConfig = (CreatePredictor -> InputDataConfig)
-> (CreatePredictor -> InputDataConfig -> CreatePredictor)
-> Lens
CreatePredictor CreatePredictor InputDataConfig InputDataConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {InputDataConfig
inputDataConfig :: InputDataConfig
$sel:inputDataConfig:CreatePredictor' :: CreatePredictor -> InputDataConfig
inputDataConfig} -> InputDataConfig
inputDataConfig) (\s :: CreatePredictor
s@CreatePredictor' {} InputDataConfig
a -> CreatePredictor
s {$sel:inputDataConfig:CreatePredictor' :: InputDataConfig
inputDataConfig = InputDataConfig
a} :: CreatePredictor)
createPredictor_featurizationConfig :: Lens.Lens' CreatePredictor FeaturizationConfig
createPredictor_featurizationConfig :: (FeaturizationConfig -> f FeaturizationConfig)
-> CreatePredictor -> f CreatePredictor
createPredictor_featurizationConfig = (CreatePredictor -> FeaturizationConfig)
-> (CreatePredictor -> FeaturizationConfig -> CreatePredictor)
-> Lens
CreatePredictor
CreatePredictor
FeaturizationConfig
FeaturizationConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictor' {FeaturizationConfig
featurizationConfig :: FeaturizationConfig
$sel:featurizationConfig:CreatePredictor' :: CreatePredictor -> FeaturizationConfig
featurizationConfig} -> FeaturizationConfig
featurizationConfig) (\s :: CreatePredictor
s@CreatePredictor' {} FeaturizationConfig
a -> CreatePredictor
s {$sel:featurizationConfig:CreatePredictor' :: FeaturizationConfig
featurizationConfig = FeaturizationConfig
a} :: CreatePredictor)
instance Core.AWSRequest CreatePredictor where
type
AWSResponse CreatePredictor =
CreatePredictorResponse
request :: CreatePredictor -> Request CreatePredictor
request = Service -> CreatePredictor -> Request CreatePredictor
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreatePredictor
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreatePredictor)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreatePredictor))
-> Logger
-> Service
-> Proxy CreatePredictor
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreatePredictor)))
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 -> CreatePredictorResponse
CreatePredictorResponse'
(Maybe Text -> Int -> CreatePredictorResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreatePredictorResponse)
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
"PredictorArn")
Either String (Int -> CreatePredictorResponse)
-> Either String Int -> Either String CreatePredictorResponse
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 CreatePredictor
instance Prelude.NFData CreatePredictor
instance Core.ToHeaders CreatePredictor where
toHeaders :: CreatePredictor -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreatePredictor -> 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
"AmazonForecast.CreatePredictor" ::
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 CreatePredictor where
toJSON :: CreatePredictor -> Value
toJSON CreatePredictor' {Int
Maybe Bool
Maybe [Tag]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe AutoMLOverrideStrategy
Maybe EncryptionConfig
Maybe EvaluationParameters
Maybe OptimizationMetric
Maybe HyperParameterTuningJobConfig
Text
FeaturizationConfig
InputDataConfig
featurizationConfig :: FeaturizationConfig
inputDataConfig :: InputDataConfig
forecastHorizon :: Int
predictorName :: Text
tags :: Maybe [Tag]
performHPO :: Maybe Bool
forecastTypes :: Maybe (NonEmpty Text)
encryptionConfig :: Maybe EncryptionConfig
evaluationParameters :: Maybe EvaluationParameters
autoMLOverrideStrategy :: Maybe AutoMLOverrideStrategy
optimizationMetric :: Maybe OptimizationMetric
hPOConfig :: Maybe HyperParameterTuningJobConfig
algorithmArn :: Maybe Text
trainingParameters :: Maybe (HashMap Text Text)
performAutoML :: Maybe Bool
$sel:featurizationConfig:CreatePredictor' :: CreatePredictor -> FeaturizationConfig
$sel:inputDataConfig:CreatePredictor' :: CreatePredictor -> InputDataConfig
$sel:forecastHorizon:CreatePredictor' :: CreatePredictor -> Int
$sel:predictorName:CreatePredictor' :: CreatePredictor -> Text
$sel:tags:CreatePredictor' :: CreatePredictor -> Maybe [Tag]
$sel:performHPO:CreatePredictor' :: CreatePredictor -> Maybe Bool
$sel:forecastTypes:CreatePredictor' :: CreatePredictor -> Maybe (NonEmpty Text)
$sel:encryptionConfig:CreatePredictor' :: CreatePredictor -> Maybe EncryptionConfig
$sel:evaluationParameters:CreatePredictor' :: CreatePredictor -> Maybe EvaluationParameters
$sel:autoMLOverrideStrategy:CreatePredictor' :: CreatePredictor -> Maybe AutoMLOverrideStrategy
$sel:optimizationMetric:CreatePredictor' :: CreatePredictor -> Maybe OptimizationMetric
$sel:hPOConfig:CreatePredictor' :: CreatePredictor -> Maybe HyperParameterTuningJobConfig
$sel:algorithmArn:CreatePredictor' :: CreatePredictor -> Maybe Text
$sel:trainingParameters:CreatePredictor' :: CreatePredictor -> Maybe (HashMap Text Text)
$sel:performAutoML:CreatePredictor' :: CreatePredictor -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"PerformAutoML" 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
performAutoML,
(Text
"TrainingParameters" 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)
trainingParameters,
(Text
"AlgorithmArn" 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
algorithmArn,
(Text
"HPOConfig" Text -> HyperParameterTuningJobConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HyperParameterTuningJobConfig -> Pair)
-> Maybe HyperParameterTuningJobConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HyperParameterTuningJobConfig
hPOConfig,
(Text
"OptimizationMetric" Text -> OptimizationMetric -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OptimizationMetric -> Pair)
-> Maybe OptimizationMetric -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OptimizationMetric
optimizationMetric,
(Text
"AutoMLOverrideStrategy" Text -> AutoMLOverrideStrategy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AutoMLOverrideStrategy -> Pair)
-> Maybe AutoMLOverrideStrategy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoMLOverrideStrategy
autoMLOverrideStrategy,
(Text
"EvaluationParameters" Text -> EvaluationParameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EvaluationParameters -> Pair)
-> Maybe EvaluationParameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EvaluationParameters
evaluationParameters,
(Text
"EncryptionConfig" Text -> EncryptionConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EncryptionConfig -> Pair) -> Maybe EncryptionConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EncryptionConfig
encryptionConfig,
(Text
"ForecastTypes" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
forecastTypes,
(Text
"PerformHPO" 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
performHPO,
(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
"PredictorName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
predictorName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ForecastHorizon" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
forecastHorizon),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"InputDataConfig" Text -> InputDataConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= InputDataConfig
inputDataConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FeaturizationConfig" Text -> FeaturizationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= FeaturizationConfig
featurizationConfig)
]
)
instance Core.ToPath CreatePredictor where
toPath :: CreatePredictor -> ByteString
toPath = ByteString -> CreatePredictor -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreatePredictor where
toQuery :: CreatePredictor -> QueryString
toQuery = QueryString -> CreatePredictor -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreatePredictorResponse = CreatePredictorResponse'
{
CreatePredictorResponse -> Maybe Text
predictorArn :: Prelude.Maybe Prelude.Text,
CreatePredictorResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreatePredictorResponse -> CreatePredictorResponse -> Bool
(CreatePredictorResponse -> CreatePredictorResponse -> Bool)
-> (CreatePredictorResponse -> CreatePredictorResponse -> Bool)
-> Eq CreatePredictorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePredictorResponse -> CreatePredictorResponse -> Bool
$c/= :: CreatePredictorResponse -> CreatePredictorResponse -> Bool
== :: CreatePredictorResponse -> CreatePredictorResponse -> Bool
$c== :: CreatePredictorResponse -> CreatePredictorResponse -> Bool
Prelude.Eq, ReadPrec [CreatePredictorResponse]
ReadPrec CreatePredictorResponse
Int -> ReadS CreatePredictorResponse
ReadS [CreatePredictorResponse]
(Int -> ReadS CreatePredictorResponse)
-> ReadS [CreatePredictorResponse]
-> ReadPrec CreatePredictorResponse
-> ReadPrec [CreatePredictorResponse]
-> Read CreatePredictorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePredictorResponse]
$creadListPrec :: ReadPrec [CreatePredictorResponse]
readPrec :: ReadPrec CreatePredictorResponse
$creadPrec :: ReadPrec CreatePredictorResponse
readList :: ReadS [CreatePredictorResponse]
$creadList :: ReadS [CreatePredictorResponse]
readsPrec :: Int -> ReadS CreatePredictorResponse
$creadsPrec :: Int -> ReadS CreatePredictorResponse
Prelude.Read, Int -> CreatePredictorResponse -> ShowS
[CreatePredictorResponse] -> ShowS
CreatePredictorResponse -> String
(Int -> CreatePredictorResponse -> ShowS)
-> (CreatePredictorResponse -> String)
-> ([CreatePredictorResponse] -> ShowS)
-> Show CreatePredictorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePredictorResponse] -> ShowS
$cshowList :: [CreatePredictorResponse] -> ShowS
show :: CreatePredictorResponse -> String
$cshow :: CreatePredictorResponse -> String
showsPrec :: Int -> CreatePredictorResponse -> ShowS
$cshowsPrec :: Int -> CreatePredictorResponse -> ShowS
Prelude.Show, (forall x.
CreatePredictorResponse -> Rep CreatePredictorResponse x)
-> (forall x.
Rep CreatePredictorResponse x -> CreatePredictorResponse)
-> Generic CreatePredictorResponse
forall x. Rep CreatePredictorResponse x -> CreatePredictorResponse
forall x. CreatePredictorResponse -> Rep CreatePredictorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreatePredictorResponse x -> CreatePredictorResponse
$cfrom :: forall x. CreatePredictorResponse -> Rep CreatePredictorResponse x
Prelude.Generic)
newCreatePredictorResponse ::
Prelude.Int ->
CreatePredictorResponse
newCreatePredictorResponse :: Int -> CreatePredictorResponse
newCreatePredictorResponse Int
pHttpStatus_ =
CreatePredictorResponse' :: Maybe Text -> Int -> CreatePredictorResponse
CreatePredictorResponse'
{ $sel:predictorArn:CreatePredictorResponse' :: Maybe Text
predictorArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreatePredictorResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createPredictorResponse_predictorArn :: Lens.Lens' CreatePredictorResponse (Prelude.Maybe Prelude.Text)
createPredictorResponse_predictorArn :: (Maybe Text -> f (Maybe Text))
-> CreatePredictorResponse -> f CreatePredictorResponse
createPredictorResponse_predictorArn = (CreatePredictorResponse -> Maybe Text)
-> (CreatePredictorResponse
-> Maybe Text -> CreatePredictorResponse)
-> Lens
CreatePredictorResponse
CreatePredictorResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictorResponse' {Maybe Text
predictorArn :: Maybe Text
$sel:predictorArn:CreatePredictorResponse' :: CreatePredictorResponse -> Maybe Text
predictorArn} -> Maybe Text
predictorArn) (\s :: CreatePredictorResponse
s@CreatePredictorResponse' {} Maybe Text
a -> CreatePredictorResponse
s {$sel:predictorArn:CreatePredictorResponse' :: Maybe Text
predictorArn = Maybe Text
a} :: CreatePredictorResponse)
createPredictorResponse_httpStatus :: Lens.Lens' CreatePredictorResponse Prelude.Int
createPredictorResponse_httpStatus :: (Int -> f Int)
-> CreatePredictorResponse -> f CreatePredictorResponse
createPredictorResponse_httpStatus = (CreatePredictorResponse -> Int)
-> (CreatePredictorResponse -> Int -> CreatePredictorResponse)
-> Lens CreatePredictorResponse CreatePredictorResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePredictorResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreatePredictorResponse' :: CreatePredictorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreatePredictorResponse
s@CreatePredictorResponse' {} Int
a -> CreatePredictorResponse
s {$sel:httpStatus:CreatePredictorResponse' :: Int
httpStatus = Int
a} :: CreatePredictorResponse)
instance Prelude.NFData CreatePredictorResponse