1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>An aggregate of step execution statuses displayed in the Amazon Web Services Systems Manager console for a multi-Region and multi-account Automation execution.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct ProgressCounters {
|
7 + | /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
8 + | pub total_steps: i32,
|
9 + | /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
10 + | pub success_steps: i32,
|
11 + | /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
12 + | pub failed_steps: i32,
|
13 + | /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
14 + | pub cancelled_steps: i32,
|
15 + | /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
16 + | pub timed_out_steps: i32,
|
17 + | }
|
18 + | impl ProgressCounters {
|
19 + | /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
20 + | pub fn total_steps(&self) -> i32 {
|
21 + | self.total_steps
|
22 + | }
|
23 + | /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
24 + | pub fn success_steps(&self) -> i32 {
|
25 + | self.success_steps
|
26 + | }
|
27 + | /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
28 + | pub fn failed_steps(&self) -> i32 {
|
29 + | self.failed_steps
|
30 + | }
|
31 + | /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
32 + | pub fn cancelled_steps(&self) -> i32 {
|
33 + | self.cancelled_steps
|
34 + | }
|
35 + | /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
36 + | pub fn timed_out_steps(&self) -> i32 {
|
37 + | self.timed_out_steps
|
38 + | }
|
39 + | }
|
40 + | static PROGRESSCOUNTERS_MEMBER_TOTAL_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
41 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ProgressCounters$TotalSteps", "com.amazonaws.ssm", "ProgressCounters"),
|
42 + | ::aws_smithy_schema::ShapeType::Integer,
|
43 + | "TotalSteps",
|
44 + | 0,
|
45 + | );
|
46 + | static PROGRESSCOUNTERS_MEMBER_SUCCESS_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
47 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ProgressCounters$SuccessSteps", "com.amazonaws.ssm", "ProgressCounters"),
|
48 + | ::aws_smithy_schema::ShapeType::Integer,
|
49 + | "SuccessSteps",
|
50 + | 1,
|
51 + | );
|
52 + | static PROGRESSCOUNTERS_MEMBER_FAILED_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
53 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ProgressCounters$FailedSteps", "com.amazonaws.ssm", "ProgressCounters"),
|
54 + | ::aws_smithy_schema::ShapeType::Integer,
|
55 + | "FailedSteps",
|
56 + | 2,
|
57 + | );
|
58 + | static PROGRESSCOUNTERS_MEMBER_CANCELLED_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
59 + | ::aws_smithy_schema::ShapeId::from_parts(
|
60 + | "com.amazonaws.ssm#ProgressCounters$CancelledSteps",
|
61 + | "com.amazonaws.ssm",
|
62 + | "ProgressCounters",
|
63 + | ),
|
64 + | ::aws_smithy_schema::ShapeType::Integer,
|
65 + | "CancelledSteps",
|
66 + | 3,
|
67 + | );
|
68 + | static PROGRESSCOUNTERS_MEMBER_TIMED_OUT_STEPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
69 + | ::aws_smithy_schema::ShapeId::from_parts(
|
70 + | "com.amazonaws.ssm#ProgressCounters$TimedOutSteps",
|
71 + | "com.amazonaws.ssm",
|
72 + | "ProgressCounters",
|
73 + | ),
|
74 + | ::aws_smithy_schema::ShapeType::Integer,
|
75 + | "TimedOutSteps",
|
76 + | 4,
|
77 + | );
|
78 + | static PROGRESSCOUNTERS_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
79 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ProgressCounters", "com.amazonaws.ssm", "ProgressCounters"),
|
80 + | ::aws_smithy_schema::ShapeType::Structure,
|
81 + | &[
|
82 + | &PROGRESSCOUNTERS_MEMBER_TOTAL_STEPS,
|
83 + | &PROGRESSCOUNTERS_MEMBER_SUCCESS_STEPS,
|
84 + | &PROGRESSCOUNTERS_MEMBER_FAILED_STEPS,
|
85 + | &PROGRESSCOUNTERS_MEMBER_CANCELLED_STEPS,
|
86 + | &PROGRESSCOUNTERS_MEMBER_TIMED_OUT_STEPS,
|
87 + | ],
|
88 + | );
|
89 + | impl ProgressCounters {
|
90 + | /// The schema for this shape.
|
91 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &PROGRESSCOUNTERS_SCHEMA;
|
92 + | }
|
93 + | impl ::aws_smithy_schema::serde::SerializableStruct for ProgressCounters {
|
94 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
95 + | fn serialize_members(
|
96 + | &self,
|
97 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
98 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
99 + | {
|
100 + | let val = &self.total_steps;
|
101 + | ser.write_integer(&PROGRESSCOUNTERS_MEMBER_TOTAL_STEPS, *val)?;
|
102 + | }
|
103 + | {
|
104 + | let val = &self.success_steps;
|
105 + | ser.write_integer(&PROGRESSCOUNTERS_MEMBER_SUCCESS_STEPS, *val)?;
|
106 + | }
|
107 + | {
|
108 + | let val = &self.failed_steps;
|
109 + | ser.write_integer(&PROGRESSCOUNTERS_MEMBER_FAILED_STEPS, *val)?;
|
110 + | }
|
111 + | {
|
112 + | let val = &self.cancelled_steps;
|
113 + | ser.write_integer(&PROGRESSCOUNTERS_MEMBER_CANCELLED_STEPS, *val)?;
|
114 + | }
|
115 + | {
|
116 + | let val = &self.timed_out_steps;
|
117 + | ser.write_integer(&PROGRESSCOUNTERS_MEMBER_TIMED_OUT_STEPS, *val)?;
|
118 + | }
|
119 + | Ok(())
|
120 + | }
|
121 + | }
|
122 + | impl ProgressCounters {
|
123 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
124 + | pub fn deserialize(
|
125 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
126 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
127 + | #[allow(unused_variables, unused_mut)]
|
128 + | let mut builder = Self::builder();
|
129 + | #[allow(
|
130 + | unused_variables,
|
131 + | unreachable_code,
|
132 + | clippy::single_match,
|
133 + | clippy::match_single_binding,
|
134 + | clippy::diverging_sub_expression
|
135 + | )]
|
136 + | deserializer.read_struct(&PROGRESSCOUNTERS_SCHEMA, &mut |member, deser| {
|
137 + | match member.member_index() {
|
138 + | Some(0) => {
|
139 + | builder.total_steps = Some(deser.read_integer(member)?);
|
140 + | }
|
141 + | Some(1) => {
|
142 + | builder.success_steps = Some(deser.read_integer(member)?);
|
143 + | }
|
144 + | Some(2) => {
|
145 + | builder.failed_steps = Some(deser.read_integer(member)?);
|
146 + | }
|
147 + | Some(3) => {
|
148 + | builder.cancelled_steps = Some(deser.read_integer(member)?);
|
149 + | }
|
150 + | Some(4) => {
|
151 + | builder.timed_out_steps = Some(deser.read_integer(member)?);
|
152 + | }
|
153 + | _ => {}
|
154 + | }
|
155 + | Ok(())
|
156 + | })?;
|
157 + | Ok(builder.build())
|
158 + | }
|
159 + | }
|
160 + | impl ProgressCounters {
|
161 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
162 + | pub fn deserialize_with_response(
|
163 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
164 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
165 + | _status: u16,
|
166 + | _body: &[u8],
|
167 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
168 + | Self::deserialize(deserializer)
|
169 + | }
|
170 + | }
|
171 + | impl ProgressCounters {
|
172 + | /// Creates a new builder-style object to manufacture [`ProgressCounters`](crate::types::ProgressCounters).
|
173 + | pub fn builder() -> crate::types::builders::ProgressCountersBuilder {
|
174 + | crate::types::builders::ProgressCountersBuilder::default()
|
175 + | }
|
176 + | }
|
177 + |
|
178 + | /// A builder for [`ProgressCounters`](crate::types::ProgressCounters).
|
179 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
180 + | #[non_exhaustive]
|
181 + | pub struct ProgressCountersBuilder {
|
182 + | pub(crate) total_steps: ::std::option::Option<i32>,
|
183 + | pub(crate) success_steps: ::std::option::Option<i32>,
|
184 + | pub(crate) failed_steps: ::std::option::Option<i32>,
|
185 + | pub(crate) cancelled_steps: ::std::option::Option<i32>,
|
186 + | pub(crate) timed_out_steps: ::std::option::Option<i32>,
|
187 + | }
|
188 + | impl ProgressCountersBuilder {
|
189 + | /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
190 + | pub fn total_steps(mut self, input: i32) -> Self {
|
191 + | self.total_steps = ::std::option::Option::Some(input);
|
192 + | self
|
193 + | }
|
194 + | /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
195 + | pub fn set_total_steps(mut self, input: ::std::option::Option<i32>) -> Self {
|
196 + | self.total_steps = input;
|
197 + | self
|
198 + | }
|
199 + | /// <p>The total number of steps run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
200 + | pub fn get_total_steps(&self) -> &::std::option::Option<i32> {
|
201 + | &self.total_steps
|
202 + | }
|
203 + | /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
204 + | pub fn success_steps(mut self, input: i32) -> Self {
|
205 + | self.success_steps = ::std::option::Option::Some(input);
|
206 + | self
|
207 + | }
|
208 + | /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
209 + | pub fn set_success_steps(mut self, input: ::std::option::Option<i32>) -> Self {
|
210 + | self.success_steps = input;
|
211 + | self
|
212 + | }
|
213 + | /// <p>The total number of steps that successfully completed in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
214 + | pub fn get_success_steps(&self) -> &::std::option::Option<i32> {
|
215 + | &self.success_steps
|
216 + | }
|
217 + | /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
218 + | pub fn failed_steps(mut self, input: i32) -> Self {
|
219 + | self.failed_steps = ::std::option::Option::Some(input);
|
220 + | self
|
221 + | }
|
222 + | /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
223 + | pub fn set_failed_steps(mut self, input: ::std::option::Option<i32>) -> Self {
|
224 + | self.failed_steps = input;
|
225 + | self
|
226 + | }
|
227 + | /// <p>The total number of steps that failed to run in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
228 + | pub fn get_failed_steps(&self) -> &::std::option::Option<i32> {
|
229 + | &self.failed_steps
|
230 + | }
|
231 + | /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
232 + | pub fn cancelled_steps(mut self, input: i32) -> Self {
|
233 + | self.cancelled_steps = ::std::option::Option::Some(input);
|
234 + | self
|
235 + | }
|
236 + | /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
237 + | pub fn set_cancelled_steps(mut self, input: ::std::option::Option<i32>) -> Self {
|
238 + | self.cancelled_steps = input;
|
239 + | self
|
240 + | }
|
241 + | /// <p>The total number of steps that the system cancelled in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
242 + | pub fn get_cancelled_steps(&self) -> &::std::option::Option<i32> {
|
243 + | &self.cancelled_steps
|
244 + | }
|
245 + | /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
246 + | pub fn timed_out_steps(mut self, input: i32) -> Self {
|
247 + | self.timed_out_steps = ::std::option::Option::Some(input);
|
248 + | self
|
249 + | }
|
250 + | /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
251 + | pub fn set_timed_out_steps(mut self, input: ::std::option::Option<i32>) -> Self {
|
252 + | self.timed_out_steps = input;
|
253 + | self
|
254 + | }
|
255 + | /// <p>The total number of steps that timed out in all specified Amazon Web Services Regions and Amazon Web Services accounts for the current Automation execution.</p>
|
256 + | pub fn get_timed_out_steps(&self) -> &::std::option::Option<i32> {
|
257 + | &self.timed_out_steps
|
258 + | }
|
259 + | /// Consumes the builder and constructs a [`ProgressCounters`](crate::types::ProgressCounters).
|
260 + | pub fn build(self) -> crate::types::ProgressCounters {
|
261 + | crate::types::ProgressCounters {
|
262 + | total_steps: self.total_steps.unwrap_or_default(),
|
263 + | success_steps: self.success_steps.unwrap_or_default(),
|
264 + | failed_steps: self.failed_steps.unwrap_or_default(),
|
265 + | cancelled_steps: self.cancelled_steps.unwrap_or_default(),
|
266 + | timed_out_steps: self.timed_out_steps.unwrap_or_default(),
|
267 + | }
|
268 + | }
|
269 + | }
|