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>The new configuration details of the solution.</p>
13    pub solution_update_config: ::std::option::Option<crate::types::SolutionUpdateConfig>,
14}
15impl UpdateSolutionInput {
16    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
17    pub fn solution_arn(&self) -> ::std::option::Option<&str> {
18        self.solution_arn.as_deref()
19    }
20    /// <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>
21    /// <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>
22    /// <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>
23    pub fn perform_auto_training(&self) -> ::std::option::Option<bool> {
24        self.perform_auto_training
25    }
26    /// <p>The new configuration details of the solution.</p>
27    pub fn solution_update_config(&self) -> ::std::option::Option<&crate::types::SolutionUpdateConfig> {
28        self.solution_update_config.as_ref()
29    }
30}
31impl UpdateSolutionInput {
32    /// Creates a new builder-style object to manufacture [`UpdateSolutionInput`](crate::operation::update_solution::UpdateSolutionInput).
33    pub fn builder() -> crate::operation::update_solution::builders::UpdateSolutionInputBuilder {
34        crate::operation::update_solution::builders::UpdateSolutionInputBuilder::default()
35    }
36}
37
38/// A builder for [`UpdateSolutionInput`](crate::operation::update_solution::UpdateSolutionInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct UpdateSolutionInputBuilder {
42    pub(crate) solution_arn: ::std::option::Option<::std::string::String>,
43    pub(crate) perform_auto_training: ::std::option::Option<bool>,
44    pub(crate) solution_update_config: ::std::option::Option<crate::types::SolutionUpdateConfig>,
45}
46impl UpdateSolutionInputBuilder {
47    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
48    /// This field is required.
49    pub fn solution_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50        self.solution_arn = ::std::option::Option::Some(input.into());
51        self
52    }
53    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
54    pub fn set_solution_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55        self.solution_arn = input;
56        self
57    }
58    /// <p>The Amazon Resource Name (ARN) of the solution to update.</p>
59    pub fn get_solution_arn(&self) -> &::std::option::Option<::std::string::String> {
60        &self.solution_arn
61    }
62    /// <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>
63    /// <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>
64    /// <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>
65    pub fn perform_auto_training(mut self, input: bool) -> Self {
66        self.perform_auto_training = ::std::option::Option::Some(input);
67        self
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 set_perform_auto_training(mut self, input: ::std::option::Option<bool>) -> Self {
73        self.perform_auto_training = 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 get_perform_auto_training(&self) -> &::std::option::Option<bool> {
80        &self.perform_auto_training
81    }
82    /// <p>The new configuration details of the solution.</p>
83    pub fn solution_update_config(mut self, input: crate::types::SolutionUpdateConfig) -> Self {
84        self.solution_update_config = ::std::option::Option::Some(input);
85        self
86    }
87    /// <p>The new configuration details of the solution.</p>
88    pub fn set_solution_update_config(mut self, input: ::std::option::Option<crate::types::SolutionUpdateConfig>) -> Self {
89        self.solution_update_config = input;
90        self
91    }
92    /// <p>The new configuration details of the solution.</p>
93    pub fn get_solution_update_config(&self) -> &::std::option::Option<crate::types::SolutionUpdateConfig> {
94        &self.solution_update_config
95    }
96    /// Consumes the builder and constructs a [`UpdateSolutionInput`](crate::operation::update_solution::UpdateSolutionInput).
97    pub fn build(
98        self,
99    ) -> ::std::result::Result<crate::operation::update_solution::UpdateSolutionInput, ::aws_smithy_types::error::operation::BuildError> {
100        ::std::result::Result::Ok(crate::operation::update_solution::UpdateSolutionInput {
101            solution_arn: self.solution_arn,
102            perform_auto_training: self.perform_auto_training,
103            solution_update_config: self.solution_update_config,
104        })
105    }
106}