aws_sdk_personalize/types/
_recipe.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Recipe {
7 pub name: ::std::option::Option<::std::string::String>,
9 pub recipe_arn: ::std::option::Option<::std::string::String>,
11 pub algorithm_arn: ::std::option::Option<::std::string::String>,
13 pub feature_transformation_arn: ::std::option::Option<::std::string::String>,
15 pub status: ::std::option::Option<::std::string::String>,
17 pub description: ::std::option::Option<::std::string::String>,
19 pub creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21 pub recipe_type: ::std::option::Option<::std::string::String>,
31 pub last_updated_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
33}
34impl Recipe {
35 pub fn name(&self) -> ::std::option::Option<&str> {
37 self.name.as_deref()
38 }
39 pub fn recipe_arn(&self) -> ::std::option::Option<&str> {
41 self.recipe_arn.as_deref()
42 }
43 pub fn algorithm_arn(&self) -> ::std::option::Option<&str> {
45 self.algorithm_arn.as_deref()
46 }
47 pub fn feature_transformation_arn(&self) -> ::std::option::Option<&str> {
49 self.feature_transformation_arn.as_deref()
50 }
51 pub fn status(&self) -> ::std::option::Option<&str> {
53 self.status.as_deref()
54 }
55 pub fn description(&self) -> ::std::option::Option<&str> {
57 self.description.as_deref()
58 }
59 pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61 self.creation_date_time.as_ref()
62 }
63 pub fn recipe_type(&self) -> ::std::option::Option<&str> {
73 self.recipe_type.as_deref()
74 }
75 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 pub fn builder() -> crate::types::builders::RecipeBuilder {
83 crate::types::builders::RecipeBuilder::default()
84 }
85}
86
87#[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 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109 self.name = input;
110 self
111 }
112 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
114 &self.name
115 }
116 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 pub fn set_recipe_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.recipe_arn = input;
124 self
125 }
126 pub fn get_recipe_arn(&self) -> &::std::option::Option<::std::string::String> {
128 &self.recipe_arn
129 }
130 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 pub fn set_algorithm_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.algorithm_arn = input;
138 self
139 }
140 pub fn get_algorithm_arn(&self) -> &::std::option::Option<::std::string::String> {
142 &self.algorithm_arn
143 }
144 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 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 pub fn get_feature_transformation_arn(&self) -> &::std::option::Option<::std::string::String> {
156 &self.feature_transformation_arn
157 }
158 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 pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
165 self.status = input;
166 self
167 }
168 pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
170 &self.status
171 }
172 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 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
179 self.description = input;
180 self
181 }
182 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
184 &self.description
185 }
186 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 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 pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
198 &self.creation_date_time
199 }
200 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 pub fn set_recipe_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
223 self.recipe_type = input;
224 self
225 }
226 pub fn get_recipe_type(&self) -> &::std::option::Option<::std::string::String> {
236 &self.recipe_type
237 }
238 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 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 pub fn get_last_updated_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
250 &self.last_updated_date_time
251 }
252 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}