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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents the output of a <code>GetPipelineState</code> action.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetPipelineStateOutput {
/// <p>The name of the pipeline for which you want to get the state.</p>
pub pipeline_name: ::std::option::Option<::std::string::String>,
/// <p>The version number of the pipeline.</p><note>
/// <p>A newly created pipeline is always assigned a version number of <code>1</code>.</p>
/// </note>
pub pipeline_version: ::std::option::Option<i32>,
/// <p>A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.</p>
pub stage_states: ::std::option::Option<::std::vec::Vec<crate::types::StageState>>,
/// <p>The date and time the pipeline was created, in timestamp format.</p>
pub created: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The date and time the pipeline was last updated, in timestamp format.</p>
pub updated: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetPipelineStateOutput {
/// <p>The name of the pipeline for which you want to get the state.</p>
pub fn pipeline_name(&self) -> ::std::option::Option<&str> {
self.pipeline_name.as_deref()
}
/// <p>The version number of the pipeline.</p><note>
/// <p>A newly created pipeline is always assigned a version number of <code>1</code>.</p>
/// </note>
pub fn pipeline_version(&self) -> ::std::option::Option<i32> {
self.pipeline_version
}
/// <p>A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.</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 `.stage_states.is_none()`.
pub fn stage_states(&self) -> &[crate::types::StageState] {
self.stage_states.as_deref().unwrap_or_default()
}
/// <p>The date and time the pipeline was created, in timestamp format.</p>
pub fn created(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created.as_ref()
}
/// <p>The date and time the pipeline was last updated, in timestamp format.</p>
pub fn updated(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetPipelineStateOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetPipelineStateOutput {
/// Creates a new builder-style object to manufacture [`GetPipelineStateOutput`](crate::operation::get_pipeline_state::GetPipelineStateOutput).
pub fn builder() -> crate::operation::get_pipeline_state::builders::GetPipelineStateOutputBuilder {
crate::operation::get_pipeline_state::builders::GetPipelineStateOutputBuilder::default()
}
}
/// A builder for [`GetPipelineStateOutput`](crate::operation::get_pipeline_state::GetPipelineStateOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetPipelineStateOutputBuilder {
pub(crate) pipeline_name: ::std::option::Option<::std::string::String>,
pub(crate) pipeline_version: ::std::option::Option<i32>,
pub(crate) stage_states: ::std::option::Option<::std::vec::Vec<crate::types::StageState>>,
pub(crate) created: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetPipelineStateOutputBuilder {
/// <p>The name of the pipeline for which you want to get the state.</p>
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 for which you want to get the state.</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 for which you want to get the state.</p>
pub fn get_pipeline_name(&self) -> &::std::option::Option<::std::string::String> {
&self.pipeline_name
}
/// <p>The version number of the pipeline.</p><note>
/// <p>A newly created pipeline is always assigned a version number of <code>1</code>.</p>
/// </note>
pub fn pipeline_version(mut self, input: i32) -> Self {
self.pipeline_version = ::std::option::Option::Some(input);
self
}
/// <p>The version number of the pipeline.</p><note>
/// <p>A newly created pipeline is always assigned a version number of <code>1</code>.</p>
/// </note>
pub fn set_pipeline_version(mut self, input: ::std::option::Option<i32>) -> Self {
self.pipeline_version = input;
self
}
/// <p>The version number of the pipeline.</p><note>
/// <p>A newly created pipeline is always assigned a version number of <code>1</code>.</p>
/// </note>
pub fn get_pipeline_version(&self) -> &::std::option::Option<i32> {
&self.pipeline_version
}
/// Appends an item to `stage_states`.
///
/// To override the contents of this collection use [`set_stage_states`](Self::set_stage_states).
///
/// <p>A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.</p>
pub fn stage_states(mut self, input: crate::types::StageState) -> Self {
let mut v = self.stage_states.unwrap_or_default();
v.push(input);
self.stage_states = ::std::option::Option::Some(v);
self
}
/// <p>A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.</p>
pub fn set_stage_states(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StageState>>) -> Self {
self.stage_states = input;
self
}
/// <p>A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.</p>
pub fn get_stage_states(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StageState>> {
&self.stage_states
}
/// <p>The date and time the pipeline was created, in timestamp format.</p>
pub fn created(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created = ::std::option::Option::Some(input);
self
}
/// <p>The date and time the pipeline was created, in timestamp format.</p>
pub fn set_created(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created = input;
self
}
/// <p>The date and time the pipeline was created, in timestamp format.</p>
pub fn get_created(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created
}
/// <p>The date and time the pipeline was last updated, in timestamp format.</p>
pub fn updated(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated = ::std::option::Option::Some(input);
self
}
/// <p>The date and time the pipeline was last updated, in timestamp format.</p>
pub fn set_updated(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated = input;
self
}
/// <p>The date and time the pipeline was last updated, in timestamp format.</p>
pub fn get_updated(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetPipelineStateOutput`](crate::operation::get_pipeline_state::GetPipelineStateOutput).
pub fn build(self) -> crate::operation::get_pipeline_state::GetPipelineStateOutput {
crate::operation::get_pipeline_state::GetPipelineStateOutput {
pipeline_name: self.pipeline_name,
pipeline_version: self.pipeline_version,
stage_states: self.stage_states,
created: self.created,
updated: self.updated,
_request_id: self._request_id,
}
}
}