aws-sdk-devopsguru 0.0.24-alpha

AWS SDK for Amazon DevOps Guru
Documentation
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn serialize_structure_crate_input_add_notification_channel_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::AddNotificationChannelInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_1) = &input.config {
        let mut object_2 = object.key("Config").start_object();
        crate::json_ser::serialize_structure_crate_model_notification_channel_config(
            &mut object_2,
            var_1,
        )?;
        object_2.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_account_overview_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeAccountOverviewInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_3) = &input.from_time {
        object
            .key("FromTime")
            .instant(var_3, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_4) = &input.to_time {
        object
            .key("ToTime")
            .instant(var_4, aws_smithy_types::instant::Format::EpochSeconds);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_describe_feedback_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::DescribeFeedbackInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_5) = &input.insight_id {
        object.key("InsightId").string(var_5);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_anomalies_for_insight_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListAnomaliesForInsightInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_6) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_6).into()),
        );
    }
    if let Some(var_7) = &input.next_token {
        object.key("NextToken").string(var_7);
    }
    if let Some(var_8) = &input.start_time_range {
        let mut object_9 = object.key("StartTimeRange").start_object();
        crate::json_ser::serialize_structure_crate_model_start_time_range(&mut object_9, var_8)?;
        object_9.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_events_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListEventsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_10) = &input.filters {
        let mut object_11 = object.key("Filters").start_object();
        crate::json_ser::serialize_structure_crate_model_list_events_filters(
            &mut object_11,
            var_10,
        )?;
        object_11.finish();
    }
    if let Some(var_12) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_12).into()),
        );
    }
    if let Some(var_13) = &input.next_token {
        object.key("NextToken").string(var_13);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_insights_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListInsightsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_14) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_14).into()),
        );
    }
    if let Some(var_15) = &input.next_token {
        object.key("NextToken").string(var_15);
    }
    if let Some(var_16) = &input.status_filter {
        let mut object_17 = object.key("StatusFilter").start_object();
        crate::json_ser::serialize_structure_crate_model_list_insights_status_filter(
            &mut object_17,
            var_16,
        )?;
        object_17.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_notification_channels_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListNotificationChannelsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_18) = &input.next_token {
        object.key("NextToken").string(var_18);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_list_recommendations_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::ListRecommendationsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_19) = &input.insight_id {
        object.key("InsightId").string(var_19);
    }
    if let Some(var_20) = &input.locale {
        object.key("Locale").string(var_20.as_str());
    }
    if let Some(var_21) = &input.next_token {
        object.key("NextToken").string(var_21);
    }
    Ok(())
}

