1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Includes information about the specified association.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct AssociationExecution {
|
7 + | /// <p>The association ID.</p>
|
8 + | pub association_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The association version.</p>
|
10 + | pub association_version: ::std::option::Option<::std::string::String>,
|
11 + | /// <p>The execution ID for the association.</p>
|
12 + | pub execution_id: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>The status of the association execution.</p>
|
14 + | pub status: ::std::option::Option<::std::string::String>,
|
15 + | /// <p>Detailed status information about the execution.</p>
|
16 + | pub detailed_status: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>The time the execution started.</p>
|
18 + | pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
19 + | /// <p>The date of the last execution.</p>
|
20 + | pub last_execution_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
21 + | /// <p>An aggregate status of the resources in the execution based on the status type.</p>
|
22 + | pub resource_count_by_status: ::std::option::Option<::std::string::String>,
|
23 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
24 + | pub alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
|
25 + | /// <p>The CloudWatch alarms that were invoked by the association.</p>
|
26 + | pub triggered_alarms: ::std::option::Option<::std::vec::Vec<crate::types::AlarmStateInformation>>,
|
27 + | }
|
28 + | impl AssociationExecution {
|
29 + | /// <p>The association ID.</p>
|
30 + | pub fn association_id(&self) -> ::std::option::Option<&str> {
|
31 + | self.association_id.as_deref()
|
32 + | }
|
33 + | /// <p>The association version.</p>
|
34 + | pub fn association_version(&self) -> ::std::option::Option<&str> {
|
35 + | self.association_version.as_deref()
|
36 + | }
|
37 + | /// <p>The execution ID for the association.</p>
|
38 + | pub fn execution_id(&self) -> ::std::option::Option<&str> {
|
39 + | self.execution_id.as_deref()
|
40 + | }
|
41 + | /// <p>The status of the association execution.</p>
|
42 + | pub fn status(&self) -> ::std::option::Option<&str> {
|
43 + | self.status.as_deref()
|
44 + | }
|
45 + | /// <p>Detailed status information about the execution.</p>
|
46 + | pub fn detailed_status(&self) -> ::std::option::Option<&str> {
|
47 + | self.detailed_status.as_deref()
|
48 + | }
|
49 + | /// <p>The time the execution started.</p>
|
50 + | pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
51 + | self.created_time.as_ref()
|
52 + | }
|
53 + | /// <p>The date of the last execution.</p>
|
54 + | pub fn last_execution_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
|
55 + | self.last_execution_date.as_ref()
|
56 + | }
|
57 + | /// <p>An aggregate status of the resources in the execution based on the status type.</p>
|
58 + | pub fn resource_count_by_status(&self) -> ::std::option::Option<&str> {
|
59 + | self.resource_count_by_status.as_deref()
|
60 + | }
|
61 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
62 + | pub fn alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
|
63 + | self.alarm_configuration.as_ref()
|
64 + | }
|
65 + | /// <p>The CloudWatch alarms that were invoked by the association.</p>
|
66 + | ///
|
67 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.triggered_alarms.is_none()`.
|
68 + | pub fn triggered_alarms(&self) -> &[crate::types::AlarmStateInformation] {
|
69 + | self.triggered_alarms.as_deref().unwrap_or_default()
|
70 + | }
|
71 + | }
|
72 + | static ASSOCIATIONEXECUTION_MEMBER_ASSOCIATION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
73 + | ::aws_smithy_schema::ShapeId::from_parts(
|
74 + | "com.amazonaws.ssm#AssociationExecution$AssociationId",
|
75 + | "com.amazonaws.ssm",
|
76 + | "AssociationExecution",
|
77 + | ),
|
78 + | ::aws_smithy_schema::ShapeType::String,
|
79 + | "AssociationId",
|
80 + | 0,
|
81 + | );
|
82 + | static ASSOCIATIONEXECUTION_MEMBER_ASSOCIATION_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
83 + | ::aws_smithy_schema::ShapeId::from_parts(
|
84 + | "com.amazonaws.ssm#AssociationExecution$AssociationVersion",
|
85 + | "com.amazonaws.ssm",
|
86 + | "AssociationExecution",
|
87 + | ),
|
88 + | ::aws_smithy_schema::ShapeType::String,
|
89 + | "AssociationVersion",
|
90 + | 1,
|
91 + | );
|
92 + | static ASSOCIATIONEXECUTION_MEMBER_EXECUTION_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
93 + | ::aws_smithy_schema::ShapeId::from_parts(
|
94 + | "com.amazonaws.ssm#AssociationExecution$ExecutionId",
|
95 + | "com.amazonaws.ssm",
|
96 + | "AssociationExecution",
|
97 + | ),
|
98 + | ::aws_smithy_schema::ShapeType::String,
|
99 + | "ExecutionId",
|
100 + | 2,
|
101 + | );
|
102 + | static ASSOCIATIONEXECUTION_MEMBER_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
103 + | ::aws_smithy_schema::ShapeId::from_parts(
|
104 + | "com.amazonaws.ssm#AssociationExecution$Status",
|
105 + | "com.amazonaws.ssm",
|
106 + | "AssociationExecution",
|
107 + | ),
|
108 + | ::aws_smithy_schema::ShapeType::String,
|
109 + | "Status",
|
110 + | 3,
|
111 + | );
|
112 + | static ASSOCIATIONEXECUTION_MEMBER_DETAILED_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
113 + | ::aws_smithy_schema::ShapeId::from_parts(
|
114 + | "com.amazonaws.ssm#AssociationExecution$DetailedStatus",
|
115 + | "com.amazonaws.ssm",
|
116 + | "AssociationExecution",
|
117 + | ),
|
118 + | ::aws_smithy_schema::ShapeType::String,
|
119 + | "DetailedStatus",
|
120 + | 4,
|
121 + | );
|
122 + | static ASSOCIATIONEXECUTION_MEMBER_CREATED_TIME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
123 + | ::aws_smithy_schema::ShapeId::from_parts(
|
124 + | "com.amazonaws.ssm#AssociationExecution$CreatedTime",
|
125 + | "com.amazonaws.ssm",
|
126 + | "AssociationExecution",
|
127 + | ),
|
128 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
129 + | "CreatedTime",
|
130 + | 5,
|
131 + | );
|
132 + | static ASSOCIATIONEXECUTION_MEMBER_LAST_EXECUTION_DATE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
133 + | ::aws_smithy_schema::ShapeId::from_parts(
|
134 + | "com.amazonaws.ssm#AssociationExecution$LastExecutionDate",
|
135 + | "com.amazonaws.ssm",
|
136 + | "AssociationExecution",
|
137 + | ),
|
138 + | ::aws_smithy_schema::ShapeType::Timestamp,
|
139 + | "LastExecutionDate",
|
140 + | 6,
|
141 + | );
|
142 + | static ASSOCIATIONEXECUTION_MEMBER_RESOURCE_COUNT_BY_STATUS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
143 + | ::aws_smithy_schema::ShapeId::from_parts(
|
144 + | "com.amazonaws.ssm#AssociationExecution$ResourceCountByStatus",
|
145 + | "com.amazonaws.ssm",
|
146 + | "AssociationExecution",
|
147 + | ),
|
148 + | ::aws_smithy_schema::ShapeType::String,
|
149 + | "ResourceCountByStatus",
|
150 + | 7,
|
151 + | );
|
152 + | static ASSOCIATIONEXECUTION_MEMBER_ALARM_CONFIGURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
153 + | ::aws_smithy_schema::ShapeId::from_parts(
|
154 + | "com.amazonaws.ssm#AssociationExecution$AlarmConfiguration",
|
155 + | "com.amazonaws.ssm",
|
156 + | "AssociationExecution",
|
157 + | ),
|
158 + | ::aws_smithy_schema::ShapeType::Structure,
|
159 + | "AlarmConfiguration",
|
160 + | 8,
|
161 + | );
|
162 + | static ASSOCIATIONEXECUTION_MEMBER_TRIGGERED_ALARMS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
163 + | ::aws_smithy_schema::ShapeId::from_parts(
|
164 + | "com.amazonaws.ssm#AlarmStateInformationList$member",
|
165 + | "com.amazonaws.ssm",
|
166 + | "AlarmStateInformationList",
|
167 + | ),
|
168 + | ::aws_smithy_schema::ShapeType::Structure,
|
169 + | "member",
|
170 + | 0,
|
171 + | );
|
172 + | static ASSOCIATIONEXECUTION_MEMBER_TRIGGERED_ALARMS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
173 + | ::aws_smithy_schema::ShapeId::from_parts(
|
174 + | "com.amazonaws.ssm#AssociationExecution$TriggeredAlarms",
|
175 + | "com.amazonaws.ssm",
|
176 + | "AssociationExecution",
|
177 + | ),
|
178 + | ::aws_smithy_schema::ShapeType::List,
|
179 + | "TriggeredAlarms",
|
180 + | 9,
|
181 + | )
|
182 + | .with_list_member(&ASSOCIATIONEXECUTION_MEMBER_TRIGGERED_ALARMS_MEMBER);
|
183 + | static ASSOCIATIONEXECUTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
184 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AssociationExecution", "com.amazonaws.ssm", "AssociationExecution"),
|
185 + | ::aws_smithy_schema::ShapeType::Structure,
|
186 + | &[
|
187 + | &ASSOCIATIONEXECUTION_MEMBER_ASSOCIATION_ID,
|
188 + | &ASSOCIATIONEXECUTION_MEMBER_ASSOCIATION_VERSION,
|
189 + | &ASSOCIATIONEXECUTION_MEMBER_EXECUTION_ID,
|
190 + | &ASSOCIATIONEXECUTION_MEMBER_STATUS,
|
191 + | &ASSOCIATIONEXECUTION_MEMBER_DETAILED_STATUS,
|
192 + | &ASSOCIATIONEXECUTION_MEMBER_CREATED_TIME,
|
193 + | &ASSOCIATIONEXECUTION_MEMBER_LAST_EXECUTION_DATE,
|
194 + | &ASSOCIATIONEXECUTION_MEMBER_RESOURCE_COUNT_BY_STATUS,
|
195 + | &ASSOCIATIONEXECUTION_MEMBER_ALARM_CONFIGURATION,
|
196 + | &ASSOCIATIONEXECUTION_MEMBER_TRIGGERED_ALARMS,
|
197 + | ],
|
198 + | );
|
199 + | impl AssociationExecution {
|
200 + | /// The schema for this shape.
|
201 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &ASSOCIATIONEXECUTION_SCHEMA;
|
202 + | }
|
203 + | impl ::aws_smithy_schema::serde::SerializableStruct for AssociationExecution {
|
204 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
205 + | fn serialize_members(
|
206 + | &self,
|
207 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
208 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
209 + | if let Some(ref val) = self.association_id {
|
210 + | ser.write_string(&ASSOCIATIONEXECUTION_MEMBER_ASSOCIATION_ID, val)?;
|
211 + | }
|
212 + | if let Some(ref val) = self.association_version {
|
213 + | ser.write_string(&ASSOCIATIONEXECUTION_MEMBER_ASSOCIATION_VERSION, val)?;
|
214 + | }
|
215 + | if let Some(ref val) = self.execution_id {
|
216 + | ser.write_string(&ASSOCIATIONEXECUTION_MEMBER_EXECUTION_ID, val)?;
|
217 + | }
|
218 + | if let Some(ref val) = self.status {
|
219 + | ser.write_string(&ASSOCIATIONEXECUTION_MEMBER_STATUS, val)?;
|
220 + | }
|
221 + | if let Some(ref val) = self.detailed_status {
|
222 + | ser.write_string(&ASSOCIATIONEXECUTION_MEMBER_DETAILED_STATUS, val)?;
|
223 + | }
|
224 + | if let Some(ref val) = self.created_time {
|
225 + | ser.write_timestamp(&ASSOCIATIONEXECUTION_MEMBER_CREATED_TIME, val)?;
|
226 + | }
|
227 + | if let Some(ref val) = self.last_execution_date {
|
228 + | ser.write_timestamp(&ASSOCIATIONEXECUTION_MEMBER_LAST_EXECUTION_DATE, val)?;
|
229 + | }
|
230 + | if let Some(ref val) = self.resource_count_by_status {
|
231 + | ser.write_string(&ASSOCIATIONEXECUTION_MEMBER_RESOURCE_COUNT_BY_STATUS, val)?;
|
232 + | }
|
233 + | if let Some(ref val) = self.alarm_configuration {
|
234 + | ser.write_struct(&ASSOCIATIONEXECUTION_MEMBER_ALARM_CONFIGURATION, val)?;
|
235 + | }
|
236 + | if let Some(ref val) = self.triggered_alarms {
|
237 + | ser.write_list(
|
238 + | &ASSOCIATIONEXECUTION_MEMBER_TRIGGERED_ALARMS,
|
239 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
240 + | for item in val {
|
241 + | ser.write_struct(crate::types::AlarmStateInformation::SCHEMA, item)?;
|
242 + | }
|
243 + | Ok(())
|
244 + | },
|
245 + | )?;
|
246 + | }
|
247 + | Ok(())
|
248 + | }
|
249 + | }
|
250 + | impl AssociationExecution {
|
251 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
252 + | pub fn deserialize(
|
253 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
254 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
255 + | #[allow(unused_variables, unused_mut)]
|
256 + | let mut builder = Self::builder();
|
257 + | #[allow(
|
258 + | unused_variables,
|
259 + | unreachable_code,
|
260 + | clippy::single_match,
|
261 + | clippy::match_single_binding,
|
262 + | clippy::diverging_sub_expression
|
263 + | )]
|
264 + | deserializer.read_struct(&ASSOCIATIONEXECUTION_SCHEMA, &mut |member, deser| {
|
265 + | match member.member_index() {
|
266 + | Some(0) => {
|
267 + | if deser.is_null() {
|
268 + | deser.read_null()?;
|
269 + | } else {
|
270 + | builder.association_id = Some(deser.read_string(member)?);
|
271 + | }
|
272 + | }
|
273 + | Some(1) => {
|
274 + | if deser.is_null() {
|
275 + | deser.read_null()?;
|
276 + | } else {
|
277 + | builder.association_version = Some(deser.read_string(member)?);
|
278 + | }
|
279 + | }
|
280 + | Some(2) => {
|
281 + | if deser.is_null() {
|
282 + | deser.read_null()?;
|
283 + | } else {
|
284 + | builder.execution_id = Some(deser.read_string(member)?);
|
285 + | }
|
286 + | }
|
287 + | Some(3) => {
|
288 + | if deser.is_null() {
|
289 + | deser.read_null()?;
|
290 + | } else {
|
291 + | builder.status = Some(deser.read_string(member)?);
|
292 + | }
|
293 + | }
|
294 + | Some(4) => {
|
295 + | if deser.is_null() {
|
296 + | deser.read_null()?;
|
297 + | } else {
|
298 + | builder.detailed_status = Some(deser.read_string(member)?);
|
299 + | }
|
300 + | }
|
301 + | Some(5) => {
|
302 + | if deser.is_null() {
|
303 + | deser.read_null()?;
|
304 + | } else {
|
305 + | builder.created_time = Some(deser.read_timestamp(member)?);
|
306 + | }
|
307 + | }
|
308 + | Some(6) => {
|
309 + | if deser.is_null() {
|
310 + | deser.read_null()?;
|
311 + | } else {
|
312 + | builder.last_execution_date = Some(deser.read_timestamp(member)?);
|
313 + | }
|
314 + | }
|
315 + | Some(7) => {
|
316 + | if deser.is_null() {
|
317 + | deser.read_null()?;
|
318 + | } else {
|
319 + | builder.resource_count_by_status = Some(deser.read_string(member)?);
|
320 + | }
|
321 + | }
|
322 + | Some(8) => {
|
323 + | if deser.is_null() {
|
324 + | deser.read_null()?;
|
325 + | } else {
|
326 + | builder.alarm_configuration = Some(crate::types::AlarmConfiguration::deserialize(deser)?);
|
327 + | }
|
328 + | }
|
329 + | Some(9) => {
|
330 + | if deser.is_null() {
|
331 + | deser.read_null()?;
|
332 + | } else {
|
333 + | builder.triggered_alarms = Some({
|
334 + | let mut container = Vec::new();
|
335 + | deser.read_list(member, &mut |deser| {
|
336 + | container.push(crate::types::AlarmStateInformation::deserialize(deser)?);
|
337 + | Ok(())
|
338 + | })?;
|
339 + | container
|
340 + | });
|
341 + | }
|
342 + | }
|
343 + | _ => {}
|
344 + | }
|
345 + | Ok(())
|
346 + | })?;
|
347 + | Ok(builder.build())
|
348 + | }
|
349 + | }
|
350 + | impl AssociationExecution {
|
351 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
352 + | pub fn deserialize_with_response(
|
353 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
354 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
355 + | _status: u16,
|
356 + | _body: &[u8],
|
357 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
358 + | Self::deserialize(deserializer)
|
359 + | }
|
360 + | }
|
361 + | impl AssociationExecution {
|
362 + | /// Creates a new builder-style object to manufacture [`AssociationExecution`](crate::types::AssociationExecution).
|
363 + | pub fn builder() -> crate::types::builders::AssociationExecutionBuilder {
|
364 + | crate::types::builders::AssociationExecutionBuilder::default()
|
365 + | }
|
366 + | }
|
367 + |
|
368 + | /// A builder for [`AssociationExecution`](crate::types::AssociationExecution).
|
369 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
370 + | #[non_exhaustive]
|
371 + | pub struct AssociationExecutionBuilder {
|
372 + | pub(crate) association_id: ::std::option::Option<::std::string::String>,
|
373 + | pub(crate) association_version: ::std::option::Option<::std::string::String>,
|
374 + | pub(crate) execution_id: ::std::option::Option<::std::string::String>,
|
375 + | pub(crate) status: ::std::option::Option<::std::string::String>,
|
376 + | pub(crate) detailed_status: ::std::option::Option<::std::string::String>,
|
377 + | pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
|
378 + | pub(crate) last_execution_date: ::std::option::Option<::aws_smithy_types::DateTime>,
|
379 + | pub(crate) resource_count_by_status: ::std::option::Option<::std::string::String>,
|
380 + | pub(crate) alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
|
381 + | pub(crate) triggered_alarms: ::std::option::Option<::std::vec::Vec<crate::types::AlarmStateInformation>>,
|
382 + | }
|
383 + | impl AssociationExecutionBuilder {
|
384 + | /// <p>The association ID.</p>
|
385 + | pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
386 + | self.association_id = ::std::option::Option::Some(input.into());
|
387 + | self
|
388 + | }
|
389 + | /// <p>The association ID.</p>
|
390 + | pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
391 + | self.association_id = input;
|
392 + | self
|
393 + | }
|
394 + | /// <p>The association ID.</p>
|
395 + | pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
|
396 + | &self.association_id
|
397 + | }
|
398 + | /// <p>The association version.</p>
|
399 + | pub fn association_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
400 + | self.association_version = ::std::option::Option::Some(input.into());
|
401 + | self
|
402 + | }
|
403 + | /// <p>The association version.</p>
|
404 + | pub fn set_association_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
405 + | self.association_version = input;
|
406 + | self
|
407 + | }
|
408 + | /// <p>The association version.</p>
|
409 + | pub fn get_association_version(&self) -> &::std::option::Option<::std::string::String> {
|
410 + | &self.association_version
|
411 + | }
|
412 + | /// <p>The execution ID for the association.</p>
|
413 + | pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
414 + | self.execution_id = ::std::option::Option::Some(input.into());
|
415 + | self
|
416 + | }
|
417 + | /// <p>The execution ID for the association.</p>
|
418 + | pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
419 + | self.execution_id = input;
|
420 + | self
|
421 + | }
|
422 + | /// <p>The execution ID for the association.</p>
|
423 + | pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
|
424 + | &self.execution_id
|
425 + | }
|
426 + | /// <p>The status of the association execution.</p>
|
427 + | pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
428 + | self.status = ::std::option::Option::Some(input.into());
|
429 + | self
|
430 + | }
|
431 + | /// <p>The status of the association execution.</p>
|
432 + | pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
433 + | self.status = input;
|
434 + | self
|
435 + | }
|
436 + | /// <p>The status of the association execution.</p>
|
437 + | pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
|
438 + | &self.status
|
439 + | }
|
440 + | /// <p>Detailed status information about the execution.</p>
|
441 + | pub fn detailed_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
442 + | self.detailed_status = ::std::option::Option::Some(input.into());
|
443 + | self
|
444 + | }
|
445 + | /// <p>Detailed status information about the execution.</p>
|
446 + | pub fn set_detailed_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
447 + | self.detailed_status = input;
|
448 + | self
|
449 + | }
|
450 + | /// <p>Detailed status information about the execution.</p>
|
451 + | pub fn get_detailed_status(&self) -> &::std::option::Option<::std::string::String> {
|
452 + | &self.detailed_status
|
453 + | }
|
454 + | /// <p>The time the execution started.</p>
|
455 + | pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
456 + | self.created_time = ::std::option::Option::Some(input);
|
457 + | self
|
458 + | }
|
459 + | /// <p>The time the execution started.</p>
|
460 + | pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
461 + | self.created_time = input;
|
462 + | self
|
463 + | }
|
464 + | /// <p>The time the execution started.</p>
|
465 + | pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
466 + | &self.created_time
|
467 + | }
|
468 + | /// <p>The date of the last execution.</p>
|
469 + | pub fn last_execution_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
|
470 + | self.last_execution_date = ::std::option::Option::Some(input);
|
471 + | self
|
472 + | }
|
473 + | /// <p>The date of the last execution.</p>
|
474 + | pub fn set_last_execution_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
|
475 + | self.last_execution_date = input;
|
476 + | self
|
477 + | }
|
478 + | /// <p>The date of the last execution.</p>
|
479 + | pub fn get_last_execution_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
|
480 + | &self.last_execution_date
|
481 + | }
|
482 + | /// <p>An aggregate status of the resources in the execution based on the status type.</p>
|
483 + | pub fn resource_count_by_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
484 + | self.resource_count_by_status = ::std::option::Option::Some(input.into());
|
485 + | self
|
486 + | }
|
487 + | /// <p>An aggregate status of the resources in the execution based on the status type.</p>
|
488 + | pub fn set_resource_count_by_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
489 + | self.resource_count_by_status = input;
|
490 + | self
|
491 + | }
|
492 + | /// <p>An aggregate status of the resources in the execution based on the status type.</p>
|
493 + | pub fn get_resource_count_by_status(&self) -> &::std::option::Option<::std::string::String> {
|
494 + | &self.resource_count_by_status
|
495 + | }
|
496 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
497 + | pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
|
498 + | self.alarm_configuration = ::std::option::Option::Some(input);
|
499 + | self
|
500 + | }
|
501 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
502 + | pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
|
503 + | self.alarm_configuration = input;
|
504 + | self
|
505 + | }
|
506 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
507 + | pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
|
508 + | &self.alarm_configuration
|
509 + | }
|
510 + | /// Appends an item to `triggered_alarms`.
|
511 + | ///
|
512 + | /// To override the contents of this collection use [`set_triggered_alarms`](Self::set_triggered_alarms).
|
513 + | ///
|
514 + | /// <p>The CloudWatch alarms that were invoked by the association.</p>
|
515 + | pub fn triggered_alarms(mut self, input: crate::types::AlarmStateInformation) -> Self {
|
516 + | let mut v = self.triggered_alarms.unwrap_or_default();
|
517 + | v.push(input);
|
518 + | self.triggered_alarms = ::std::option::Option::Some(v);
|
519 + | self
|
520 + | }
|
521 + | /// <p>The CloudWatch alarms that were invoked by the association.</p>
|
522 + | pub fn set_triggered_alarms(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AlarmStateInformation>>) -> Self {
|
523 + | self.triggered_alarms = input;
|
524 + | self
|
525 + | }
|
526 + | /// <p>The CloudWatch alarms that were invoked by the association.</p>
|
527 + | pub fn get_triggered_alarms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AlarmStateInformation>> {
|
528 + | &self.triggered_alarms
|
529 + | }
|
530 + | /// Consumes the builder and constructs a [`AssociationExecution`](crate::types::AssociationExecution).
|
531 + | pub fn build(self) -> crate::types::AssociationExecution {
|
532 + | crate::types::AssociationExecution {
|
533 + | association_id: self.association_id,
|
534 + | association_version: self.association_version,
|
535 + | execution_id: self.execution_id,
|
536 + | status: self.status,
|
537 + | detailed_status: self.detailed_status,
|
538 + | created_time: self.created_time,
|
539 + | last_execution_date: self.last_execution_date,
|
540 + | resource_count_by_status: self.resource_count_by_status,
|
541 + | alarm_configuration: self.alarm_configuration,
|
542 + | triggered_alarms: self.triggered_alarms,
|
543 + | }
|
544 + | }
|
545 + | }
|