aws_sdk_deadline/operation/update_queue/
_update_queue_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateQueueInput {
6 pub client_token: ::std::option::Option<::std::string::String>,
8 pub farm_id: ::std::option::Option<::std::string::String>,
10 pub queue_id: ::std::option::Option<::std::string::String>,
12 pub display_name: ::std::option::Option<::std::string::String>,
16 pub description: ::std::option::Option<::std::string::String>,
20 pub default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
22 pub job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
24 pub role_arn: ::std::option::Option<::std::string::String>,
26 pub job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
28 pub required_file_system_location_names_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30 pub required_file_system_location_names_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
32 pub allowed_storage_profile_ids_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
34 pub allowed_storage_profile_ids_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
36}
37impl UpdateQueueInput {
38 pub fn client_token(&self) -> ::std::option::Option<&str> {
40 self.client_token.as_deref()
41 }
42 pub fn farm_id(&self) -> ::std::option::Option<&str> {
44 self.farm_id.as_deref()
45 }
46 pub fn queue_id(&self) -> ::std::option::Option<&str> {
48 self.queue_id.as_deref()
49 }
50 pub fn display_name(&self) -> ::std::option::Option<&str> {
54 self.display_name.as_deref()
55 }
56 pub fn description(&self) -> ::std::option::Option<&str> {
60 self.description.as_deref()
61 }
62 pub fn default_budget_action(&self) -> ::std::option::Option<&crate::types::DefaultQueueBudgetAction> {
64 self.default_budget_action.as_ref()
65 }
66 pub fn job_attachment_settings(&self) -> ::std::option::Option<&crate::types::JobAttachmentSettings> {
68 self.job_attachment_settings.as_ref()
69 }
70 pub fn role_arn(&self) -> ::std::option::Option<&str> {
72 self.role_arn.as_deref()
73 }
74 pub fn job_run_as_user(&self) -> ::std::option::Option<&crate::types::JobRunAsUser> {
76 self.job_run_as_user.as_ref()
77 }
78 pub fn required_file_system_location_names_to_add(&self) -> &[::std::string::String] {
82 self.required_file_system_location_names_to_add.as_deref().unwrap_or_default()
83 }
84 pub fn required_file_system_location_names_to_remove(&self) -> &[::std::string::String] {
88 self.required_file_system_location_names_to_remove.as_deref().unwrap_or_default()
89 }
90 pub fn allowed_storage_profile_ids_to_add(&self) -> &[::std::string::String] {
94 self.allowed_storage_profile_ids_to_add.as_deref().unwrap_or_default()
95 }
96 pub fn allowed_storage_profile_ids_to_remove(&self) -> &[::std::string::String] {
100 self.allowed_storage_profile_ids_to_remove.as_deref().unwrap_or_default()
101 }
102}
103impl ::std::fmt::Debug for UpdateQueueInput {
104 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
105 let mut formatter = f.debug_struct("UpdateQueueInput");
106 formatter.field("client_token", &self.client_token);
107 formatter.field("farm_id", &self.farm_id);
108 formatter.field("queue_id", &self.queue_id);
109 formatter.field("display_name", &self.display_name);
110 formatter.field("description", &"*** Sensitive Data Redacted ***");
111 formatter.field("default_budget_action", &self.default_budget_action);
112 formatter.field("job_attachment_settings", &self.job_attachment_settings);
113 formatter.field("role_arn", &self.role_arn);
114 formatter.field("job_run_as_user", &self.job_run_as_user);
115 formatter.field(
116 "required_file_system_location_names_to_add",
117 &self.required_file_system_location_names_to_add,
118 );
119 formatter.field(
120 "required_file_system_location_names_to_remove",
121 &self.required_file_system_location_names_to_remove,
122 );
123 formatter.field("allowed_storage_profile_ids_to_add", &self.allowed_storage_profile_ids_to_add);
124 formatter.field("allowed_storage_profile_ids_to_remove", &self.allowed_storage_profile_ids_to_remove);
125 formatter.finish()
126 }
127}
128impl UpdateQueueInput {
129 pub fn builder() -> crate::operation::update_queue::builders::UpdateQueueInputBuilder {
131 crate::operation::update_queue::builders::UpdateQueueInputBuilder::default()
132 }
133}
134
135#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
137#[non_exhaustive]
138pub struct UpdateQueueInputBuilder {
139 pub(crate) client_token: ::std::option::Option<::std::string::String>,
140 pub(crate) farm_id: ::std::option::Option<::std::string::String>,
141 pub(crate) queue_id: ::std::option::Option<::std::string::String>,
142 pub(crate) display_name: ::std::option::Option<::std::string::String>,
143 pub(crate) description: ::std::option::Option<::std::string::String>,
144 pub(crate) default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
145 pub(crate) job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
146 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
147 pub(crate) job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
148 pub(crate) required_file_system_location_names_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
149 pub(crate) required_file_system_location_names_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
150 pub(crate) allowed_storage_profile_ids_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
151 pub(crate) allowed_storage_profile_ids_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
152}
153impl UpdateQueueInputBuilder {
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 farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171 self.farm_id = ::std::option::Option::Some(input.into());
172 self
173 }
174 pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176 self.farm_id = input;
177 self
178 }
179 pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
181 &self.farm_id
182 }
183 pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186 self.queue_id = ::std::option::Option::Some(input.into());
187 self
188 }
189 pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191 self.queue_id = input;
192 self
193 }
194 pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
196 &self.queue_id
197 }
198 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
202 self.display_name = ::std::option::Option::Some(input.into());
203 self
204 }
205 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.display_name = input;
210 self
211 }
212 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
216 &self.display_name
217 }
218 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222 self.description = ::std::option::Option::Some(input.into());
223 self
224 }
225 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229 self.description = input;
230 self
231 }
232 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
236 &self.description
237 }
238 pub fn default_budget_action(mut self, input: crate::types::DefaultQueueBudgetAction) -> Self {
240 self.default_budget_action = ::std::option::Option::Some(input);
241 self
242 }
243 pub fn set_default_budget_action(mut self, input: ::std::option::Option<crate::types::DefaultQueueBudgetAction>) -> Self {
245 self.default_budget_action = input;
246 self
247 }
248 pub fn get_default_budget_action(&self) -> &::std::option::Option<crate::types::DefaultQueueBudgetAction> {
250 &self.default_budget_action
251 }
252 pub fn job_attachment_settings(mut self, input: crate::types::JobAttachmentSettings) -> Self {
254 self.job_attachment_settings = ::std::option::Option::Some(input);
255 self
256 }
257 pub fn set_job_attachment_settings(mut self, input: ::std::option::Option<crate::types::JobAttachmentSettings>) -> Self {
259 self.job_attachment_settings = input;
260 self
261 }
262 pub fn get_job_attachment_settings(&self) -> &::std::option::Option<crate::types::JobAttachmentSettings> {
264 &self.job_attachment_settings
265 }
266 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
268 self.role_arn = ::std::option::Option::Some(input.into());
269 self
270 }
271 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273 self.role_arn = input;
274 self
275 }
276 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
278 &self.role_arn
279 }
280 pub fn job_run_as_user(mut self, input: crate::types::JobRunAsUser) -> Self {
282 self.job_run_as_user = ::std::option::Option::Some(input);
283 self
284 }
285 pub fn set_job_run_as_user(mut self, input: ::std::option::Option<crate::types::JobRunAsUser>) -> Self {
287 self.job_run_as_user = input;
288 self
289 }
290 pub fn get_job_run_as_user(&self) -> &::std::option::Option<crate::types::JobRunAsUser> {
292 &self.job_run_as_user
293 }
294 pub fn required_file_system_location_names_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
300 let mut v = self.required_file_system_location_names_to_add.unwrap_or_default();
301 v.push(input.into());
302 self.required_file_system_location_names_to_add = ::std::option::Option::Some(v);
303 self
304 }
305 pub fn set_required_file_system_location_names_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
307 self.required_file_system_location_names_to_add = input;
308 self
309 }
310 pub fn get_required_file_system_location_names_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
312 &self.required_file_system_location_names_to_add
313 }
314 pub fn required_file_system_location_names_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
320 let mut v = self.required_file_system_location_names_to_remove.unwrap_or_default();
321 v.push(input.into());
322 self.required_file_system_location_names_to_remove = ::std::option::Option::Some(v);
323 self
324 }
325 pub fn set_required_file_system_location_names_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
327 self.required_file_system_location_names_to_remove = input;
328 self
329 }
330 pub fn get_required_file_system_location_names_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
332 &self.required_file_system_location_names_to_remove
333 }
334 pub fn allowed_storage_profile_ids_to_add(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
340 let mut v = self.allowed_storage_profile_ids_to_add.unwrap_or_default();
341 v.push(input.into());
342 self.allowed_storage_profile_ids_to_add = ::std::option::Option::Some(v);
343 self
344 }
345 pub fn set_allowed_storage_profile_ids_to_add(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
347 self.allowed_storage_profile_ids_to_add = input;
348 self
349 }
350 pub fn get_allowed_storage_profile_ids_to_add(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
352 &self.allowed_storage_profile_ids_to_add
353 }
354 pub fn allowed_storage_profile_ids_to_remove(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
360 let mut v = self.allowed_storage_profile_ids_to_remove.unwrap_or_default();
361 v.push(input.into());
362 self.allowed_storage_profile_ids_to_remove = ::std::option::Option::Some(v);
363 self
364 }
365 pub fn set_allowed_storage_profile_ids_to_remove(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
367 self.allowed_storage_profile_ids_to_remove = input;
368 self
369 }
370 pub fn get_allowed_storage_profile_ids_to_remove(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
372 &self.allowed_storage_profile_ids_to_remove
373 }
374 pub fn build(self) -> ::std::result::Result<crate::operation::update_queue::UpdateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
376 ::std::result::Result::Ok(crate::operation::update_queue::UpdateQueueInput {
377 client_token: self.client_token,
378 farm_id: self.farm_id,
379 queue_id: self.queue_id,
380 display_name: self.display_name,
381 description: self.description,
382 default_budget_action: self.default_budget_action,
383 job_attachment_settings: self.job_attachment_settings,
384 role_arn: self.role_arn,
385 job_run_as_user: self.job_run_as_user,
386 required_file_system_location_names_to_add: self.required_file_system_location_names_to_add,
387 required_file_system_location_names_to_remove: self.required_file_system_location_names_to_remove,
388 allowed_storage_profile_ids_to_add: self.allowed_storage_profile_ids_to_add,
389 allowed_storage_profile_ids_to_remove: self.allowed_storage_profile_ids_to_remove,
390 })
391 }
392}
393impl ::std::fmt::Debug for UpdateQueueInputBuilder {
394 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
395 let mut formatter = f.debug_struct("UpdateQueueInputBuilder");
396 formatter.field("client_token", &self.client_token);
397 formatter.field("farm_id", &self.farm_id);
398 formatter.field("queue_id", &self.queue_id);
399 formatter.field("display_name", &self.display_name);
400 formatter.field("description", &"*** Sensitive Data Redacted ***");
401 formatter.field("default_budget_action", &self.default_budget_action);
402 formatter.field("job_attachment_settings", &self.job_attachment_settings);
403 formatter.field("role_arn", &self.role_arn);
404 formatter.field("job_run_as_user", &self.job_run_as_user);
405 formatter.field(
406 "required_file_system_location_names_to_add",
407 &self.required_file_system_location_names_to_add,
408 );
409 formatter.field(
410 "required_file_system_location_names_to_remove",
411 &self.required_file_system_location_names_to_remove,
412 );
413 formatter.field("allowed_storage_profile_ids_to_add", &self.allowed_storage_profile_ids_to_add);
414 formatter.field("allowed_storage_profile_ids_to_remove", &self.allowed_storage_profile_ids_to_remove);
415 formatter.finish()
416 }
417}