aws_sdk_databrew/operation/create_project/
_create_project_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateProjectInput {
6 pub dataset_name: ::std::option::Option<::std::string::String>,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub recipe_name: ::std::option::Option<::std::string::String>,
12 pub sample: ::std::option::Option<crate::types::Sample>,
14 pub role_arn: ::std::option::Option<::std::string::String>,
16 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18}
19impl CreateProjectInput {
20 pub fn dataset_name(&self) -> ::std::option::Option<&str> {
22 self.dataset_name.as_deref()
23 }
24 pub fn name(&self) -> ::std::option::Option<&str> {
26 self.name.as_deref()
27 }
28 pub fn recipe_name(&self) -> ::std::option::Option<&str> {
30 self.recipe_name.as_deref()
31 }
32 pub fn sample(&self) -> ::std::option::Option<&crate::types::Sample> {
34 self.sample.as_ref()
35 }
36 pub fn role_arn(&self) -> ::std::option::Option<&str> {
38 self.role_arn.as_deref()
39 }
40 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
42 self.tags.as_ref()
43 }
44}
45impl CreateProjectInput {
46 pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
48 crate::operation::create_project::builders::CreateProjectInputBuilder::default()
49 }
50}
51
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct CreateProjectInputBuilder {
56 pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
57 pub(crate) name: ::std::option::Option<::std::string::String>,
58 pub(crate) recipe_name: ::std::option::Option<::std::string::String>,
59 pub(crate) sample: ::std::option::Option<crate::types::Sample>,
60 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
61 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
62}
63impl CreateProjectInputBuilder {
64 pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.dataset_name = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.dataset_name = input;
73 self
74 }
75 pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
77 &self.dataset_name
78 }
79 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.name = ::std::option::Option::Some(input.into());
83 self
84 }
85 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.name = input;
88 self
89 }
90 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
92 &self.name
93 }
94 pub fn recipe_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.recipe_name = ::std::option::Option::Some(input.into());
98 self
99 }
100 pub fn set_recipe_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.recipe_name = input;
103 self
104 }
105 pub fn get_recipe_name(&self) -> &::std::option::Option<::std::string::String> {
107 &self.recipe_name
108 }
109 pub fn sample(mut self, input: crate::types::Sample) -> Self {
111 self.sample = ::std::option::Option::Some(input);
112 self
113 }
114 pub fn set_sample(mut self, input: ::std::option::Option<crate::types::Sample>) -> Self {
116 self.sample = input;
117 self
118 }
119 pub fn get_sample(&self) -> &::std::option::Option<crate::types::Sample> {
121 &self.sample
122 }
123 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126 self.role_arn = ::std::option::Option::Some(input.into());
127 self
128 }
129 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131 self.role_arn = input;
132 self
133 }
134 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
136 &self.role_arn
137 }
138 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
144 let mut hash_map = self.tags.unwrap_or_default();
145 hash_map.insert(k.into(), v.into());
146 self.tags = ::std::option::Option::Some(hash_map);
147 self
148 }
149 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
151 self.tags = input;
152 self
153 }
154 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
156 &self.tags
157 }
158 pub fn build(
160 self,
161 ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
162 ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
163 dataset_name: self.dataset_name,
164 name: self.name,
165 recipe_name: self.recipe_name,
166 sample: self.sample,
167 role_arn: self.role_arn,
168 tags: self.tags,
169 })
170 }
171}