aws_sdk_personalize/types/
_recipe.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides information about a recipe. Each recipe provides an algorithm that Amazon Personalize uses in model training when you use the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolution.html">CreateSolution</a> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Recipe {
7    /// <p>The name of the recipe.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
10    pub recipe_arn: ::std::option::Option<::std::string::String>,
11    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
12    pub algorithm_arn: ::std::option::Option<::std::string::String>,
13    /// <p>The ARN of the FeatureTransformation object.</p>
14    pub feature_transformation_arn: ::std::option::Option<::std::string::String>,
15    /// <p>The status of the recipe.</p>
16    pub status: ::std::option::Option<::std::string::String>,
17    /// <p>The description of the recipe.</p>
18    pub description: ::std::option::Option<::std::string::String>,
19    /// <p>The date and time (in Unix format) that the recipe was created.</p>
20    pub creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21    /// <p>One of the following values:</p>
22    /// <ul>
23    /// <li>
24    /// <p>PERSONALIZED_RANKING</p></li>
25    /// <li>
26    /// <p>RELATED_ITEMS</p></li>
27    /// <li>
28    /// <p>USER_PERSONALIZATION</p></li>
29    /// </ul>
30    pub recipe_type: ::std::option::Option<::std::string::String>,
31    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
32    pub last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
33}
34impl Recipe {
35    /// <p>The name of the recipe.</p>
36    pub fn name(&self) -> ::std::option::Option<&str> {
37        self.name.as_deref()
38    }
39    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
40    pub fn recipe_arn(&self) -> ::std::option::Option<&str> {
41        self.recipe_arn.as_deref()
42    }
43    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
44    pub fn algorithm_arn(&self) -> ::std::option::Option<&str> {
45        self.algorithm_arn.as_deref()
46    }
47    /// <p>The ARN of the FeatureTransformation object.</p>
48    pub fn feature_transformation_arn(&self) -> ::std::option::Option<&str> {
49        self.feature_transformation_arn.as_deref()
50    }
51    /// <p>The status of the recipe.</p>
52    pub fn status(&self) -> ::std::option::Option<&str> {
53        self.status.as_deref()
54    }
55    /// <p>The description of the recipe.</p>
56    pub fn description(&self) -> ::std::option::Option<&str> {
57        self.description.as_deref()
58    }
59    /// <p>The date and time (in Unix format) that the recipe was created.</p>
60    pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61        self.creation_date_time.as_ref()
62    }
63    /// <p>One of the following values:</p>
64    /// <ul>
65    /// <li>
66    /// <p>PERSONALIZED_RANKING</p></li>
67    /// <li>
68    /// <p>RELATED_ITEMS</p></li>
69    /// <li>
70    /// <p>USER_PERSONALIZATION</p></li>
71    /// </ul>
72    pub fn recipe_type(&self) -> ::std::option::Option<&str> {
73        self.recipe_type.as_deref()
74    }
75    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
76    pub fn last_updated_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
77        self.last_updated_date_time.as_ref()
78    }
79}
80impl Recipe {
81    /// Creates a new builder-style object to manufacture [`Recipe`](crate::types::Recipe).
82    pub fn builder() -> crate::types::builders::RecipeBuilder {
83        crate::types::builders::RecipeBuilder::default()
84    }
85}
86
87/// A builder for [`Recipe`](crate::types::Recipe).
88#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
89#[non_exhaustive]
90pub struct RecipeBuilder {
91    pub(crate) name: ::std::option::Option<::std::string::String>,
92    pub(crate) recipe_arn: ::std::option::Option<::std::string::String>,
93    pub(crate) algorithm_arn: ::std::option::Option<::std::string::String>,
94    pub(crate) feature_transformation_arn: ::std::option::Option<::std::string::String>,
95    pub(crate) status: ::std::option::Option<::std::string::String>,
96    pub(crate) description: ::std::option::Option<::std::string::String>,
97    pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
98    pub(crate) recipe_type: ::std::option::Option<::std::string::String>,
99    pub(crate) last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
100}
101impl RecipeBuilder {
102    /// <p>The name of the recipe.</p>
103    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.name = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The name of the recipe.</p>
108    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.name = input;
110        self
111    }
112    /// <p>The name of the recipe.</p>
113    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
114        &self.name
115    }
116    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
117    pub fn recipe_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.recipe_arn = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
122    pub fn set_recipe_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.recipe_arn = input;
124        self
125    }
126    /// <p>The Amazon Resource Name (ARN) of the recipe.</p>
127    pub fn get_recipe_arn(&self) -> &::std::option::Option<::std::string::String> {
128        &self.recipe_arn
129    }
130    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
131    pub fn algorithm_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132        self.algorithm_arn = ::std::option::Option::Some(input.into());
133        self
134    }
135    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
136    pub fn set_algorithm_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137        self.algorithm_arn = input;
138        self
139    }
140    /// <p>The Amazon Resource Name (ARN) of the algorithm that Amazon Personalize uses to train the model.</p>
141    pub fn get_algorithm_arn(&self) -> &::std::option::Option<::std::string::String> {
142        &self.algorithm_arn
143    }
144    /// <p>The ARN of the FeatureTransformation object.</p>
145    pub fn feature_transformation_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146        self.feature_transformation_arn = ::std::option::Option::Some(input.into());
147        self
148    }
149    /// <p>The ARN of the FeatureTransformation object.</p>
150    pub fn set_feature_transformation_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151        self.feature_transformation_arn = input;
152        self
153    }
154    /// <p>The ARN of the FeatureTransformation object.</p>
155    pub fn get_feature_transformation_arn(&self) -> &::std::option::Option<::std::string::String> {
156        &self.feature_transformation_arn
157    }
158    /// <p>The status of the recipe.</p>
159    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
160        self.status = ::std::option::Option::Some(input.into());
161        self
162    }
163    /// <p>The status of the recipe.</p>
164    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165        self.status = input;
166        self
167    }
168    /// <p>The status of the recipe.</p>
169    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
170        &self.status
171    }
172    /// <p>The description of the recipe.</p>
173    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
174        self.description = ::std::option::Option::Some(input.into());
175        self
176    }
177    /// <p>The description of the recipe.</p>
178    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179        self.description = input;
180        self
181    }
182    /// <p>The description of the recipe.</p>
183    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
184        &self.description
185    }
186    /// <p>The date and time (in Unix format) that the recipe was created.</p>
187    pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
188        self.creation_date_time = ::std::option::Option::Some(input);
189        self
190    }
191    /// <p>The date and time (in Unix format) that the recipe was created.</p>
192    pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
193        self.creation_date_time = input;
194        self
195    }
196    /// <p>The date and time (in Unix format) that the recipe was created.</p>
197    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
198        &self.creation_date_time
199    }
200    /// <p>One of the following values:</p>
201    /// <ul>
202    /// <li>
203    /// <p>PERSONALIZED_RANKING</p></li>
204    /// <li>
205    /// <p>RELATED_ITEMS</p></li>
206    /// <li>
207    /// <p>USER_PERSONALIZATION</p></li>
208    /// </ul>
209    pub fn recipe_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
210        self.recipe_type = ::std::option::Option::Some(input.into());
211        self
212    }
213    /// <p>One of the following values:</p>
214    /// <ul>
215    /// <li>
216    /// <p>PERSONALIZED_RANKING</p></li>
217    /// <li>
218    /// <p>RELATED_ITEMS</p></li>
219    /// <li>
220    /// <p>USER_PERSONALIZATION</p></li>
221    /// </ul>
222    pub fn set_recipe_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223        self.recipe_type = input;
224        self
225    }
226    /// <p>One of the following values:</p>
227    /// <ul>
228    /// <li>
229    /// <p>PERSONALIZED_RANKING</p></li>
230    /// <li>
231    /// <p>RELATED_ITEMS</p></li>
232    /// <li>
233    /// <p>USER_PERSONALIZATION</p></li>
234    /// </ul>
235    pub fn get_recipe_type(&self) -> &::std::option::Option<::std::string::String> {
236        &self.recipe_type
237    }
238    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
239    pub fn last_updated_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
240        self.last_updated_date_time = ::std::option::Option::Some(input);
241        self
242    }
243    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
244    pub fn set_last_updated_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
245        self.last_updated_date_time = input;
246        self
247    }
248    /// <p>The date and time (in Unix format) that the recipe was last updated.</p>
249    pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
250        &self.last_updated_date_time
251    }
252    /// Consumes the builder and constructs a [`Recipe`](crate::types::Recipe).
253    pub fn build(self) -> crate::types::Recipe {
254        crate::types::Recipe {
255            name: self.name,
256            recipe_arn: self.recipe_arn,
257            algorithm_arn: self.algorithm_arn,
258            feature_transformation_arn: self.feature_transformation_arn,
259            status: self.status,
260            description: self.description,
261            creation_date_time: self.creation_date_time,
262            recipe_type: self.recipe_type,
263            last_updated_date_time: self.last_updated_date_time,
264        }
265    }
266}