aws_sdk_personalize/operation/update_solution/
_update_solution_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateSolutionInput {
6    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
7    pub solution_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Whether the solution uses automatic training to create new solution versions (trained models). You can change the training frequency by specifying a <code>schedulingExpression</code> in the <code>AutoTrainingConfig</code> as part of solution configuration.</p>
9    /// <p>If you turn on automatic training, the first automatic training starts within one hour after the solution update completes. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information about automatic training, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/solution-config-auto-training.html">Configuring automatic training</a>.</p>
10    /// <p>After training starts, you can get the solution version's Amazon Resource Name (ARN) with the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html">ListSolutionVersions</a> API operation. To get its status, use the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html">DescribeSolutionVersion</a>.</p>
11    pub perform_auto_training: ::std::option::Option<bool>,
12    /// <p>Whether to perform incremental training updates on your model. When enabled, this allows the model to learn from new data more frequently without requiring full retraining, which enables near real-time personalization. This parameter is supported only for solutions that use the semantic-similarity recipe.</p>
13    pub perform_incremental_update: ::std::option::Option<bool>,
14    /// <p>The new configuration details of the solution.</p>
15    pub solution_update_config: ::std::option::Option<crate::types::SolutionUpdateConfig>,
16}
17impl UpdateSolutionInput {
18    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
19    pub fn solution_arn(&self) -> ::std::option::Option<&str> {
20        self.solution_arn.as_deref()
21    }
22    /// <p>Whether the solution uses automatic training to create new solution versions (trained models). You can change the training frequency by specifying a <code>schedulingExpression</code> in the <code>AutoTrainingConfig</code> as part of solution configuration.</p>
23    /// <p>If you turn on automatic training, the first automatic training starts within one hour after the solution update completes. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information about automatic training, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/solution-config-auto-training.html">Configuring automatic training</a>.</p>
24    /// <p>After training starts, you can get the solution version's Amazon Resource Name (ARN) with the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html">ListSolutionVersions</a> API operation. To get its status, use the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html">DescribeSolutionVersion</a>.</p>
25    pub fn perform_auto_training(&self) -> ::std::option::Option<bool> {
26        self.perform_auto_training
27    }
28    /// <p>Whether to perform incremental training updates on your model. When enabled, this allows the model to learn from new data more frequently without requiring full retraining, which enables near real-time personalization. This parameter is supported only for solutions that use the semantic-similarity recipe.</p>
29    pub fn perform_incremental_update(&self) -> ::std::option::Option<bool> {
30        self.perform_incremental_update
31    }
32    /// <p>The new configuration details of the solution.</p>
33    pub fn solution_update_config(&self) -> ::std::option::Option<&crate::types::SolutionUpdateConfig> {
34        self.solution_update_config.as_ref()
35    }
36}
37impl UpdateSolutionInput {
38    /// Creates a new builder-style object to manufacture [`UpdateSolutionInput`](crate::operation::update_solution::UpdateSolutionInput).
39    pub fn builder() -> crate::operation::update_solution::builders::UpdateSolutionInputBuilder {
40        crate::operation::update_solution::builders::UpdateSolutionInputBuilder::default()
41    }
42}
43
44/// A builder for [`UpdateSolutionInput`](crate::operation::update_solution::UpdateSolutionInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct UpdateSolutionInputBuilder {
48    pub(crate) solution_arn: ::std::option::Option<::std::string::String>,
49    pub(crate) perform_auto_training: ::std::option::Option<bool>,
50    pub(crate) perform_incremental_update: ::std::option::Option<bool>,
51    pub(crate) solution_update_config: ::std::option::Option<crate::types::SolutionUpdateConfig>,
52}
53impl UpdateSolutionInputBuilder {
54    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
55    /// This field is required.
56    pub fn solution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57        self.solution_arn = ::std::option::Option::Some(input.into());
58        self
59    }
60    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
61    pub fn set_solution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62        self.solution_arn = input;
63        self
64    }
65    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
66    pub fn get_solution_arn(&self) -> &::std::option::Option<::std::string::String> {
67        &self.solution_arn
68    }
69    /// <p>Whether the solution uses automatic training to create new solution versions (trained models). You can change the training frequency by specifying a <code>schedulingExpression</code> in the <code>AutoTrainingConfig</code> as part of solution configuration.</p>
70    /// <p>If you turn on automatic training, the first automatic training starts within one hour after the solution update completes. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information about automatic training, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/solution-config-auto-training.html">Configuring automatic training</a>.</p>
71    /// <p>After training starts, you can get the solution version's Amazon Resource Name (ARN) with the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html">ListSolutionVersions</a> API operation. To get its status, use the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html">DescribeSolutionVersion</a>.</p>
72    pub fn perform_auto_training(mut self, input: bool) -> Self {
73        self.perform_auto_training = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>Whether the solution uses automatic training to create new solution versions (trained models). You can change the training frequency by specifying a <code>schedulingExpression</code> in the <code>AutoTrainingConfig</code> as part of solution configuration.</p>
77    /// <p>If you turn on automatic training, the first automatic training starts within one hour after the solution update completes. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information about automatic training, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/solution-config-auto-training.html">Configuring automatic training</a>.</p>
78    /// <p>After training starts, you can get the solution version's Amazon Resource Name (ARN) with the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html">ListSolutionVersions</a> API operation. To get its status, use the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html">DescribeSolutionVersion</a>.</p>
79    pub fn set_perform_auto_training(mut self, input: ::std::option::Option<bool>) -> Self {
80        self.perform_auto_training = input;
81        self
82    }
83    /// <p>Whether the solution uses automatic training to create new solution versions (trained models). You can change the training frequency by specifying a <code>schedulingExpression</code> in the <code>AutoTrainingConfig</code> as part of solution configuration.</p>
84    /// <p>If you turn on automatic training, the first automatic training starts within one hour after the solution update completes. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information about automatic training, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/solution-config-auto-training.html">Configuring automatic training</a>.</p>
85    /// <p>After training starts, you can get the solution version's Amazon Resource Name (ARN) with the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html">ListSolutionVersions</a> API operation. To get its status, use the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html">DescribeSolutionVersion</a>.</p>
86    pub fn get_perform_auto_training(&self) -> &::std::option::Option<bool> {
87        &self.perform_auto_training
88    }
89    /// <p>Whether to perform incremental training updates on your model. When enabled, this allows the model to learn from new data more frequently without requiring full retraining, which enables near real-time personalization. This parameter is supported only for solutions that use the semantic-similarity recipe.</p>
90    pub fn perform_incremental_update(mut self, input: bool) -> Self {
91        self.perform_incremental_update = ::std::option::Option::Some(input);
92        self
93    }
94    /// <p>Whether to perform incremental training updates on your model. When enabled, this allows the model to learn from new data more frequently without requiring full retraining, which enables near real-time personalization. This parameter is supported only for solutions that use the semantic-similarity recipe.</p>
95    pub fn set_perform_incremental_update(mut self, input: ::std::option::Option<bool>) -> Self {
96        self.perform_incremental_update = input;
97        self
98    }
99    /// <p>Whether to perform incremental training updates on your model. When enabled, this allows the model to learn from new data more frequently without requiring full retraining, which enables near real-time personalization. This parameter is supported only for solutions that use the semantic-similarity recipe.</p>
100    pub fn get_perform_incremental_update(&self) -> &::std::option::Option<bool> {
101        &self.perform_incremental_update
102    }
103    /// <p>The new configuration details of the solution.</p>
104    pub fn solution_update_config(mut self, input: crate::types::SolutionUpdateConfig) -> Self {
105        self.solution_update_config = ::std::option::Option::Some(input);
106        self
107    }
108    /// <p>The new configuration details of the solution.</p>
109    pub fn set_solution_update_config(mut self, input: ::std::option::Option<crate::types::SolutionUpdateConfig>) -> Self {
110        self.solution_update_config = input;
111        self
112    }
113    /// <p>The new configuration details of the solution.</p>
114    pub fn get_solution_update_config(&self) -> &::std::option::Option<crate::types::SolutionUpdateConfig> {
115        &self.solution_update_config
116    }
117    /// Consumes the builder and constructs a [`UpdateSolutionInput`](crate::operation::update_solution::UpdateSolutionInput).
118    pub fn build(
119        self,
120    ) -> ::std::result::Result<crate::operation::update_solution::UpdateSolutionInput, ::aws_smithy_types::error::operation::BuildError> {
121        ::std::result::Result::Ok(crate::operation::update_solution::UpdateSolutionInput {
122            solution_arn: self.solution_arn,
123            perform_auto_training: self.perform_auto_training,
124            perform_incremental_update: self.perform_incremental_update,
125            solution_update_config: self.solution_update_config,
126        })
127    }
128}