aws_sdk_forecast/operation/create_predictor/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_predictor::_create_predictor_output::CreatePredictorOutputBuilder;
3
4pub use crate::operation::create_predictor::_create_predictor_input::CreatePredictorInputBuilder;
5
6impl crate::operation::create_predictor::builders::CreatePredictorInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::create_predictor::CreatePredictorOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_predictor::CreatePredictorError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_predictor();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreatePredictor`.
24///
25/// <note>
26/// <p>This operation creates a legacy predictor that does not include all the predictor functionalities provided by Amazon Forecast. To create a predictor that is compatible with all aspects of Forecast, use <code>CreateAutoPredictor</code>.</p>
27/// </note>
28/// <p>Creates an Amazon Forecast predictor.</p>
29/// <p>In the request, provide a dataset group and either specify an algorithm or let Amazon Forecast choose an algorithm for you using AutoML. If you specify an algorithm, you also can override algorithm-specific hyperparameters.</p>
30/// <p>Amazon Forecast uses the algorithm to train a predictor using the latest version of the datasets in the specified dataset group. You can then generate a forecast using the <code>CreateForecast</code> operation.</p>
31/// <p>To see the evaluation metrics, use the <code>GetAccuracyMetrics</code> operation.</p>
32/// <p>You can specify a featurization configuration to fill and aggregate the data fields in the <code>TARGET_TIME_SERIES</code> dataset to improve model training. For more information, see <code>FeaturizationConfig</code>.</p>
33/// <p>For RELATED_TIME_SERIES datasets, <code>CreatePredictor</code> verifies that the <code>DataFrequency</code> specified when the dataset was created matches the <code>ForecastFrequency</code>. TARGET_TIME_SERIES datasets don't have this restriction. Amazon Forecast also verifies the delimiter and timestamp format. For more information, see <code>howitworks-datasets-groups</code>.</p>
34/// <p>By default, predictors are trained and evaluated at the 0.1 (P10), 0.5 (P50), and 0.9 (P90) quantiles. You can choose custom forecast types to train and evaluate your predictor by setting the <code>ForecastTypes</code>.</p>
35/// <p><b>AutoML</b></p>
36/// <p>If you want Amazon Forecast to evaluate each algorithm and choose the one that minimizes the <code>objective function</code>, set <code>PerformAutoML</code> to <code>true</code>. The <code>objective function</code> is defined as the mean of the weighted losses over the forecast types. By default, these are the p10, p50, and p90 quantile losses. For more information, see <code>EvaluationResult</code>.</p>
37/// <p>When AutoML is enabled, the following properties are disallowed:</p>
38/// <ul>
39/// <li>
40/// <p><code>AlgorithmArn</code></p></li>
41/// <li>
42/// <p><code>HPOConfig</code></p></li>
43/// <li>
44/// <p><code>PerformHPO</code></p></li>
45/// <li>
46/// <p><code>TrainingParameters</code></p></li>
47/// </ul>
48/// <p>To get a list of all of your predictors, use the <code>ListPredictors</code> operation.</p><note>
49/// <p>Before you can use the predictor to create a forecast, the <code>Status</code> of the predictor must be <code>ACTIVE</code>, signifying that training has completed. To get the status, use the <code>DescribePredictor</code> operation.</p>
50/// </note>
51#[derive(::std::clone::Clone, ::std::fmt::Debug)]
52pub struct CreatePredictorFluentBuilder {
53    handle: ::std::sync::Arc<crate::client::Handle>,
54    inner: crate::operation::create_predictor::builders::CreatePredictorInputBuilder,
55    config_override: ::std::option::Option<crate::config::Builder>,
56}
57impl
58    crate::client::customize::internal::CustomizableSend<
59        crate::operation::create_predictor::CreatePredictorOutput,
60        crate::operation::create_predictor::CreatePredictorError,
61    > for CreatePredictorFluentBuilder
62{
63    fn send(
64        self,
65        config_override: crate::config::Builder,
66    ) -> crate::client::customize::internal::BoxFuture<
67        crate::client::customize::internal::SendResult<
68            crate::operation::create_predictor::CreatePredictorOutput,
69            crate::operation::create_predictor::CreatePredictorError,
70        >,
71    > {
72        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
73    }
74}
75impl CreatePredictorFluentBuilder {
76    /// Creates a new `CreatePredictorFluentBuilder`.
77    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
78        Self {
79            handle,
80            inner: ::std::default::Default::default(),
81            config_override: ::std::option::Option::None,
82        }
83    }
84    /// Access the CreatePredictor as a reference.
85    pub fn as_input(&self) -> &crate::operation::create_predictor::builders::CreatePredictorInputBuilder {
86        &self.inner
87    }
88    /// Sends the request and returns the response.
89    ///
90    /// If an error occurs, an `SdkError` will be returned with additional details that
91    /// can be matched against.
92    ///
93    /// By default, any retryable failures will be retried twice. Retry behavior
94    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
95    /// set when configuring the client.
96    pub async fn send(
97        self,
98    ) -> ::std::result::Result<
99        crate::operation::create_predictor::CreatePredictorOutput,
100        ::aws_smithy_runtime_api::client::result::SdkError<
101            crate::operation::create_predictor::CreatePredictorError,
102            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
103        >,
104    > {
105        let input = self
106            .inner
107            .build()
108            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
109        let runtime_plugins = crate::operation::create_predictor::CreatePredictor::operation_runtime_plugins(
110            self.handle.runtime_plugins.clone(),
111            &self.handle.conf,
112            self.config_override,
113        );
114        crate::operation::create_predictor::CreatePredictor::orchestrate(&runtime_plugins, input).await
115    }
116
117    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
118    pub fn customize(
119        self,
120    ) -> crate::client::customize::CustomizableOperation<
121        crate::operation::create_predictor::CreatePredictorOutput,
122        crate::operation::create_predictor::CreatePredictorError,
123        Self,
124    > {
125        crate::client::customize::CustomizableOperation::new(self)
126    }
127    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
128        self.set_config_override(::std::option::Option::Some(config_override.into()));
129        self
130    }
131
132    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
133        self.config_override = config_override;
134        self
135    }
136    /// <p>A name for the predictor.</p>
137    pub fn predictor_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.inner = self.inner.predictor_name(input.into());
139        self
140    }
141    /// <p>A name for the predictor.</p>
142    pub fn set_predictor_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.inner = self.inner.set_predictor_name(input);
144        self
145    }
146    /// <p>A name for the predictor.</p>
147    pub fn get_predictor_name(&self) -> &::std::option::Option<::std::string::String> {
148        self.inner.get_predictor_name()
149    }
150    /// <p>The Amazon Resource Name (ARN) of the algorithm to use for model training. Required if <code>PerformAutoML</code> is not set to <code>true</code>.</p>
151    /// <p class="title"><b>Supported algorithms:</b></p>
152    /// <ul>
153    /// <li>
154    /// <p><code>arn:aws:forecast:::algorithm/ARIMA</code></p></li>
155    /// <li>
156    /// <p><code>arn:aws:forecast:::algorithm/CNN-QR</code></p></li>
157    /// <li>
158    /// <p><code>arn:aws:forecast:::algorithm/Deep_AR_Plus</code></p></li>
159    /// <li>
160    /// <p><code>arn:aws:forecast:::algorithm/ETS</code></p></li>
161    /// <li>
162    /// <p><code>arn:aws:forecast:::algorithm/NPTS</code></p></li>
163    /// <li>
164    /// <p><code>arn:aws:forecast:::algorithm/Prophet</code></p></li>
165    /// </ul>
166    pub fn algorithm_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
167        self.inner = self.inner.algorithm_arn(input.into());
168        self
169    }
170    /// <p>The Amazon Resource Name (ARN) of the algorithm to use for model training. Required if <code>PerformAutoML</code> is not set to <code>true</code>.</p>
171    /// <p class="title"><b>Supported algorithms:</b></p>
172    /// <ul>
173    /// <li>
174    /// <p><code>arn:aws:forecast:::algorithm/ARIMA</code></p></li>
175    /// <li>
176    /// <p><code>arn:aws:forecast:::algorithm/CNN-QR</code></p></li>
177    /// <li>
178    /// <p><code>arn:aws:forecast:::algorithm/Deep_AR_Plus</code></p></li>
179    /// <li>
180    /// <p><code>arn:aws:forecast:::algorithm/ETS</code></p></li>
181    /// <li>
182    /// <p><code>arn:aws:forecast:::algorithm/NPTS</code></p></li>
183    /// <li>
184    /// <p><code>arn:aws:forecast:::algorithm/Prophet</code></p></li>
185    /// </ul>
186    pub fn set_algorithm_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.inner = self.inner.set_algorithm_arn(input);
188        self
189    }
190    /// <p>The Amazon Resource Name (ARN) of the algorithm to use for model training. Required if <code>PerformAutoML</code> is not set to <code>true</code>.</p>
191    /// <p class="title"><b>Supported algorithms:</b></p>
192    /// <ul>
193    /// <li>
194    /// <p><code>arn:aws:forecast:::algorithm/ARIMA</code></p></li>
195    /// <li>
196    /// <p><code>arn:aws:forecast:::algorithm/CNN-QR</code></p></li>
197    /// <li>
198    /// <p><code>arn:aws:forecast:::algorithm/Deep_AR_Plus</code></p></li>
199    /// <li>
200    /// <p><code>arn:aws:forecast:::algorithm/ETS</code></p></li>
201    /// <li>
202    /// <p><code>arn:aws:forecast:::algorithm/NPTS</code></p></li>
203    /// <li>
204    /// <p><code>arn:aws:forecast:::algorithm/Prophet</code></p></li>
205    /// </ul>
206    pub fn get_algorithm_arn(&self) -> &::std::option::Option<::std::string::String> {
207        self.inner.get_algorithm_arn()
208    }
209    /// <p>Specifies the number of time-steps that the model is trained to predict. The forecast horizon is also called the prediction length.</p>
210    /// <p>For example, if you configure a dataset for daily data collection (using the <code>DataFrequency</code> parameter of the <code>CreateDataset</code> operation) and set the forecast horizon to 10, the model returns predictions for 10 days.</p>
211    /// <p>The maximum forecast horizon is the lesser of 500 time-steps or 1/3 of the TARGET_TIME_SERIES dataset length.</p>
212    pub fn forecast_horizon(mut self, input: i32) -> Self {
213        self.inner = self.inner.forecast_horizon(input);
214        self
215    }
216    /// <p>Specifies the number of time-steps that the model is trained to predict. The forecast horizon is also called the prediction length.</p>
217    /// <p>For example, if you configure a dataset for daily data collection (using the <code>DataFrequency</code> parameter of the <code>CreateDataset</code> operation) and set the forecast horizon to 10, the model returns predictions for 10 days.</p>
218    /// <p>The maximum forecast horizon is the lesser of 500 time-steps or 1/3 of the TARGET_TIME_SERIES dataset length.</p>
219    pub fn set_forecast_horizon(mut self, input: ::std::option::Option<i32>) -> Self {
220        self.inner = self.inner.set_forecast_horizon(input);
221        self
222    }
223    /// <p>Specifies the number of time-steps that the model is trained to predict. The forecast horizon is also called the prediction length.</p>
224    /// <p>For example, if you configure a dataset for daily data collection (using the <code>DataFrequency</code> parameter of the <code>CreateDataset</code> operation) and set the forecast horizon to 10, the model returns predictions for 10 days.</p>
225    /// <p>The maximum forecast horizon is the lesser of 500 time-steps or 1/3 of the TARGET_TIME_SERIES dataset length.</p>
226    pub fn get_forecast_horizon(&self) -> &::std::option::Option<i32> {
227        self.inner.get_forecast_horizon()
228    }
229    ///
230    /// Appends an item to `ForecastTypes`.
231    ///
232    /// To override the contents of this collection use [`set_forecast_types`](Self::set_forecast_types).
233    ///
234    /// <p>Specifies the forecast types used to train a predictor. You can specify up to five forecast types. Forecast types can be quantiles from 0.01 to 0.99, by increments of 0.01 or higher. You can also specify the mean forecast with <code>mean</code>.</p>
235    /// <p>The default value is <code>\["0.10", "0.50", "0.9"\]</code>.</p>
236    pub fn forecast_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237        self.inner = self.inner.forecast_types(input.into());
238        self
239    }
240    /// <p>Specifies the forecast types used to train a predictor. You can specify up to five forecast types. Forecast types can be quantiles from 0.01 to 0.99, by increments of 0.01 or higher. You can also specify the mean forecast with <code>mean</code>.</p>
241    /// <p>The default value is <code>\["0.10", "0.50", "0.9"\]</code>.</p>
242    pub fn set_forecast_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
243        self.inner = self.inner.set_forecast_types(input);
244        self
245    }
246    /// <p>Specifies the forecast types used to train a predictor. You can specify up to five forecast types. Forecast types can be quantiles from 0.01 to 0.99, by increments of 0.01 or higher. You can also specify the mean forecast with <code>mean</code>.</p>
247    /// <p>The default value is <code>\["0.10", "0.50", "0.9"\]</code>.</p>
248    pub fn get_forecast_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
249        self.inner.get_forecast_types()
250    }
251    /// <p>Whether to perform AutoML. When Amazon Forecast performs AutoML, it evaluates the algorithms it provides and chooses the best algorithm and configuration for your training dataset.</p>
252    /// <p>The default value is <code>false</code>. In this case, you are required to specify an algorithm.</p>
253    /// <p>Set <code>PerformAutoML</code> to <code>true</code> to have Amazon Forecast perform AutoML. This is a good option if you aren't sure which algorithm is suitable for your training data. In this case, <code>PerformHPO</code> must be false.</p>
254    pub fn perform_auto_ml(mut self, input: bool) -> Self {
255        self.inner = self.inner.perform_auto_ml(input);
256        self
257    }
258    /// <p>Whether to perform AutoML. When Amazon Forecast performs AutoML, it evaluates the algorithms it provides and chooses the best algorithm and configuration for your training dataset.</p>
259    /// <p>The default value is <code>false</code>. In this case, you are required to specify an algorithm.</p>
260    /// <p>Set <code>PerformAutoML</code> to <code>true</code> to have Amazon Forecast perform AutoML. This is a good option if you aren't sure which algorithm is suitable for your training data. In this case, <code>PerformHPO</code> must be false.</p>
261    pub fn set_perform_auto_ml(mut self, input: ::std::option::Option<bool>) -> Self {
262        self.inner = self.inner.set_perform_auto_ml(input);
263        self
264    }
265    /// <p>Whether to perform AutoML. When Amazon Forecast performs AutoML, it evaluates the algorithms it provides and chooses the best algorithm and configuration for your training dataset.</p>
266    /// <p>The default value is <code>false</code>. In this case, you are required to specify an algorithm.</p>
267    /// <p>Set <code>PerformAutoML</code> to <code>true</code> to have Amazon Forecast perform AutoML. This is a good option if you aren't sure which algorithm is suitable for your training data. In this case, <code>PerformHPO</code> must be false.</p>
268    pub fn get_perform_auto_ml(&self) -> &::std::option::Option<bool> {
269        self.inner.get_perform_auto_ml()
270    }
271    /// <note>
272    /// <p>The <code>LatencyOptimized</code> AutoML override strategy is only available in private beta. Contact Amazon Web Services Support or your account manager to learn more about access privileges.</p>
273    /// </note>
274    /// <p>Used to overide the default AutoML strategy, which is to optimize predictor accuracy. To apply an AutoML strategy that minimizes training time, use <code>LatencyOptimized</code>.</p>
275    /// <p>This parameter is only valid for predictors trained using AutoML.</p>
276    pub fn auto_ml_override_strategy(mut self, input: crate::types::AutoMlOverrideStrategy) -> Self {
277        self.inner = self.inner.auto_ml_override_strategy(input);
278        self
279    }
280    /// <note>
281    /// <p>The <code>LatencyOptimized</code> AutoML override strategy is only available in private beta. Contact Amazon Web Services Support or your account manager to learn more about access privileges.</p>
282    /// </note>
283    /// <p>Used to overide the default AutoML strategy, which is to optimize predictor accuracy. To apply an AutoML strategy that minimizes training time, use <code>LatencyOptimized</code>.</p>
284    /// <p>This parameter is only valid for predictors trained using AutoML.</p>
285    pub fn set_auto_ml_override_strategy(mut self, input: ::std::option::Option<crate::types::AutoMlOverrideStrategy>) -> Self {
286        self.inner = self.inner.set_auto_ml_override_strategy(input);
287        self
288    }
289    /// <note>
290    /// <p>The <code>LatencyOptimized</code> AutoML override strategy is only available in private beta. Contact Amazon Web Services Support or your account manager to learn more about access privileges.</p>
291    /// </note>
292    /// <p>Used to overide the default AutoML strategy, which is to optimize predictor accuracy. To apply an AutoML strategy that minimizes training time, use <code>LatencyOptimized</code>.</p>
293    /// <p>This parameter is only valid for predictors trained using AutoML.</p>
294    pub fn get_auto_ml_override_strategy(&self) -> &::std::option::Option<crate::types::AutoMlOverrideStrategy> {
295        self.inner.get_auto_ml_override_strategy()
296    }
297    /// <p>Whether to perform hyperparameter optimization (HPO). HPO finds optimal hyperparameter values for your training data. The process of performing HPO is known as running a hyperparameter tuning job.</p>
298    /// <p>The default value is <code>false</code>. In this case, Amazon Forecast uses default hyperparameter values from the chosen algorithm.</p>
299    /// <p>To override the default values, set <code>PerformHPO</code> to <code>true</code> and, optionally, supply the <code>HyperParameterTuningJobConfig</code> object. The tuning job specifies a metric to optimize, which hyperparameters participate in tuning, and the valid range for each tunable hyperparameter. In this case, you are required to specify an algorithm and <code>PerformAutoML</code> must be false.</p>
300    /// <p>The following algorithms support HPO:</p>
301    /// <ul>
302    /// <li>
303    /// <p>DeepAR+</p></li>
304    /// <li>
305    /// <p>CNN-QR</p></li>
306    /// </ul>
307    pub fn perform_hpo(mut self, input: bool) -> Self {
308        self.inner = self.inner.perform_hpo(input);
309        self
310    }
311    /// <p>Whether to perform hyperparameter optimization (HPO). HPO finds optimal hyperparameter values for your training data. The process of performing HPO is known as running a hyperparameter tuning job.</p>
312    /// <p>The default value is <code>false</code>. In this case, Amazon Forecast uses default hyperparameter values from the chosen algorithm.</p>
313    /// <p>To override the default values, set <code>PerformHPO</code> to <code>true</code> and, optionally, supply the <code>HyperParameterTuningJobConfig</code> object. The tuning job specifies a metric to optimize, which hyperparameters participate in tuning, and the valid range for each tunable hyperparameter. In this case, you are required to specify an algorithm and <code>PerformAutoML</code> must be false.</p>
314    /// <p>The following algorithms support HPO:</p>
315    /// <ul>
316    /// <li>
317    /// <p>DeepAR+</p></li>
318    /// <li>
319    /// <p>CNN-QR</p></li>
320    /// </ul>
321    pub fn set_perform_hpo(mut self, input: ::std::option::Option<bool>) -> Self {
322        self.inner = self.inner.set_perform_hpo(input);
323        self
324    }
325    /// <p>Whether to perform hyperparameter optimization (HPO). HPO finds optimal hyperparameter values for your training data. The process of performing HPO is known as running a hyperparameter tuning job.</p>
326    /// <p>The default value is <code>false</code>. In this case, Amazon Forecast uses default hyperparameter values from the chosen algorithm.</p>
327    /// <p>To override the default values, set <code>PerformHPO</code> to <code>true</code> and, optionally, supply the <code>HyperParameterTuningJobConfig</code> object. The tuning job specifies a metric to optimize, which hyperparameters participate in tuning, and the valid range for each tunable hyperparameter. In this case, you are required to specify an algorithm and <code>PerformAutoML</code> must be false.</p>
328    /// <p>The following algorithms support HPO:</p>
329    /// <ul>
330    /// <li>
331    /// <p>DeepAR+</p></li>
332    /// <li>
333    /// <p>CNN-QR</p></li>
334    /// </ul>
335    pub fn get_perform_hpo(&self) -> &::std::option::Option<bool> {
336        self.inner.get_perform_hpo()
337    }
338    ///
339    /// Adds a key-value pair to `TrainingParameters`.
340    ///
341    /// To override the contents of this collection use [`set_training_parameters`](Self::set_training_parameters).
342    ///
343    /// <p>The hyperparameters to override for model training. The hyperparameters that you can override are listed in the individual algorithms. For the list of supported algorithms, see <code>aws-forecast-choosing-recipes</code>.</p>
344    pub fn training_parameters(
345        mut self,
346        k: impl ::std::convert::Into<::std::string::String>,
347        v: impl ::std::convert::Into<::std::string::String>,
348    ) -> Self {
349        self.inner = self.inner.training_parameters(k.into(), v.into());
350        self
351    }
352    /// <p>The hyperparameters to override for model training. The hyperparameters that you can override are listed in the individual algorithms. For the list of supported algorithms, see <code>aws-forecast-choosing-recipes</code>.</p>
353    pub fn set_training_parameters(
354        mut self,
355        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
356    ) -> Self {
357        self.inner = self.inner.set_training_parameters(input);
358        self
359    }
360    /// <p>The hyperparameters to override for model training. The hyperparameters that you can override are listed in the individual algorithms. For the list of supported algorithms, see <code>aws-forecast-choosing-recipes</code>.</p>
361    pub fn get_training_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
362        self.inner.get_training_parameters()
363    }
364    /// <p>Used to override the default evaluation parameters of the specified algorithm. Amazon Forecast evaluates a predictor by splitting a dataset into training data and testing data. The evaluation parameters define how to perform the split and the number of iterations.</p>
365    pub fn evaluation_parameters(mut self, input: crate::types::EvaluationParameters) -> Self {
366        self.inner = self.inner.evaluation_parameters(input);
367        self
368    }
369    /// <p>Used to override the default evaluation parameters of the specified algorithm. Amazon Forecast evaluates a predictor by splitting a dataset into training data and testing data. The evaluation parameters define how to perform the split and the number of iterations.</p>
370    pub fn set_evaluation_parameters(mut self, input: ::std::option::Option<crate::types::EvaluationParameters>) -> Self {
371        self.inner = self.inner.set_evaluation_parameters(input);
372        self
373    }
374    /// <p>Used to override the default evaluation parameters of the specified algorithm. Amazon Forecast evaluates a predictor by splitting a dataset into training data and testing data. The evaluation parameters define how to perform the split and the number of iterations.</p>
375    pub fn get_evaluation_parameters(&self) -> &::std::option::Option<crate::types::EvaluationParameters> {
376        self.inner.get_evaluation_parameters()
377    }
378    /// <p>Provides hyperparameter override values for the algorithm. If you don't provide this parameter, Amazon Forecast uses default values. The individual algorithms specify which hyperparameters support hyperparameter optimization (HPO). For more information, see <code>aws-forecast-choosing-recipes</code>.</p>
379    /// <p>If you included the <code>HPOConfig</code> object, you must set <code>PerformHPO</code> to true.</p>
380    pub fn hpo_config(mut self, input: crate::types::HyperParameterTuningJobConfig) -> Self {
381        self.inner = self.inner.hpo_config(input);
382        self
383    }
384    /// <p>Provides hyperparameter override values for the algorithm. If you don't provide this parameter, Amazon Forecast uses default values. The individual algorithms specify which hyperparameters support hyperparameter optimization (HPO). For more information, see <code>aws-forecast-choosing-recipes</code>.</p>
385    /// <p>If you included the <code>HPOConfig</code> object, you must set <code>PerformHPO</code> to true.</p>
386    pub fn set_hpo_config(mut self, input: ::std::option::Option<crate::types::HyperParameterTuningJobConfig>) -> Self {
387        self.inner = self.inner.set_hpo_config(input);
388        self
389    }
390    /// <p>Provides hyperparameter override values for the algorithm. If you don't provide this parameter, Amazon Forecast uses default values. The individual algorithms specify which hyperparameters support hyperparameter optimization (HPO). For more information, see <code>aws-forecast-choosing-recipes</code>.</p>
391    /// <p>If you included the <code>HPOConfig</code> object, you must set <code>PerformHPO</code> to true.</p>
392    pub fn get_hpo_config(&self) -> &::std::option::Option<crate::types::HyperParameterTuningJobConfig> {
393        self.inner.get_hpo_config()
394    }
395    /// <p>Describes the dataset group that contains the data to use to train the predictor.</p>
396    pub fn input_data_config(mut self, input: crate::types::InputDataConfig) -> Self {
397        self.inner = self.inner.input_data_config(input);
398        self
399    }
400    /// <p>Describes the dataset group that contains the data to use to train the predictor.</p>
401    pub fn set_input_data_config(mut self, input: ::std::option::Option<crate::types::InputDataConfig>) -> Self {
402        self.inner = self.inner.set_input_data_config(input);
403        self
404    }
405    /// <p>Describes the dataset group that contains the data to use to train the predictor.</p>
406    pub fn get_input_data_config(&self) -> &::std::option::Option<crate::types::InputDataConfig> {
407        self.inner.get_input_data_config()
408    }
409    /// <p>The featurization configuration.</p>
410    pub fn featurization_config(mut self, input: crate::types::FeaturizationConfig) -> Self {
411        self.inner = self.inner.featurization_config(input);
412        self
413    }
414    /// <p>The featurization configuration.</p>
415    pub fn set_featurization_config(mut self, input: ::std::option::Option<crate::types::FeaturizationConfig>) -> Self {
416        self.inner = self.inner.set_featurization_config(input);
417        self
418    }
419    /// <p>The featurization configuration.</p>
420    pub fn get_featurization_config(&self) -> &::std::option::Option<crate::types::FeaturizationConfig> {
421        self.inner.get_featurization_config()
422    }
423    /// <p>An Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.</p>
424    pub fn encryption_config(mut self, input: crate::types::EncryptionConfig) -> Self {
425        self.inner = self.inner.encryption_config(input);
426        self
427    }
428    /// <p>An Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.</p>
429    pub fn set_encryption_config(mut self, input: ::std::option::Option<crate::types::EncryptionConfig>) -> Self {
430        self.inner = self.inner.set_encryption_config(input);
431        self
432    }
433    /// <p>An Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.</p>
434    pub fn get_encryption_config(&self) -> &::std::option::Option<crate::types::EncryptionConfig> {
435        self.inner.get_encryption_config()
436    }
437    ///
438    /// Appends an item to `Tags`.
439    ///
440    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
441    ///
442    /// <p>The optional metadata that you apply to the predictor to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
443    /// <p>The following basic restrictions apply to tags:</p>
444    /// <ul>
445    /// <li>
446    /// <p>Maximum number of tags per resource - 50.</p></li>
447    /// <li>
448    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
449    /// <li>
450    /// <p>Maximum key length - 128 Unicode characters in UTF-8.</p></li>
451    /// <li>
452    /// <p>Maximum value length - 256 Unicode characters in UTF-8.</p></li>
453    /// <li>
454    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
455    /// <li>
456    /// <p>Tag keys and values are case sensitive.</p></li>
457    /// <li>
458    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for keys as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, then Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit.</p></li>
459    /// </ul>
460    pub fn tags(mut self, input: crate::types::Tag) -> Self {
461        self.inner = self.inner.tags(input);
462        self
463    }
464    /// <p>The optional metadata that you apply to the predictor to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
465    /// <p>The following basic restrictions apply to tags:</p>
466    /// <ul>
467    /// <li>
468    /// <p>Maximum number of tags per resource - 50.</p></li>
469    /// <li>
470    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
471    /// <li>
472    /// <p>Maximum key length - 128 Unicode characters in UTF-8.</p></li>
473    /// <li>
474    /// <p>Maximum value length - 256 Unicode characters in UTF-8.</p></li>
475    /// <li>
476    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
477    /// <li>
478    /// <p>Tag keys and values are case sensitive.</p></li>
479    /// <li>
480    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for keys as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, then Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit.</p></li>
481    /// </ul>
482    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
483        self.inner = self.inner.set_tags(input);
484        self
485    }
486    /// <p>The optional metadata that you apply to the predictor to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.</p>
487    /// <p>The following basic restrictions apply to tags:</p>
488    /// <ul>
489    /// <li>
490    /// <p>Maximum number of tags per resource - 50.</p></li>
491    /// <li>
492    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
493    /// <li>
494    /// <p>Maximum key length - 128 Unicode characters in UTF-8.</p></li>
495    /// <li>
496    /// <p>Maximum value length - 256 Unicode characters in UTF-8.</p></li>
497    /// <li>
498    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
499    /// <li>
500    /// <p>Tag keys and values are case sensitive.</p></li>
501    /// <li>
502    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for keys as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys with this prefix. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, then Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit.</p></li>
503    /// </ul>
504    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
505        self.inner.get_tags()
506    }
507    /// <p>The accuracy metric used to optimize the predictor.</p>
508    pub fn optimization_metric(mut self, input: crate::types::OptimizationMetric) -> Self {
509        self.inner = self.inner.optimization_metric(input);
510        self
511    }
512    /// <p>The accuracy metric used to optimize the predictor.</p>
513    pub fn set_optimization_metric(mut self, input: ::std::option::Option<crate::types::OptimizationMetric>) -> Self {
514        self.inner = self.inner.set_optimization_metric(input);
515        self
516    }
517    /// <p>The accuracy metric used to optimize the predictor.</p>
518    pub fn get_optimization_metric(&self) -> &::std::option::Option<crate::types::OptimizationMetric> {
519        self.inner.get_optimization_metric()
520    }
521}