1use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28#[derive(Clone, Debug, Default, PartialEq, Serialize)]
30#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
31pub struct AddNotificationChannelsRequest {
32 #[serde(rename = "channels")]
34 pub channels: Vec<Channel>,
35 #[serde(rename = "profilingGroupName")]
37 pub profiling_group_name: String,
38}
39
40#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
42#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
43pub struct AddNotificationChannelsResponse {
44 #[serde(rename = "notificationConfiguration")]
46 #[serde(skip_serializing_if = "Option::is_none")]
47 pub notification_configuration: Option<NotificationConfiguration>,
48}
49
50#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
52#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
53pub struct AgentConfiguration {
54 #[serde(rename = "agentParameters")]
56 #[serde(skip_serializing_if = "Option::is_none")]
57 pub agent_parameters: Option<::std::collections::HashMap<String, String>>,
58 #[serde(rename = "periodInSeconds")]
60 pub period_in_seconds: i64,
61 #[serde(rename = "shouldProfile")]
63 pub should_profile: bool,
64}
65
66#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
68pub struct AgentOrchestrationConfig {
69 #[serde(rename = "profilingEnabled")]
71 pub profiling_enabled: bool,
72}
73
74#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
76#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
77pub struct AggregatedProfileTime {
78 #[serde(rename = "period")]
80 #[serde(skip_serializing_if = "Option::is_none")]
81 pub period: Option<String>,
82 #[serde(rename = "start")]
84 #[serde(skip_serializing_if = "Option::is_none")]
85 pub start: Option<f64>,
86}
87
88#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
90#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
91pub struct Anomaly {
92 #[serde(rename = "instances")]
94 pub instances: Vec<AnomalyInstance>,
95 #[serde(rename = "metric")]
97 pub metric: Metric,
98 #[serde(rename = "reason")]
100 pub reason: String,
101}
102
103#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
105#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
106pub struct AnomalyInstance {
107 #[serde(rename = "endTime")]
109 #[serde(skip_serializing_if = "Option::is_none")]
110 pub end_time: Option<f64>,
111 #[serde(rename = "id")]
113 pub id: String,
114 #[serde(rename = "startTime")]
116 pub start_time: f64,
117 #[serde(rename = "userFeedback")]
119 #[serde(skip_serializing_if = "Option::is_none")]
120 pub user_feedback: Option<UserFeedback>,
121}
122
123#[derive(Clone, Debug, Default, PartialEq, Serialize)]
125#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
126pub struct BatchGetFrameMetricDataRequest {
127 #[serde(rename = "endTime")]
129 #[serde(skip_serializing_if = "Option::is_none")]
130 pub end_time: Option<f64>,
131 #[serde(rename = "frameMetrics")]
133 #[serde(skip_serializing_if = "Option::is_none")]
134 pub frame_metrics: Option<Vec<FrameMetric>>,
135 #[serde(rename = "period")]
137 #[serde(skip_serializing_if = "Option::is_none")]
138 pub period: Option<String>,
139 #[serde(rename = "profilingGroupName")]
141 pub profiling_group_name: String,
142 #[serde(rename = "startTime")]
144 #[serde(skip_serializing_if = "Option::is_none")]
145 pub start_time: Option<f64>,
146 #[serde(rename = "targetResolution")]
148 #[serde(skip_serializing_if = "Option::is_none")]
149 pub target_resolution: Option<String>,
150}
151
152#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
154#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
155pub struct BatchGetFrameMetricDataResponse {
156 #[serde(rename = "endTime")]
158 pub end_time: f64,
159 #[serde(rename = "endTimes")]
161 pub end_times: Vec<TimestampStructure>,
162 #[serde(rename = "frameMetricData")]
164 pub frame_metric_data: Vec<FrameMetricDatum>,
165 #[serde(rename = "resolution")]
167 pub resolution: String,
168 #[serde(rename = "startTime")]
170 pub start_time: f64,
171 #[serde(rename = "unprocessedEndTimes")]
173 pub unprocessed_end_times: ::std::collections::HashMap<String, Vec<TimestampStructure>>,
174}
175
176#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
178pub struct Channel {
179 #[serde(rename = "eventPublishers")]
181 pub event_publishers: Vec<String>,
182 #[serde(rename = "id")]
184 #[serde(skip_serializing_if = "Option::is_none")]
185 pub id: Option<String>,
186 #[serde(rename = "uri")]
188 pub uri: String,
189}
190
191#[derive(Clone, Debug, Default, PartialEq, Serialize)]
193#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
194pub struct ConfigureAgentRequest {
195 #[serde(rename = "fleetInstanceId")]
197 #[serde(skip_serializing_if = "Option::is_none")]
198 pub fleet_instance_id: Option<String>,
199 #[serde(rename = "metadata")]
201 #[serde(skip_serializing_if = "Option::is_none")]
202 pub metadata: Option<::std::collections::HashMap<String, String>>,
203 #[serde(rename = "profilingGroupName")]
205 pub profiling_group_name: String,
206}
207
208#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
210#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
211pub struct ConfigureAgentResponse {
212 #[serde(rename = "configuration")]
214 pub configuration: AgentConfiguration,
215}
216
217#[derive(Clone, Debug, Default, PartialEq, Serialize)]
219#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
220pub struct CreateProfilingGroupRequest {
221 #[serde(rename = "agentOrchestrationConfig")]
223 #[serde(skip_serializing_if = "Option::is_none")]
224 pub agent_orchestration_config: Option<AgentOrchestrationConfig>,
225 #[serde(rename = "clientToken")]
227 pub client_token: String,
228 #[serde(rename = "computePlatform")]
230 #[serde(skip_serializing_if = "Option::is_none")]
231 pub compute_platform: Option<String>,
232 #[serde(rename = "profilingGroupName")]
234 pub profiling_group_name: String,
235}
236
237#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
239#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
240pub struct CreateProfilingGroupResponse {
241 #[serde(rename = "profilingGroup")]
243 pub profiling_group: ProfilingGroupDescription,
244}
245
246#[derive(Clone, Debug, Default, PartialEq, Serialize)]
248#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
249pub struct DeleteProfilingGroupRequest {
250 #[serde(rename = "profilingGroupName")]
252 pub profiling_group_name: String,
253}
254
255#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
257#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
258pub struct DeleteProfilingGroupResponse {}
259
260#[derive(Clone, Debug, Default, PartialEq, Serialize)]
262#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
263pub struct DescribeProfilingGroupRequest {
264 #[serde(rename = "profilingGroupName")]
266 pub profiling_group_name: String,
267}
268
269#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
271#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
272pub struct DescribeProfilingGroupResponse {
273 #[serde(rename = "profilingGroup")]
275 pub profiling_group: ProfilingGroupDescription,
276}
277
278#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
280#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
281pub struct FindingsReportSummary {
282 #[serde(rename = "id")]
284 #[serde(skip_serializing_if = "Option::is_none")]
285 pub id: Option<String>,
286 #[serde(rename = "profileEndTime")]
288 #[serde(skip_serializing_if = "Option::is_none")]
289 pub profile_end_time: Option<f64>,
290 #[serde(rename = "profileStartTime")]
292 #[serde(skip_serializing_if = "Option::is_none")]
293 pub profile_start_time: Option<f64>,
294 #[serde(rename = "profilingGroupName")]
296 #[serde(skip_serializing_if = "Option::is_none")]
297 pub profiling_group_name: Option<String>,
298 #[serde(rename = "totalNumberOfFindings")]
300 #[serde(skip_serializing_if = "Option::is_none")]
301 pub total_number_of_findings: Option<i64>,
302}
303
304#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
306pub struct FrameMetric {
307 #[serde(rename = "frameName")]
309 pub frame_name: String,
310 #[serde(rename = "threadStates")]
312 pub thread_states: Vec<String>,
313 #[serde(rename = "type")]
315 pub type_: String,
316}
317
318#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
320#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
321pub struct FrameMetricDatum {
322 #[serde(rename = "frameMetric")]
323 pub frame_metric: FrameMetric,
324 #[serde(rename = "values")]
326 pub values: Vec<f64>,
327}
328
329#[derive(Clone, Debug, Default, PartialEq, Serialize)]
331#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
332pub struct GetFindingsReportAccountSummaryRequest {
333 #[serde(rename = "dailyReportsOnly")]
335 #[serde(skip_serializing_if = "Option::is_none")]
336 pub daily_reports_only: Option<bool>,
337 #[serde(rename = "maxResults")]
339 #[serde(skip_serializing_if = "Option::is_none")]
340 pub max_results: Option<i64>,
341 #[serde(rename = "nextToken")]
343 #[serde(skip_serializing_if = "Option::is_none")]
344 pub next_token: Option<String>,
345}
346
347#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
349#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
350pub struct GetFindingsReportAccountSummaryResponse {
351 #[serde(rename = "nextToken")]
353 #[serde(skip_serializing_if = "Option::is_none")]
354 pub next_token: Option<String>,
355 #[serde(rename = "reportSummaries")]
357 pub report_summaries: Vec<FindingsReportSummary>,
358}
359
360#[derive(Clone, Debug, Default, PartialEq, Serialize)]
362#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
363pub struct GetNotificationConfigurationRequest {
364 #[serde(rename = "profilingGroupName")]
366 pub profiling_group_name: String,
367}
368
369#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
371#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
372pub struct GetNotificationConfigurationResponse {
373 #[serde(rename = "notificationConfiguration")]
375 pub notification_configuration: NotificationConfiguration,
376}
377
378#[derive(Clone, Debug, Default, PartialEq, Serialize)]
380#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
381pub struct GetPolicyRequest {
382 #[serde(rename = "profilingGroupName")]
384 pub profiling_group_name: String,
385}
386
387#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
389#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
390pub struct GetPolicyResponse {
391 #[serde(rename = "policy")]
393 pub policy: String,
394 #[serde(rename = "revisionId")]
396 pub revision_id: String,
397}
398
399#[derive(Clone, Debug, Default, PartialEq, Serialize)]
401#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
402pub struct GetProfileRequest {
403 #[serde(rename = "accept")]
405 #[serde(skip_serializing_if = "Option::is_none")]
406 pub accept: Option<String>,
407 #[serde(rename = "endTime")]
409 #[serde(skip_serializing_if = "Option::is_none")]
410 pub end_time: Option<f64>,
411 #[serde(rename = "maxDepth")]
413 #[serde(skip_serializing_if = "Option::is_none")]
414 pub max_depth: Option<i64>,
415 #[serde(rename = "period")]
417 #[serde(skip_serializing_if = "Option::is_none")]
418 pub period: Option<String>,
419 #[serde(rename = "profilingGroupName")]
421 pub profiling_group_name: String,
422 #[serde(rename = "startTime")]
424 #[serde(skip_serializing_if = "Option::is_none")]
425 pub start_time: Option<f64>,
426}
427
428#[derive(Clone, Debug, Default, PartialEq)]
430pub struct GetProfileResponse {
431 pub content_encoding: Option<String>,
433 pub content_type: String,
435 pub profile: bytes::Bytes,
437}
438
439#[derive(Clone, Debug, Default, PartialEq, Serialize)]
441#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
442pub struct GetRecommendationsRequest {
443 #[serde(rename = "endTime")]
445 pub end_time: f64,
446 #[serde(rename = "locale")]
448 #[serde(skip_serializing_if = "Option::is_none")]
449 pub locale: Option<String>,
450 #[serde(rename = "profilingGroupName")]
452 pub profiling_group_name: String,
453 #[serde(rename = "startTime")]
455 pub start_time: f64,
456}
457
458#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
460#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
461pub struct GetRecommendationsResponse {
462 #[serde(rename = "anomalies")]
464 pub anomalies: Vec<Anomaly>,
465 #[serde(rename = "profileEndTime")]
467 pub profile_end_time: f64,
468 #[serde(rename = "profileStartTime")]
470 pub profile_start_time: f64,
471 #[serde(rename = "profilingGroupName")]
473 pub profiling_group_name: String,
474 #[serde(rename = "recommendations")]
476 pub recommendations: Vec<Recommendation>,
477}
478
479#[derive(Clone, Debug, Default, PartialEq, Serialize)]
481#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
482pub struct ListFindingsReportsRequest {
483 #[serde(rename = "dailyReportsOnly")]
485 #[serde(skip_serializing_if = "Option::is_none")]
486 pub daily_reports_only: Option<bool>,
487 #[serde(rename = "endTime")]
489 pub end_time: f64,
490 #[serde(rename = "maxResults")]
492 #[serde(skip_serializing_if = "Option::is_none")]
493 pub max_results: Option<i64>,
494 #[serde(rename = "nextToken")]
496 #[serde(skip_serializing_if = "Option::is_none")]
497 pub next_token: Option<String>,
498 #[serde(rename = "profilingGroupName")]
500 pub profiling_group_name: String,
501 #[serde(rename = "startTime")]
503 pub start_time: f64,
504}
505
506#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
508#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
509pub struct ListFindingsReportsResponse {
510 #[serde(rename = "findingsReportSummaries")]
512 pub findings_report_summaries: Vec<FindingsReportSummary>,
513 #[serde(rename = "nextToken")]
515 #[serde(skip_serializing_if = "Option::is_none")]
516 pub next_token: Option<String>,
517}
518
519#[derive(Clone, Debug, Default, PartialEq, Serialize)]
521#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
522pub struct ListProfileTimesRequest {
523 #[serde(rename = "endTime")]
525 pub end_time: f64,
526 #[serde(rename = "maxResults")]
528 #[serde(skip_serializing_if = "Option::is_none")]
529 pub max_results: Option<i64>,
530 #[serde(rename = "nextToken")]
532 #[serde(skip_serializing_if = "Option::is_none")]
533 pub next_token: Option<String>,
534 #[serde(rename = "orderBy")]
536 #[serde(skip_serializing_if = "Option::is_none")]
537 pub order_by: Option<String>,
538 #[serde(rename = "period")]
540 pub period: String,
541 #[serde(rename = "profilingGroupName")]
543 pub profiling_group_name: String,
544 #[serde(rename = "startTime")]
546 pub start_time: f64,
547}
548
549#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
551#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
552pub struct ListProfileTimesResponse {
553 #[serde(rename = "nextToken")]
555 #[serde(skip_serializing_if = "Option::is_none")]
556 pub next_token: Option<String>,
557 #[serde(rename = "profileTimes")]
559 pub profile_times: Vec<ProfileTime>,
560}
561
562#[derive(Clone, Debug, Default, PartialEq, Serialize)]
564#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
565pub struct ListProfilingGroupsRequest {
566 #[serde(rename = "includeDescription")]
568 #[serde(skip_serializing_if = "Option::is_none")]
569 pub include_description: Option<bool>,
570 #[serde(rename = "maxResults")]
572 #[serde(skip_serializing_if = "Option::is_none")]
573 pub max_results: Option<i64>,
574 #[serde(rename = "nextToken")]
576 #[serde(skip_serializing_if = "Option::is_none")]
577 pub next_token: Option<String>,
578}
579
580#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
582#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
583pub struct ListProfilingGroupsResponse {
584 #[serde(rename = "nextToken")]
586 #[serde(skip_serializing_if = "Option::is_none")]
587 pub next_token: Option<String>,
588 #[serde(rename = "profilingGroupNames")]
590 pub profiling_group_names: Vec<String>,
591 #[serde(rename = "profilingGroups")]
593 #[serde(skip_serializing_if = "Option::is_none")]
594 pub profiling_groups: Option<Vec<ProfilingGroupDescription>>,
595}
596
597#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
599#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
600pub struct Match {
601 #[serde(rename = "frameAddress")]
603 #[serde(skip_serializing_if = "Option::is_none")]
604 pub frame_address: Option<String>,
605 #[serde(rename = "targetFramesIndex")]
607 #[serde(skip_serializing_if = "Option::is_none")]
608 pub target_frames_index: Option<i64>,
609 #[serde(rename = "thresholdBreachValue")]
611 #[serde(skip_serializing_if = "Option::is_none")]
612 pub threshold_breach_value: Option<f64>,
613}
614
615#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
617#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
618pub struct Metric {
619 #[serde(rename = "frameName")]
621 pub frame_name: String,
622 #[serde(rename = "threadStates")]
624 pub thread_states: Vec<String>,
625 #[serde(rename = "type")]
627 pub type_: String,
628}
629
630#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
632#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
633pub struct NotificationConfiguration {
634 #[serde(rename = "channels")]
636 #[serde(skip_serializing_if = "Option::is_none")]
637 pub channels: Option<Vec<Channel>>,
638}
639
640#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
642#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
643pub struct Pattern {
644 #[serde(rename = "countersToAggregate")]
646 #[serde(skip_serializing_if = "Option::is_none")]
647 pub counters_to_aggregate: Option<Vec<String>>,
648 #[serde(rename = "description")]
650 #[serde(skip_serializing_if = "Option::is_none")]
651 pub description: Option<String>,
652 #[serde(rename = "id")]
654 #[serde(skip_serializing_if = "Option::is_none")]
655 pub id: Option<String>,
656 #[serde(rename = "name")]
658 #[serde(skip_serializing_if = "Option::is_none")]
659 pub name: Option<String>,
660 #[serde(rename = "resolutionSteps")]
662 #[serde(skip_serializing_if = "Option::is_none")]
663 pub resolution_steps: Option<String>,
664 #[serde(rename = "targetFrames")]
666 #[serde(skip_serializing_if = "Option::is_none")]
667 pub target_frames: Option<Vec<Vec<String>>>,
668 #[serde(rename = "thresholdPercent")]
670 #[serde(skip_serializing_if = "Option::is_none")]
671 pub threshold_percent: Option<f64>,
672}
673
674#[derive(Clone, Debug, Default, PartialEq, Serialize)]
676#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
677pub struct PostAgentProfileRequest {
678 #[serde(rename = "agentProfile")]
680 #[serde(
681 deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
682 serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
683 default
684 )]
685 pub agent_profile: bytes::Bytes,
686 #[serde(rename = "contentType")]
688 pub content_type: String,
689 #[serde(rename = "profileToken")]
691 #[serde(skip_serializing_if = "Option::is_none")]
692 pub profile_token: Option<String>,
693 #[serde(rename = "profilingGroupName")]
695 pub profiling_group_name: String,
696}
697
698#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
700#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
701pub struct PostAgentProfileResponse {}
702
703#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
705#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
706pub struct ProfileTime {
707 #[serde(rename = "start")]
709 #[serde(skip_serializing_if = "Option::is_none")]
710 pub start: Option<f64>,
711}
712
713#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
715#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
716pub struct ProfilingGroupDescription {
717 #[serde(rename = "agentOrchestrationConfig")]
719 #[serde(skip_serializing_if = "Option::is_none")]
720 pub agent_orchestration_config: Option<AgentOrchestrationConfig>,
721 #[serde(rename = "arn")]
723 #[serde(skip_serializing_if = "Option::is_none")]
724 pub arn: Option<String>,
725 #[serde(rename = "computePlatform")]
727 #[serde(skip_serializing_if = "Option::is_none")]
728 pub compute_platform: Option<String>,
729 #[serde(rename = "createdAt")]
731 #[serde(skip_serializing_if = "Option::is_none")]
732 pub created_at: Option<f64>,
733 #[serde(rename = "name")]
735 #[serde(skip_serializing_if = "Option::is_none")]
736 pub name: Option<String>,
737 #[serde(rename = "profilingStatus")]
739 #[serde(skip_serializing_if = "Option::is_none")]
740 pub profiling_status: Option<ProfilingStatus>,
741 #[serde(rename = "updatedAt")]
743 #[serde(skip_serializing_if = "Option::is_none")]
744 pub updated_at: Option<f64>,
745}
746
747#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
749#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
750pub struct ProfilingStatus {
751 #[serde(rename = "latestAgentOrchestratedAt")]
753 #[serde(skip_serializing_if = "Option::is_none")]
754 pub latest_agent_orchestrated_at: Option<f64>,
755 #[serde(rename = "latestAgentProfileReportedAt")]
757 #[serde(skip_serializing_if = "Option::is_none")]
758 pub latest_agent_profile_reported_at: Option<f64>,
759 #[serde(rename = "latestAggregatedProfile")]
761 #[serde(skip_serializing_if = "Option::is_none")]
762 pub latest_aggregated_profile: Option<AggregatedProfileTime>,
763}
764
765#[derive(Clone, Debug, Default, PartialEq, Serialize)]
767#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
768pub struct PutPermissionRequest {
769 #[serde(rename = "actionGroup")]
771 pub action_group: String,
772 #[serde(rename = "principals")]
774 pub principals: Vec<String>,
775 #[serde(rename = "profilingGroupName")]
777 pub profiling_group_name: String,
778 #[serde(rename = "revisionId")]
780 #[serde(skip_serializing_if = "Option::is_none")]
781 pub revision_id: Option<String>,
782}
783
784#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
786#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
787pub struct PutPermissionResponse {
788 #[serde(rename = "policy")]
790 pub policy: String,
791 #[serde(rename = "revisionId")]
793 pub revision_id: String,
794}
795
796#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
798#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
799pub struct Recommendation {
800 #[serde(rename = "allMatchesCount")]
802 pub all_matches_count: i64,
803 #[serde(rename = "allMatchesSum")]
805 pub all_matches_sum: f64,
806 #[serde(rename = "endTime")]
808 pub end_time: f64,
809 #[serde(rename = "pattern")]
811 pub pattern: Pattern,
812 #[serde(rename = "startTime")]
814 pub start_time: f64,
815 #[serde(rename = "topMatches")]
817 pub top_matches: Vec<Match>,
818}
819
820#[derive(Clone, Debug, Default, PartialEq, Serialize)]
822#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
823pub struct RemoveNotificationChannelRequest {
824 #[serde(rename = "channelId")]
826 pub channel_id: String,
827 #[serde(rename = "profilingGroupName")]
829 pub profiling_group_name: String,
830}
831
832#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
834#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
835pub struct RemoveNotificationChannelResponse {
836 #[serde(rename = "notificationConfiguration")]
838 #[serde(skip_serializing_if = "Option::is_none")]
839 pub notification_configuration: Option<NotificationConfiguration>,
840}
841
842#[derive(Clone, Debug, Default, PartialEq, Serialize)]
844#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
845pub struct RemovePermissionRequest {
846 #[serde(rename = "actionGroup")]
848 pub action_group: String,
849 #[serde(rename = "profilingGroupName")]
851 pub profiling_group_name: String,
852 #[serde(rename = "revisionId")]
854 pub revision_id: String,
855}
856
857#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
859#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
860pub struct RemovePermissionResponse {
861 #[serde(rename = "policy")]
863 pub policy: String,
864 #[serde(rename = "revisionId")]
866 pub revision_id: String,
867}
868
869#[derive(Clone, Debug, Default, PartialEq, Serialize)]
871#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
872pub struct SubmitFeedbackRequest {
873 #[serde(rename = "anomalyInstanceId")]
875 pub anomaly_instance_id: String,
876 #[serde(rename = "comment")]
878 #[serde(skip_serializing_if = "Option::is_none")]
879 pub comment: Option<String>,
880 #[serde(rename = "profilingGroupName")]
882 pub profiling_group_name: String,
883 #[serde(rename = "type")]
885 pub type_: String,
886}
887
888#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
890#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
891pub struct SubmitFeedbackResponse {}
892
893#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
895#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
896pub struct TimestampStructure {
897 #[serde(rename = "value")]
899 pub value: f64,
900}
901
902#[derive(Clone, Debug, Default, PartialEq, Serialize)]
904#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
905pub struct UpdateProfilingGroupRequest {
906 #[serde(rename = "agentOrchestrationConfig")]
908 pub agent_orchestration_config: AgentOrchestrationConfig,
909 #[serde(rename = "profilingGroupName")]
911 pub profiling_group_name: String,
912}
913
914#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
916#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
917pub struct UpdateProfilingGroupResponse {
918 #[serde(rename = "profilingGroup")]
920 pub profiling_group: ProfilingGroupDescription,
921}
922
923#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
925#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
926pub struct UserFeedback {
927 #[serde(rename = "type")]
929 pub type_: String,
930}
931
932#[derive(Debug, PartialEq)]
934pub enum AddNotificationChannelsError {
935 Conflict(String),
937 InternalServer(String),
939 ResourceNotFound(String),
941 ServiceQuotaExceeded(String),
943 Throttling(String),
945}
946
947impl AddNotificationChannelsError {
948 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddNotificationChannelsError> {
949 if let Some(err) = proto::json::Error::parse_rest(&res) {
950 match err.typ.as_str() {
951 "ConflictException" => {
952 return RusotoError::Service(AddNotificationChannelsError::Conflict(err.msg))
953 }
954 "InternalServerException" => {
955 return RusotoError::Service(AddNotificationChannelsError::InternalServer(
956 err.msg,
957 ))
958 }
959 "ResourceNotFoundException" => {
960 return RusotoError::Service(AddNotificationChannelsError::ResourceNotFound(
961 err.msg,
962 ))
963 }
964 "ServiceQuotaExceededException" => {
965 return RusotoError::Service(
966 AddNotificationChannelsError::ServiceQuotaExceeded(err.msg),
967 )
968 }
969 "ThrottlingException" => {
970 return RusotoError::Service(AddNotificationChannelsError::Throttling(err.msg))
971 }
972 "ValidationException" => return RusotoError::Validation(err.msg),
973 _ => {}
974 }
975 }
976 RusotoError::Unknown(res)
977 }
978}
979impl fmt::Display for AddNotificationChannelsError {
980 #[allow(unused_variables)]
981 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
982 match *self {
983 AddNotificationChannelsError::Conflict(ref cause) => write!(f, "{}", cause),
984 AddNotificationChannelsError::InternalServer(ref cause) => write!(f, "{}", cause),
985 AddNotificationChannelsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
986 AddNotificationChannelsError::ServiceQuotaExceeded(ref cause) => write!(f, "{}", cause),
987 AddNotificationChannelsError::Throttling(ref cause) => write!(f, "{}", cause),
988 }
989 }
990}
991impl Error for AddNotificationChannelsError {}
992#[derive(Debug, PartialEq)]
994pub enum BatchGetFrameMetricDataError {
995 InternalServer(String),
997 ResourceNotFound(String),
999 Throttling(String),
1001}
1002
1003impl BatchGetFrameMetricDataError {
1004 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchGetFrameMetricDataError> {
1005 if let Some(err) = proto::json::Error::parse_rest(&res) {
1006 match err.typ.as_str() {
1007 "InternalServerException" => {
1008 return RusotoError::Service(BatchGetFrameMetricDataError::InternalServer(
1009 err.msg,
1010 ))
1011 }
1012 "ResourceNotFoundException" => {
1013 return RusotoError::Service(BatchGetFrameMetricDataError::ResourceNotFound(
1014 err.msg,
1015 ))
1016 }
1017 "ThrottlingException" => {
1018 return RusotoError::Service(BatchGetFrameMetricDataError::Throttling(err.msg))
1019 }
1020 "ValidationException" => return RusotoError::Validation(err.msg),
1021 _ => {}
1022 }
1023 }
1024 RusotoError::Unknown(res)
1025 }
1026}
1027impl fmt::Display for BatchGetFrameMetricDataError {
1028 #[allow(unused_variables)]
1029 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1030 match *self {
1031 BatchGetFrameMetricDataError::InternalServer(ref cause) => write!(f, "{}", cause),
1032 BatchGetFrameMetricDataError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1033 BatchGetFrameMetricDataError::Throttling(ref cause) => write!(f, "{}", cause),
1034 }
1035 }
1036}
1037impl Error for BatchGetFrameMetricDataError {}
1038#[derive(Debug, PartialEq)]
1040pub enum ConfigureAgentError {
1041 InternalServer(String),
1043 ResourceNotFound(String),
1045 Throttling(String),
1047}
1048
1049impl ConfigureAgentError {
1050 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConfigureAgentError> {
1051 if let Some(err) = proto::json::Error::parse_rest(&res) {
1052 match err.typ.as_str() {
1053 "InternalServerException" => {
1054 return RusotoError::Service(ConfigureAgentError::InternalServer(err.msg))
1055 }
1056 "ResourceNotFoundException" => {
1057 return RusotoError::Service(ConfigureAgentError::ResourceNotFound(err.msg))
1058 }
1059 "ThrottlingException" => {
1060 return RusotoError::Service(ConfigureAgentError::Throttling(err.msg))
1061 }
1062 "ValidationException" => return RusotoError::Validation(err.msg),
1063 _ => {}
1064 }
1065 }
1066 RusotoError::Unknown(res)
1067 }
1068}
1069impl fmt::Display for ConfigureAgentError {
1070 #[allow(unused_variables)]
1071 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1072 match *self {
1073 ConfigureAgentError::InternalServer(ref cause) => write!(f, "{}", cause),
1074 ConfigureAgentError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1075 ConfigureAgentError::Throttling(ref cause) => write!(f, "{}", cause),
1076 }
1077 }
1078}
1079impl Error for ConfigureAgentError {}
1080#[derive(Debug, PartialEq)]
1082pub enum CreateProfilingGroupError {
1083 Conflict(String),
1085 InternalServer(String),
1087 ServiceQuotaExceeded(String),
1089 Throttling(String),
1091}
1092
1093impl CreateProfilingGroupError {
1094 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateProfilingGroupError> {
1095 if let Some(err) = proto::json::Error::parse_rest(&res) {
1096 match err.typ.as_str() {
1097 "ConflictException" => {
1098 return RusotoError::Service(CreateProfilingGroupError::Conflict(err.msg))
1099 }
1100 "InternalServerException" => {
1101 return RusotoError::Service(CreateProfilingGroupError::InternalServer(err.msg))
1102 }
1103 "ServiceQuotaExceededException" => {
1104 return RusotoError::Service(CreateProfilingGroupError::ServiceQuotaExceeded(
1105 err.msg,
1106 ))
1107 }
1108 "ThrottlingException" => {
1109 return RusotoError::Service(CreateProfilingGroupError::Throttling(err.msg))
1110 }
1111 "ValidationException" => return RusotoError::Validation(err.msg),
1112 _ => {}
1113 }
1114 }
1115 RusotoError::Unknown(res)
1116 }
1117}
1118impl fmt::Display for CreateProfilingGroupError {
1119 #[allow(unused_variables)]
1120 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1121 match *self {
1122 CreateProfilingGroupError::Conflict(ref cause) => write!(f, "{}", cause),
1123 CreateProfilingGroupError::InternalServer(ref cause) => write!(f, "{}", cause),
1124 CreateProfilingGroupError::ServiceQuotaExceeded(ref cause) => write!(f, "{}", cause),
1125 CreateProfilingGroupError::Throttling(ref cause) => write!(f, "{}", cause),
1126 }
1127 }
1128}
1129impl Error for CreateProfilingGroupError {}
1130#[derive(Debug, PartialEq)]
1132pub enum DeleteProfilingGroupError {
1133 InternalServer(String),
1135 ResourceNotFound(String),
1137 Throttling(String),
1139}
1140
1141impl DeleteProfilingGroupError {
1142 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteProfilingGroupError> {
1143 if let Some(err) = proto::json::Error::parse_rest(&res) {
1144 match err.typ.as_str() {
1145 "InternalServerException" => {
1146 return RusotoError::Service(DeleteProfilingGroupError::InternalServer(err.msg))
1147 }
1148 "ResourceNotFoundException" => {
1149 return RusotoError::Service(DeleteProfilingGroupError::ResourceNotFound(
1150 err.msg,
1151 ))
1152 }
1153 "ThrottlingException" => {
1154 return RusotoError::Service(DeleteProfilingGroupError::Throttling(err.msg))
1155 }
1156 "ValidationException" => return RusotoError::Validation(err.msg),
1157 _ => {}
1158 }
1159 }
1160 RusotoError::Unknown(res)
1161 }
1162}
1163impl fmt::Display for DeleteProfilingGroupError {
1164 #[allow(unused_variables)]
1165 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1166 match *self {
1167 DeleteProfilingGroupError::InternalServer(ref cause) => write!(f, "{}", cause),
1168 DeleteProfilingGroupError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1169 DeleteProfilingGroupError::Throttling(ref cause) => write!(f, "{}", cause),
1170 }
1171 }
1172}
1173impl Error for DeleteProfilingGroupError {}
1174#[derive(Debug, PartialEq)]
1176pub enum DescribeProfilingGroupError {
1177 InternalServer(String),
1179 ResourceNotFound(String),
1181 Throttling(String),
1183}
1184
1185impl DescribeProfilingGroupError {
1186 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeProfilingGroupError> {
1187 if let Some(err) = proto::json::Error::parse_rest(&res) {
1188 match err.typ.as_str() {
1189 "InternalServerException" => {
1190 return RusotoError::Service(DescribeProfilingGroupError::InternalServer(
1191 err.msg,
1192 ))
1193 }
1194 "ResourceNotFoundException" => {
1195 return RusotoError::Service(DescribeProfilingGroupError::ResourceNotFound(
1196 err.msg,
1197 ))
1198 }
1199 "ThrottlingException" => {
1200 return RusotoError::Service(DescribeProfilingGroupError::Throttling(err.msg))
1201 }
1202 "ValidationException" => return RusotoError::Validation(err.msg),
1203 _ => {}
1204 }
1205 }
1206 RusotoError::Unknown(res)
1207 }
1208}
1209impl fmt::Display for DescribeProfilingGroupError {
1210 #[allow(unused_variables)]
1211 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1212 match *self {
1213 DescribeProfilingGroupError::InternalServer(ref cause) => write!(f, "{}", cause),
1214 DescribeProfilingGroupError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1215 DescribeProfilingGroupError::Throttling(ref cause) => write!(f, "{}", cause),
1216 }
1217 }
1218}
1219impl Error for DescribeProfilingGroupError {}
1220#[derive(Debug, PartialEq)]
1222pub enum GetFindingsReportAccountSummaryError {
1223 InternalServer(String),
1225 Throttling(String),
1227}
1228
1229impl GetFindingsReportAccountSummaryError {
1230 pub fn from_response(
1231 res: BufferedHttpResponse,
1232 ) -> RusotoError<GetFindingsReportAccountSummaryError> {
1233 if let Some(err) = proto::json::Error::parse_rest(&res) {
1234 match err.typ.as_str() {
1235 "InternalServerException" => {
1236 return RusotoError::Service(
1237 GetFindingsReportAccountSummaryError::InternalServer(err.msg),
1238 )
1239 }
1240 "ThrottlingException" => {
1241 return RusotoError::Service(GetFindingsReportAccountSummaryError::Throttling(
1242 err.msg,
1243 ))
1244 }
1245 "ValidationException" => return RusotoError::Validation(err.msg),
1246 _ => {}
1247 }
1248 }
1249 RusotoError::Unknown(res)
1250 }
1251}
1252impl fmt::Display for GetFindingsReportAccountSummaryError {
1253 #[allow(unused_variables)]
1254 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1255 match *self {
1256 GetFindingsReportAccountSummaryError::InternalServer(ref cause) => {
1257 write!(f, "{}", cause)
1258 }
1259 GetFindingsReportAccountSummaryError::Throttling(ref cause) => write!(f, "{}", cause),
1260 }
1261 }
1262}
1263impl Error for GetFindingsReportAccountSummaryError {}
1264#[derive(Debug, PartialEq)]
1266pub enum GetNotificationConfigurationError {
1267 InternalServer(String),
1269 ResourceNotFound(String),
1271 Throttling(String),
1273}
1274
1275impl GetNotificationConfigurationError {
1276 pub fn from_response(
1277 res: BufferedHttpResponse,
1278 ) -> RusotoError<GetNotificationConfigurationError> {
1279 if let Some(err) = proto::json::Error::parse_rest(&res) {
1280 match err.typ.as_str() {
1281 "InternalServerException" => {
1282 return RusotoError::Service(GetNotificationConfigurationError::InternalServer(
1283 err.msg,
1284 ))
1285 }
1286 "ResourceNotFoundException" => {
1287 return RusotoError::Service(
1288 GetNotificationConfigurationError::ResourceNotFound(err.msg),
1289 )
1290 }
1291 "ThrottlingException" => {
1292 return RusotoError::Service(GetNotificationConfigurationError::Throttling(
1293 err.msg,
1294 ))
1295 }
1296 "ValidationException" => return RusotoError::Validation(err.msg),
1297 _ => {}
1298 }
1299 }
1300 RusotoError::Unknown(res)
1301 }
1302}
1303impl fmt::Display for GetNotificationConfigurationError {
1304 #[allow(unused_variables)]
1305 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1306 match *self {
1307 GetNotificationConfigurationError::InternalServer(ref cause) => write!(f, "{}", cause),
1308 GetNotificationConfigurationError::ResourceNotFound(ref cause) => {
1309 write!(f, "{}", cause)
1310 }
1311 GetNotificationConfigurationError::Throttling(ref cause) => write!(f, "{}", cause),
1312 }
1313 }
1314}
1315impl Error for GetNotificationConfigurationError {}
1316#[derive(Debug, PartialEq)]
1318pub enum GetPolicyError {
1319 InternalServer(String),
1321 ResourceNotFound(String),
1323 Throttling(String),
1325}
1326
1327impl GetPolicyError {
1328 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPolicyError> {
1329 if let Some(err) = proto::json::Error::parse_rest(&res) {
1330 match err.typ.as_str() {
1331 "InternalServerException" => {
1332 return RusotoError::Service(GetPolicyError::InternalServer(err.msg))
1333 }
1334 "ResourceNotFoundException" => {
1335 return RusotoError::Service(GetPolicyError::ResourceNotFound(err.msg))
1336 }
1337 "ThrottlingException" => {
1338 return RusotoError::Service(GetPolicyError::Throttling(err.msg))
1339 }
1340 "ValidationException" => return RusotoError::Validation(err.msg),
1341 _ => {}
1342 }
1343 }
1344 RusotoError::Unknown(res)
1345 }
1346}
1347impl fmt::Display for GetPolicyError {
1348 #[allow(unused_variables)]
1349 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1350 match *self {
1351 GetPolicyError::InternalServer(ref cause) => write!(f, "{}", cause),
1352 GetPolicyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1353 GetPolicyError::Throttling(ref cause) => write!(f, "{}", cause),
1354 }
1355 }
1356}
1357impl Error for GetPolicyError {}
1358#[derive(Debug, PartialEq)]
1360pub enum GetProfileError {
1361 InternalServer(String),
1363 ResourceNotFound(String),
1365 Throttling(String),
1367}
1368
1369impl GetProfileError {
1370 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetProfileError> {
1371 if let Some(err) = proto::json::Error::parse_rest(&res) {
1372 match err.typ.as_str() {
1373 "InternalServerException" => {
1374 return RusotoError::Service(GetProfileError::InternalServer(err.msg))
1375 }
1376 "ResourceNotFoundException" => {
1377 return RusotoError::Service(GetProfileError::ResourceNotFound(err.msg))
1378 }
1379 "ThrottlingException" => {
1380 return RusotoError::Service(GetProfileError::Throttling(err.msg))
1381 }
1382 "ValidationException" => return RusotoError::Validation(err.msg),
1383 _ => {}
1384 }
1385 }
1386 RusotoError::Unknown(res)
1387 }
1388}
1389impl fmt::Display for GetProfileError {
1390 #[allow(unused_variables)]
1391 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1392 match *self {
1393 GetProfileError::InternalServer(ref cause) => write!(f, "{}", cause),
1394 GetProfileError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1395 GetProfileError::Throttling(ref cause) => write!(f, "{}", cause),
1396 }
1397 }
1398}
1399impl Error for GetProfileError {}
1400#[derive(Debug, PartialEq)]
1402pub enum GetRecommendationsError {
1403 InternalServer(String),
1405 ResourceNotFound(String),
1407 Throttling(String),
1409}
1410
1411impl GetRecommendationsError {
1412 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRecommendationsError> {
1413 if let Some(err) = proto::json::Error::parse_rest(&res) {
1414 match err.typ.as_str() {
1415 "InternalServerException" => {
1416 return RusotoError::Service(GetRecommendationsError::InternalServer(err.msg))
1417 }
1418 "ResourceNotFoundException" => {
1419 return RusotoError::Service(GetRecommendationsError::ResourceNotFound(err.msg))
1420 }
1421 "ThrottlingException" => {
1422 return RusotoError::Service(GetRecommendationsError::Throttling(err.msg))
1423 }
1424 "ValidationException" => return RusotoError::Validation(err.msg),
1425 _ => {}
1426 }
1427 }
1428 RusotoError::Unknown(res)
1429 }
1430}
1431impl fmt::Display for GetRecommendationsError {
1432 #[allow(unused_variables)]
1433 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1434 match *self {
1435 GetRecommendationsError::InternalServer(ref cause) => write!(f, "{}", cause),
1436 GetRecommendationsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1437 GetRecommendationsError::Throttling(ref cause) => write!(f, "{}", cause),
1438 }
1439 }
1440}
1441impl Error for GetRecommendationsError {}
1442#[derive(Debug, PartialEq)]
1444pub enum ListFindingsReportsError {
1445 InternalServer(String),
1447 ResourceNotFound(String),
1449 Throttling(String),
1451}
1452
1453impl ListFindingsReportsError {
1454 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFindingsReportsError> {
1455 if let Some(err) = proto::json::Error::parse_rest(&res) {
1456 match err.typ.as_str() {
1457 "InternalServerException" => {
1458 return RusotoError::Service(ListFindingsReportsError::InternalServer(err.msg))
1459 }
1460 "ResourceNotFoundException" => {
1461 return RusotoError::Service(ListFindingsReportsError::ResourceNotFound(
1462 err.msg,
1463 ))
1464 }
1465 "ThrottlingException" => {
1466 return RusotoError::Service(ListFindingsReportsError::Throttling(err.msg))
1467 }
1468 "ValidationException" => return RusotoError::Validation(err.msg),
1469 _ => {}
1470 }
1471 }
1472 RusotoError::Unknown(res)
1473 }
1474}
1475impl fmt::Display for ListFindingsReportsError {
1476 #[allow(unused_variables)]
1477 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1478 match *self {
1479 ListFindingsReportsError::InternalServer(ref cause) => write!(f, "{}", cause),
1480 ListFindingsReportsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1481 ListFindingsReportsError::Throttling(ref cause) => write!(f, "{}", cause),
1482 }
1483 }
1484}
1485impl Error for ListFindingsReportsError {}
1486#[derive(Debug, PartialEq)]
1488pub enum ListProfileTimesError {
1489 InternalServer(String),
1491 ResourceNotFound(String),
1493 Throttling(String),
1495}
1496
1497impl ListProfileTimesError {
1498 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProfileTimesError> {
1499 if let Some(err) = proto::json::Error::parse_rest(&res) {
1500 match err.typ.as_str() {
1501 "InternalServerException" => {
1502 return RusotoError::Service(ListProfileTimesError::InternalServer(err.msg))
1503 }
1504 "ResourceNotFoundException" => {
1505 return RusotoError::Service(ListProfileTimesError::ResourceNotFound(err.msg))
1506 }
1507 "ThrottlingException" => {
1508 return RusotoError::Service(ListProfileTimesError::Throttling(err.msg))
1509 }
1510 "ValidationException" => return RusotoError::Validation(err.msg),
1511 _ => {}
1512 }
1513 }
1514 RusotoError::Unknown(res)
1515 }
1516}
1517impl fmt::Display for ListProfileTimesError {
1518 #[allow(unused_variables)]
1519 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1520 match *self {
1521 ListProfileTimesError::InternalServer(ref cause) => write!(f, "{}", cause),
1522 ListProfileTimesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1523 ListProfileTimesError::Throttling(ref cause) => write!(f, "{}", cause),
1524 }
1525 }
1526}
1527impl Error for ListProfileTimesError {}
1528#[derive(Debug, PartialEq)]
1530pub enum ListProfilingGroupsError {
1531 InternalServer(String),
1533 Throttling(String),
1535}
1536
1537impl ListProfilingGroupsError {
1538 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProfilingGroupsError> {
1539 if let Some(err) = proto::json::Error::parse_rest(&res) {
1540 match err.typ.as_str() {
1541 "InternalServerException" => {
1542 return RusotoError::Service(ListProfilingGroupsError::InternalServer(err.msg))
1543 }
1544 "ThrottlingException" => {
1545 return RusotoError::Service(ListProfilingGroupsError::Throttling(err.msg))
1546 }
1547 "ValidationException" => return RusotoError::Validation(err.msg),
1548 _ => {}
1549 }
1550 }
1551 RusotoError::Unknown(res)
1552 }
1553}
1554impl fmt::Display for ListProfilingGroupsError {
1555 #[allow(unused_variables)]
1556 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1557 match *self {
1558 ListProfilingGroupsError::InternalServer(ref cause) => write!(f, "{}", cause),
1559 ListProfilingGroupsError::Throttling(ref cause) => write!(f, "{}", cause),
1560 }
1561 }
1562}
1563impl Error for ListProfilingGroupsError {}
1564#[derive(Debug, PartialEq)]
1566pub enum PostAgentProfileError {
1567 InternalServer(String),
1569 ResourceNotFound(String),
1571 Throttling(String),
1573}
1574
1575impl PostAgentProfileError {
1576 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PostAgentProfileError> {
1577 if let Some(err) = proto::json::Error::parse_rest(&res) {
1578 match err.typ.as_str() {
1579 "InternalServerException" => {
1580 return RusotoError::Service(PostAgentProfileError::InternalServer(err.msg))
1581 }
1582 "ResourceNotFoundException" => {
1583 return RusotoError::Service(PostAgentProfileError::ResourceNotFound(err.msg))
1584 }
1585 "ThrottlingException" => {
1586 return RusotoError::Service(PostAgentProfileError::Throttling(err.msg))
1587 }
1588 "ValidationException" => return RusotoError::Validation(err.msg),
1589 _ => {}
1590 }
1591 }
1592 RusotoError::Unknown(res)
1593 }
1594}
1595impl fmt::Display for PostAgentProfileError {
1596 #[allow(unused_variables)]
1597 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1598 match *self {
1599 PostAgentProfileError::InternalServer(ref cause) => write!(f, "{}", cause),
1600 PostAgentProfileError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1601 PostAgentProfileError::Throttling(ref cause) => write!(f, "{}", cause),
1602 }
1603 }
1604}
1605impl Error for PostAgentProfileError {}
1606#[derive(Debug, PartialEq)]
1608pub enum PutPermissionError {
1609 Conflict(String),
1611 InternalServer(String),
1613 ResourceNotFound(String),
1615 Throttling(String),
1617}
1618
1619impl PutPermissionError {
1620 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutPermissionError> {
1621 if let Some(err) = proto::json::Error::parse_rest(&res) {
1622 match err.typ.as_str() {
1623 "ConflictException" => {
1624 return RusotoError::Service(PutPermissionError::Conflict(err.msg))
1625 }
1626 "InternalServerException" => {
1627 return RusotoError::Service(PutPermissionError::InternalServer(err.msg))
1628 }
1629 "ResourceNotFoundException" => {
1630 return RusotoError::Service(PutPermissionError::ResourceNotFound(err.msg))
1631 }
1632 "ThrottlingException" => {
1633 return RusotoError::Service(PutPermissionError::Throttling(err.msg))
1634 }
1635 "ValidationException" => return RusotoError::Validation(err.msg),
1636 _ => {}
1637 }
1638 }
1639 RusotoError::Unknown(res)
1640 }
1641}
1642impl fmt::Display for PutPermissionError {
1643 #[allow(unused_variables)]
1644 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1645 match *self {
1646 PutPermissionError::Conflict(ref cause) => write!(f, "{}", cause),
1647 PutPermissionError::InternalServer(ref cause) => write!(f, "{}", cause),
1648 PutPermissionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1649 PutPermissionError::Throttling(ref cause) => write!(f, "{}", cause),
1650 }
1651 }
1652}
1653impl Error for PutPermissionError {}
1654#[derive(Debug, PartialEq)]
1656pub enum RemoveNotificationChannelError {
1657 InternalServer(String),
1659 ResourceNotFound(String),
1661 Throttling(String),
1663}
1664
1665impl RemoveNotificationChannelError {
1666 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveNotificationChannelError> {
1667 if let Some(err) = proto::json::Error::parse_rest(&res) {
1668 match err.typ.as_str() {
1669 "InternalServerException" => {
1670 return RusotoError::Service(RemoveNotificationChannelError::InternalServer(
1671 err.msg,
1672 ))
1673 }
1674 "ResourceNotFoundException" => {
1675 return RusotoError::Service(RemoveNotificationChannelError::ResourceNotFound(
1676 err.msg,
1677 ))
1678 }
1679 "ThrottlingException" => {
1680 return RusotoError::Service(RemoveNotificationChannelError::Throttling(
1681 err.msg,
1682 ))
1683 }
1684 "ValidationException" => return RusotoError::Validation(err.msg),
1685 _ => {}
1686 }
1687 }
1688 RusotoError::Unknown(res)
1689 }
1690}
1691impl fmt::Display for RemoveNotificationChannelError {
1692 #[allow(unused_variables)]
1693 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1694 match *self {
1695 RemoveNotificationChannelError::InternalServer(ref cause) => write!(f, "{}", cause),
1696 RemoveNotificationChannelError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1697 RemoveNotificationChannelError::Throttling(ref cause) => write!(f, "{}", cause),
1698 }
1699 }
1700}
1701impl Error for RemoveNotificationChannelError {}
1702#[derive(Debug, PartialEq)]
1704pub enum RemovePermissionError {
1705 Conflict(String),
1707 InternalServer(String),
1709 ResourceNotFound(String),
1711 Throttling(String),
1713}
1714
1715impl RemovePermissionError {
1716 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemovePermissionError> {
1717 if let Some(err) = proto::json::Error::parse_rest(&res) {
1718 match err.typ.as_str() {
1719 "ConflictException" => {
1720 return RusotoError::Service(RemovePermissionError::Conflict(err.msg))
1721 }
1722 "InternalServerException" => {
1723 return RusotoError::Service(RemovePermissionError::InternalServer(err.msg))
1724 }
1725 "ResourceNotFoundException" => {
1726 return RusotoError::Service(RemovePermissionError::ResourceNotFound(err.msg))
1727 }
1728 "ThrottlingException" => {
1729 return RusotoError::Service(RemovePermissionError::Throttling(err.msg))
1730 }
1731 "ValidationException" => return RusotoError::Validation(err.msg),
1732 _ => {}
1733 }
1734 }
1735 RusotoError::Unknown(res)
1736 }
1737}
1738impl fmt::Display for RemovePermissionError {
1739 #[allow(unused_variables)]
1740 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1741 match *self {
1742 RemovePermissionError::Conflict(ref cause) => write!(f, "{}", cause),
1743 RemovePermissionError::InternalServer(ref cause) => write!(f, "{}", cause),
1744 RemovePermissionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1745 RemovePermissionError::Throttling(ref cause) => write!(f, "{}", cause),
1746 }
1747 }
1748}
1749impl Error for RemovePermissionError {}
1750#[derive(Debug, PartialEq)]
1752pub enum SubmitFeedbackError {
1753 InternalServer(String),
1755 ResourceNotFound(String),
1757 Throttling(String),
1759}
1760
1761impl SubmitFeedbackError {
1762 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SubmitFeedbackError> {
1763 if let Some(err) = proto::json::Error::parse_rest(&res) {
1764 match err.typ.as_str() {
1765 "InternalServerException" => {
1766 return RusotoError::Service(SubmitFeedbackError::InternalServer(err.msg))
1767 }
1768 "ResourceNotFoundException" => {
1769 return RusotoError::Service(SubmitFeedbackError::ResourceNotFound(err.msg))
1770 }
1771 "ThrottlingException" => {
1772 return RusotoError::Service(SubmitFeedbackError::Throttling(err.msg))
1773 }
1774 "ValidationException" => return RusotoError::Validation(err.msg),
1775 _ => {}
1776 }
1777 }
1778 RusotoError::Unknown(res)
1779 }
1780}
1781impl fmt::Display for SubmitFeedbackError {
1782 #[allow(unused_variables)]
1783 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1784 match *self {
1785 SubmitFeedbackError::InternalServer(ref cause) => write!(f, "{}", cause),
1786 SubmitFeedbackError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1787 SubmitFeedbackError::Throttling(ref cause) => write!(f, "{}", cause),
1788 }
1789 }
1790}
1791impl Error for SubmitFeedbackError {}
1792#[derive(Debug, PartialEq)]
1794pub enum UpdateProfilingGroupError {
1795 Conflict(String),
1797 InternalServer(String),
1799 ResourceNotFound(String),
1801 Throttling(String),
1803}
1804
1805impl UpdateProfilingGroupError {
1806 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateProfilingGroupError> {
1807 if let Some(err) = proto::json::Error::parse_rest(&res) {
1808 match err.typ.as_str() {
1809 "ConflictException" => {
1810 return RusotoError::Service(UpdateProfilingGroupError::Conflict(err.msg))
1811 }
1812 "InternalServerException" => {
1813 return RusotoError::Service(UpdateProfilingGroupError::InternalServer(err.msg))
1814 }
1815 "ResourceNotFoundException" => {
1816 return RusotoError::Service(UpdateProfilingGroupError::ResourceNotFound(
1817 err.msg,
1818 ))
1819 }
1820 "ThrottlingException" => {
1821 return RusotoError::Service(UpdateProfilingGroupError::Throttling(err.msg))
1822 }
1823 "ValidationException" => return RusotoError::Validation(err.msg),
1824 _ => {}
1825 }
1826 }
1827 RusotoError::Unknown(res)
1828 }
1829}
1830impl fmt::Display for UpdateProfilingGroupError {
1831 #[allow(unused_variables)]
1832 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1833 match *self {
1834 UpdateProfilingGroupError::Conflict(ref cause) => write!(f, "{}", cause),
1835 UpdateProfilingGroupError::InternalServer(ref cause) => write!(f, "{}", cause),
1836 UpdateProfilingGroupError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1837 UpdateProfilingGroupError::Throttling(ref cause) => write!(f, "{}", cause),
1838 }
1839 }
1840}
1841impl Error for UpdateProfilingGroupError {}
1842#[async_trait]
1844pub trait CodeGuruProfiler {
1845 async fn add_notification_channels(
1847 &self,
1848 input: AddNotificationChannelsRequest,
1849 ) -> Result<AddNotificationChannelsResponse, RusotoError<AddNotificationChannelsError>>;
1850
1851 async fn batch_get_frame_metric_data(
1853 &self,
1854 input: BatchGetFrameMetricDataRequest,
1855 ) -> Result<BatchGetFrameMetricDataResponse, RusotoError<BatchGetFrameMetricDataError>>;
1856
1857 async fn configure_agent(
1859 &self,
1860 input: ConfigureAgentRequest,
1861 ) -> Result<ConfigureAgentResponse, RusotoError<ConfigureAgentError>>;
1862
1863 async fn create_profiling_group(
1865 &self,
1866 input: CreateProfilingGroupRequest,
1867 ) -> Result<CreateProfilingGroupResponse, RusotoError<CreateProfilingGroupError>>;
1868
1869 async fn delete_profiling_group(
1871 &self,
1872 input: DeleteProfilingGroupRequest,
1873 ) -> Result<DeleteProfilingGroupResponse, RusotoError<DeleteProfilingGroupError>>;
1874
1875 async fn describe_profiling_group(
1877 &self,
1878 input: DescribeProfilingGroupRequest,
1879 ) -> Result<DescribeProfilingGroupResponse, RusotoError<DescribeProfilingGroupError>>;
1880
1881 async fn get_findings_report_account_summary(
1883 &self,
1884 input: GetFindingsReportAccountSummaryRequest,
1885 ) -> Result<
1886 GetFindingsReportAccountSummaryResponse,
1887 RusotoError<GetFindingsReportAccountSummaryError>,
1888 >;
1889
1890 async fn get_notification_configuration(
1892 &self,
1893 input: GetNotificationConfigurationRequest,
1894 ) -> Result<GetNotificationConfigurationResponse, RusotoError<GetNotificationConfigurationError>>;
1895
1896 async fn get_policy(
1898 &self,
1899 input: GetPolicyRequest,
1900 ) -> Result<GetPolicyResponse, RusotoError<GetPolicyError>>;
1901
1902 async fn get_profile(
1904 &self,
1905 input: GetProfileRequest,
1906 ) -> Result<GetProfileResponse, RusotoError<GetProfileError>>;
1907
1908 async fn get_recommendations(
1910 &self,
1911 input: GetRecommendationsRequest,
1912 ) -> Result<GetRecommendationsResponse, RusotoError<GetRecommendationsError>>;
1913
1914 async fn list_findings_reports(
1916 &self,
1917 input: ListFindingsReportsRequest,
1918 ) -> Result<ListFindingsReportsResponse, RusotoError<ListFindingsReportsError>>;
1919
1920 async fn list_profile_times(
1922 &self,
1923 input: ListProfileTimesRequest,
1924 ) -> Result<ListProfileTimesResponse, RusotoError<ListProfileTimesError>>;
1925
1926 async fn list_profiling_groups(
1928 &self,
1929 input: ListProfilingGroupsRequest,
1930 ) -> Result<ListProfilingGroupsResponse, RusotoError<ListProfilingGroupsError>>;
1931
1932 async fn post_agent_profile(
1934 &self,
1935 input: PostAgentProfileRequest,
1936 ) -> Result<PostAgentProfileResponse, RusotoError<PostAgentProfileError>>;
1937
1938 async fn put_permission(
1940 &self,
1941 input: PutPermissionRequest,
1942 ) -> Result<PutPermissionResponse, RusotoError<PutPermissionError>>;
1943
1944 async fn remove_notification_channel(
1946 &self,
1947 input: RemoveNotificationChannelRequest,
1948 ) -> Result<RemoveNotificationChannelResponse, RusotoError<RemoveNotificationChannelError>>;
1949
1950 async fn remove_permission(
1952 &self,
1953 input: RemovePermissionRequest,
1954 ) -> Result<RemovePermissionResponse, RusotoError<RemovePermissionError>>;
1955
1956 async fn submit_feedback(
1958 &self,
1959 input: SubmitFeedbackRequest,
1960 ) -> Result<SubmitFeedbackResponse, RusotoError<SubmitFeedbackError>>;
1961
1962 async fn update_profiling_group(
1964 &self,
1965 input: UpdateProfilingGroupRequest,
1966 ) -> Result<UpdateProfilingGroupResponse, RusotoError<UpdateProfilingGroupError>>;
1967}
1968#[derive(Clone)]
1970pub struct CodeGuruProfilerClient {
1971 client: Client,
1972 region: region::Region,
1973}
1974
1975impl CodeGuruProfilerClient {
1976 pub fn new(region: region::Region) -> CodeGuruProfilerClient {
1980 CodeGuruProfilerClient {
1981 client: Client::shared(),
1982 region,
1983 }
1984 }
1985
1986 pub fn new_with<P, D>(
1987 request_dispatcher: D,
1988 credentials_provider: P,
1989 region: region::Region,
1990 ) -> CodeGuruProfilerClient
1991 where
1992 P: ProvideAwsCredentials + Send + Sync + 'static,
1993 D: DispatchSignedRequest + Send + Sync + 'static,
1994 {
1995 CodeGuruProfilerClient {
1996 client: Client::new_with(credentials_provider, request_dispatcher),
1997 region,
1998 }
1999 }
2000
2001 pub fn new_with_client(client: Client, region: region::Region) -> CodeGuruProfilerClient {
2002 CodeGuruProfilerClient { client, region }
2003 }
2004}
2005
2006#[async_trait]
2007impl CodeGuruProfiler for CodeGuruProfilerClient {
2008 #[allow(unused_mut)]
2010 async fn add_notification_channels(
2011 &self,
2012 input: AddNotificationChannelsRequest,
2013 ) -> Result<AddNotificationChannelsResponse, RusotoError<AddNotificationChannelsError>> {
2014 let request_uri = format!(
2015 "/profilingGroups/{profiling_group_name}/notificationConfiguration",
2016 profiling_group_name = input.profiling_group_name
2017 );
2018
2019 let mut request =
2020 SignedRequest::new("POST", "codeguru-profiler", &self.region, &request_uri);
2021 request.set_content_type("application/x-amz-json-1.1".to_owned());
2022
2023 let encoded = Some(serde_json::to_vec(&input).unwrap());
2024 request.set_payload(encoded);
2025
2026 let mut response = self
2027 .client
2028 .sign_and_dispatch(request)
2029 .await
2030 .map_err(RusotoError::from)?;
2031 if response.status.as_u16() == 200 {
2032 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2033 let result = proto::json::ResponsePayload::new(&response)
2034 .deserialize::<AddNotificationChannelsResponse, _>()?;
2035
2036 Ok(result)
2037 } else {
2038 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2039 Err(AddNotificationChannelsError::from_response(response))
2040 }
2041 }
2042
2043 #[allow(unused_mut)]
2045 async fn batch_get_frame_metric_data(
2046 &self,
2047 input: BatchGetFrameMetricDataRequest,
2048 ) -> Result<BatchGetFrameMetricDataResponse, RusotoError<BatchGetFrameMetricDataError>> {
2049 let request_uri = format!(
2050 "/profilingGroups/{profiling_group_name}/frames/-/metrics",
2051 profiling_group_name = input.profiling_group_name
2052 );
2053
2054 let mut request =
2055 SignedRequest::new("POST", "codeguru-profiler", &self.region, &request_uri);
2056 request.set_content_type("application/x-amz-json-1.1".to_owned());
2057
2058 let encoded = Some(serde_json::to_vec(&input).unwrap());
2059 request.set_payload(encoded);
2060
2061 let mut params = Params::new();
2062 if let Some(ref x) = input.end_time {
2063 params.put("endTime", x);
2064 }
2065 if let Some(ref x) = input.period {
2066 params.put("period", x);
2067 }
2068 if let Some(ref x) = input.start_time {
2069 params.put("startTime", x);
2070 }
2071 if let Some(ref x) = input.target_resolution {
2072 params.put("targetResolution", x);
2073 }
2074 request.set_params(params);
2075
2076 let mut response = self
2077 .client
2078 .sign_and_dispatch(request)
2079 .await
2080 .map_err(RusotoError::from)?;
2081 if response.status.as_u16() == 200 {
2082 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2083 let result = proto::json::ResponsePayload::new(&response)
2084 .deserialize::<BatchGetFrameMetricDataResponse, _>()?;
2085
2086 Ok(result)
2087 } else {
2088 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2089 Err(BatchGetFrameMetricDataError::from_response(response))
2090 }
2091 }
2092
2093 #[allow(unused_mut)]
2095 async fn configure_agent(
2096 &self,
2097 input: ConfigureAgentRequest,
2098 ) -> Result<ConfigureAgentResponse, RusotoError<ConfigureAgentError>> {
2099 let request_uri = format!(
2100 "/profilingGroups/{profiling_group_name}/configureAgent",
2101 profiling_group_name = input.profiling_group_name
2102 );
2103
2104 let mut request =
2105 SignedRequest::new("POST", "codeguru-profiler", &self.region, &request_uri);
2106 request.set_content_type("application/x-amz-json-1.1".to_owned());
2107
2108 let encoded = Some(serde_json::to_vec(&input).unwrap());
2109 request.set_payload(encoded);
2110
2111 let mut response = self
2112 .client
2113 .sign_and_dispatch(request)
2114 .await
2115 .map_err(RusotoError::from)?;
2116 if response.status.as_u16() == 200 {
2117 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2118 let result = proto::json::ResponsePayload::new(&response)
2119 .deserialize::<ConfigureAgentResponse, _>()?;
2120
2121 Ok(result)
2122 } else {
2123 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2124 Err(ConfigureAgentError::from_response(response))
2125 }
2126 }
2127
2128 #[allow(unused_mut)]
2130 async fn create_profiling_group(
2131 &self,
2132 input: CreateProfilingGroupRequest,
2133 ) -> Result<CreateProfilingGroupResponse, RusotoError<CreateProfilingGroupError>> {
2134 let request_uri = "/profilingGroups";
2135
2136 let mut request =
2137 SignedRequest::new("POST", "codeguru-profiler", &self.region, &request_uri);
2138 request.set_content_type("application/x-amz-json-1.1".to_owned());
2139
2140 let encoded = Some(serde_json::to_vec(&input).unwrap());
2141 request.set_payload(encoded);
2142
2143 let mut params = Params::new();
2144 params.put("clientToken", &input.client_token);
2145 request.set_params(params);
2146
2147 let mut response = self
2148 .client
2149 .sign_and_dispatch(request)
2150 .await
2151 .map_err(RusotoError::from)?;
2152 if response.status.as_u16() == 201 {
2153 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2154 let result = proto::json::ResponsePayload::new(&response)
2155 .deserialize::<CreateProfilingGroupResponse, _>()?;
2156
2157 Ok(result)
2158 } else {
2159 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2160 Err(CreateProfilingGroupError::from_response(response))
2161 }
2162 }
2163
2164 #[allow(unused_mut)]
2166 async fn delete_profiling_group(
2167 &self,
2168 input: DeleteProfilingGroupRequest,
2169 ) -> Result<DeleteProfilingGroupResponse, RusotoError<DeleteProfilingGroupError>> {
2170 let request_uri = format!(
2171 "/profilingGroups/{profiling_group_name}",
2172 profiling_group_name = input.profiling_group_name
2173 );
2174
2175 let mut request =
2176 SignedRequest::new("DELETE", "codeguru-profiler", &self.region, &request_uri);
2177 request.set_content_type("application/x-amz-json-1.1".to_owned());
2178
2179 let mut response = self
2180 .client
2181 .sign_and_dispatch(request)
2182 .await
2183 .map_err(RusotoError::from)?;
2184 if response.status.as_u16() == 204 {
2185 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2186 let result = proto::json::ResponsePayload::new(&response)
2187 .deserialize::<DeleteProfilingGroupResponse, _>()?;
2188
2189 Ok(result)
2190 } else {
2191 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2192 Err(DeleteProfilingGroupError::from_response(response))
2193 }
2194 }
2195
2196 #[allow(unused_mut)]
2198 async fn describe_profiling_group(
2199 &self,
2200 input: DescribeProfilingGroupRequest,
2201 ) -> Result<DescribeProfilingGroupResponse, RusotoError<DescribeProfilingGroupError>> {
2202 let request_uri = format!(
2203 "/profilingGroups/{profiling_group_name}",
2204 profiling_group_name = input.profiling_group_name
2205 );
2206
2207 let mut request =
2208 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2209 request.set_content_type("application/x-amz-json-1.1".to_owned());
2210
2211 let mut response = self
2212 .client
2213 .sign_and_dispatch(request)
2214 .await
2215 .map_err(RusotoError::from)?;
2216 if response.status.as_u16() == 200 {
2217 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2218 let result = proto::json::ResponsePayload::new(&response)
2219 .deserialize::<DescribeProfilingGroupResponse, _>()?;
2220
2221 Ok(result)
2222 } else {
2223 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2224 Err(DescribeProfilingGroupError::from_response(response))
2225 }
2226 }
2227
2228 #[allow(unused_mut)]
2230 async fn get_findings_report_account_summary(
2231 &self,
2232 input: GetFindingsReportAccountSummaryRequest,
2233 ) -> Result<
2234 GetFindingsReportAccountSummaryResponse,
2235 RusotoError<GetFindingsReportAccountSummaryError>,
2236 > {
2237 let request_uri = "/internal/findingsReports";
2238
2239 let mut request =
2240 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2241 request.set_content_type("application/x-amz-json-1.1".to_owned());
2242
2243 let mut params = Params::new();
2244 if let Some(ref x) = input.daily_reports_only {
2245 params.put("dailyReportsOnly", x);
2246 }
2247 if let Some(ref x) = input.max_results {
2248 params.put("maxResults", x);
2249 }
2250 if let Some(ref x) = input.next_token {
2251 params.put("nextToken", x);
2252 }
2253 request.set_params(params);
2254
2255 let mut response = self
2256 .client
2257 .sign_and_dispatch(request)
2258 .await
2259 .map_err(RusotoError::from)?;
2260 if response.status.as_u16() == 200 {
2261 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2262 let result = proto::json::ResponsePayload::new(&response)
2263 .deserialize::<GetFindingsReportAccountSummaryResponse, _>()?;
2264
2265 Ok(result)
2266 } else {
2267 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2268 Err(GetFindingsReportAccountSummaryError::from_response(
2269 response,
2270 ))
2271 }
2272 }
2273
2274 #[allow(unused_mut)]
2276 async fn get_notification_configuration(
2277 &self,
2278 input: GetNotificationConfigurationRequest,
2279 ) -> Result<GetNotificationConfigurationResponse, RusotoError<GetNotificationConfigurationError>>
2280 {
2281 let request_uri = format!(
2282 "/profilingGroups/{profiling_group_name}/notificationConfiguration",
2283 profiling_group_name = input.profiling_group_name
2284 );
2285
2286 let mut request =
2287 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2288 request.set_content_type("application/x-amz-json-1.1".to_owned());
2289
2290 let mut response = self
2291 .client
2292 .sign_and_dispatch(request)
2293 .await
2294 .map_err(RusotoError::from)?;
2295 if response.status.as_u16() == 200 {
2296 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2297 let result = proto::json::ResponsePayload::new(&response)
2298 .deserialize::<GetNotificationConfigurationResponse, _>()?;
2299
2300 Ok(result)
2301 } else {
2302 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2303 Err(GetNotificationConfigurationError::from_response(response))
2304 }
2305 }
2306
2307 #[allow(unused_mut)]
2309 async fn get_policy(
2310 &self,
2311 input: GetPolicyRequest,
2312 ) -> Result<GetPolicyResponse, RusotoError<GetPolicyError>> {
2313 let request_uri = format!(
2314 "/profilingGroups/{profiling_group_name}/policy",
2315 profiling_group_name = input.profiling_group_name
2316 );
2317
2318 let mut request =
2319 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2320 request.set_content_type("application/x-amz-json-1.1".to_owned());
2321
2322 let mut response = self
2323 .client
2324 .sign_and_dispatch(request)
2325 .await
2326 .map_err(RusotoError::from)?;
2327 if response.status.as_u16() == 200 {
2328 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2329 let result = proto::json::ResponsePayload::new(&response)
2330 .deserialize::<GetPolicyResponse, _>()?;
2331
2332 Ok(result)
2333 } else {
2334 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2335 Err(GetPolicyError::from_response(response))
2336 }
2337 }
2338
2339 #[allow(unused_mut)]
2341 async fn get_profile(
2342 &self,
2343 input: GetProfileRequest,
2344 ) -> Result<GetProfileResponse, RusotoError<GetProfileError>> {
2345 let request_uri = format!(
2346 "/profilingGroups/{profiling_group_name}/profile",
2347 profiling_group_name = input.profiling_group_name
2348 );
2349
2350 let mut request =
2351 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2352 request.set_content_type("application/x-amz-json-1.1".to_owned());
2353
2354 request.add_optional_header("Accept", input.accept.as_ref());
2355 let mut params = Params::new();
2356 if let Some(ref x) = input.end_time {
2357 params.put("endTime", x);
2358 }
2359 if let Some(ref x) = input.max_depth {
2360 params.put("maxDepth", x);
2361 }
2362 if let Some(ref x) = input.period {
2363 params.put("period", x);
2364 }
2365 if let Some(ref x) = input.start_time {
2366 params.put("startTime", x);
2367 }
2368 request.set_params(params);
2369
2370 let mut response = self
2371 .client
2372 .sign_and_dispatch(request)
2373 .await
2374 .map_err(RusotoError::from)?;
2375 if response.status.as_u16() == 200 {
2376 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2377
2378 let mut result = GetProfileResponse::default();
2379 result.profile = response.body;
2380
2381 result.content_encoding = response.headers.remove("Content-Encoding");
2382 let value = response.headers.remove("Content-Type").unwrap();
2383 result.content_type = value;
2384
2385 Ok(result)
2386 } else {
2387 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2388 Err(GetProfileError::from_response(response))
2389 }
2390 }
2391
2392 #[allow(unused_mut)]
2394 async fn get_recommendations(
2395 &self,
2396 input: GetRecommendationsRequest,
2397 ) -> Result<GetRecommendationsResponse, RusotoError<GetRecommendationsError>> {
2398 let request_uri = format!(
2399 "/internal/profilingGroups/{profiling_group_name}/recommendations",
2400 profiling_group_name = input.profiling_group_name
2401 );
2402
2403 let mut request =
2404 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2405 request.set_content_type("application/x-amz-json-1.1".to_owned());
2406
2407 let mut params = Params::new();
2408 params.put("endTime", &input.end_time);
2409 if let Some(ref x) = input.locale {
2410 params.put("locale", x);
2411 }
2412 params.put("startTime", &input.start_time);
2413 request.set_params(params);
2414
2415 let mut response = self
2416 .client
2417 .sign_and_dispatch(request)
2418 .await
2419 .map_err(RusotoError::from)?;
2420 if response.status.as_u16() == 200 {
2421 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2422 let result = proto::json::ResponsePayload::new(&response)
2423 .deserialize::<GetRecommendationsResponse, _>()?;
2424
2425 Ok(result)
2426 } else {
2427 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2428 Err(GetRecommendationsError::from_response(response))
2429 }
2430 }
2431
2432 #[allow(unused_mut)]
2434 async fn list_findings_reports(
2435 &self,
2436 input: ListFindingsReportsRequest,
2437 ) -> Result<ListFindingsReportsResponse, RusotoError<ListFindingsReportsError>> {
2438 let request_uri = format!(
2439 "/internal/profilingGroups/{profiling_group_name}/findingsReports",
2440 profiling_group_name = input.profiling_group_name
2441 );
2442
2443 let mut request =
2444 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2445 request.set_content_type("application/x-amz-json-1.1".to_owned());
2446
2447 let mut params = Params::new();
2448 if let Some(ref x) = input.daily_reports_only {
2449 params.put("dailyReportsOnly", x);
2450 }
2451 params.put("endTime", &input.end_time);
2452 if let Some(ref x) = input.max_results {
2453 params.put("maxResults", x);
2454 }
2455 if let Some(ref x) = input.next_token {
2456 params.put("nextToken", x);
2457 }
2458 params.put("startTime", &input.start_time);
2459 request.set_params(params);
2460
2461 let mut response = self
2462 .client
2463 .sign_and_dispatch(request)
2464 .await
2465 .map_err(RusotoError::from)?;
2466 if response.status.as_u16() == 200 {
2467 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2468 let result = proto::json::ResponsePayload::new(&response)
2469 .deserialize::<ListFindingsReportsResponse, _>()?;
2470
2471 Ok(result)
2472 } else {
2473 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2474 Err(ListFindingsReportsError::from_response(response))
2475 }
2476 }
2477
2478 #[allow(unused_mut)]
2480 async fn list_profile_times(
2481 &self,
2482 input: ListProfileTimesRequest,
2483 ) -> Result<ListProfileTimesResponse, RusotoError<ListProfileTimesError>> {
2484 let request_uri = format!(
2485 "/profilingGroups/{profiling_group_name}/profileTimes",
2486 profiling_group_name = input.profiling_group_name
2487 );
2488
2489 let mut request =
2490 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2491 request.set_content_type("application/x-amz-json-1.1".to_owned());
2492
2493 let mut params = Params::new();
2494 params.put("endTime", &input.end_time);
2495 if let Some(ref x) = input.max_results {
2496 params.put("maxResults", x);
2497 }
2498 if let Some(ref x) = input.next_token {
2499 params.put("nextToken", x);
2500 }
2501 if let Some(ref x) = input.order_by {
2502 params.put("orderBy", x);
2503 }
2504 params.put("period", &input.period);
2505 params.put("startTime", &input.start_time);
2506 request.set_params(params);
2507
2508 let mut response = self
2509 .client
2510 .sign_and_dispatch(request)
2511 .await
2512 .map_err(RusotoError::from)?;
2513 if response.status.as_u16() == 200 {
2514 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2515 let result = proto::json::ResponsePayload::new(&response)
2516 .deserialize::<ListProfileTimesResponse, _>()?;
2517
2518 Ok(result)
2519 } else {
2520 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2521 Err(ListProfileTimesError::from_response(response))
2522 }
2523 }
2524
2525 #[allow(unused_mut)]
2527 async fn list_profiling_groups(
2528 &self,
2529 input: ListProfilingGroupsRequest,
2530 ) -> Result<ListProfilingGroupsResponse, RusotoError<ListProfilingGroupsError>> {
2531 let request_uri = "/profilingGroups";
2532
2533 let mut request =
2534 SignedRequest::new("GET", "codeguru-profiler", &self.region, &request_uri);
2535 request.set_content_type("application/x-amz-json-1.1".to_owned());
2536
2537 let mut params = Params::new();
2538 if let Some(ref x) = input.include_description {
2539 params.put("includeDescription", x);
2540 }
2541 if let Some(ref x) = input.max_results {
2542 params.put("maxResults", x);
2543 }
2544 if let Some(ref x) = input.next_token {
2545 params.put("nextToken", x);
2546 }
2547 request.set_params(params);
2548
2549 let mut response = self
2550 .client
2551 .sign_and_dispatch(request)
2552 .await
2553 .map_err(RusotoError::from)?;
2554 if response.status.as_u16() == 200 {
2555 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2556 let result = proto::json::ResponsePayload::new(&response)
2557 .deserialize::<ListProfilingGroupsResponse, _>()?;
2558
2559 Ok(result)
2560 } else {
2561 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2562 Err(ListProfilingGroupsError::from_response(response))
2563 }
2564 }
2565
2566 #[allow(unused_mut)]
2568 async fn post_agent_profile(
2569 &self,
2570 input: PostAgentProfileRequest,
2571 ) -> Result<PostAgentProfileResponse, RusotoError<PostAgentProfileError>> {
2572 let request_uri = format!(
2573 "/profilingGroups/{profiling_group_name}/agentProfile",
2574 profiling_group_name = input.profiling_group_name
2575 );
2576
2577 let mut request =
2578 SignedRequest::new("POST", "codeguru-profiler", &self.region, &request_uri);
2579 request.set_content_type("application/x-amz-json-1.1".to_owned());
2580
2581 let encoded = Some(input.agent_profile.to_owned());
2582 request.set_payload(encoded);
2583 request.add_header("Content-Type", &input.content_type.to_string());
2584 let mut params = Params::new();
2585 if let Some(ref x) = input.profile_token {
2586 params.put("profileToken", x);
2587 }
2588 request.set_params(params);
2589
2590 let mut response = self
2591 .client
2592 .sign_and_dispatch(request)
2593 .await
2594 .map_err(RusotoError::from)?;
2595 if response.status.as_u16() == 204 {
2596 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2597 let result = proto::json::ResponsePayload::new(&response)
2598 .deserialize::<PostAgentProfileResponse, _>()?;
2599
2600 Ok(result)
2601 } else {
2602 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2603 Err(PostAgentProfileError::from_response(response))
2604 }
2605 }
2606
2607 #[allow(unused_mut)]
2609 async fn put_permission(
2610 &self,
2611 input: PutPermissionRequest,
2612 ) -> Result<PutPermissionResponse, RusotoError<PutPermissionError>> {
2613 let request_uri = format!(
2614 "/profilingGroups/{profiling_group_name}/policy/{action_group}",
2615 action_group = input.action_group,
2616 profiling_group_name = input.profiling_group_name
2617 );
2618
2619 let mut request =
2620 SignedRequest::new("PUT", "codeguru-profiler", &self.region, &request_uri);
2621 request.set_content_type("application/x-amz-json-1.1".to_owned());
2622
2623 let encoded = Some(serde_json::to_vec(&input).unwrap());
2624 request.set_payload(encoded);
2625
2626 let mut response = self
2627 .client
2628 .sign_and_dispatch(request)
2629 .await
2630 .map_err(RusotoError::from)?;
2631 if response.status.as_u16() == 200 {
2632 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2633 let result = proto::json::ResponsePayload::new(&response)
2634 .deserialize::<PutPermissionResponse, _>()?;
2635
2636 Ok(result)
2637 } else {
2638 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2639 Err(PutPermissionError::from_response(response))
2640 }
2641 }
2642
2643 #[allow(unused_mut)]
2645 async fn remove_notification_channel(
2646 &self,
2647 input: RemoveNotificationChannelRequest,
2648 ) -> Result<RemoveNotificationChannelResponse, RusotoError<RemoveNotificationChannelError>>
2649 {
2650 let request_uri = format!(
2651 "/profilingGroups/{profiling_group_name}/notificationConfiguration/{channel_id}",
2652 channel_id = input.channel_id,
2653 profiling_group_name = input.profiling_group_name
2654 );
2655
2656 let mut request =
2657 SignedRequest::new("DELETE", "codeguru-profiler", &self.region, &request_uri);
2658 request.set_content_type("application/x-amz-json-1.1".to_owned());
2659
2660 let mut response = self
2661 .client
2662 .sign_and_dispatch(request)
2663 .await
2664 .map_err(RusotoError::from)?;
2665 if response.status.as_u16() == 200 {
2666 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2667 let result = proto::json::ResponsePayload::new(&response)
2668 .deserialize::<RemoveNotificationChannelResponse, _>()?;
2669
2670 Ok(result)
2671 } else {
2672 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2673 Err(RemoveNotificationChannelError::from_response(response))
2674 }
2675 }
2676
2677 #[allow(unused_mut)]
2679 async fn remove_permission(
2680 &self,
2681 input: RemovePermissionRequest,
2682 ) -> Result<RemovePermissionResponse, RusotoError<RemovePermissionError>> {
2683 let request_uri = format!(
2684 "/profilingGroups/{profiling_group_name}/policy/{action_group}",
2685 action_group = input.action_group,
2686 profiling_group_name = input.profiling_group_name
2687 );
2688
2689 let mut request =
2690 SignedRequest::new("DELETE", "codeguru-profiler", &self.region, &request_uri);
2691 request.set_content_type("application/x-amz-json-1.1".to_owned());
2692
2693 let mut params = Params::new();
2694 params.put("revisionId", &input.revision_id);
2695 request.set_params(params);
2696
2697 let mut response = self
2698 .client
2699 .sign_and_dispatch(request)
2700 .await
2701 .map_err(RusotoError::from)?;
2702 if response.status.as_u16() == 200 {
2703 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2704 let result = proto::json::ResponsePayload::new(&response)
2705 .deserialize::<RemovePermissionResponse, _>()?;
2706
2707 Ok(result)
2708 } else {
2709 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2710 Err(RemovePermissionError::from_response(response))
2711 }
2712 }
2713
2714 #[allow(unused_mut)]
2716 async fn submit_feedback(
2717 &self,
2718 input: SubmitFeedbackRequest,
2719 ) -> Result<SubmitFeedbackResponse, RusotoError<SubmitFeedbackError>> {
2720 let request_uri = format!("/internal/profilingGroups/{profiling_group_name}/anomalies/{anomaly_instance_id}/feedback", anomaly_instance_id = input.anomaly_instance_id, profiling_group_name = input.profiling_group_name);
2721
2722 let mut request =
2723 SignedRequest::new("POST", "codeguru-profiler", &self.region, &request_uri);
2724 request.set_content_type("application/x-amz-json-1.1".to_owned());
2725
2726 let encoded = Some(serde_json::to_vec(&input).unwrap());
2727 request.set_payload(encoded);
2728
2729 let mut response = self
2730 .client
2731 .sign_and_dispatch(request)
2732 .await
2733 .map_err(RusotoError::from)?;
2734 if response.status.as_u16() == 204 {
2735 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2736 let result = proto::json::ResponsePayload::new(&response)
2737 .deserialize::<SubmitFeedbackResponse, _>()?;
2738
2739 Ok(result)
2740 } else {
2741 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2742 Err(SubmitFeedbackError::from_response(response))
2743 }
2744 }
2745
2746 #[allow(unused_mut)]
2748 async fn update_profiling_group(
2749 &self,
2750 input: UpdateProfilingGroupRequest,
2751 ) -> Result<UpdateProfilingGroupResponse, RusotoError<UpdateProfilingGroupError>> {
2752 let request_uri = format!(
2753 "/profilingGroups/{profiling_group_name}",
2754 profiling_group_name = input.profiling_group_name
2755 );
2756
2757 let mut request =
2758 SignedRequest::new("PUT", "codeguru-profiler", &self.region, &request_uri);
2759 request.set_content_type("application/x-amz-json-1.1".to_owned());
2760
2761 let encoded = Some(serde_json::to_vec(&input).unwrap());
2762 request.set_payload(encoded);
2763
2764 let mut response = self
2765 .client
2766 .sign_and_dispatch(request)
2767 .await
2768 .map_err(RusotoError::from)?;
2769 if response.status.as_u16() == 200 {
2770 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2771 let result = proto::json::ResponsePayload::new(&response)
2772 .deserialize::<UpdateProfilingGroupResponse, _>()?;
2773
2774 Ok(result)
2775 } else {
2776 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2777 Err(UpdateProfilingGroupError::from_response(response))
2778 }
2779 }
2780}