aws_sdk_comprehend/operation/create_flywheel/
_create_flywheel_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateFlywheelInput {
6 pub flywheel_name: ::std::option::Option<::std::string::String>,
8 pub active_model_arn: ::std::option::Option<::std::string::String>,
10 pub data_access_role_arn: ::std::option::Option<::std::string::String>,
12 pub task_config: ::std::option::Option<crate::types::TaskConfig>,
14 pub model_type: ::std::option::Option<crate::types::ModelType>,
16 pub data_lake_s3_uri: ::std::option::Option<::std::string::String>,
18 pub data_security_config: ::std::option::Option<crate::types::DataSecurityConfig>,
20 pub client_request_token: ::std::option::Option<::std::string::String>,
22 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
24}
25impl CreateFlywheelInput {
26 pub fn flywheel_name(&self) -> ::std::option::Option<&str> {
28 self.flywheel_name.as_deref()
29 }
30 pub fn active_model_arn(&self) -> ::std::option::Option<&str> {
32 self.active_model_arn.as_deref()
33 }
34 pub fn data_access_role_arn(&self) -> ::std::option::Option<&str> {
36 self.data_access_role_arn.as_deref()
37 }
38 pub fn task_config(&self) -> ::std::option::Option<&crate::types::TaskConfig> {
40 self.task_config.as_ref()
41 }
42 pub fn model_type(&self) -> ::std::option::Option<&crate::types::ModelType> {
44 self.model_type.as_ref()
45 }
46 pub fn data_lake_s3_uri(&self) -> ::std::option::Option<&str> {
48 self.data_lake_s3_uri.as_deref()
49 }
50 pub fn data_security_config(&self) -> ::std::option::Option<&crate::types::DataSecurityConfig> {
52 self.data_security_config.as_ref()
53 }
54 pub fn client_request_token(&self) -> ::std::option::Option<&str> {
56 self.client_request_token.as_deref()
57 }
58 pub fn tags(&self) -> &[crate::types::Tag] {
62 self.tags.as_deref().unwrap_or_default()
63 }
64}
65impl CreateFlywheelInput {
66 pub fn builder() -> crate::operation::create_flywheel::builders::CreateFlywheelInputBuilder {
68 crate::operation::create_flywheel::builders::CreateFlywheelInputBuilder::default()
69 }
70}
71
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct CreateFlywheelInputBuilder {
76 pub(crate) flywheel_name: ::std::option::Option<::std::string::String>,
77 pub(crate) active_model_arn: ::std::option::Option<::std::string::String>,
78 pub(crate) data_access_role_arn: ::std::option::Option<::std::string::String>,
79 pub(crate) task_config: ::std::option::Option<crate::types::TaskConfig>,
80 pub(crate) model_type: ::std::option::Option<crate::types::ModelType>,
81 pub(crate) data_lake_s3_uri: ::std::option::Option<::std::string::String>,
82 pub(crate) data_security_config: ::std::option::Option<crate::types::DataSecurityConfig>,
83 pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
84 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
85}
86impl CreateFlywheelInputBuilder {
87 pub fn flywheel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90 self.flywheel_name = ::std::option::Option::Some(input.into());
91 self
92 }
93 pub fn set_flywheel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95 self.flywheel_name = input;
96 self
97 }
98 pub fn get_flywheel_name(&self) -> &::std::option::Option<::std::string::String> {
100 &self.flywheel_name
101 }
102 pub fn active_model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104 self.active_model_arn = ::std::option::Option::Some(input.into());
105 self
106 }
107 pub fn set_active_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109 self.active_model_arn = input;
110 self
111 }
112 pub fn get_active_model_arn(&self) -> &::std::option::Option<::std::string::String> {
114 &self.active_model_arn
115 }
116 pub fn data_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.data_access_role_arn = ::std::option::Option::Some(input.into());
120 self
121 }
122 pub fn set_data_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.data_access_role_arn = input;
125 self
126 }
127 pub fn get_data_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
129 &self.data_access_role_arn
130 }
131 pub fn task_config(mut self, input: crate::types::TaskConfig) -> Self {
133 self.task_config = ::std::option::Option::Some(input);
134 self
135 }
136 pub fn set_task_config(mut self, input: ::std::option::Option<crate::types::TaskConfig>) -> Self {
138 self.task_config = input;
139 self
140 }
141 pub fn get_task_config(&self) -> &::std::option::Option<crate::types::TaskConfig> {
143 &self.task_config
144 }
145 pub fn model_type(mut self, input: crate::types::ModelType) -> Self {
147 self.model_type = ::std::option::Option::Some(input);
148 self
149 }
150 pub fn set_model_type(mut self, input: ::std::option::Option<crate::types::ModelType>) -> Self {
152 self.model_type = input;
153 self
154 }
155 pub fn get_model_type(&self) -> &::std::option::Option<crate::types::ModelType> {
157 &self.model_type
158 }
159 pub fn data_lake_s3_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.data_lake_s3_uri = ::std::option::Option::Some(input.into());
163 self
164 }
165 pub fn set_data_lake_s3_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167 self.data_lake_s3_uri = input;
168 self
169 }
170 pub fn get_data_lake_s3_uri(&self) -> &::std::option::Option<::std::string::String> {
172 &self.data_lake_s3_uri
173 }
174 pub fn data_security_config(mut self, input: crate::types::DataSecurityConfig) -> Self {
176 self.data_security_config = ::std::option::Option::Some(input);
177 self
178 }
179 pub fn set_data_security_config(mut self, input: ::std::option::Option<crate::types::DataSecurityConfig>) -> Self {
181 self.data_security_config = input;
182 self
183 }
184 pub fn get_data_security_config(&self) -> &::std::option::Option<crate::types::DataSecurityConfig> {
186 &self.data_security_config
187 }
188 pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190 self.client_request_token = ::std::option::Option::Some(input.into());
191 self
192 }
193 pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
195 self.client_request_token = input;
196 self
197 }
198 pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
200 &self.client_request_token
201 }
202 pub fn tags(mut self, input: crate::types::Tag) -> Self {
208 let mut v = self.tags.unwrap_or_default();
209 v.push(input);
210 self.tags = ::std::option::Option::Some(v);
211 self
212 }
213 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
215 self.tags = input;
216 self
217 }
218 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
220 &self.tags
221 }
222 pub fn build(
224 self,
225 ) -> ::std::result::Result<crate::operation::create_flywheel::CreateFlywheelInput, ::aws_smithy_types::error::operation::BuildError> {
226 ::std::result::Result::Ok(crate::operation::create_flywheel::CreateFlywheelInput {
227 flywheel_name: self.flywheel_name,
228 active_model_arn: self.active_model_arn,
229 data_access_role_arn: self.data_access_role_arn,
230 task_config: self.task_config,
231 model_type: self.model_type,
232 data_lake_s3_uri: self.data_lake_s3_uri,
233 data_security_config: self.data_security_config,
234 client_request_token: self.client_request_token,
235 tags: self.tags,
236 })
237 }
238}