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>The <code>Job</code> object contains details about a job.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Job {
    /// <p>An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".</p>
    pub job_arn: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier you assigned to this job when it was created.</p>
    pub job_id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.</p><note>
    /// <p>We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.</p>
    /// </note>
    pub target_selection: ::std::option::Option<crate::types::TargetSelection>,
    /// <p>The status of the job, one of <code>IN_PROGRESS</code>, <code>CANCELED</code>, <code>DELETION_IN_PROGRESS</code> or <code>COMPLETED</code>.</p>
    pub status: ::std::option::Option<crate::types::JobStatus>,
    /// <p>Will be <code>true</code> if the job was canceled with the optional <code>force</code> parameter set to <code>true</code>.</p>
    pub force_canceled: ::std::option::Option<bool>,
    /// <p>If the job was updated, provides the reason code for the update.</p>
    pub reason_code: ::std::option::Option<::std::string::String>,
    /// <p>If the job was updated, describes the reason for the update.</p>
    pub comment: ::std::option::Option<::std::string::String>,
    /// <p>A list of IoT things and thing groups to which the job should be sent.</p>
    pub targets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A short text description of the job.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Configuration for pre-signed S3 URLs.</p>
    pub presigned_url_config: ::std::option::Option<crate::types::PresignedUrlConfig>,
    /// <p>Allows you to create a staged rollout of a job.</p>
    pub job_executions_rollout_config: ::std::option::Option<crate::types::JobExecutionsRolloutConfig>,
    /// <p>Configuration for criteria to abort the job.</p>
    pub abort_config: ::std::option::Option<crate::types::AbortConfig>,
    /// <p>The time, in seconds since the epoch, when the job was created.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time, in seconds since the epoch, when the job was last updated.</p>
    pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time, in seconds since the epoch, when the job was completed.</p>
    pub completed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Details about the job process.</p>
    pub job_process_details: ::std::option::Option<crate::types::JobProcessDetails>,
    /// <p>Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub timeout_config: ::std::option::Option<crate::types::TimeoutConfig>,
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub namespace_id: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the job template used to create the job.</p>
    pub job_template_arn: ::std::option::Option<::std::string::String>,
    /// <p>The configuration for the criteria to retry the job.</p>
    pub job_executions_retry_config: ::std::option::Option<crate::types::JobExecutionsRetryConfig>,
    /// <p>A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.</p><note>
    /// <p><code>documentParameters</code> can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.</p>
    /// </note>
    pub document_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.</p>
    pub is_concurrent: ::std::option::Option<bool>,
    /// <p>The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.</p>
    pub scheduling_config: ::std::option::Option<crate::types::SchedulingConfig>,
    /// <p>Displays the next seven maintenance window occurrences and their start times.</p>
    pub scheduled_job_rollouts: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledJobRollout>>,
    /// <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.</p>
    /// <p><b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>
    pub destination_package_versions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Job {
    /// <p>An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".</p>
    pub fn job_arn(&self) -> ::std::option::Option<&str> {
        self.job_arn.as_deref()
    }
    /// <p>The unique identifier you assigned to this job when it was created.</p>
    pub fn job_id(&self) -> ::std::option::Option<&str> {
        self.job_id.as_deref()
    }
    /// <p>Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.</p><note>
    /// <p>We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.</p>
    /// </note>
    pub fn target_selection(&self) -> ::std::option::Option<&crate::types::TargetSelection> {
        self.target_selection.as_ref()
    }
    /// <p>The status of the job, one of <code>IN_PROGRESS</code>, <code>CANCELED</code>, <code>DELETION_IN_PROGRESS</code> or <code>COMPLETED</code>.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::JobStatus> {
        self.status.as_ref()
    }
    /// <p>Will be <code>true</code> if the job was canceled with the optional <code>force</code> parameter set to <code>true</code>.</p>
    pub fn force_canceled(&self) -> ::std::option::Option<bool> {
        self.force_canceled
    }
    /// <p>If the job was updated, provides the reason code for the update.</p>
    pub fn reason_code(&self) -> ::std::option::Option<&str> {
        self.reason_code.as_deref()
    }
    /// <p>If the job was updated, describes the reason for the update.</p>
    pub fn comment(&self) -> ::std::option::Option<&str> {
        self.comment.as_deref()
    }
    /// <p>A list of IoT things and thing groups to which the job should be sent.</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 `.targets.is_none()`.
    pub fn targets(&self) -> &[::std::string::String] {
        self.targets.as_deref().unwrap_or_default()
    }
    /// <p>A short text description of the job.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Configuration for pre-signed S3 URLs.</p>
    pub fn presigned_url_config(&self) -> ::std::option::Option<&crate::types::PresignedUrlConfig> {
        self.presigned_url_config.as_ref()
    }
    /// <p>Allows you to create a staged rollout of a job.</p>
    pub fn job_executions_rollout_config(&self) -> ::std::option::Option<&crate::types::JobExecutionsRolloutConfig> {
        self.job_executions_rollout_config.as_ref()
    }
    /// <p>Configuration for criteria to abort the job.</p>
    pub fn abort_config(&self) -> ::std::option::Option<&crate::types::AbortConfig> {
        self.abort_config.as_ref()
    }
    /// <p>The time, in seconds since the epoch, when the job was created.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The time, in seconds since the epoch, when the job was last updated.</p>
    pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_updated_at.as_ref()
    }
    /// <p>The time, in seconds since the epoch, when the job was completed.</p>
    pub fn completed_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.completed_at.as_ref()
    }
    /// <p>Details about the job process.</p>
    pub fn job_process_details(&self) -> ::std::option::Option<&crate::types::JobProcessDetails> {
        self.job_process_details.as_ref()
    }
    /// <p>Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub fn timeout_config(&self) -> ::std::option::Option<&crate::types::TimeoutConfig> {
        self.timeout_config.as_ref()
    }
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub fn namespace_id(&self) -> ::std::option::Option<&str> {
        self.namespace_id.as_deref()
    }
    /// <p>The ARN of the job template used to create the job.</p>
    pub fn job_template_arn(&self) -> ::std::option::Option<&str> {
        self.job_template_arn.as_deref()
    }
    /// <p>The configuration for the criteria to retry the job.</p>
    pub fn job_executions_retry_config(&self) -> ::std::option::Option<&crate::types::JobExecutionsRetryConfig> {
        self.job_executions_retry_config.as_ref()
    }
    /// <p>A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.</p><note>
    /// <p><code>documentParameters</code> can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.</p>
    /// </note>
    pub fn document_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.document_parameters.as_ref()
    }
    /// <p>Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.</p>
    pub fn is_concurrent(&self) -> ::std::option::Option<bool> {
        self.is_concurrent
    }
    /// <p>The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.</p>
    pub fn scheduling_config(&self) -> ::std::option::Option<&crate::types::SchedulingConfig> {
        self.scheduling_config.as_ref()
    }
    /// <p>Displays the next seven maintenance window occurrences and their start times.</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 `.scheduled_job_rollouts.is_none()`.
    pub fn scheduled_job_rollouts(&self) -> &[crate::types::ScheduledJobRollout] {
        self.scheduled_job_rollouts.as_deref().unwrap_or_default()
    }
    /// <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.</p>
    /// <p><b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</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 `.destination_package_versions.is_none()`.
    pub fn destination_package_versions(&self) -> &[::std::string::String] {
        self.destination_package_versions.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).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct JobBuilder {
    pub(crate) job_arn: ::std::option::Option<::std::string::String>,
    pub(crate) job_id: ::std::option::Option<::std::string::String>,
    pub(crate) target_selection: ::std::option::Option<crate::types::TargetSelection>,
    pub(crate) status: ::std::option::Option<crate::types::JobStatus>,
    pub(crate) force_canceled: ::std::option::Option<bool>,
    pub(crate) reason_code: ::std::option::Option<::std::string::String>,
    pub(crate) comment: ::std::option::Option<::std::string::String>,
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) presigned_url_config: ::std::option::Option<crate::types::PresignedUrlConfig>,
    pub(crate) job_executions_rollout_config: ::std::option::Option<crate::types::JobExecutionsRolloutConfig>,
    pub(crate) abort_config: ::std::option::Option<crate::types::AbortConfig>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) completed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) job_process_details: ::std::option::Option<crate::types::JobProcessDetails>,
    pub(crate) timeout_config: ::std::option::Option<crate::types::TimeoutConfig>,
    pub(crate) namespace_id: ::std::option::Option<::std::string::String>,
    pub(crate) job_template_arn: ::std::option::Option<::std::string::String>,
    pub(crate) job_executions_retry_config: ::std::option::Option<crate::types::JobExecutionsRetryConfig>,
    pub(crate) document_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) is_concurrent: ::std::option::Option<bool>,
    pub(crate) scheduling_config: ::std::option::Option<crate::types::SchedulingConfig>,
    pub(crate) scheduled_job_rollouts: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledJobRollout>>,
    pub(crate) destination_package_versions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl JobBuilder {
    /// <p>An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".</p>
    pub fn job_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".</p>
    pub fn set_job_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_arn = input;
        self
    }
    /// <p>An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".</p>
    pub fn get_job_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_arn
    }
    /// <p>The unique identifier you assigned to this job when it was created.</p>
    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier you assigned to this job when it was created.</p>
    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_id = input;
        self
    }
    /// <p>The unique identifier you assigned to this job when it was created.</p>
    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_id
    }
    /// <p>Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.</p><note>
    /// <p>We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.</p>
    /// </note>
    pub fn target_selection(mut self, input: crate::types::TargetSelection) -> Self {
        self.target_selection = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.</p><note>
    /// <p>We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.</p>
    /// </note>
    pub fn set_target_selection(mut self, input: ::std::option::Option<crate::types::TargetSelection>) -> Self {
        self.target_selection = input;
        self
    }
    /// <p>Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.</p><note>
    /// <p>We recommend that you use continuous jobs instead of snapshot jobs for dynamic thing group targets. By using continuous jobs, devices that join the group receive the job execution even after the job has been created.</p>
    /// </note>
    pub fn get_target_selection(&self) -> &::std::option::Option<crate::types::TargetSelection> {
        &self.target_selection
    }
    /// <p>The status of the job, one of <code>IN_PROGRESS</code>, <code>CANCELED</code>, <code>DELETION_IN_PROGRESS</code> or <code>COMPLETED</code>.</p>
    pub fn status(mut self, input: crate::types::JobStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the job, one of <code>IN_PROGRESS</code>, <code>CANCELED</code>, <code>DELETION_IN_PROGRESS</code> or <code>COMPLETED</code>.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::JobStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the job, one of <code>IN_PROGRESS</code>, <code>CANCELED</code>, <code>DELETION_IN_PROGRESS</code> or <code>COMPLETED</code>.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::JobStatus> {
        &self.status
    }
    /// <p>Will be <code>true</code> if the job was canceled with the optional <code>force</code> parameter set to <code>true</code>.</p>
    pub fn force_canceled(mut self, input: bool) -> Self {
        self.force_canceled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Will be <code>true</code> if the job was canceled with the optional <code>force</code> parameter set to <code>true</code>.</p>
    pub fn set_force_canceled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.force_canceled = input;
        self
    }
    /// <p>Will be <code>true</code> if the job was canceled with the optional <code>force</code> parameter set to <code>true</code>.</p>
    pub fn get_force_canceled(&self) -> &::std::option::Option<bool> {
        &self.force_canceled
    }
    /// <p>If the job was updated, provides the reason code for the update.</p>
    pub fn reason_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reason_code = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the job was updated, provides the reason code for the update.</p>
    pub fn set_reason_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reason_code = input;
        self
    }
    /// <p>If the job was updated, provides the reason code for the update.</p>
    pub fn get_reason_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.reason_code
    }
    /// <p>If the job was updated, describes the reason for the update.</p>
    pub fn comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.comment = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>If the job was updated, describes the reason for the update.</p>
    pub fn set_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.comment = input;
        self
    }
    /// <p>If the job was updated, describes the reason for the update.</p>
    pub fn get_comment(&self) -> &::std::option::Option<::std::string::String> {
        &self.comment
    }
    /// Appends an item to `targets`.
    ///
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
    ///
    /// <p>A list of IoT things and thing groups to which the job should be sent.</p>
    pub fn targets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.targets.unwrap_or_default();
        v.push(input.into());
        self.targets = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of IoT things and thing groups to which the job should be sent.</p>
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.targets = input;
        self
    }
    /// <p>A list of IoT things and thing groups to which the job should be sent.</p>
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.targets
    }
    /// <p>A short text description of the job.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A short text description of the job.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A short text description of the job.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Configuration for pre-signed S3 URLs.</p>
    pub fn presigned_url_config(mut self, input: crate::types::PresignedUrlConfig) -> Self {
        self.presigned_url_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration for pre-signed S3 URLs.</p>
    pub fn set_presigned_url_config(mut self, input: ::std::option::Option<crate::types::PresignedUrlConfig>) -> Self {
        self.presigned_url_config = input;
        self
    }
    /// <p>Configuration for pre-signed S3 URLs.</p>
    pub fn get_presigned_url_config(&self) -> &::std::option::Option<crate::types::PresignedUrlConfig> {
        &self.presigned_url_config
    }
    /// <p>Allows you to create a staged rollout of a job.</p>
    pub fn job_executions_rollout_config(mut self, input: crate::types::JobExecutionsRolloutConfig) -> Self {
        self.job_executions_rollout_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Allows you to create a staged rollout of a job.</p>
    pub fn set_job_executions_rollout_config(mut self, input: ::std::option::Option<crate::types::JobExecutionsRolloutConfig>) -> Self {
        self.job_executions_rollout_config = input;
        self
    }
    /// <p>Allows you to create a staged rollout of a job.</p>
    pub fn get_job_executions_rollout_config(&self) -> &::std::option::Option<crate::types::JobExecutionsRolloutConfig> {
        &self.job_executions_rollout_config
    }
    /// <p>Configuration for criteria to abort the job.</p>
    pub fn abort_config(mut self, input: crate::types::AbortConfig) -> Self {
        self.abort_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Configuration for criteria to abort the job.</p>
    pub fn set_abort_config(mut self, input: ::std::option::Option<crate::types::AbortConfig>) -> Self {
        self.abort_config = input;
        self
    }
    /// <p>Configuration for criteria to abort the job.</p>
    pub fn get_abort_config(&self) -> &::std::option::Option<crate::types::AbortConfig> {
        &self.abort_config
    }
    /// <p>The time, in seconds since the epoch, when the job was created.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time, in seconds since the epoch, when the job was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The time, in seconds since the epoch, when the job was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The time, in seconds since the epoch, when the job was last updated.</p>
    pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time, in seconds since the epoch, when the job was last updated.</p>
    pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_updated_at = input;
        self
    }
    /// <p>The time, in seconds since the epoch, when the job was last updated.</p>
    pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_updated_at
    }
    /// <p>The time, in seconds since the epoch, when the job was completed.</p>
    pub fn completed_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.completed_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time, in seconds since the epoch, when the job was completed.</p>
    pub fn set_completed_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.completed_at = input;
        self
    }
    /// <p>The time, in seconds since the epoch, when the job was completed.</p>
    pub fn get_completed_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.completed_at
    }
    /// <p>Details about the job process.</p>
    pub fn job_process_details(mut self, input: crate::types::JobProcessDetails) -> Self {
        self.job_process_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details about the job process.</p>
    pub fn set_job_process_details(mut self, input: ::std::option::Option<crate::types::JobProcessDetails>) -> Self {
        self.job_process_details = input;
        self
    }
    /// <p>Details about the job process.</p>
    pub fn get_job_process_details(&self) -> &::std::option::Option<crate::types::JobProcessDetails> {
        &self.job_process_details
    }
    /// <p>Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub fn timeout_config(mut self, input: crate::types::TimeoutConfig) -> Self {
        self.timeout_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub fn set_timeout_config(mut self, input: ::std::option::Option<crate::types::TimeoutConfig>) -> Self {
        self.timeout_config = input;
        self
    }
    /// <p>Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to <code>IN_PROGRESS</code>. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to <code>TIMED_OUT</code>.</p>
    pub fn get_timeout_config(&self) -> &::std::option::Option<crate::types::TimeoutConfig> {
        &self.timeout_config
    }
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub fn namespace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.namespace_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub fn set_namespace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.namespace_id = input;
        self
    }
    /// <p>The namespace used to indicate that a job is a customer-managed job.</p>
    /// <p>When you specify a value for this parameter, Amazon Web Services IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.</p>
    /// <p><code>$aws/things/<i>THING_NAME</i>/jobs/<i>JOB_ID</i>/notify-namespace-<i>NAMESPACE_ID</i>/</code></p><note>
    /// <p>The <code>namespaceId</code> feature is only supported by IoT Greengrass at this time. For more information, see <a href="https://docs.aws.amazon.com/greengrass/v2/developerguide/setting-up.html">Setting up IoT Greengrass core devices.</a></p>
    /// </note>
    pub fn get_namespace_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.namespace_id
    }
    /// <p>The ARN of the job template used to create the job.</p>
    pub fn job_template_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_template_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the job template used to create the job.</p>
    pub fn set_job_template_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_template_arn = input;
        self
    }
    /// <p>The ARN of the job template used to create the job.</p>
    pub fn get_job_template_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_template_arn
    }
    /// <p>The configuration for the criteria to retry the job.</p>
    pub fn job_executions_retry_config(mut self, input: crate::types::JobExecutionsRetryConfig) -> Self {
        self.job_executions_retry_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration for the criteria to retry the job.</p>
    pub fn set_job_executions_retry_config(mut self, input: ::std::option::Option<crate::types::JobExecutionsRetryConfig>) -> Self {
        self.job_executions_retry_config = input;
        self
    }
    /// <p>The configuration for the criteria to retry the job.</p>
    pub fn get_job_executions_retry_config(&self) -> &::std::option::Option<crate::types::JobExecutionsRetryConfig> {
        &self.job_executions_retry_config
    }
    /// Adds a key-value pair to `document_parameters`.
    ///
    /// To override the contents of this collection use [`set_document_parameters`](Self::set_document_parameters).
    ///
    /// <p>A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.</p><note>
    /// <p><code>documentParameters</code> can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.</p>
    /// </note>
    pub fn document_parameters(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.document_parameters.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.document_parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.</p><note>
    /// <p><code>documentParameters</code> can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.</p>
    /// </note>
    pub fn set_document_parameters(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.document_parameters = input;
        self
    }
    /// <p>A key-value map that pairs the patterns that need to be replaced in a managed template job document schema. You can use the description of each key as a guidance to specify the inputs during runtime when creating a job.</p><note>
    /// <p><code>documentParameters</code> can only be used when creating jobs from Amazon Web Services managed templates. This parameter can't be used with custom job templates or to create jobs from them.</p>
    /// </note>
    pub fn get_document_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.document_parameters
    }
    /// <p>Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.</p>
    pub fn is_concurrent(mut self, input: bool) -> Self {
        self.is_concurrent = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.</p>
    pub fn set_is_concurrent(mut self, input: ::std::option::Option<bool>) -> Self {
        self.is_concurrent = input;
        self
    }
    /// <p>Indicates whether a job is concurrent. Will be true when a job is rolling out new job executions or canceling previously created executions, otherwise false.</p>
    pub fn get_is_concurrent(&self) -> &::std::option::Option<bool> {
        &self.is_concurrent
    }
    /// <p>The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.</p>
    pub fn scheduling_config(mut self, input: crate::types::SchedulingConfig) -> Self {
        self.scheduling_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.</p>
    pub fn set_scheduling_config(mut self, input: ::std::option::Option<crate::types::SchedulingConfig>) -> Self {
        self.scheduling_config = input;
        self
    }
    /// <p>The configuration that allows you to schedule a job for a future date and time in addition to specifying the end behavior for each job execution.</p>
    pub fn get_scheduling_config(&self) -> &::std::option::Option<crate::types::SchedulingConfig> {
        &self.scheduling_config
    }
    /// Appends an item to `scheduled_job_rollouts`.
    ///
    /// To override the contents of this collection use [`set_scheduled_job_rollouts`](Self::set_scheduled_job_rollouts).
    ///
    /// <p>Displays the next seven maintenance window occurrences and their start times.</p>
    pub fn scheduled_job_rollouts(mut self, input: crate::types::ScheduledJobRollout) -> Self {
        let mut v = self.scheduled_job_rollouts.unwrap_or_default();
        v.push(input);
        self.scheduled_job_rollouts = ::std::option::Option::Some(v);
        self
    }
    /// <p>Displays the next seven maintenance window occurrences and their start times.</p>
    pub fn set_scheduled_job_rollouts(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ScheduledJobRollout>>) -> Self {
        self.scheduled_job_rollouts = input;
        self
    }
    /// <p>Displays the next seven maintenance window occurrences and their start times.</p>
    pub fn get_scheduled_job_rollouts(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ScheduledJobRollout>> {
        &self.scheduled_job_rollouts
    }
    /// Appends an item to `destination_package_versions`.
    ///
    /// To override the contents of this collection use [`set_destination_package_versions`](Self::set_destination_package_versions).
    ///
    /// <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.</p>
    /// <p><b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>
    pub fn destination_package_versions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.destination_package_versions.unwrap_or_default();
        v.push(input.into());
        self.destination_package_versions = ::std::option::Option::Some(v);
        self
    }
    /// <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.</p>
    /// <p><b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>
    pub fn set_destination_package_versions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.destination_package_versions = input;
        self
    }
    /// <p>The package version Amazon Resource Names (ARNs) that are installed on the device when the job successfully completes. The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.The package version must be in either the Published or Deprecated state when the job deploys. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle">Package version lifecycle</a>.</p>
    /// <p><b>Note:</b>The following Length Constraints relates to a single ARN. Up to 25 package version ARNs are allowed.</p>
    pub fn get_destination_package_versions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.destination_package_versions
    }
    /// Consumes the builder and constructs a [`Job`](crate::types::Job).
    pub fn build(self) -> crate::types::Job {
        crate::types::Job {
            job_arn: self.job_arn,
            job_id: self.job_id,
            target_selection: self.target_selection,
            status: self.status,
            force_canceled: self.force_canceled,
            reason_code: self.reason_code,
            comment: self.comment,
            targets: self.targets,
            description: self.description,
            presigned_url_config: self.presigned_url_config,
            job_executions_rollout_config: self.job_executions_rollout_config,
            abort_config: self.abort_config,
            created_at: self.created_at,
            last_updated_at: self.last_updated_at,
            completed_at: self.completed_at,
            job_process_details: self.job_process_details,
            timeout_config: self.timeout_config,
            namespace_id: self.namespace_id,
            job_template_arn: self.job_template_arn,
            job_executions_retry_config: self.job_executions_retry_config,
            document_parameters: self.document_parameters,
            is_concurrent: self.is_concurrent,
            scheduling_config: self.scheduling_config,
            scheduled_job_rollouts: self.scheduled_job_rollouts,
            destination_package_versions: self.destination_package_versions,
        }
    }
}