pub fn serialize_structure_crate_input_put_feedback_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::PutFeedbackInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_22) = &input.insight_feedback {
        let mut object_23 = object.key("InsightFeedback").start_object();
        crate::json_ser::serialize_structure_crate_model_insight_feedback(&mut object_23, var_22)?;
        object_23.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_search_insights_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::SearchInsightsInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_24) = &input.filters {
        let mut object_25 = object.key("Filters").start_object();
        crate::json_ser::serialize_structure_crate_model_search_insights_filters(
            &mut object_25,
            var_24,
        )?;
        object_25.finish();
    }
    if let Some(var_26) = &input.max_results {
        object.key("MaxResults").number(
            #[allow(clippy::useless_conversion)]
            aws_smithy_types::Number::NegInt((*var_26).into()),
        );
    }
    if let Some(var_27) = &input.next_token {
        object.key("NextToken").string(var_27);
    }
    if let Some(var_28) = &input.start_time_range {
        let mut object_29 = object.key("StartTimeRange").start_object();
        crate::json_ser::serialize_structure_crate_model_start_time_range(&mut object_29, var_28)?;
        object_29.finish();
    }
    if let Some(var_30) = &input.r#type {
        object.key("Type").string(var_30.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_input_start_cost_estimation_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::StartCostEstimationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_31) = &input.client_token {
        object.key("ClientToken").string(var_31);
    }
    if let Some(var_32) = &input.resource_collection {
        let mut object_33 = object.key("ResourceCollection").start_object();
        crate::json_ser::serialize_structure_crate_model_cost_estimation_resource_collection_filter(&mut object_33, var_32)?;
        object_33.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_resource_collection_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateResourceCollectionInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_34) = &input.action {
        object.key("Action").string(var_34.as_str());
    }
    if let Some(var_35) = &input.resource_collection {
        let mut object_36 = object.key("ResourceCollection").start_object();
        crate::json_ser::serialize_structure_crate_model_update_resource_collection_filter(
            &mut object_36,
            var_35,
        )?;
        object_36.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_input_update_service_integration_input(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::input::UpdateServiceIntegrationInput,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_37) = &input.service_integration {
        let mut object_38 = object.key("ServiceIntegration").start_object();
        crate::json_ser::serialize_structure_crate_model_update_service_integration_config(
            &mut object_38,
            var_37,
        )?;
        object_38.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_notification_channel_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::NotificationChannelConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_39) = &input.sns {
        let mut object_40 = object.key("Sns").start_object();
        crate::json_ser::serialize_structure_crate_model_sns_channel_config(
            &mut object_40,
            var_39,
        )?;
        object_40.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_start_time_range(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::StartTimeRange,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_41) = &input.from_time {
        object
            .key("FromTime")
            .instant(var_41, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_42) = &input.to_time {
        object
            .key("ToTime")
            .instant(var_42, aws_smithy_types::instant::Format::EpochSeconds);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_list_events_filters(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ListEventsFilters,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_43) = &input.insight_id {
        object.key("InsightId").string(var_43);
    }
    if let Some(var_44) = &input.event_time_range {
        let mut object_45 = object.key("EventTimeRange").start_object();
        crate::json_ser::serialize_structure_crate_model_event_time_range(&mut object_45, var_44)?;
        object_45.finish();
    }
    if let Some(var_46) = &input.event_class {
        object.key("EventClass").string(var_46.as_str());
    }
    if let Some(var_47) = &input.event_source {
        object.key("EventSource").string(var_47);
    }
    if let Some(var_48) = &input.data_source {
        object.key("DataSource").string(var_48.as_str());
    }
    if let Some(var_49) = &input.resource_collection {
        let mut object_50 = object.key("ResourceCollection").start_object();
        crate::json_ser::serialize_structure_crate_model_resource_collection(
            &mut object_50,
            var_49,
        )?;
        object_50.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_list_insights_status_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ListInsightsStatusFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_51) = &input.ongoing {
        let mut object_52 = object.key("Ongoing").start_object();
        crate::json_ser::serialize_structure_crate_model_list_insights_ongoing_status_filter(
            &mut object_52,
            var_51,
        )?;
        object_52.finish();
    }
    if let Some(var_53) = &input.closed {
        let mut object_54 = object.key("Closed").start_object();
        crate::json_ser::serialize_structure_crate_model_list_insights_closed_status_filter(
            &mut object_54,
            var_53,
        )?;
        object_54.finish();
    }
    if let Some(var_55) = &input.any {
        let mut object_56 = object.key("Any").start_object();
        crate::json_ser::serialize_structure_crate_model_list_insights_any_status_filter(
            &mut object_56,
            var_55,
        )?;
        object_56.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_insight_feedback(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::InsightFeedback,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_57) = &input.id {
        object.key("Id").string(var_57);
    }
    if let Some(var_58) = &input.feedback {
        object.key("Feedback").string(var_58.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_search_insights_filters(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::SearchInsightsFilters,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_59) = &input.severities {
        let mut array_60 = object.key("Severities").start_array();
        for item_61 in var_59 {
            {
                array_60.value().string(item_61.as_str());
            }
        }
        array_60.finish();
    }
    if let Some(var_62) = &input.statuses {
        let mut array_63 = object.key("Statuses").start_array();
        for item_64 in var_62 {
            {
                array_63.value().string(item_64.as_str());
            }
        }
        array_63.finish();
    }
    if let Some(var_65) = &input.resource_collection {
        let mut object_66 = object.key("ResourceCollection").start_object();
        crate::json_ser::serialize_structure_crate_model_resource_collection(
            &mut object_66,
            var_65,
        )?;
        object_66.finish();
    }
    if let Some(var_67) = &input.service_collection {
        let mut object_68 = object.key("ServiceCollection").start_object();
        crate::json_ser::serialize_structure_crate_model_service_collection(
            &mut object_68,
            var_67,
        )?;
        object_68.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_cost_estimation_resource_collection_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CostEstimationResourceCollectionFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_69) = &input.cloud_formation {
        let mut object_70 = object.key("CloudFormation").start_object();
        crate::json_ser::serialize_structure_crate_model_cloud_formation_cost_estimation_resource_collection_filter(&mut object_70, var_69)?;
        object_70.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_update_resource_collection_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::UpdateResourceCollectionFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_71) = &input.cloud_formation {
        let mut object_72 = object.key("CloudFormation").start_object();
        crate::json_ser::serialize_structure_crate_model_update_cloud_formation_collection_filter(
            &mut object_72,
            var_71,
        )?;
        object_72.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_update_service_integration_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::UpdateServiceIntegrationConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_73) = &input.ops_center {
        let mut object_74 = object.key("OpsCenter").start_object();
        crate::json_ser::serialize_structure_crate_model_ops_center_integration_config(
            &mut object_74,
            var_73,
        )?;
        object_74.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_sns_channel_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::SnsChannelConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_75) = &input.topic_arn {
        object.key("TopicArn").string(var_75);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_event_time_range(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::EventTimeRange,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_76) = &input.from_time {
        object
            .key("FromTime")
            .instant(var_76, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_77) = &input.to_time {
        object
            .key("ToTime")
            .instant(var_77, aws_smithy_types::instant::Format::EpochSeconds);
    }
    Ok(())
}

pub fn serialize_structure_crate_model_resource_collection(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ResourceCollection,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_78) = &input.cloud_formation {
        let mut object_79 = object.key("CloudFormation").start_object();
        crate::json_ser::serialize_structure_crate_model_cloud_formation_collection(
            &mut object_79,
            var_78,
        )?;
        object_79.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_list_insights_ongoing_status_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ListInsightsOngoingStatusFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_80) = &input.r#type {
        object.key("Type").string(var_80.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_list_insights_closed_status_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ListInsightsClosedStatusFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_81) = &input.r#type {
        object.key("Type").string(var_81.as_str());
    }
    if let Some(var_82) = &input.end_time_range {
        let mut object_83 = object.key("EndTimeRange").start_object();
        crate::json_ser::serialize_structure_crate_model_end_time_range(&mut object_83, var_82)?;
        object_83.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_list_insights_any_status_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ListInsightsAnyStatusFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_84) = &input.r#type {
        object.key("Type").string(var_84.as_str());
    }
    if let Some(var_85) = &input.start_time_range {
        let mut object_86 = object.key("StartTimeRange").start_object();
        crate::json_ser::serialize_structure_crate_model_start_time_range(&mut object_86, var_85)?;
        object_86.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_service_collection(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::ServiceCollection,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_87) = &input.service_names {
        let mut array_88 = object.key("ServiceNames").start_array();
        for item_89 in var_87 {
            {
                array_88.value().string(item_89.as_str());
            }
        }
        array_88.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_cloud_formation_cost_estimation_resource_collection_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CloudFormationCostEstimationResourceCollectionFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_90) = &input.stack_names {
        let mut array_91 = object.key("StackNames").start_array();
        for item_92 in var_90 {
            {
                array_91.value().string(item_92);
            }
        }
        array_91.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_update_cloud_formation_collection_filter(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::UpdateCloudFormationCollectionFilter,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_93) = &input.stack_names {
        let mut array_94 = object.key("StackNames").start_array();
        for item_95 in var_93 {
            {
                array_94.value().string(item_95);
            }
        }
        array_94.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_ops_center_integration_config(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::OpsCenterIntegrationConfig,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_96) = &input.opt_in_status {
        object.key("OptInStatus").string(var_96.as_str());
    }
    Ok(())
}

pub fn serialize_structure_crate_model_cloud_formation_collection(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::CloudFormationCollection,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_97) = &input.stack_names {
        let mut array_98 = object.key("StackNames").start_array();
        for item_99 in var_97 {
            {
                array_98.value().string(item_99);
            }
        }
        array_98.finish();
    }
    Ok(())
}

pub fn serialize_structure_crate_model_end_time_range(
    object: &mut aws_smithy_json::serialize::JsonObjectWriter,
    input: &crate::model::EndTimeRange,
) -> Result<(), aws_smithy_http::operation::SerializationError> {
    if let Some(var_100) = &input.from_time {
        object
            .key("FromTime")
            .instant(var_100, aws_smithy_types::instant::Format::EpochSeconds);
    }
    if let Some(var_101) = &input.to_time {
        object
            .key("ToTime")
            .instant(var_101, aws_smithy_types::instant::Format::EpochSeconds);
    }
    Ok(())
}