aws_sdk_deadline/operation/create_queue/
_create_queue_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateQueueInput {
6 pub client_token: ::std::option::Option<::std::string::String>,
8 pub farm_id: ::std::option::Option<::std::string::String>,
10 pub display_name: ::std::option::Option<::std::string::String>,
14 pub description: ::std::option::Option<::std::string::String>,
18 pub default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
20 pub job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
22 pub role_arn: ::std::option::Option<::std::string::String>,
24 pub job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
26 pub required_file_system_location_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
28 pub allowed_storage_profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
30 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
32}
33impl CreateQueueInput {
34 pub fn client_token(&self) -> ::std::option::Option<&str> {
36 self.client_token.as_deref()
37 }
38 pub fn farm_id(&self) -> ::std::option::Option<&str> {
40 self.farm_id.as_deref()
41 }
42 pub fn display_name(&self) -> ::std::option::Option<&str> {
46 self.display_name.as_deref()
47 }
48 pub fn description(&self) -> ::std::option::Option<&str> {
52 self.description.as_deref()
53 }
54 pub fn default_budget_action(&self) -> ::std::option::Option<&crate::types::DefaultQueueBudgetAction> {
56 self.default_budget_action.as_ref()
57 }
58 pub fn job_attachment_settings(&self) -> ::std::option::Option<&crate::types::JobAttachmentSettings> {
60 self.job_attachment_settings.as_ref()
61 }
62 pub fn role_arn(&self) -> ::std::option::Option<&str> {
64 self.role_arn.as_deref()
65 }
66 pub fn job_run_as_user(&self) -> ::std::option::Option<&crate::types::JobRunAsUser> {
68 self.job_run_as_user.as_ref()
69 }
70 pub fn required_file_system_location_names(&self) -> &[::std::string::String] {
74 self.required_file_system_location_names.as_deref().unwrap_or_default()
75 }
76 pub fn allowed_storage_profile_ids(&self) -> &[::std::string::String] {
80 self.allowed_storage_profile_ids.as_deref().unwrap_or_default()
81 }
82 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
84 self.tags.as_ref()
85 }
86}
87impl ::std::fmt::Debug for CreateQueueInput {
88 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
89 let mut formatter = f.debug_struct("CreateQueueInput");
90 formatter.field("client_token", &self.client_token);
91 formatter.field("farm_id", &self.farm_id);
92 formatter.field("display_name", &self.display_name);
93 formatter.field("description", &"*** Sensitive Data Redacted ***");
94 formatter.field("default_budget_action", &self.default_budget_action);
95 formatter.field("job_attachment_settings", &self.job_attachment_settings);
96 formatter.field("role_arn", &self.role_arn);
97 formatter.field("job_run_as_user", &self.job_run_as_user);
98 formatter.field("required_file_system_location_names", &self.required_file_system_location_names);
99 formatter.field("allowed_storage_profile_ids", &self.allowed_storage_profile_ids);
100 formatter.field("tags", &self.tags);
101 formatter.finish()
102 }
103}
104impl CreateQueueInput {
105 pub fn builder() -> crate::operation::create_queue::builders::CreateQueueInputBuilder {
107 crate::operation::create_queue::builders::CreateQueueInputBuilder::default()
108 }
109}
110
111#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
113#[non_exhaustive]
114pub struct CreateQueueInputBuilder {
115 pub(crate) client_token: ::std::option::Option<::std::string::String>,
116 pub(crate) farm_id: ::std::option::Option<::std::string::String>,
117 pub(crate) display_name: ::std::option::Option<::std::string::String>,
118 pub(crate) description: ::std::option::Option<::std::string::String>,
119 pub(crate) default_budget_action: ::std::option::Option<crate::types::DefaultQueueBudgetAction>,
120 pub(crate) job_attachment_settings: ::std::option::Option<crate::types::JobAttachmentSettings>,
121 pub(crate) role_arn: ::std::option::Option<::std::string::String>,
122 pub(crate) job_run_as_user: ::std::option::Option<crate::types::JobRunAsUser>,
123 pub(crate) required_file_system_location_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
124 pub(crate) allowed_storage_profile_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
125 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
126}
127impl CreateQueueInputBuilder {
128 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.client_token = ::std::option::Option::Some(input.into());
131 self
132 }
133 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.client_token = input;
136 self
137 }
138 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
140 &self.client_token
141 }
142 pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.farm_id = ::std::option::Option::Some(input.into());
146 self
147 }
148 pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150 self.farm_id = input;
151 self
152 }
153 pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
155 &self.farm_id
156 }
157 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162 self.display_name = ::std::option::Option::Some(input.into());
163 self
164 }
165 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
169 self.display_name = input;
170 self
171 }
172 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
176 &self.display_name
177 }
178 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182 self.description = ::std::option::Option::Some(input.into());
183 self
184 }
185 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189 self.description = input;
190 self
191 }
192 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
196 &self.description
197 }
198 pub fn default_budget_action(mut self, input: crate::types::DefaultQueueBudgetAction) -> Self {
200 self.default_budget_action = ::std::option::Option::Some(input);
201 self
202 }
203 pub fn set_default_budget_action(mut self, input: ::std::option::Option<crate::types::DefaultQueueBudgetAction>) -> Self {
205 self.default_budget_action = input;
206 self
207 }
208 pub fn get_default_budget_action(&self) -> &::std::option::Option<crate::types::DefaultQueueBudgetAction> {
210 &self.default_budget_action
211 }
212 pub fn job_attachment_settings(mut self, input: crate::types::JobAttachmentSettings) -> Self {
214 self.job_attachment_settings = ::std::option::Option::Some(input);
215 self
216 }
217 pub fn set_job_attachment_settings(mut self, input: ::std::option::Option<crate::types::JobAttachmentSettings>) -> Self {
219 self.job_attachment_settings = input;
220 self
221 }
222 pub fn get_job_attachment_settings(&self) -> &::std::option::Option<crate::types::JobAttachmentSettings> {
224 &self.job_attachment_settings
225 }
226 pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228 self.role_arn = ::std::option::Option::Some(input.into());
229 self
230 }
231 pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233 self.role_arn = input;
234 self
235 }
236 pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
238 &self.role_arn
239 }
240 pub fn job_run_as_user(mut self, input: crate::types::JobRunAsUser) -> Self {
242 self.job_run_as_user = ::std::option::Option::Some(input);
243 self
244 }
245 pub fn set_job_run_as_user(mut self, input: ::std::option::Option<crate::types::JobRunAsUser>) -> Self {
247 self.job_run_as_user = input;
248 self
249 }
250 pub fn get_job_run_as_user(&self) -> &::std::option::Option<crate::types::JobRunAsUser> {
252 &self.job_run_as_user
253 }
254 pub fn required_file_system_location_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
260 let mut v = self.required_file_system_location_names.unwrap_or_default();
261 v.push(input.into());
262 self.required_file_system_location_names = ::std::option::Option::Some(v);
263 self
264 }
265 pub fn set_required_file_system_location_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
267 self.required_file_system_location_names = input;
268 self
269 }
270 pub fn get_required_file_system_location_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
272 &self.required_file_system_location_names
273 }
274 pub fn allowed_storage_profile_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
280 let mut v = self.allowed_storage_profile_ids.unwrap_or_default();
281 v.push(input.into());
282 self.allowed_storage_profile_ids = ::std::option::Option::Some(v);
283 self
284 }
285 pub fn set_allowed_storage_profile_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
287 self.allowed_storage_profile_ids = input;
288 self
289 }
290 pub fn get_allowed_storage_profile_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
292 &self.allowed_storage_profile_ids
293 }
294 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
300 let mut hash_map = self.tags.unwrap_or_default();
301 hash_map.insert(k.into(), v.into());
302 self.tags = ::std::option::Option::Some(hash_map);
303 self
304 }
305 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
307 self.tags = input;
308 self
309 }
310 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
312 &self.tags
313 }
314 pub fn build(self) -> ::std::result::Result<crate::operation::create_queue::CreateQueueInput, ::aws_smithy_types::error::operation::BuildError> {
316 ::std::result::Result::Ok(crate::operation::create_queue::CreateQueueInput {
317 client_token: self.client_token,
318 farm_id: self.farm_id,
319 display_name: self.display_name,
320 description: self.description,
321 default_budget_action: self.default_budget_action,
322 job_attachment_settings: self.job_attachment_settings,
323 role_arn: self.role_arn,
324 job_run_as_user: self.job_run_as_user,
325 required_file_system_location_names: self.required_file_system_location_names,
326 allowed_storage_profile_ids: self.allowed_storage_profile_ids,
327 tags: self.tags,
328 })
329 }
330}
331impl ::std::fmt::Debug for CreateQueueInputBuilder {
332 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
333 let mut formatter = f.debug_struct("CreateQueueInputBuilder");
334 formatter.field("client_token", &self.client_token);
335 formatter.field("farm_id", &self.farm_id);
336 formatter.field("display_name", &self.display_name);
337 formatter.field("description", &"*** Sensitive Data Redacted ***");
338 formatter.field("default_budget_action", &self.default_budget_action);
339 formatter.field("job_attachment_settings", &self.job_attachment_settings);
340 formatter.field("role_arn", &self.role_arn);
341 formatter.field("job_run_as_user", &self.job_run_as_user);
342 formatter.field("required_file_system_location_names", &self.required_file_system_location_names);
343 formatter.field("allowed_storage_profile_ids", &self.allowed_storage_profile_ids);
344 formatter.field("tags", &self.tags);
345 formatter.finish()
346 }
347}