aws_sdk_deadline/operation/update_queue/
_update_queue_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateQueueInput {
6    /// <p>The idempotency token to update in the queue.</p>
7    pub client_token: ::std::option::Option<::std::string::String>,
8    /// <p>The farm ID to update in the queue.</p>
9    pub farm_id: ::std::option::Option<::std::string::String>,
10    /// <p>The queue ID to update.</p>
11    pub queue_id: ::std::option::Option<::std::string::String>,
12    /// <p>The display name of the queue to update.</p><important>
13    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
14    /// </important>
15    pub display_name: ::std::option::Option<::std::string::String>,
16    /// <p>The description of the queue to update.</p><important>
17    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
18    /// </important>
19    pub description: ::std::option::Option<::std::string::String>,
20    /// <p>The default action to take for a queue update if a budget isn't configured.</p>
21    pub default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
22    /// <p>The job attachment settings to update for the queue.</p>
23    pub job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
24    /// <p>The IAM role ARN that's used to run jobs from this queue.</p>
25    pub role_arn: ::std::option::Option<::std::string::String>,
26    /// <p>Update the jobs in the queue to run as a specified POSIX user.</p>
27    pub job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
28    /// <p>The required file system location names to add to the queue.</p>
29    pub required_file_system_location_names_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30    /// <p>The required file system location names to remove from the queue.</p>
31    pub required_file_system_location_names_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
32    /// <p>The storage profile IDs to add.</p>
33    pub allowed_storage_profile_ids_to_add: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
34    /// <p>The storage profile ID to remove.</p>
35    pub allowed_storage_profile_ids_to_remove: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
36}
37impl UpdateQueueInput {
38    /// <p>The idempotency token to update in the queue.</p>
39    pub fn client_token(&self) -> ::std::option::Option<&str> {
40        self.client_token.as_deref()
41    }
42    /// <p>The farm ID to update in the queue.</p>
43    pub fn farm_id(&self) -> ::std::option::Option<&str> {
44        self.farm_id.as_deref()
45    }
46    /// <p>The queue ID to update.</p>
47    pub fn queue_id(&self) -> ::std::option::Option<&str> {
48        self.queue_id.as_deref()
49    }
50    /// <p>The display name of the queue to update.</p><important>
51    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
52    /// </important>
53    pub fn display_name(&self) -> ::std::option::Option<&str> {
54        self.display_name.as_deref()
55    }
56    /// <p>The description of the queue to update.</p><important>
57    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
58    /// </important>
59    pub fn description(&self) -> ::std::option::Option<&str> {
60        self.description.as_deref()
61    }
62    /// <p>The default action to take for a queue update if a budget isn't configured.</p>
63    pub fn default_budget_action(&self) -> ::std::option::Option<&crate::types::DefaultQueueBudgetAction> {
64        self.default_budget_action.as_ref()
65    }
66    /// <p>The job attachment settings to update for the queue.</p>
67    pub fn job_attachment_settings(&self) -> ::std::option::Option<&crate::types::JobAttachmentSettings> {
68        self.job_attachment_settings.as_ref()
69    }
70    /// <p>The IAM role ARN that's used to run jobs from this queue.</p>
71    pub fn role_arn(&self) -> ::std::option::Option<&str> {
72        self.role_arn.as_deref()
73    }
74    /// <p>Update the jobs in the queue to run as a specified POSIX user.</p>
75    pub fn job_run_as_user(&self) -> ::std::option::Option<&crate::types::JobRunAsUser> {
76        self.job_run_as_user.as_ref()
77    }
78    /// <p>The required file system location names to add to the queue.</p>
79    ///
80    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.required_file_system_location_names_to_add.is_none()`.
81    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    /// <p>The required file system location names to remove from the queue.</p>
85    ///
86    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.required_file_system_location_names_to_remove.is_none()`.
87    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    /// <p>The storage profile IDs to add.</p>
91    ///
92    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.allowed_storage_profile_ids_to_add.is_none()`.
93    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    /// <p>The storage profile ID to remove.</p>
97    ///
98    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.allowed_storage_profile_ids_to_remove.is_none()`.
99    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    /// Creates a new builder-style object to manufacture [`UpdateQueueInput`](crate::operation::update_queue::UpdateQueueInput).
130    pub fn builder() -> crate::operation::update_queue::builders::UpdateQueueInputBuilder {
131        crate::operation::update_queue::builders::UpdateQueueInputBuilder::default()
132    }
133}
134
135/// A builder for [`UpdateQueueInput`](crate::operation::update_queue::UpdateQueueInput).
136#[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    /// <p>The idempotency token to update in the queue.</p>
155    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    /// <p>The idempotency token to update in the queue.</p>
160    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161        self.client_token = input;
162        self
163    }
164    /// <p>The idempotency token to update in the queue.</p>
165    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
166        &self.client_token
167    }
168    /// <p>The farm ID to update in the queue.</p>
169    /// This field is required.
170    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    /// <p>The farm ID to update in the queue.</p>
175    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.farm_id = input;
177        self
178    }
179    /// <p>The farm ID to update in the queue.</p>
180    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
181        &self.farm_id
182    }
183    /// <p>The queue ID to update.</p>
184    /// This field is required.
185    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    /// <p>The queue ID to update.</p>
190    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191        self.queue_id = input;
192        self
193    }
194    /// <p>The queue ID to update.</p>
195    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
196        &self.queue_id
197    }
198    /// <p>The display name of the queue to update.</p><important>
199    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
200    /// </important>
201    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    /// <p>The display name of the queue to update.</p><important>
206    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
207    /// </important>
208    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209        self.display_name = input;
210        self
211    }
212    /// <p>The display name of the queue to update.</p><important>
213    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
214    /// </important>
215    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
216        &self.display_name
217    }
218    /// <p>The description of the queue to update.</p><important>
219    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
220    /// </important>
221    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    /// <p>The description of the queue to update.</p><important>
226    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
227    /// </important>
228    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229        self.description = input;
230        self
231    }
232    /// <p>The description of the queue to update.</p><important>
233    /// <p>This field can store any content. Escape or encode this content before displaying it on a webpage or any other system that might interpret the content of this field.</p>
234    /// </important>
235    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
236        &self.description
237    }
238    /// <p>The default action to take for a queue update if a budget isn't configured.</p>
239    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    /// <p>The default action to take for a queue update if a budget isn't configured.</p>
244    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    /// <p>The default action to take for a queue update if a budget isn't configured.</p>
249    pub fn get_default_budget_action(&self) -> &::std::option::Option<crate::types::DefaultQueueBudgetAction> {
250        &self.default_budget_action
251    }
252    /// <p>The job attachment settings to update for the queue.</p>
253    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    /// <p>The job attachment settings to update for the queue.</p>
258    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    /// <p>The job attachment settings to update for the queue.</p>
263    pub fn get_job_attachment_settings(&self) -> &::std::option::Option<crate::types::JobAttachmentSettings> {
264        &self.job_attachment_settings
265    }
266    /// <p>The IAM role ARN that's used to run jobs from this queue.</p>
267    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    /// <p>The IAM role ARN that's used to run jobs from this queue.</p>
272    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
273        self.role_arn = input;
274        self
275    }
276    /// <p>The IAM role ARN that's used to run jobs from this queue.</p>
277    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
278        &self.role_arn
279    }
280    /// <p>Update the jobs in the queue to run as a specified POSIX user.</p>
281    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    /// <p>Update the jobs in the queue to run as a specified POSIX user.</p>
286    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    /// <p>Update the jobs in the queue to run as a specified POSIX user.</p>
291    pub fn get_job_run_as_user(&self) -> &::std::option::Option<crate::types::JobRunAsUser> {
292        &self.job_run_as_user
293    }
294    /// Appends an item to `required_file_system_location_names_to_add`.
295    ///
296    /// To override the contents of this collection use [`set_required_file_system_location_names_to_add`](Self::set_required_file_system_location_names_to_add).
297    ///
298    /// <p>The required file system location names to add to the queue.</p>
299    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    /// <p>The required file system location names to add to the queue.</p>
306    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    /// <p>The required file system location names to add to the queue.</p>
311    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    /// Appends an item to `required_file_system_location_names_to_remove`.
315    ///
316    /// To override the contents of this collection use [`set_required_file_system_location_names_to_remove`](Self::set_required_file_system_location_names_to_remove).
317    ///
318    /// <p>The required file system location names to remove from the queue.</p>
319    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    /// <p>The required file system location names to remove from the queue.</p>
326    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    /// <p>The required file system location names to remove from the queue.</p>
331    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    /// Appends an item to `allowed_storage_profile_ids_to_add`.
335    ///
336    /// To override the contents of this collection use [`set_allowed_storage_profile_ids_to_add`](Self::set_allowed_storage_profile_ids_to_add).
337    ///
338    /// <p>The storage profile IDs to add.</p>
339    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    /// <p>The storage profile IDs to add.</p>
346    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    /// <p>The storage profile IDs to add.</p>
351    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    /// Appends an item to `allowed_storage_profile_ids_to_remove`.
355    ///
356    /// To override the contents of this collection use [`set_allowed_storage_profile_ids_to_remove`](Self::set_allowed_storage_profile_ids_to_remove).
357    ///
358    /// <p>The storage profile ID to remove.</p>
359    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    /// <p>The storage profile ID to remove.</p>
366    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    /// <p>The storage profile ID to remove.</p>
371    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    /// Consumes the builder and constructs a [`UpdateQueueInput`](crate::operation::update_queue::UpdateQueueInput).
375    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}