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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents the input of a <code>PutApprovalResult</code> action.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutApprovalResultInput {
/// <p>The name of the pipeline that contains the action.</p>
pub pipeline_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the stage that contains the action.</p>
pub stage_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the action for which approval is requested.</p>
pub action_name: ::std::option::Option<::std::string::String>,
/// <p>Represents information about the result of the approval request.</p>
pub result: ::std::option::Option<crate::types::ApprovalResult>,
/// <p>The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the <code>GetPipelineState</code> action. It is used to validate that the approval request corresponding to this token is still valid.</p><important>
/// <p>For a pipeline where the execution mode is set to PARALLEL, the token required to approve/reject an approval request as detailed above is not available. Instead, use the <code>externalExecutionId</code> in the response output from the <code>ListActionExecutions</code> action as the token in the approval request.</p>
/// </important>
pub token: ::std::option::Option<::std::string::String>,
}
impl PutApprovalResultInput {
/// <p>The name of the pipeline that contains the action.</p>
pub fn pipeline_name(&self) -> ::std::option::Option<&str> {
self.pipeline_name.as_deref()
}
/// <p>The name of the stage that contains the action.</p>
pub fn stage_name(&self) -> ::std::option::Option<&str> {
self.stage_name.as_deref()
}
/// <p>The name of the action for which approval is requested.</p>
pub fn action_name(&self) -> ::std::option::Option<&str> {
self.action_name.as_deref()
}
/// <p>Represents information about the result of the approval request.</p>
pub fn result(&self) -> ::std::option::Option<&crate::types::ApprovalResult> {
self.result.as_ref()
}
/// <p>The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the <code>GetPipelineState</code> action. It is used to validate that the approval request corresponding to this token is still valid.</p><important>
/// <p>For a pipeline where the execution mode is set to PARALLEL, the token required to approve/reject an approval request as detailed above is not available. Instead, use the <code>externalExecutionId</code> in the response output from the <code>ListActionExecutions</code> action as the token in the approval request.</p>
/// </important>
pub fn token(&self) -> ::std::option::Option<&str> {
self.token.as_deref()
}
}
impl PutApprovalResultInput {
/// Creates a new builder-style object to manufacture [`PutApprovalResultInput`](crate::operation::put_approval_result::PutApprovalResultInput).
pub fn builder() -> crate::operation::put_approval_result::builders::PutApprovalResultInputBuilder {
crate::operation::put_approval_result::builders::PutApprovalResultInputBuilder::default()
}
}
/// A builder for [`PutApprovalResultInput`](crate::operation::put_approval_result::PutApprovalResultInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutApprovalResultInputBuilder {
pub(crate) pipeline_name: ::std::option::Option<::std::string::String>,
pub(crate) stage_name: ::std::option::Option<::std::string::String>,
pub(crate) action_name: ::std::option::Option<::std::string::String>,
pub(crate) result: ::std::option::Option<crate::types::ApprovalResult>,
pub(crate) token: ::std::option::Option<::std::string::String>,
}
impl PutApprovalResultInputBuilder {
/// <p>The name of the pipeline that contains the action.</p>
/// This field is required.
pub fn pipeline_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.pipeline_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the pipeline that contains the action.</p>
pub fn set_pipeline_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.pipeline_name = input;
self
}
/// <p>The name of the pipeline that contains the action.</p>
pub fn get_pipeline_name(&self) -> &::std::option::Option<::std::string::String> {
&self.pipeline_name
}
/// <p>The name of the stage that contains the action.</p>
/// This field is required.
pub fn stage_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stage_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the stage that contains the action.</p>
pub fn set_stage_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stage_name = input;
self
}
/// <p>The name of the stage that contains the action.</p>
pub fn get_stage_name(&self) -> &::std::option::Option<::std::string::String> {
&self.stage_name
}
/// <p>The name of the action for which approval is requested.</p>
/// This field is required.
pub fn action_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.action_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the action for which approval is requested.</p>
pub fn set_action_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.action_name = input;
self
}
/// <p>The name of the action for which approval is requested.</p>
pub fn get_action_name(&self) -> &::std::option::Option<::std::string::String> {
&self.action_name
}
/// <p>Represents information about the result of the approval request.</p>
/// This field is required.
pub fn result(mut self, input: crate::types::ApprovalResult) -> Self {
self.result = ::std::option::Option::Some(input);
self
}
/// <p>Represents information about the result of the approval request.</p>
pub fn set_result(mut self, input: ::std::option::Option<crate::types::ApprovalResult>) -> Self {
self.result = input;
self
}
/// <p>Represents information about the result of the approval request.</p>
pub fn get_result(&self) -> &::std::option::Option<crate::types::ApprovalResult> {
&self.result
}
/// <p>The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the <code>GetPipelineState</code> action. It is used to validate that the approval request corresponding to this token is still valid.</p><important>
/// <p>For a pipeline where the execution mode is set to PARALLEL, the token required to approve/reject an approval request as detailed above is not available. Instead, use the <code>externalExecutionId</code> in the response output from the <code>ListActionExecutions</code> action as the token in the approval request.</p>
/// </important>
/// This field is required.
pub fn token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.token = ::std::option::Option::Some(input.into());
self
}
/// <p>The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the <code>GetPipelineState</code> action. It is used to validate that the approval request corresponding to this token is still valid.</p><important>
/// <p>For a pipeline where the execution mode is set to PARALLEL, the token required to approve/reject an approval request as detailed above is not available. Instead, use the <code>externalExecutionId</code> in the response output from the <code>ListActionExecutions</code> action as the token in the approval request.</p>
/// </important>
pub fn set_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.token = input;
self
}
/// <p>The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the <code>GetPipelineState</code> action. It is used to validate that the approval request corresponding to this token is still valid.</p><important>
/// <p>For a pipeline where the execution mode is set to PARALLEL, the token required to approve/reject an approval request as detailed above is not available. Instead, use the <code>externalExecutionId</code> in the response output from the <code>ListActionExecutions</code> action as the token in the approval request.</p>
/// </important>
pub fn get_token(&self) -> &::std::option::Option<::std::string::String> {
&self.token
}
/// Consumes the builder and constructs a [`PutApprovalResultInput`](crate::operation::put_approval_result::PutApprovalResultInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::put_approval_result::PutApprovalResultInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::put_approval_result::PutApprovalResultInput {
pipeline_name: self.pipeline_name,
stage_name: self.stage_name,
action_name: self.action_name,
result: self.result,
token: self.token,
})
}
}