aws_sdk_databrew/operation/update_recipe/
_update_recipe_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateRecipeInput {
6 pub description: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub steps: ::std::option::Option<::std::vec::Vec<crate::types::RecipeStep>>,
12}
13impl UpdateRecipeInput {
14 pub fn description(&self) -> ::std::option::Option<&str> {
16 self.description.as_deref()
17 }
18 pub fn name(&self) -> ::std::option::Option<&str> {
20 self.name.as_deref()
21 }
22 pub fn steps(&self) -> &[crate::types::RecipeStep] {
26 self.steps.as_deref().unwrap_or_default()
27 }
28}
29impl UpdateRecipeInput {
30 pub fn builder() -> crate::operation::update_recipe::builders::UpdateRecipeInputBuilder {
32 crate::operation::update_recipe::builders::UpdateRecipeInputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct UpdateRecipeInputBuilder {
40 pub(crate) description: ::std::option::Option<::std::string::String>,
41 pub(crate) name: ::std::option::Option<::std::string::String>,
42 pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::RecipeStep>>,
43}
44impl UpdateRecipeInputBuilder {
45 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.description = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.description = input;
53 self
54 }
55 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
57 &self.description
58 }
59 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.name = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.name = input;
68 self
69 }
70 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
72 &self.name
73 }
74 pub fn steps(mut self, input: crate::types::RecipeStep) -> Self {
80 let mut v = self.steps.unwrap_or_default();
81 v.push(input);
82 self.steps = ::std::option::Option::Some(v);
83 self
84 }
85 pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RecipeStep>>) -> Self {
87 self.steps = input;
88 self
89 }
90 pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RecipeStep>> {
92 &self.steps
93 }
94 pub fn build(
96 self,
97 ) -> ::std::result::Result<crate::operation::update_recipe::UpdateRecipeInput, ::aws_smithy_types::error::operation::BuildError> {
98 ::std::result::Result::Ok(crate::operation::update_recipe::UpdateRecipeInput {
99 description: self.description,
100 name: self.name,
101 steps: self.steps,
102 })
103 }
104}