aws_sdk_databrew/operation/describe_recipe/
_describe_recipe_output.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 DescribeRecipeOutput {
6    /// <p>The identifier (user name) of the user who created the recipe.</p>
7    pub created_by: ::std::option::Option<::std::string::String>,
8    /// <p>The date and time that the recipe was created.</p>
9    pub create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
10    /// <p>The identifier (user name) of the user who last modified the recipe.</p>
11    pub last_modified_by: ::std::option::Option<::std::string::String>,
12    /// <p>The date and time that the recipe was last modified.</p>
13    pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
14    /// <p>The name of the project associated with this recipe.</p>
15    pub project_name: ::std::option::Option<::std::string::String>,
16    /// <p>The identifier (user name) of the user who last published the recipe.</p>
17    pub published_by: ::std::option::Option<::std::string::String>,
18    /// <p>The date and time when the recipe was last published.</p>
19    pub published_date: ::std::option::Option<::aws_smithy_types::DateTime>,
20    /// <p>The description of the recipe.</p>
21    pub description: ::std::option::Option<::std::string::String>,
22    /// <p>The name of the recipe.</p>
23    pub name: ::std::string::String,
24    /// <p>One or more steps to be performed by the recipe. Each step consists of an action, and the conditions under which the action should succeed.</p>
25    pub steps: ::std::option::Option<::std::vec::Vec<crate::types::RecipeStep>>,
26    /// <p>Metadata tags associated with this project.</p>
27    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28    /// <p>The ARN of the recipe.</p>
29    pub resource_arn: ::std::option::Option<::std::string::String>,
30    /// <p>The recipe version identifier.</p>
31    pub recipe_version: ::std::option::Option<::std::string::String>,
32    _request_id: Option<String>,
33}
34impl DescribeRecipeOutput {
35    /// <p>The identifier (user name) of the user who created the recipe.</p>
36    pub fn created_by(&self) -> ::std::option::Option<&str> {
37        self.created_by.as_deref()
38    }
39    /// <p>The date and time that the recipe was created.</p>
40    pub fn create_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
41        self.create_date.as_ref()
42    }
43    /// <p>The identifier (user name) of the user who last modified the recipe.</p>
44    pub fn last_modified_by(&self) -> ::std::option::Option<&str> {
45        self.last_modified_by.as_deref()
46    }
47    /// <p>The date and time that the recipe was last modified.</p>
48    pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
49        self.last_modified_date.as_ref()
50    }
51    /// <p>The name of the project associated with this recipe.</p>
52    pub fn project_name(&self) -> ::std::option::Option<&str> {
53        self.project_name.as_deref()
54    }
55    /// <p>The identifier (user name) of the user who last published the recipe.</p>
56    pub fn published_by(&self) -> ::std::option::Option<&str> {
57        self.published_by.as_deref()
58    }
59    /// <p>The date and time when the recipe was last published.</p>
60    pub fn published_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
61        self.published_date.as_ref()
62    }
63    /// <p>The description of the recipe.</p>
64    pub fn description(&self) -> ::std::option::Option<&str> {
65        self.description.as_deref()
66    }
67    /// <p>The name of the recipe.</p>
68    pub fn name(&self) -> &str {
69        use std::ops::Deref;
70        self.name.deref()
71    }
72    /// <p>One or more steps to be performed by the recipe. Each step consists of an action, and the conditions under which the action should succeed.</p>
73    ///
74    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.steps.is_none()`.
75    pub fn steps(&self) -> &[crate::types::RecipeStep] {
76        self.steps.as_deref().unwrap_or_default()
77    }
78    /// <p>Metadata tags associated with this project.</p>
79    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
80        self.tags.as_ref()
81    }
82    /// <p>The ARN of the recipe.</p>
83    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
84        self.resource_arn.as_deref()
85    }
86    /// <p>The recipe version identifier.</p>
87    pub fn recipe_version(&self) -> ::std::option::Option<&str> {
88        self.recipe_version.as_deref()
89    }
90}
91impl ::aws_types::request_id::RequestId for DescribeRecipeOutput {
92    fn request_id(&self) -> Option<&str> {
93        self._request_id.as_deref()
94    }
95}
96impl DescribeRecipeOutput {
97    /// Creates a new builder-style object to manufacture [`DescribeRecipeOutput`](crate::operation::describe_recipe::DescribeRecipeOutput).
98    pub fn builder() -> crate::operation::describe_recipe::builders::DescribeRecipeOutputBuilder {
99        crate::operation::describe_recipe::builders::DescribeRecipeOutputBuilder::default()
100    }
101}
102
103/// A builder for [`DescribeRecipeOutput`](crate::operation::describe_recipe::DescribeRecipeOutput).
104#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
105#[non_exhaustive]
106pub struct DescribeRecipeOutputBuilder {
107    pub(crate) created_by: ::std::option::Option<::std::string::String>,
108    pub(crate) create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
109    pub(crate) last_modified_by: ::std::option::Option<::std::string::String>,
110    pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
111    pub(crate) project_name: ::std::option::Option<::std::string::String>,
112    pub(crate) published_by: ::std::option::Option<::std::string::String>,
113    pub(crate) published_date: ::std::option::Option<::aws_smithy_types::DateTime>,
114    pub(crate) description: ::std::option::Option<::std::string::String>,
115    pub(crate) name: ::std::option::Option<::std::string::String>,
116    pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::RecipeStep>>,
117    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
118    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
119    pub(crate) recipe_version: ::std::option::Option<::std::string::String>,
120    _request_id: Option<String>,
121}
122impl DescribeRecipeOutputBuilder {
123    /// <p>The identifier (user name) of the user who created the recipe.</p>
124    pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125        self.created_by = ::std::option::Option::Some(input.into());
126        self
127    }
128    /// <p>The identifier (user name) of the user who created the recipe.</p>
129    pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130        self.created_by = input;
131        self
132    }
133    /// <p>The identifier (user name) of the user who created the recipe.</p>
134    pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
135        &self.created_by
136    }
137    /// <p>The date and time that the recipe was created.</p>
138    pub fn create_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
139        self.create_date = ::std::option::Option::Some(input);
140        self
141    }
142    /// <p>The date and time that the recipe was created.</p>
143    pub fn set_create_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
144        self.create_date = input;
145        self
146    }
147    /// <p>The date and time that the recipe was created.</p>
148    pub fn get_create_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
149        &self.create_date
150    }
151    /// <p>The identifier (user name) of the user who last modified the recipe.</p>
152    pub fn last_modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153        self.last_modified_by = ::std::option::Option::Some(input.into());
154        self
155    }
156    /// <p>The identifier (user name) of the user who last modified the recipe.</p>
157    pub fn set_last_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158        self.last_modified_by = input;
159        self
160    }
161    /// <p>The identifier (user name) of the user who last modified the recipe.</p>
162    pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
163        &self.last_modified_by
164    }
165    /// <p>The date and time that the recipe was last modified.</p>
166    pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
167        self.last_modified_date = ::std::option::Option::Some(input);
168        self
169    }
170    /// <p>The date and time that the recipe was last modified.</p>
171    pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
172        self.last_modified_date = input;
173        self
174    }
175    /// <p>The date and time that the recipe was last modified.</p>
176    pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
177        &self.last_modified_date
178    }
179    /// <p>The name of the project associated with this recipe.</p>
180    pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
181        self.project_name = ::std::option::Option::Some(input.into());
182        self
183    }
184    /// <p>The name of the project associated with this recipe.</p>
185    pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
186        self.project_name = input;
187        self
188    }
189    /// <p>The name of the project associated with this recipe.</p>
190    pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
191        &self.project_name
192    }
193    /// <p>The identifier (user name) of the user who last published the recipe.</p>
194    pub fn published_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.published_by = ::std::option::Option::Some(input.into());
196        self
197    }
198    /// <p>The identifier (user name) of the user who last published the recipe.</p>
199    pub fn set_published_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.published_by = input;
201        self
202    }
203    /// <p>The identifier (user name) of the user who last published the recipe.</p>
204    pub fn get_published_by(&self) -> &::std::option::Option<::std::string::String> {
205        &self.published_by
206    }
207    /// <p>The date and time when the recipe was last published.</p>
208    pub fn published_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
209        self.published_date = ::std::option::Option::Some(input);
210        self
211    }
212    /// <p>The date and time when the recipe was last published.</p>
213    pub fn set_published_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
214        self.published_date = input;
215        self
216    }
217    /// <p>The date and time when the recipe was last published.</p>
218    pub fn get_published_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
219        &self.published_date
220    }
221    /// <p>The description of the recipe.</p>
222    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.description = ::std::option::Option::Some(input.into());
224        self
225    }
226    /// <p>The description of the recipe.</p>
227    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.description = input;
229        self
230    }
231    /// <p>The description of the recipe.</p>
232    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
233        &self.description
234    }
235    /// <p>The name of the recipe.</p>
236    /// This field is required.
237    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238        self.name = ::std::option::Option::Some(input.into());
239        self
240    }
241    /// <p>The name of the recipe.</p>
242    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243        self.name = input;
244        self
245    }
246    /// <p>The name of the recipe.</p>
247    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
248        &self.name
249    }
250    /// Appends an item to `steps`.
251    ///
252    /// To override the contents of this collection use [`set_steps`](Self::set_steps).
253    ///
254    /// <p>One or more steps to be performed by the recipe. Each step consists of an action, and the conditions under which the action should succeed.</p>
255    pub fn steps(mut self, input: crate::types::RecipeStep) -> Self {
256        let mut v = self.steps.unwrap_or_default();
257        v.push(input);
258        self.steps = ::std::option::Option::Some(v);
259        self
260    }
261    /// <p>One or more steps to be performed by the recipe. Each step consists of an action, and the conditions under which the action should succeed.</p>
262    pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RecipeStep>>) -> Self {
263        self.steps = input;
264        self
265    }
266    /// <p>One or more steps to be performed by the recipe. Each step consists of an action, and the conditions under which the action should succeed.</p>
267    pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RecipeStep>> {
268        &self.steps
269    }
270    /// Adds a key-value pair to `tags`.
271    ///
272    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
273    ///
274    /// <p>Metadata tags associated with this project.</p>
275    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
276        let mut hash_map = self.tags.unwrap_or_default();
277        hash_map.insert(k.into(), v.into());
278        self.tags = ::std::option::Option::Some(hash_map);
279        self
280    }
281    /// <p>Metadata tags associated with this project.</p>
282    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
283        self.tags = input;
284        self
285    }
286    /// <p>Metadata tags associated with this project.</p>
287    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
288        &self.tags
289    }
290    /// <p>The ARN of the recipe.</p>
291    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
292        self.resource_arn = ::std::option::Option::Some(input.into());
293        self
294    }
295    /// <p>The ARN of the recipe.</p>
296    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
297        self.resource_arn = input;
298        self
299    }
300    /// <p>The ARN of the recipe.</p>
301    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
302        &self.resource_arn
303    }
304    /// <p>The recipe version identifier.</p>
305    pub fn recipe_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
306        self.recipe_version = ::std::option::Option::Some(input.into());
307        self
308    }
309    /// <p>The recipe version identifier.</p>
310    pub fn set_recipe_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
311        self.recipe_version = input;
312        self
313    }
314    /// <p>The recipe version identifier.</p>
315    pub fn get_recipe_version(&self) -> &::std::option::Option<::std::string::String> {
316        &self.recipe_version
317    }
318    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
319        self._request_id = Some(request_id.into());
320        self
321    }
322
323    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
324        self._request_id = request_id;
325        self
326    }
327    /// Consumes the builder and constructs a [`DescribeRecipeOutput`](crate::operation::describe_recipe::DescribeRecipeOutput).
328    /// This method will fail if any of the following fields are not set:
329    /// - [`name`](crate::operation::describe_recipe::builders::DescribeRecipeOutputBuilder::name)
330    pub fn build(
331        self,
332    ) -> ::std::result::Result<crate::operation::describe_recipe::DescribeRecipeOutput, ::aws_smithy_types::error::operation::BuildError> {
333        ::std::result::Result::Ok(crate::operation::describe_recipe::DescribeRecipeOutput {
334            created_by: self.created_by,
335            create_date: self.create_date,
336            last_modified_by: self.last_modified_by,
337            last_modified_date: self.last_modified_date,
338            project_name: self.project_name,
339            published_by: self.published_by,
340            published_date: self.published_date,
341            description: self.description,
342            name: self.name.ok_or_else(|| {
343                ::aws_smithy_types::error::operation::BuildError::missing_field(
344                    "name",
345                    "name was not specified but it is required when building DescribeRecipeOutput",
346                )
347            })?,
348            steps: self.steps,
349            tags: self.tags,
350            resource_arn: self.resource_arn,
351            recipe_version: self.recipe_version,
352            _request_id: self._request_id,
353        })
354    }
355}