1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents all of the attributes of a DataBrew job.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Job {
/// <p>The ID of the Amazon Web Services account that owns the job.</p>
pub account_id: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the user who created the job.</p>
pub created_by: ::std::option::Option<::std::string::String>,
/// <p>The date and time that the job was created.</p>
pub create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>A dataset that the job is to process.</p>
pub dataset_name: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job output. For more information, see <a href="https://docs.aws.amazon.com/databrew/latest/dg/encryption-security-configuration.html">Encrypting data written by DataBrew jobs</a></p>
pub encryption_key_arn: ::std::option::Option<::std::string::String>,
/// <p>The encryption mode for the job, which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
/// <li>
/// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
/// </ul>
pub encryption_mode: ::std::option::Option<crate::types::EncryptionMode>,
/// <p>The unique name of the job.</p>
pub name: ::std::string::String,
/// <p>The job type of the job, which must be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>PROFILE</code> - A job to analyze a dataset, to determine its size, data types, data distribution, and more.</p></li>
/// <li>
/// <p><code>RECIPE</code> - A job to apply one or more transformations to a dataset.</p></li>
/// </ul>
pub r#type: ::std::option::Option<crate::types::JobType>,
/// <p>The Amazon Resource Name (ARN) of the user who last modified the job.</p>
pub last_modified_by: ::std::option::Option<::std::string::String>,
/// <p>The modification date and time of the job.</p>
pub last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The current status of Amazon CloudWatch logging for the job.</p>
pub log_subscription: ::std::option::Option<crate::types::LogSubscription>,
/// <p>The maximum number of nodes that can be consumed when the job processes data.</p>
pub max_capacity: i32,
/// <p>The maximum number of times to retry the job after a job run fails.</p>
pub max_retries: i32,
/// <p>One or more artifacts that represent output from running the job.</p>
pub outputs: ::std::option::Option<::std::vec::Vec<crate::types::Output>>,
/// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
pub data_catalog_outputs: ::std::option::Option<::std::vec::Vec<crate::types::DataCatalogOutput>>,
/// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
pub database_outputs: ::std::option::Option<::std::vec::Vec<crate::types::DatabaseOutput>>,
/// <p>The name of the project that the job is associated with.</p>
pub project_name: ::std::option::Option<::std::string::String>,
/// <p>A set of steps that the job runs.</p>
pub recipe_reference: ::std::option::Option<crate::types::RecipeReference>,
/// <p>The unique Amazon Resource Name (ARN) for the job.</p>
pub resource_arn: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the role to be assumed for this job.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
/// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
pub timeout: i32,
/// <p>Metadata tags that have been applied to the job.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>A sample configuration for profile jobs only, which determines the number of rows on which the profile job is run. If a <code>JobSample</code> value isn't provided, the default value is used. The default value is CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter.</p>
pub job_sample: ::std::option::Option<crate::types::JobSample>,
/// <p>List of validation configurations that are applied to the profile job.</p>
pub validation_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ValidationConfiguration>>,
}
impl Job {
/// <p>The ID of the Amazon Web Services account that owns the job.</p>
pub fn account_id(&self) -> ::std::option::Option<&str> {
self.account_id.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the user who created the job.</p>
pub fn created_by(&self) -> ::std::option::Option<&str> {
self.created_by.as_deref()
}
/// <p>The date and time that the job was created.</p>
pub fn create_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.create_date.as_ref()
}
/// <p>A dataset that the job is to process.</p>
pub fn dataset_name(&self) -> ::std::option::Option<&str> {
self.dataset_name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job output. For more information, see <a href="https://docs.aws.amazon.com/databrew/latest/dg/encryption-security-configuration.html">Encrypting data written by DataBrew jobs</a></p>
pub fn encryption_key_arn(&self) -> ::std::option::Option<&str> {
self.encryption_key_arn.as_deref()
}
/// <p>The encryption mode for the job, which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
/// <li>
/// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
/// </ul>
pub fn encryption_mode(&self) -> ::std::option::Option<&crate::types::EncryptionMode> {
self.encryption_mode.as_ref()
}
/// <p>The unique name of the job.</p>
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
/// <p>The job type of the job, which must be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>PROFILE</code> - A job to analyze a dataset, to determine its size, data types, data distribution, and more.</p></li>
/// <li>
/// <p><code>RECIPE</code> - A job to apply one or more transformations to a dataset.</p></li>
/// </ul>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::JobType> {
self.r#type.as_ref()
}
/// <p>The Amazon Resource Name (ARN) of the user who last modified the job.</p>
pub fn last_modified_by(&self) -> ::std::option::Option<&str> {
self.last_modified_by.as_deref()
}
/// <p>The modification date and time of the job.</p>
pub fn last_modified_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_modified_date.as_ref()
}
/// <p>The current status of Amazon CloudWatch logging for the job.</p>
pub fn log_subscription(&self) -> ::std::option::Option<&crate::types::LogSubscription> {
self.log_subscription.as_ref()
}
/// <p>The maximum number of nodes that can be consumed when the job processes data.</p>
pub fn max_capacity(&self) -> i32 {
self.max_capacity
}
/// <p>The maximum number of times to retry the job after a job run fails.</p>
pub fn max_retries(&self) -> i32 {
self.max_retries
}
/// <p>One or more artifacts that represent output from running the job.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.outputs.is_none()`.
pub fn outputs(&self) -> &[crate::types::Output] {
self.outputs.as_deref().unwrap_or_default()
}
/// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.data_catalog_outputs.is_none()`.
pub fn data_catalog_outputs(&self) -> &[crate::types::DataCatalogOutput] {
self.data_catalog_outputs.as_deref().unwrap_or_default()
}
/// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.database_outputs.is_none()`.
pub fn database_outputs(&self) -> &[crate::types::DatabaseOutput] {
self.database_outputs.as_deref().unwrap_or_default()
}
/// <p>The name of the project that the job is associated with.</p>
pub fn project_name(&self) -> ::std::option::Option<&str> {
self.project_name.as_deref()
}
/// <p>A set of steps that the job runs.</p>
pub fn recipe_reference(&self) -> ::std::option::Option<&crate::types::RecipeReference> {
self.recipe_reference.as_ref()
}
/// <p>The unique Amazon Resource Name (ARN) for the job.</p>
pub fn resource_arn(&self) -> ::std::option::Option<&str> {
self.resource_arn.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the role to be assumed for this job.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
pub fn timeout(&self) -> i32 {
self.timeout
}
/// <p>Metadata tags that have been applied to the job.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// <p>A sample configuration for profile jobs only, which determines the number of rows on which the profile job is run. If a <code>JobSample</code> value isn't provided, the default value is used. The default value is CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter.</p>
pub fn job_sample(&self) -> ::std::option::Option<&crate::types::JobSample> {
self.job_sample.as_ref()
}
/// <p>List of validation configurations that are applied to the profile job.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.validation_configurations.is_none()`.
pub fn validation_configurations(&self) -> &[crate::types::ValidationConfiguration] {
self.validation_configurations.as_deref().unwrap_or_default()
}
}
impl Job {
/// Creates a new builder-style object to manufacture [`Job`](crate::types::Job).
pub fn builder() -> crate::types::builders::JobBuilder {
crate::types::builders::JobBuilder::default()
}
}
/// A builder for [`Job`](crate::types::Job).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct JobBuilder {
pub(crate) account_id: ::std::option::Option<::std::string::String>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) create_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
pub(crate) encryption_key_arn: ::std::option::Option<::std::string::String>,
pub(crate) encryption_mode: ::std::option::Option<crate::types::EncryptionMode>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::JobType>,
pub(crate) last_modified_by: ::std::option::Option<::std::string::String>,
pub(crate) last_modified_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) log_subscription: ::std::option::Option<crate::types::LogSubscription>,
pub(crate) max_capacity: ::std::option::Option<i32>,
pub(crate) max_retries: ::std::option::Option<i32>,
pub(crate) outputs: ::std::option::Option<::std::vec::Vec<crate::types::Output>>,
pub(crate) data_catalog_outputs: ::std::option::Option<::std::vec::Vec<crate::types::DataCatalogOutput>>,
pub(crate) database_outputs: ::std::option::Option<::std::vec::Vec<crate::types::DatabaseOutput>>,
pub(crate) project_name: ::std::option::Option<::std::string::String>,
pub(crate) recipe_reference: ::std::option::Option<crate::types::RecipeReference>,
pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
pub(crate) timeout: ::std::option::Option<i32>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) job_sample: ::std::option::Option<crate::types::JobSample>,
pub(crate) validation_configurations: ::std::option::Option<::std::vec::Vec<crate::types::ValidationConfiguration>>,
}
impl JobBuilder {
/// <p>The ID of the Amazon Web Services account that owns the job.</p>
pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the Amazon Web Services account that owns the job.</p>
pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_id = input;
self
}
/// <p>The ID of the Amazon Web Services account that owns the job.</p>
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
/// <p>The Amazon Resource Name (ARN) of the user who created the job.</p>
pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the user who created the job.</p>
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the user who created the job.</p>
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
/// <p>The date and time that the job was created.</p>
pub fn create_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.create_date = ::std::option::Option::Some(input);
self
}
/// <p>The date and time that the job was created.</p>
pub fn set_create_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.create_date = input;
self
}
/// <p>The date and time that the job was created.</p>
pub fn get_create_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.create_date
}
/// <p>A dataset that the job is to process.</p>
pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dataset_name = ::std::option::Option::Some(input.into());
self
}
/// <p>A dataset that the job is to process.</p>
pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dataset_name = input;
self
}
/// <p>A dataset that the job is to process.</p>
pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
&self.dataset_name
}
/// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job output. For more information, see <a href="https://docs.aws.amazon.com/databrew/latest/dg/encryption-security-configuration.html">Encrypting data written by DataBrew jobs</a></p>
pub fn encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.encryption_key_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job output. For more information, see <a href="https://docs.aws.amazon.com/databrew/latest/dg/encryption-security-configuration.html">Encrypting data written by DataBrew jobs</a></p>
pub fn set_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.encryption_key_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of an encryption key that is used to protect the job output. For more information, see <a href="https://docs.aws.amazon.com/databrew/latest/dg/encryption-security-configuration.html">Encrypting data written by DataBrew jobs</a></p>
pub fn get_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.encryption_key_arn
}
/// <p>The encryption mode for the job, which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
/// <li>
/// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
/// </ul>
pub fn encryption_mode(mut self, input: crate::types::EncryptionMode) -> Self {
self.encryption_mode = ::std::option::Option::Some(input);
self
}
/// <p>The encryption mode for the job, which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
/// <li>
/// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
/// </ul>
pub fn set_encryption_mode(mut self, input: ::std::option::Option<crate::types::EncryptionMode>) -> Self {
self.encryption_mode = input;
self
}
/// <p>The encryption mode for the job, which can be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>SSE-KMS</code> - Server-side encryption with keys managed by KMS.</p></li>
/// <li>
/// <p><code>SSE-S3</code> - Server-side encryption with keys managed by Amazon S3.</p></li>
/// </ul>
pub fn get_encryption_mode(&self) -> &::std::option::Option<crate::types::EncryptionMode> {
&self.encryption_mode
}
/// <p>The unique name of the job.</p>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique name of the job.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The unique name of the job.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The job type of the job, which must be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>PROFILE</code> - A job to analyze a dataset, to determine its size, data types, data distribution, and more.</p></li>
/// <li>
/// <p><code>RECIPE</code> - A job to apply one or more transformations to a dataset.</p></li>
/// </ul>
pub fn r#type(mut self, input: crate::types::JobType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The job type of the job, which must be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>PROFILE</code> - A job to analyze a dataset, to determine its size, data types, data distribution, and more.</p></li>
/// <li>
/// <p><code>RECIPE</code> - A job to apply one or more transformations to a dataset.</p></li>
/// </ul>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::JobType>) -> Self {
self.r#type = input;
self
}
/// <p>The job type of the job, which must be one of the following:</p>
/// <ul>
/// <li>
/// <p><code>PROFILE</code> - A job to analyze a dataset, to determine its size, data types, data distribution, and more.</p></li>
/// <li>
/// <p><code>RECIPE</code> - A job to apply one or more transformations to a dataset.</p></li>
/// </ul>
pub fn get_type(&self) -> &::std::option::Option<crate::types::JobType> {
&self.r#type
}
/// <p>The Amazon Resource Name (ARN) of the user who last modified the job.</p>
pub fn last_modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_modified_by = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the user who last modified the job.</p>
pub fn set_last_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_modified_by = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the user who last modified the job.</p>
pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
&self.last_modified_by
}
/// <p>The modification date and time of the job.</p>
pub fn last_modified_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_modified_date = ::std::option::Option::Some(input);
self
}
/// <p>The modification date and time of the job.</p>
pub fn set_last_modified_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_modified_date = input;
self
}
/// <p>The modification date and time of the job.</p>
pub fn get_last_modified_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_modified_date
}
/// <p>The current status of Amazon CloudWatch logging for the job.</p>
pub fn log_subscription(mut self, input: crate::types::LogSubscription) -> Self {
self.log_subscription = ::std::option::Option::Some(input);
self
}
/// <p>The current status of Amazon CloudWatch logging for the job.</p>
pub fn set_log_subscription(mut self, input: ::std::option::Option<crate::types::LogSubscription>) -> Self {
self.log_subscription = input;
self
}
/// <p>The current status of Amazon CloudWatch logging for the job.</p>
pub fn get_log_subscription(&self) -> &::std::option::Option<crate::types::LogSubscription> {
&self.log_subscription
}
/// <p>The maximum number of nodes that can be consumed when the job processes data.</p>
pub fn max_capacity(mut self, input: i32) -> Self {
self.max_capacity = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of nodes that can be consumed when the job processes data.</p>
pub fn set_max_capacity(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_capacity = input;
self
}
/// <p>The maximum number of nodes that can be consumed when the job processes data.</p>
pub fn get_max_capacity(&self) -> &::std::option::Option<i32> {
&self.max_capacity
}
/// <p>The maximum number of times to retry the job after a job run fails.</p>
pub fn max_retries(mut self, input: i32) -> Self {
self.max_retries = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of times to retry the job after a job run fails.</p>
pub fn set_max_retries(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_retries = input;
self
}
/// <p>The maximum number of times to retry the job after a job run fails.</p>
pub fn get_max_retries(&self) -> &::std::option::Option<i32> {
&self.max_retries
}
/// Appends an item to `outputs`.
///
/// To override the contents of this collection use [`set_outputs`](Self::set_outputs).
///
/// <p>One or more artifacts that represent output from running the job.</p>
pub fn outputs(mut self, input: crate::types::Output) -> Self {
let mut v = self.outputs.unwrap_or_default();
v.push(input);
self.outputs = ::std::option::Option::Some(v);
self
}
/// <p>One or more artifacts that represent output from running the job.</p>
pub fn set_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Output>>) -> Self {
self.outputs = input;
self
}
/// <p>One or more artifacts that represent output from running the job.</p>
pub fn get_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Output>> {
&self.outputs
}
/// Appends an item to `data_catalog_outputs`.
///
/// To override the contents of this collection use [`set_data_catalog_outputs`](Self::set_data_catalog_outputs).
///
/// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
pub fn data_catalog_outputs(mut self, input: crate::types::DataCatalogOutput) -> Self {
let mut v = self.data_catalog_outputs.unwrap_or_default();
v.push(input);
self.data_catalog_outputs = ::std::option::Option::Some(v);
self
}
/// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
pub fn set_data_catalog_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataCatalogOutput>>) -> Self {
self.data_catalog_outputs = input;
self
}
/// <p>One or more artifacts that represent the Glue Data Catalog output from running the job.</p>
pub fn get_data_catalog_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataCatalogOutput>> {
&self.data_catalog_outputs
}
/// Appends an item to `database_outputs`.
///
/// To override the contents of this collection use [`set_database_outputs`](Self::set_database_outputs).
///
/// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
pub fn database_outputs(mut self, input: crate::types::DatabaseOutput) -> Self {
let mut v = self.database_outputs.unwrap_or_default();
v.push(input);
self.database_outputs = ::std::option::Option::Some(v);
self
}
/// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
pub fn set_database_outputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DatabaseOutput>>) -> Self {
self.database_outputs = input;
self
}
/// <p>Represents a list of JDBC database output objects which defines the output destination for a DataBrew recipe job to write into.</p>
pub fn get_database_outputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DatabaseOutput>> {
&self.database_outputs
}
/// <p>The name of the project that the job is associated with.</p>
pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the project that the job is associated with.</p>
pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_name = input;
self
}
/// <p>The name of the project that the job is associated with.</p>
pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
&self.project_name
}
/// <p>A set of steps that the job runs.</p>
pub fn recipe_reference(mut self, input: crate::types::RecipeReference) -> Self {
self.recipe_reference = ::std::option::Option::Some(input);
self
}
/// <p>A set of steps that the job runs.</p>
pub fn set_recipe_reference(mut self, input: ::std::option::Option<crate::types::RecipeReference>) -> Self {
self.recipe_reference = input;
self
}
/// <p>A set of steps that the job runs.</p>
pub fn get_recipe_reference(&self) -> &::std::option::Option<crate::types::RecipeReference> {
&self.recipe_reference
}
/// <p>The unique Amazon Resource Name (ARN) for the job.</p>
pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique Amazon Resource Name (ARN) for the job.</p>
pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_arn = input;
self
}
/// <p>The unique Amazon Resource Name (ARN) for the job.</p>
pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_arn
}
/// <p>The Amazon Resource Name (ARN) of the role to be assumed for this job.</p>
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the role to be assumed for this job.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the role to be assumed for this job.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
pub fn timeout(mut self, input: i32) -> Self {
self.timeout = ::std::option::Option::Some(input);
self
}
/// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
pub fn set_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
self.timeout = input;
self
}
/// <p>The job's timeout in minutes. A job that attempts to run longer than this timeout period ends with a status of <code>TIMEOUT</code>.</p>
pub fn get_timeout(&self) -> &::std::option::Option<i32> {
&self.timeout
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Metadata tags that have been applied to the job.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>Metadata tags that have been applied to the job.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>Metadata tags that have been applied to the job.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// <p>A sample configuration for profile jobs only, which determines the number of rows on which the profile job is run. If a <code>JobSample</code> value isn't provided, the default value is used. The default value is CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter.</p>
pub fn job_sample(mut self, input: crate::types::JobSample) -> Self {
self.job_sample = ::std::option::Option::Some(input);
self
}
/// <p>A sample configuration for profile jobs only, which determines the number of rows on which the profile job is run. If a <code>JobSample</code> value isn't provided, the default value is used. The default value is CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter.</p>
pub fn set_job_sample(mut self, input: ::std::option::Option<crate::types::JobSample>) -> Self {
self.job_sample = input;
self
}
/// <p>A sample configuration for profile jobs only, which determines the number of rows on which the profile job is run. If a <code>JobSample</code> value isn't provided, the default value is used. The default value is CUSTOM_ROWS for the mode parameter and 20,000 for the size parameter.</p>
pub fn get_job_sample(&self) -> &::std::option::Option<crate::types::JobSample> {
&self.job_sample
}
/// Appends an item to `validation_configurations`.
///
/// To override the contents of this collection use [`set_validation_configurations`](Self::set_validation_configurations).
///
/// <p>List of validation configurations that are applied to the profile job.</p>
pub fn validation_configurations(mut self, input: crate::types::ValidationConfiguration) -> Self {
let mut v = self.validation_configurations.unwrap_or_default();
v.push(input);
self.validation_configurations = ::std::option::Option::Some(v);
self
}
/// <p>List of validation configurations that are applied to the profile job.</p>
pub fn set_validation_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ValidationConfiguration>>) -> Self {
self.validation_configurations = input;
self
}
/// <p>List of validation configurations that are applied to the profile job.</p>
pub fn get_validation_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ValidationConfiguration>> {
&self.validation_configurations
}
/// Consumes the builder and constructs a [`Job`](crate::types::Job).
/// This method will fail if any of the following fields are not set:
/// - [`name`](crate::types::builders::JobBuilder::name)
pub fn build(self) -> ::std::result::Result<crate::types::Job, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Job {
account_id: self.account_id,
created_by: self.created_by,
create_date: self.create_date,
dataset_name: self.dataset_name,
encryption_key_arn: self.encryption_key_arn,
encryption_mode: self.encryption_mode,
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field("name", "name was not specified but it is required when building Job")
})?,
r#type: self.r#type,
last_modified_by: self.last_modified_by,
last_modified_date: self.last_modified_date,
log_subscription: self.log_subscription,
max_capacity: self.max_capacity.unwrap_or_default(),
max_retries: self.max_retries.unwrap_or_default(),
outputs: self.outputs,
data_catalog_outputs: self.data_catalog_outputs,
database_outputs: self.database_outputs,
project_name: self.project_name,
recipe_reference: self.recipe_reference,
resource_arn: self.resource_arn,
role_arn: self.role_arn,
timeout: self.timeout.unwrap_or_default(),
tags: self.tags,
job_sample: self.job_sample,
validation_configurations: self.validation_configurations,
})
}
}