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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents information about a job.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Job {
/// <p>The unique system-generated ID of the job.</p>
pub id: ::std::option::Option<::std::string::String>,
/// <p>Other data about a job.</p>
pub data: ::std::option::Option<crate::types::JobData>,
/// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an <code>AcknowledgeJob</code> request.</p>
pub nonce: ::std::option::Option<::std::string::String>,
/// <p>The ID of the Amazon Web Services account to use when performing the job.</p>
pub account_id: ::std::option::Option<::std::string::String>,
}
impl Job {
/// <p>The unique system-generated ID of the job.</p>
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
/// <p>Other data about a job.</p>
pub fn data(&self) -> ::std::option::Option<&crate::types::JobData> {
self.data.as_ref()
}
/// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an <code>AcknowledgeJob</code> request.</p>
pub fn nonce(&self) -> ::std::option::Option<&str> {
self.nonce.as_deref()
}
/// <p>The ID of the Amazon Web Services account to use when performing the job.</p>
pub fn account_id(&self) -> ::std::option::Option<&str> {
self.account_id.as_deref()
}
}
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) id: ::std::option::Option<::std::string::String>,
pub(crate) data: ::std::option::Option<crate::types::JobData>,
pub(crate) nonce: ::std::option::Option<::std::string::String>,
pub(crate) account_id: ::std::option::Option<::std::string::String>,
}
impl JobBuilder {
/// <p>The unique system-generated ID of the job.</p>
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
/// <p>The unique system-generated ID of the job.</p>
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The unique system-generated ID of the job.</p>
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
/// <p>Other data about a job.</p>
pub fn data(mut self, input: crate::types::JobData) -> Self {
self.data = ::std::option::Option::Some(input);
self
}
/// <p>Other data about a job.</p>
pub fn set_data(mut self, input: ::std::option::Option<crate::types::JobData>) -> Self {
self.data = input;
self
}
/// <p>Other data about a job.</p>
pub fn get_data(&self) -> &::std::option::Option<crate::types::JobData> {
&self.data
}
/// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an <code>AcknowledgeJob</code> request.</p>
pub fn nonce(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.nonce = ::std::option::Option::Some(input.into());
self
}
/// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an <code>AcknowledgeJob</code> request.</p>
pub fn set_nonce(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.nonce = input;
self
}
/// <p>A system-generated random number that CodePipeline uses to ensure that the job is being worked on by only one job worker. Use this number in an <code>AcknowledgeJob</code> request.</p>
pub fn get_nonce(&self) -> &::std::option::Option<::std::string::String> {
&self.nonce
}
/// <p>The ID of the Amazon Web Services account to use when performing 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 to use when performing 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 to use when performing the job.</p>
pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.account_id
}
/// Consumes the builder and constructs a [`Job`](crate::types::Job).
pub fn build(self) -> crate::types::Job {
crate::types::Job {
id: self.id,
data: self.data,
nonce: self.nonce,
account_id: self.account_id,
}
}
}