aws_sdk_deadline/operation/create_queue/
_create_queue_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct CreateQueueInput {
7 pub farm_id: ::std::option::Option<::std::string::String>,
9 pub client_token: ::std::option::Option<::std::string::String>,
11 pub display_name: ::std::option::Option<::std::string::String>,
15 pub description: ::std::option::Option<::std::string::String>,
19 pub default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
21 pub job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
23 pub role_arn: ::std::option::Option<::std::string::String>,
25 pub job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
27 pub required_file_system_location_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
29 pub allowed_storage_profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
31 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
33 pub scheduling_configuration: ::std::option::Option<crate::types::SchedulingConfiguration>,
36}
37impl CreateQueueInput {
38 pub fn farm_id(&self) -> ::std::option::Option<&str> {
40 self.farm_id.as_deref()
41 }
42 pub fn client_token(&self) -> ::std::option::Option<&str> {
44 self.client_token.as_deref()
45 }
46 pub fn display_name(&self) -> ::std::option::Option<&str> {
50 self.display_name.as_deref()
51 }
52 pub fn description(&self) -> ::std::option::Option<&str> {
56 self.description.as_deref()
57 }
58 pub fn default_budget_action(&self) -> ::std::option::Option<&crate::types::DefaultQueueBudgetAction> {
60 self.default_budget_action.as_ref()
61 }
62 pub fn job_attachment_settings(&self) -> ::std::option::Option<&crate::types::JobAttachmentSettings> {
64 self.job_attachment_settings.as_ref()
65 }
66 pub fn role_arn(&self) -> ::std::option::Option<&str> {
68 self.role_arn.as_deref()
69 }
70 pub fn job_run_as_user(&self) -> ::std::option::Option<&crate::types::JobRunAsUser> {
72 self.job_run_as_user.as_ref()
73 }
74 pub fn required_file_system_location_names(&self) -> &[::std::string::String] {
78 self.required_file_system_location_names.as_deref().unwrap_or_default()
79 }
80 pub fn allowed_storage_profile_ids(&self) -> &[::std::string::String] {
84 self.allowed_storage_profile_ids.as_deref().unwrap_or_default()
85 }
86 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
88 self.tags.as_ref()
89 }
90 pub fn scheduling_configuration(&self) -> ::std::option::Option<&crate::types::SchedulingConfiguration> {
93 self.scheduling_configuration.as_ref()
94 }
95}
96impl ::std::fmt::Debug for CreateQueueInput {
97 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
98 let mut formatter = f.debug_struct("CreateQueueInput");
99 formatter.field("farm_id", &self.farm_id);
100 formatter.field("client_token", &self.client_token);
101 formatter.field("display_name", &self.display_name);
102 formatter.field("description", &"*** Sensitive Data Redacted ***");
103 formatter.field("default_budget_action", &self.default_budget_action);
104 formatter.field("job_attachment_settings", &self.job_attachment_settings);
105 formatter.field("role_arn", &self.role_arn);
106 formatter.field("job_run_as_user", &self.job_run_as_user);
107 formatter.field("required_file_system_location_names", &self.required_file_system_location_names);
108 formatter.field("allowed_storage_profile_ids", &self.allowed_storage_profile_ids);
109 formatter.field("tags", &self.tags);
110 formatter.field("scheduling_configuration", &self.scheduling_configuration);
111 formatter.finish()
112 }
113}
114impl CreateQueueInput {
115 pub fn builder() -> crate::operation::create_queue::builders::CreateQueueInputBuilder {
117 crate::operation::create_queue::builders::CreateQueueInputBuilder::default()
118 }
119}
120
121#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
123#[non_exhaustive]
124pub struct CreateQueueInputBuilder {
125 pub(crate) farm_id: ::std::option::Option<::std::string::String>,
126 pub(crate) client_token: ::std::option::Option<::std::string::String>,
127 pub(crate) display_name: ::std::option::Option<::std::string::String>,
128 pub(crate) description: ::std::option::Option<::std::string::String>,
129 pub(crate) default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
130 pub(crate) job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
131 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
132 pub(crate) job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
133 pub(crate) required_file_system_location_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
134 pub(crate) allowed_storage_profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
135 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
136 pub(crate) scheduling_configuration: ::std::option::Option<crate::types::SchedulingConfiguration>,
137}
138impl CreateQueueInputBuilder {
139 pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142 self.farm_id = ::std::option::Option::Some(input.into());
143 self
144 }
145 pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147 self.farm_id = input;
148 self
149 }
150 pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
152 &self.farm_id
153 }
154 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.client_token = ::std::option::Option::Some(input.into());
157 self
158 }
159 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161 self.client_token = input;
162 self
163 }
164 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
166 &self.client_token
167 }
168 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173 self.display_name = ::std::option::Option::Some(input.into());
174 self
175 }
176 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180 self.display_name = input;
181 self
182 }
183 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
187 &self.display_name
188 }
189 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.description = ::std::option::Option::Some(input.into());
194 self
195 }
196 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200 self.description = input;
201 self
202 }
203 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
207 &self.description
208 }
209 pub fn default_budget_action(mut self, input: crate::types::DefaultQueueBudgetAction) -> Self {
211 self.default_budget_action = ::std::option::Option::Some(input);
212 self
213 }
214 pub fn set_default_budget_action(mut self, input: ::std::option::Option<crate::types::DefaultQueueBudgetAction>) -> Self {
216 self.default_budget_action = input;
217 self
218 }
219 pub fn get_default_budget_action(&self) -> &::std::option::Option<crate::types::DefaultQueueBudgetAction> {
221 &self.default_budget_action
222 }
223 pub fn job_attachment_settings(mut self, input: crate::types::JobAttachmentSettings) -> Self {
225 self.job_attachment_settings = ::std::option::Option::Some(input);
226 self
227 }
228 pub fn set_job_attachment_settings(mut self, input: ::std::option::Option<crate::types::JobAttachmentSettings>) -> Self {
230 self.job_attachment_settings = input;
231 self
232 }
233 pub fn get_job_attachment_settings(&self) -> &::std::option::Option<crate::types::JobAttachmentSettings> {
235 &self.job_attachment_settings
236 }
237 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239 self.role_arn = ::std::option::Option::Some(input.into());
240 self
241 }
242 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.role_arn = input;
245 self
246 }
247 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
249 &self.role_arn
250 }
251 pub fn job_run_as_user(mut self, input: crate::types::JobRunAsUser) -> Self {
253 self.job_run_as_user = ::std::option::Option::Some(input);
254 self
255 }
256 pub fn set_job_run_as_user(mut self, input: ::std::option::Option<crate::types::JobRunAsUser>) -> Self {
258 self.job_run_as_user = input;
259 self
260 }
261 pub fn get_job_run_as_user(&self) -> &::std::option::Option<crate::types::JobRunAsUser> {
263 &self.job_run_as_user
264 }
265 pub fn required_file_system_location_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271 let mut v = self.required_file_system_location_names.unwrap_or_default();
272 v.push(input.into());
273 self.required_file_system_location_names = ::std::option::Option::Some(v);
274 self
275 }
276 pub fn set_required_file_system_location_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
278 self.required_file_system_location_names = input;
279 self
280 }
281 pub fn get_required_file_system_location_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
283 &self.required_file_system_location_names
284 }
285 pub fn allowed_storage_profile_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291 let mut v = self.allowed_storage_profile_ids.unwrap_or_default();
292 v.push(input.into());
293 self.allowed_storage_profile_ids = ::std::option::Option::Some(v);
294 self
295 }
296 pub fn set_allowed_storage_profile_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
298 self.allowed_storage_profile_ids = input;
299 self
300 }
301 pub fn get_allowed_storage_profile_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
303 &self.allowed_storage_profile_ids
304 }
305 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
311 let mut hash_map = self.tags.unwrap_or_default();
312 hash_map.insert(k.into(), v.into());
313 self.tags = ::std::option::Option::Some(hash_map);
314 self
315 }
316 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
318 self.tags = input;
319 self
320 }
321 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
323 &self.tags
324 }
325 pub fn scheduling_configuration(mut self, input: crate::types::SchedulingConfiguration) -> Self {
328 self.scheduling_configuration = ::std::option::Option::Some(input);
329 self
330 }
331 pub fn set_scheduling_configuration(mut self, input: ::std::option::Option<crate::types::SchedulingConfiguration>) -> Self {
334 self.scheduling_configuration = input;
335 self
336 }
337 pub fn get_scheduling_configuration(&self) -> &::std::option::Option<crate::types::SchedulingConfiguration> {
340 &self.scheduling_configuration
341 }
342 pub fn build(self) -> ::std::result::Result<crate::operation::create_queue::CreateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
344 ::std::result::Result::Ok(crate::operation::create_queue::CreateQueueInput {
345 farm_id: self.farm_id,
346 client_token: self.client_token,
347 display_name: self.display_name,
348 description: self.description,
349 default_budget_action: self.default_budget_action,
350 job_attachment_settings: self.job_attachment_settings,
351 role_arn: self.role_arn,
352 job_run_as_user: self.job_run_as_user,
353 required_file_system_location_names: self.required_file_system_location_names,
354 allowed_storage_profile_ids: self.allowed_storage_profile_ids,
355 tags: self.tags,
356 scheduling_configuration: self.scheduling_configuration,
357 })
358 }
359}
360impl ::std::fmt::Debug for CreateQueueInputBuilder {
361 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
362 let mut formatter = f.debug_struct("CreateQueueInputBuilder");
363 formatter.field("farm_id", &self.farm_id);
364 formatter.field("client_token", &self.client_token);
365 formatter.field("display_name", &self.display_name);
366 formatter.field("description", &"*** Sensitive Data Redacted ***");
367 formatter.field("default_budget_action", &self.default_budget_action);
368 formatter.field("job_attachment_settings", &self.job_attachment_settings);
369 formatter.field("role_arn", &self.role_arn);
370 formatter.field("job_run_as_user", &self.job_run_as_user);
371 formatter.field("required_file_system_location_names", &self.required_file_system_location_names);
372 formatter.field("allowed_storage_profile_ids", &self.allowed_storage_profile_ids);
373 formatter.field("tags", &self.tags);
374 formatter.field("scheduling_configuration", &self.scheduling_configuration);
375 formatter.finish()
376 }
377}