rusoto_application_insights/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use 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::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl ApplicationInsightsClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(
31            http_method,
32            "applicationinsights",
33            &self.region,
34            request_uri,
35        );
36
37        request.set_content_type("application/x-amz-json-1.1".to_owned());
38
39        request
40    }
41
42    async fn sign_and_dispatch<E>(
43        &self,
44        request: SignedRequest,
45        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
46    ) -> Result<HttpResponse, RusotoError<E>> {
47        let mut response = self.client.sign_and_dispatch(request).await?;
48        if !response.status.is_success() {
49            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
50            return Err(from_response(response));
51        }
52
53        Ok(response)
54    }
55}
56
57use serde_json;
58/// <p>Describes a standalone resource or similarly grouped resources that the application is made up of.</p>
59#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
60#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
61pub struct ApplicationComponent {
62    /// <p>The name of the component.</p>
63    #[serde(rename = "ComponentName")]
64    #[serde(skip_serializing_if = "Option::is_none")]
65    pub component_name: Option<String>,
66    /// <p>Indicates whether the application component is monitored. </p>
67    #[serde(rename = "Monitor")]
68    #[serde(skip_serializing_if = "Option::is_none")]
69    pub monitor: Option<bool>,
70    /// <p>The resource type. Supported resource types include EC2 instances, Auto Scaling group, Classic ELB, Application ELB, and SQS Queue.</p>
71    #[serde(rename = "ResourceType")]
72    #[serde(skip_serializing_if = "Option::is_none")]
73    pub resource_type: Option<String>,
74    /// <p>The stack tier of the application component.</p>
75    #[serde(rename = "Tier")]
76    #[serde(skip_serializing_if = "Option::is_none")]
77    pub tier: Option<String>,
78}
79
80/// <p>Describes the status of the application.</p>
81#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
82#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
83pub struct ApplicationInfo {
84    /// <p> Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others. </p>
85    #[serde(rename = "CWEMonitorEnabled")]
86    #[serde(skip_serializing_if = "Option::is_none")]
87    pub cwe_monitor_enabled: Option<bool>,
88    /// <p>The lifecycle of the application. </p>
89    #[serde(rename = "LifeCycle")]
90    #[serde(skip_serializing_if = "Option::is_none")]
91    pub life_cycle: Option<String>,
92    /// <p> Indicates whether Application Insights will create opsItems for any problem detected by Application Insights for an application. </p>
93    #[serde(rename = "OpsCenterEnabled")]
94    #[serde(skip_serializing_if = "Option::is_none")]
95    pub ops_center_enabled: Option<bool>,
96    /// <p> The SNS topic provided to Application Insights that is associated to the created opsItems to receive SNS notifications for opsItem updates. </p>
97    #[serde(rename = "OpsItemSNSTopicArn")]
98    #[serde(skip_serializing_if = "Option::is_none")]
99    pub ops_item_sns_topic_arn: Option<String>,
100    /// <p><p>The issues on the user side that block Application Insights from successfully monitoring an application. Example remarks include:</p> <ul> <li> <p>“Configuring application, detected 1 Errors, 3 Warnings”</p> </li> <li> <p>“Configuring application, detected 1 Unconfigured Components”</p> </li> </ul></p>
101    #[serde(rename = "Remarks")]
102    #[serde(skip_serializing_if = "Option::is_none")]
103    pub remarks: Option<String>,
104    /// <p>The name of the resource group used for the application.</p>
105    #[serde(rename = "ResourceGroupName")]
106    #[serde(skip_serializing_if = "Option::is_none")]
107    pub resource_group_name: Option<String>,
108}
109
110/// <p> The event information. </p>
111#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
112#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
113pub struct ConfigurationEvent {
114    /// <p> The details of the event in plain text. </p>
115    #[serde(rename = "EventDetail")]
116    #[serde(skip_serializing_if = "Option::is_none")]
117    pub event_detail: Option<String>,
118    /// <p> The name of the resource Application Insights attempted to configure. </p>
119    #[serde(rename = "EventResourceName")]
120    #[serde(skip_serializing_if = "Option::is_none")]
121    pub event_resource_name: Option<String>,
122    /// <p> The resource type that Application Insights attempted to configure, for example, CLOUDWATCH_ALARM. </p>
123    #[serde(rename = "EventResourceType")]
124    #[serde(skip_serializing_if = "Option::is_none")]
125    pub event_resource_type: Option<String>,
126    /// <p> The status of the configuration update event. Possible values include INFO, WARN, and ERROR. </p>
127    #[serde(rename = "EventStatus")]
128    #[serde(skip_serializing_if = "Option::is_none")]
129    pub event_status: Option<String>,
130    /// <p> The timestamp of the event. </p>
131    #[serde(rename = "EventTime")]
132    #[serde(skip_serializing_if = "Option::is_none")]
133    pub event_time: Option<f64>,
134    /// <p> The resource monitored by Application Insights. </p>
135    #[serde(rename = "MonitoredResourceARN")]
136    #[serde(skip_serializing_if = "Option::is_none")]
137    pub monitored_resource_arn: Option<String>,
138}
139
140#[derive(Clone, Debug, Default, PartialEq, Serialize)]
141#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
142pub struct CreateApplicationRequest {
143    /// <p> Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others. </p>
144    #[serde(rename = "CWEMonitorEnabled")]
145    #[serde(skip_serializing_if = "Option::is_none")]
146    pub cwe_monitor_enabled: Option<bool>,
147    /// <p> When set to <code>true</code>, creates opsItems for any problems detected on an application. </p>
148    #[serde(rename = "OpsCenterEnabled")]
149    #[serde(skip_serializing_if = "Option::is_none")]
150    pub ops_center_enabled: Option<bool>,
151    /// <p> The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem. </p>
152    #[serde(rename = "OpsItemSNSTopicArn")]
153    #[serde(skip_serializing_if = "Option::is_none")]
154    pub ops_item_sns_topic_arn: Option<String>,
155    /// <p>The name of the resource group.</p>
156    #[serde(rename = "ResourceGroupName")]
157    pub resource_group_name: String,
158    /// <p>List of tags to add to the application. tag key (<code>Key</code>) and an associated tag value (<code>Value</code>). The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.</p>
159    #[serde(rename = "Tags")]
160    #[serde(skip_serializing_if = "Option::is_none")]
161    pub tags: Option<Vec<Tag>>,
162}
163
164#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
165#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
166pub struct CreateApplicationResponse {
167    /// <p>Information about the application.</p>
168    #[serde(rename = "ApplicationInfo")]
169    #[serde(skip_serializing_if = "Option::is_none")]
170    pub application_info: Option<ApplicationInfo>,
171}
172
173#[derive(Clone, Debug, Default, PartialEq, Serialize)]
174#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
175pub struct CreateComponentRequest {
176    /// <p>The name of the component.</p>
177    #[serde(rename = "ComponentName")]
178    pub component_name: String,
179    /// <p>The name of the resource group.</p>
180    #[serde(rename = "ResourceGroupName")]
181    pub resource_group_name: String,
182    /// <p>The list of resource ARNs that belong to the component.</p>
183    #[serde(rename = "ResourceList")]
184    pub resource_list: Vec<String>,
185}
186
187#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
188#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
189pub struct CreateComponentResponse {}
190
191#[derive(Clone, Debug, Default, PartialEq, Serialize)]
192#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
193pub struct CreateLogPatternRequest {
194    /// <p>The log pattern.</p>
195    #[serde(rename = "Pattern")]
196    pub pattern: String,
197    /// <p>The name of the log pattern.</p>
198    #[serde(rename = "PatternName")]
199    pub pattern_name: String,
200    /// <p>The name of the log pattern set.</p>
201    #[serde(rename = "PatternSetName")]
202    pub pattern_set_name: String,
203    /// <p>Rank of the log pattern.</p>
204    #[serde(rename = "Rank")]
205    pub rank: i64,
206    /// <p>The name of the resource group.</p>
207    #[serde(rename = "ResourceGroupName")]
208    pub resource_group_name: String,
209}
210
211#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
212#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
213pub struct CreateLogPatternResponse {
214    /// <p>The successfully created log pattern.</p>
215    #[serde(rename = "LogPattern")]
216    #[serde(skip_serializing_if = "Option::is_none")]
217    pub log_pattern: Option<LogPattern>,
218    /// <p>The name of the resource group.</p>
219    #[serde(rename = "ResourceGroupName")]
220    #[serde(skip_serializing_if = "Option::is_none")]
221    pub resource_group_name: Option<String>,
222}
223
224#[derive(Clone, Debug, Default, PartialEq, Serialize)]
225#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
226pub struct DeleteApplicationRequest {
227    /// <p>The name of the resource group.</p>
228    #[serde(rename = "ResourceGroupName")]
229    pub resource_group_name: String,
230}
231
232#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
233#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
234pub struct DeleteApplicationResponse {}
235
236#[derive(Clone, Debug, Default, PartialEq, Serialize)]
237#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
238pub struct DeleteComponentRequest {
239    /// <p>The name of the component.</p>
240    #[serde(rename = "ComponentName")]
241    pub component_name: String,
242    /// <p>The name of the resource group.</p>
243    #[serde(rename = "ResourceGroupName")]
244    pub resource_group_name: String,
245}
246
247#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
248#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
249pub struct DeleteComponentResponse {}
250
251#[derive(Clone, Debug, Default, PartialEq, Serialize)]
252#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
253pub struct DeleteLogPatternRequest {
254    /// <p>The name of the log pattern.</p>
255    #[serde(rename = "PatternName")]
256    pub pattern_name: String,
257    /// <p>The name of the log pattern set.</p>
258    #[serde(rename = "PatternSetName")]
259    pub pattern_set_name: String,
260    /// <p>The name of the resource group.</p>
261    #[serde(rename = "ResourceGroupName")]
262    pub resource_group_name: String,
263}
264
265#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
266#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
267pub struct DeleteLogPatternResponse {}
268
269#[derive(Clone, Debug, Default, PartialEq, Serialize)]
270#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
271pub struct DescribeApplicationRequest {
272    /// <p>The name of the resource group.</p>
273    #[serde(rename = "ResourceGroupName")]
274    pub resource_group_name: String,
275}
276
277#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
278#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
279pub struct DescribeApplicationResponse {
280    /// <p>Information about the application.</p>
281    #[serde(rename = "ApplicationInfo")]
282    #[serde(skip_serializing_if = "Option::is_none")]
283    pub application_info: Option<ApplicationInfo>,
284}
285
286#[derive(Clone, Debug, Default, PartialEq, Serialize)]
287#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
288pub struct DescribeComponentConfigurationRecommendationRequest {
289    /// <p>The name of the component.</p>
290    #[serde(rename = "ComponentName")]
291    pub component_name: String,
292    /// <p>The name of the resource group.</p>
293    #[serde(rename = "ResourceGroupName")]
294    pub resource_group_name: String,
295    /// <p>The tier of the application component. Supported tiers include <code>DOT_NET_CORE</code>, <code>DOT_NET_WORKER</code>, <code>DOT_NET_WEB</code>, <code>SQL_SERVER</code>, and <code>DEFAULT</code>.</p>
296    #[serde(rename = "Tier")]
297    pub tier: String,
298}
299
300#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
301#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
302pub struct DescribeComponentConfigurationRecommendationResponse {
303    /// <p>The recommended configuration settings of the component. The value is the escaped JSON of the configuration.</p>
304    #[serde(rename = "ComponentConfiguration")]
305    #[serde(skip_serializing_if = "Option::is_none")]
306    pub component_configuration: Option<String>,
307}
308
309#[derive(Clone, Debug, Default, PartialEq, Serialize)]
310#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
311pub struct DescribeComponentConfigurationRequest {
312    /// <p>The name of the component.</p>
313    #[serde(rename = "ComponentName")]
314    pub component_name: String,
315    /// <p>The name of the resource group.</p>
316    #[serde(rename = "ResourceGroupName")]
317    pub resource_group_name: String,
318}
319
320#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
321#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
322pub struct DescribeComponentConfigurationResponse {
323    /// <p>The configuration settings of the component. The value is the escaped JSON of the configuration.</p>
324    #[serde(rename = "ComponentConfiguration")]
325    #[serde(skip_serializing_if = "Option::is_none")]
326    pub component_configuration: Option<String>,
327    /// <p>Indicates whether the application component is monitored.</p>
328    #[serde(rename = "Monitor")]
329    #[serde(skip_serializing_if = "Option::is_none")]
330    pub monitor: Option<bool>,
331    /// <p>The tier of the application component. Supported tiers include <code>DOT_NET_CORE</code>, <code>DOT_NET_WORKER</code>, <code>DOT_NET_WEB</code>, <code>SQL_SERVER</code>, and <code>DEFAULT</code> </p>
332    #[serde(rename = "Tier")]
333    #[serde(skip_serializing_if = "Option::is_none")]
334    pub tier: Option<String>,
335}
336
337#[derive(Clone, Debug, Default, PartialEq, Serialize)]
338#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
339pub struct DescribeComponentRequest {
340    /// <p>The name of the component.</p>
341    #[serde(rename = "ComponentName")]
342    pub component_name: String,
343    /// <p>The name of the resource group.</p>
344    #[serde(rename = "ResourceGroupName")]
345    pub resource_group_name: String,
346}
347
348#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
349#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
350pub struct DescribeComponentResponse {
351    #[serde(rename = "ApplicationComponent")]
352    #[serde(skip_serializing_if = "Option::is_none")]
353    pub application_component: Option<ApplicationComponent>,
354    /// <p>The list of resource ARNs that belong to the component.</p>
355    #[serde(rename = "ResourceList")]
356    #[serde(skip_serializing_if = "Option::is_none")]
357    pub resource_list: Option<Vec<String>>,
358}
359
360#[derive(Clone, Debug, Default, PartialEq, Serialize)]
361#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
362pub struct DescribeLogPatternRequest {
363    /// <p>The name of the log pattern.</p>
364    #[serde(rename = "PatternName")]
365    pub pattern_name: String,
366    /// <p>The name of the log pattern set.</p>
367    #[serde(rename = "PatternSetName")]
368    pub pattern_set_name: String,
369    /// <p>The name of the resource group.</p>
370    #[serde(rename = "ResourceGroupName")]
371    pub resource_group_name: String,
372}
373
374#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
375#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
376pub struct DescribeLogPatternResponse {
377    /// <p>The successfully created log pattern.</p>
378    #[serde(rename = "LogPattern")]
379    #[serde(skip_serializing_if = "Option::is_none")]
380    pub log_pattern: Option<LogPattern>,
381    /// <p>The name of the resource group.</p>
382    #[serde(rename = "ResourceGroupName")]
383    #[serde(skip_serializing_if = "Option::is_none")]
384    pub resource_group_name: Option<String>,
385}
386
387#[derive(Clone, Debug, Default, PartialEq, Serialize)]
388#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
389pub struct DescribeObservationRequest {
390    /// <p>The ID of the observation.</p>
391    #[serde(rename = "ObservationId")]
392    pub observation_id: String,
393}
394
395#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
396#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
397pub struct DescribeObservationResponse {
398    /// <p>Information about the observation.</p>
399    #[serde(rename = "Observation")]
400    #[serde(skip_serializing_if = "Option::is_none")]
401    pub observation: Option<Observation>,
402}
403
404#[derive(Clone, Debug, Default, PartialEq, Serialize)]
405#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
406pub struct DescribeProblemObservationsRequest {
407    /// <p>The ID of the problem.</p>
408    #[serde(rename = "ProblemId")]
409    pub problem_id: String,
410}
411
412#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
413#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
414pub struct DescribeProblemObservationsResponse {
415    /// <p>Observations related to the problem.</p>
416    #[serde(rename = "RelatedObservations")]
417    #[serde(skip_serializing_if = "Option::is_none")]
418    pub related_observations: Option<RelatedObservations>,
419}
420
421#[derive(Clone, Debug, Default, PartialEq, Serialize)]
422#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
423pub struct DescribeProblemRequest {
424    /// <p>The ID of the problem.</p>
425    #[serde(rename = "ProblemId")]
426    pub problem_id: String,
427}
428
429#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
430#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
431pub struct DescribeProblemResponse {
432    /// <p>Information about the problem. </p>
433    #[serde(rename = "Problem")]
434    #[serde(skip_serializing_if = "Option::is_none")]
435    pub problem: Option<Problem>,
436}
437
438#[derive(Clone, Debug, Default, PartialEq, Serialize)]
439#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
440pub struct ListApplicationsRequest {
441    /// <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
442    #[serde(rename = "MaxResults")]
443    #[serde(skip_serializing_if = "Option::is_none")]
444    pub max_results: Option<i64>,
445    /// <p>The token to request the next page of results.</p>
446    #[serde(rename = "NextToken")]
447    #[serde(skip_serializing_if = "Option::is_none")]
448    pub next_token: Option<String>,
449}
450
451#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
452#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
453pub struct ListApplicationsResponse {
454    /// <p>The list of applications.</p>
455    #[serde(rename = "ApplicationInfoList")]
456    #[serde(skip_serializing_if = "Option::is_none")]
457    pub application_info_list: Option<Vec<ApplicationInfo>>,
458    /// <p>The token used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return. </p>
459    #[serde(rename = "NextToken")]
460    #[serde(skip_serializing_if = "Option::is_none")]
461    pub next_token: Option<String>,
462}
463
464#[derive(Clone, Debug, Default, PartialEq, Serialize)]
465#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
466pub struct ListComponentsRequest {
467    /// <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
468    #[serde(rename = "MaxResults")]
469    #[serde(skip_serializing_if = "Option::is_none")]
470    pub max_results: Option<i64>,
471    /// <p>The token to request the next page of results.</p>
472    #[serde(rename = "NextToken")]
473    #[serde(skip_serializing_if = "Option::is_none")]
474    pub next_token: Option<String>,
475    /// <p>The name of the resource group.</p>
476    #[serde(rename = "ResourceGroupName")]
477    pub resource_group_name: String,
478}
479
480#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
481#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
482pub struct ListComponentsResponse {
483    /// <p>The list of application components.</p>
484    #[serde(rename = "ApplicationComponentList")]
485    #[serde(skip_serializing_if = "Option::is_none")]
486    pub application_component_list: Option<Vec<ApplicationComponent>>,
487    /// <p>The token to request the next page of results.</p>
488    #[serde(rename = "NextToken")]
489    #[serde(skip_serializing_if = "Option::is_none")]
490    pub next_token: Option<String>,
491}
492
493#[derive(Clone, Debug, Default, PartialEq, Serialize)]
494#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
495pub struct ListConfigurationHistoryRequest {
496    /// <p>The end time of the event.</p>
497    #[serde(rename = "EndTime")]
498    #[serde(skip_serializing_if = "Option::is_none")]
499    pub end_time: Option<f64>,
500    /// <p>The status of the configuration update event. Possible values include INFO, WARN, and ERROR.</p>
501    #[serde(rename = "EventStatus")]
502    #[serde(skip_serializing_if = "Option::is_none")]
503    pub event_status: Option<String>,
504    /// <p> The maximum number of results returned by <code>ListConfigurationHistory</code> in paginated output. When this parameter is used, <code>ListConfigurationHistory</code> returns only <code>MaxResults</code> in a single page along with a <code>NextToken</code> response element. The remaining results of the initial request can be seen by sending another <code>ListConfigurationHistory</code> request with the returned <code>NextToken</code> value. If this parameter is not used, then <code>ListConfigurationHistory</code> returns all results. </p>
505    #[serde(rename = "MaxResults")]
506    #[serde(skip_serializing_if = "Option::is_none")]
507    pub max_results: Option<i64>,
508    /// <p>The <code>NextToken</code> value returned from a previous paginated <code>ListConfigurationHistory</code> request where <code>MaxResults</code> was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the <code>NextToken</code> value. This value is <code>null</code> when there are no more results to return.</p>
509    #[serde(rename = "NextToken")]
510    #[serde(skip_serializing_if = "Option::is_none")]
511    pub next_token: Option<String>,
512    /// <p>Resource group to which the application belongs. </p>
513    #[serde(rename = "ResourceGroupName")]
514    #[serde(skip_serializing_if = "Option::is_none")]
515    pub resource_group_name: Option<String>,
516    /// <p>The start time of the event. </p>
517    #[serde(rename = "StartTime")]
518    #[serde(skip_serializing_if = "Option::is_none")]
519    pub start_time: Option<f64>,
520}
521
522#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
523#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
524pub struct ListConfigurationHistoryResponse {
525    /// <p> The list of configuration events and their corresponding details. </p>
526    #[serde(rename = "EventList")]
527    #[serde(skip_serializing_if = "Option::is_none")]
528    pub event_list: Option<Vec<ConfigurationEvent>>,
529    /// <p>The <code>NextToken</code> value to include in a future <code>ListConfigurationHistory</code> request. When the results of a <code>ListConfigurationHistory</code> request exceed <code>MaxResults</code>, this value can be used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>
530    #[serde(rename = "NextToken")]
531    #[serde(skip_serializing_if = "Option::is_none")]
532    pub next_token: Option<String>,
533}
534
535#[derive(Clone, Debug, Default, PartialEq, Serialize)]
536#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
537pub struct ListLogPatternSetsRequest {
538    /// <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
539    #[serde(rename = "MaxResults")]
540    #[serde(skip_serializing_if = "Option::is_none")]
541    pub max_results: Option<i64>,
542    /// <p>The token to request the next page of results.</p>
543    #[serde(rename = "NextToken")]
544    #[serde(skip_serializing_if = "Option::is_none")]
545    pub next_token: Option<String>,
546    /// <p>The name of the resource group.</p>
547    #[serde(rename = "ResourceGroupName")]
548    pub resource_group_name: String,
549}
550
551#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
552#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
553pub struct ListLogPatternSetsResponse {
554    /// <p>The list of log pattern sets.</p>
555    #[serde(rename = "LogPatternSets")]
556    #[serde(skip_serializing_if = "Option::is_none")]
557    pub log_pattern_sets: Option<Vec<String>>,
558    /// <p>The token used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return. </p>
559    #[serde(rename = "NextToken")]
560    #[serde(skip_serializing_if = "Option::is_none")]
561    pub next_token: Option<String>,
562    /// <p>The name of the resource group.</p>
563    #[serde(rename = "ResourceGroupName")]
564    #[serde(skip_serializing_if = "Option::is_none")]
565    pub resource_group_name: Option<String>,
566}
567
568#[derive(Clone, Debug, Default, PartialEq, Serialize)]
569#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
570pub struct ListLogPatternsRequest {
571    /// <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
572    #[serde(rename = "MaxResults")]
573    #[serde(skip_serializing_if = "Option::is_none")]
574    pub max_results: Option<i64>,
575    /// <p>The token to request the next page of results.</p>
576    #[serde(rename = "NextToken")]
577    #[serde(skip_serializing_if = "Option::is_none")]
578    pub next_token: Option<String>,
579    /// <p>The name of the log pattern set.</p>
580    #[serde(rename = "PatternSetName")]
581    #[serde(skip_serializing_if = "Option::is_none")]
582    pub pattern_set_name: Option<String>,
583    /// <p>The name of the resource group.</p>
584    #[serde(rename = "ResourceGroupName")]
585    pub resource_group_name: String,
586}
587
588#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
589#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
590pub struct ListLogPatternsResponse {
591    /// <p>The list of log patterns.</p>
592    #[serde(rename = "LogPatterns")]
593    #[serde(skip_serializing_if = "Option::is_none")]
594    pub log_patterns: Option<Vec<LogPattern>>,
595    /// <p>The token used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return. </p>
596    #[serde(rename = "NextToken")]
597    #[serde(skip_serializing_if = "Option::is_none")]
598    pub next_token: Option<String>,
599    /// <p>The name of the resource group.</p>
600    #[serde(rename = "ResourceGroupName")]
601    #[serde(skip_serializing_if = "Option::is_none")]
602    pub resource_group_name: Option<String>,
603}
604
605#[derive(Clone, Debug, Default, PartialEq, Serialize)]
606#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
607pub struct ListProblemsRequest {
608    /// <p>The time when the problem ended, in epoch seconds. If not specified, problems within the past seven days are returned.</p>
609    #[serde(rename = "EndTime")]
610    #[serde(skip_serializing_if = "Option::is_none")]
611    pub end_time: Option<f64>,
612    /// <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
613    #[serde(rename = "MaxResults")]
614    #[serde(skip_serializing_if = "Option::is_none")]
615    pub max_results: Option<i64>,
616    /// <p>The token to request the next page of results.</p>
617    #[serde(rename = "NextToken")]
618    #[serde(skip_serializing_if = "Option::is_none")]
619    pub next_token: Option<String>,
620    /// <p>The name of the resource group.</p>
621    #[serde(rename = "ResourceGroupName")]
622    #[serde(skip_serializing_if = "Option::is_none")]
623    pub resource_group_name: Option<String>,
624    /// <p>The time when the problem was detected, in epoch seconds. If you don't specify a time frame for the request, problems within the past seven days are returned.</p>
625    #[serde(rename = "StartTime")]
626    #[serde(skip_serializing_if = "Option::is_none")]
627    pub start_time: Option<f64>,
628}
629
630#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
631#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
632pub struct ListProblemsResponse {
633    /// <p>The token used to retrieve the next page of results. This value is <code>null</code> when there are no more results to return. </p>
634    #[serde(rename = "NextToken")]
635    #[serde(skip_serializing_if = "Option::is_none")]
636    pub next_token: Option<String>,
637    /// <p>The list of problems. </p>
638    #[serde(rename = "ProblemList")]
639    #[serde(skip_serializing_if = "Option::is_none")]
640    pub problem_list: Option<Vec<Problem>>,
641}
642
643#[derive(Clone, Debug, Default, PartialEq, Serialize)]
644#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
645pub struct ListTagsForResourceRequest {
646    /// <p>The Amazon Resource Name (ARN) of the application that you want to retrieve tag information for.</p>
647    #[serde(rename = "ResourceARN")]
648    pub resource_arn: String,
649}
650
651#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
652#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
653pub struct ListTagsForResourceResponse {
654    /// <p>An array that lists all the tags that are associated with the application. Each tag consists of a required tag key (<code>Key</code>) and an associated tag value (<code>Value</code>).</p>
655    #[serde(rename = "Tags")]
656    #[serde(skip_serializing_if = "Option::is_none")]
657    pub tags: Option<Vec<Tag>>,
658}
659
660/// <p>An object that defines the log patterns that belongs to a <code>LogPatternSet</code>.</p>
661#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
662#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
663pub struct LogPattern {
664    /// <p>A regular expression that defines the log pattern. A log pattern can contains at many as 50 characters, and it cannot be empty.</p>
665    #[serde(rename = "Pattern")]
666    #[serde(skip_serializing_if = "Option::is_none")]
667    pub pattern: Option<String>,
668    /// <p>The name of the log pattern. A log pattern name can contains at many as 50 characters, and it cannot be empty. The characters can be Unicode letters, digits or one of the following symbols: period, dash, underscore.</p>
669    #[serde(rename = "PatternName")]
670    #[serde(skip_serializing_if = "Option::is_none")]
671    pub pattern_name: Option<String>,
672    /// <p>The name of the log pattern. A log pattern name can contains at many as 30 characters, and it cannot be empty. The characters can be Unicode letters, digits or one of the following symbols: period, dash, underscore.</p>
673    #[serde(rename = "PatternSetName")]
674    #[serde(skip_serializing_if = "Option::is_none")]
675    pub pattern_set_name: Option<String>,
676    /// <p>Rank of the log pattern.</p>
677    #[serde(rename = "Rank")]
678    #[serde(skip_serializing_if = "Option::is_none")]
679    pub rank: Option<i64>,
680}
681
682/// <p>Describes an anomaly or error with the application.</p>
683#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
684#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
685pub struct Observation {
686    /// <p> The detail type of the CloudWatch Event-based observation, for example, <code>EC2 Instance State-change Notification</code>. </p>
687    #[serde(rename = "CloudWatchEventDetailType")]
688    #[serde(skip_serializing_if = "Option::is_none")]
689    pub cloud_watch_event_detail_type: Option<String>,
690    /// <p> The ID of the CloudWatch Event-based observation related to the detected problem. </p>
691    #[serde(rename = "CloudWatchEventId")]
692    #[serde(skip_serializing_if = "Option::is_none")]
693    pub cloud_watch_event_id: Option<String>,
694    /// <p> The source of the CloudWatch Event. </p>
695    #[serde(rename = "CloudWatchEventSource")]
696    #[serde(skip_serializing_if = "Option::is_none")]
697    pub cloud_watch_event_source: Option<String>,
698    /// <p> The CodeDeploy application to which the deployment belongs. </p>
699    #[serde(rename = "CodeDeployApplication")]
700    #[serde(skip_serializing_if = "Option::is_none")]
701    pub code_deploy_application: Option<String>,
702    /// <p> The deployment group to which the CodeDeploy deployment belongs. </p>
703    #[serde(rename = "CodeDeployDeploymentGroup")]
704    #[serde(skip_serializing_if = "Option::is_none")]
705    pub code_deploy_deployment_group: Option<String>,
706    /// <p> The deployment ID of the CodeDeploy-based observation related to the detected problem. </p>
707    #[serde(rename = "CodeDeployDeploymentId")]
708    #[serde(skip_serializing_if = "Option::is_none")]
709    pub code_deploy_deployment_id: Option<String>,
710    /// <p> The instance group to which the CodeDeploy instance belongs. </p>
711    #[serde(rename = "CodeDeployInstanceGroupId")]
712    #[serde(skip_serializing_if = "Option::is_none")]
713    pub code_deploy_instance_group_id: Option<String>,
714    /// <p> The status of the CodeDeploy deployment, for example <code>SUCCESS</code> or <code> FAILURE</code>. </p>
715    #[serde(rename = "CodeDeployState")]
716    #[serde(skip_serializing_if = "Option::is_none")]
717    pub code_deploy_state: Option<String>,
718    /// <p> The state of the instance, such as <code>STOPPING</code> or <code>TERMINATING</code>. </p>
719    #[serde(rename = "Ec2State")]
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub ec_2_state: Option<String>,
722    /// <p>The time when the observation ended, in epoch seconds.</p>
723    #[serde(rename = "EndTime")]
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub end_time: Option<f64>,
726    /// <p> The Amazon Resource Name (ARN) of the AWS Health Event-based observation.</p>
727    #[serde(rename = "HealthEventArn")]
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub health_event_arn: Option<String>,
730    /// <p> The description of the AWS Health event provided by the service, such as Amazon EC2. </p>
731    #[serde(rename = "HealthEventDescription")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub health_event_description: Option<String>,
734    /// <p> The category of the AWS Health event, such as <code>issue</code>. </p>
735    #[serde(rename = "HealthEventTypeCategory")]
736    #[serde(skip_serializing_if = "Option::is_none")]
737    pub health_event_type_category: Option<String>,
738    /// <p> The type of the AWS Health event, for example, <code>AWS_EC2_POWER_CONNECTIVITY_ISSUE</code>. </p>
739    #[serde(rename = "HealthEventTypeCode")]
740    #[serde(skip_serializing_if = "Option::is_none")]
741    pub health_event_type_code: Option<String>,
742    /// <p> The service to which the AWS Health Event belongs, such as EC2. </p>
743    #[serde(rename = "HealthService")]
744    #[serde(skip_serializing_if = "Option::is_none")]
745    pub health_service: Option<String>,
746    /// <p>The ID of the observation type.</p>
747    #[serde(rename = "Id")]
748    #[serde(skip_serializing_if = "Option::is_none")]
749    pub id: Option<String>,
750    /// <p>The timestamp in the CloudWatch Logs that specifies when the matched line occurred.</p>
751    #[serde(rename = "LineTime")]
752    #[serde(skip_serializing_if = "Option::is_none")]
753    pub line_time: Option<f64>,
754    /// <p>The log filter of the observation.</p>
755    #[serde(rename = "LogFilter")]
756    #[serde(skip_serializing_if = "Option::is_none")]
757    pub log_filter: Option<String>,
758    /// <p>The log group name.</p>
759    #[serde(rename = "LogGroup")]
760    #[serde(skip_serializing_if = "Option::is_none")]
761    pub log_group: Option<String>,
762    /// <p>The log text of the observation.</p>
763    #[serde(rename = "LogText")]
764    #[serde(skip_serializing_if = "Option::is_none")]
765    pub log_text: Option<String>,
766    /// <p>The name of the observation metric.</p>
767    #[serde(rename = "MetricName")]
768    #[serde(skip_serializing_if = "Option::is_none")]
769    pub metric_name: Option<String>,
770    /// <p>The namespace of the observation metric.</p>
771    #[serde(rename = "MetricNamespace")]
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub metric_namespace: Option<String>,
774    /// <p>The source resource ARN of the observation.</p>
775    #[serde(rename = "SourceARN")]
776    #[serde(skip_serializing_if = "Option::is_none")]
777    pub source_arn: Option<String>,
778    /// <p>The source type of the observation.</p>
779    #[serde(rename = "SourceType")]
780    #[serde(skip_serializing_if = "Option::is_none")]
781    pub source_type: Option<String>,
782    /// <p>The time when the observation was first detected, in epoch seconds.</p>
783    #[serde(rename = "StartTime")]
784    #[serde(skip_serializing_if = "Option::is_none")]
785    pub start_time: Option<f64>,
786    /// <p>The unit of the source observation metric.</p>
787    #[serde(rename = "Unit")]
788    #[serde(skip_serializing_if = "Option::is_none")]
789    pub unit: Option<String>,
790    /// <p>The value of the source observation metric.</p>
791    #[serde(rename = "Value")]
792    #[serde(skip_serializing_if = "Option::is_none")]
793    pub value: Option<f64>,
794    /// <p> The X-Ray request error percentage for this node. </p>
795    #[serde(rename = "XRayErrorPercent")]
796    #[serde(skip_serializing_if = "Option::is_none")]
797    pub x_ray_error_percent: Option<i64>,
798    /// <p> The X-Ray request fault percentage for this node. </p>
799    #[serde(rename = "XRayFaultPercent")]
800    #[serde(skip_serializing_if = "Option::is_none")]
801    pub x_ray_fault_percent: Option<i64>,
802    /// <p> The name of the X-Ray node. </p>
803    #[serde(rename = "XRayNodeName")]
804    #[serde(skip_serializing_if = "Option::is_none")]
805    pub x_ray_node_name: Option<String>,
806    /// <p> The type of the X-Ray node. </p>
807    #[serde(rename = "XRayNodeType")]
808    #[serde(skip_serializing_if = "Option::is_none")]
809    pub x_ray_node_type: Option<String>,
810    /// <p> The X-Ray node request average latency for this node. </p>
811    #[serde(rename = "XRayRequestAverageLatency")]
812    #[serde(skip_serializing_if = "Option::is_none")]
813    pub x_ray_request_average_latency: Option<i64>,
814    /// <p> The X-Ray request count for this node. </p>
815    #[serde(rename = "XRayRequestCount")]
816    #[serde(skip_serializing_if = "Option::is_none")]
817    pub x_ray_request_count: Option<i64>,
818    /// <p> The X-Ray request throttle percentage for this node. </p>
819    #[serde(rename = "XRayThrottlePercent")]
820    #[serde(skip_serializing_if = "Option::is_none")]
821    pub x_ray_throttle_percent: Option<i64>,
822}
823
824/// <p>Describes a problem that is detected by correlating observations.</p>
825#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
826#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
827pub struct Problem {
828    /// <p>The resource affected by the problem.</p>
829    #[serde(rename = "AffectedResource")]
830    #[serde(skip_serializing_if = "Option::is_none")]
831    pub affected_resource: Option<String>,
832    /// <p>The time when the problem ended, in epoch seconds.</p>
833    #[serde(rename = "EndTime")]
834    #[serde(skip_serializing_if = "Option::is_none")]
835    pub end_time: Option<f64>,
836    /// <p>Feedback provided by the user about the problem.</p>
837    #[serde(rename = "Feedback")]
838    #[serde(skip_serializing_if = "Option::is_none")]
839    pub feedback: Option<::std::collections::HashMap<String, String>>,
840    /// <p>The ID of the problem.</p>
841    #[serde(rename = "Id")]
842    #[serde(skip_serializing_if = "Option::is_none")]
843    pub id: Option<String>,
844    /// <p>A detailed analysis of the problem using machine learning.</p>
845    #[serde(rename = "Insights")]
846    #[serde(skip_serializing_if = "Option::is_none")]
847    pub insights: Option<String>,
848    /// <p>The name of the resource group affected by the problem.</p>
849    #[serde(rename = "ResourceGroupName")]
850    #[serde(skip_serializing_if = "Option::is_none")]
851    pub resource_group_name: Option<String>,
852    /// <p>A measure of the level of impact of the problem.</p>
853    #[serde(rename = "SeverityLevel")]
854    #[serde(skip_serializing_if = "Option::is_none")]
855    pub severity_level: Option<String>,
856    /// <p>The time when the problem started, in epoch seconds.</p>
857    #[serde(rename = "StartTime")]
858    #[serde(skip_serializing_if = "Option::is_none")]
859    pub start_time: Option<f64>,
860    /// <p>The status of the problem.</p>
861    #[serde(rename = "Status")]
862    #[serde(skip_serializing_if = "Option::is_none")]
863    pub status: Option<String>,
864    /// <p>The name of the problem.</p>
865    #[serde(rename = "Title")]
866    #[serde(skip_serializing_if = "Option::is_none")]
867    pub title: Option<String>,
868}
869
870/// <p>Describes observations related to the problem.</p>
871#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
872#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
873pub struct RelatedObservations {
874    /// <p>The list of observations related to the problem.</p>
875    #[serde(rename = "ObservationList")]
876    #[serde(skip_serializing_if = "Option::is_none")]
877    pub observation_list: Option<Vec<Observation>>,
878}
879
880/// <p><p>An object that defines the tags associated with an application. A <i>tag</i> is a label that you optionally define and associate with an application. Tags can help you categorize and manage resources in different ways, such as by purpose, owner, environment, or other criteria.</p> <p>Each tag consists of a required <i>tag key</i> and an associated <i>tag value</i>, both of which you define. A tag key is a general label that acts as a category for a more specific tag value. A tag value acts as a descriptor within a tag key. A tag key can contain as many as 128 characters. A tag value can contain as many as 256 characters. The characters can be Unicode letters, digits, white space, or one of the following symbols: _ . : / = + -. The following additional restrictions apply to tags:</p> <ul> <li> <p>Tag keys and values are case sensitive.</p> </li> <li> <p>For each associated resource, each tag key must be unique and it can have only one value.</p> </li> <li> <p>The <code>aws:</code> prefix is reserved for use by AWS; you can’t use it in any tag keys or values that you define. In addition, you can&#39;t edit or remove tag keys or values that use this prefix. </p> </li> </ul></p>
881#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
882pub struct Tag {
883    /// <p>One part of a key-value pair that defines a tag. The maximum length of a tag key is 128 characters. The minimum length is 1 character.</p>
884    #[serde(rename = "Key")]
885    pub key: String,
886    /// <p>The optional part of a key-value pair that defines a tag. The maximum length of a tag value is 256 characters. The minimum length is 0 characters. If you don't want an application to have a specific tag value, don't specify a value for this parameter.</p>
887    #[serde(rename = "Value")]
888    pub value: String,
889}
890
891#[derive(Clone, Debug, Default, PartialEq, Serialize)]
892#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
893pub struct TagResourceRequest {
894    /// <p>The Amazon Resource Name (ARN) of the application that you want to add one or more tags to.</p>
895    #[serde(rename = "ResourceARN")]
896    pub resource_arn: String,
897    /// <p>A list of tags that to add to the application. A tag consists of a required tag key (<code>Key</code>) and an associated tag value (<code>Value</code>). The maximum length of a tag key is 128 characters. The maximum length of a tag value is 256 characters.</p>
898    #[serde(rename = "Tags")]
899    pub tags: Vec<Tag>,
900}
901
902#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
903#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
904pub struct TagResourceResponse {}
905
906#[derive(Clone, Debug, Default, PartialEq, Serialize)]
907#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
908pub struct UntagResourceRequest {
909    /// <p>The Amazon Resource Name (ARN) of the application that you want to remove one or more tags from.</p>
910    #[serde(rename = "ResourceARN")]
911    pub resource_arn: String,
912    /// <p>The tags (tag keys) that you want to remove from the resource. When you specify a tag key, the action removes both that key and its associated tag value.</p> <p>To remove more than one tag from the application, append the <code>TagKeys</code> parameter and argument for each additional tag to remove, separated by an ampersand. </p>
913    #[serde(rename = "TagKeys")]
914    pub tag_keys: Vec<String>,
915}
916
917#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
918#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
919pub struct UntagResourceResponse {}
920
921#[derive(Clone, Debug, Default, PartialEq, Serialize)]
922#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
923pub struct UpdateApplicationRequest {
924    /// <p> Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others. </p>
925    #[serde(rename = "CWEMonitorEnabled")]
926    #[serde(skip_serializing_if = "Option::is_none")]
927    pub cwe_monitor_enabled: Option<bool>,
928    /// <p> When set to <code>true</code>, creates opsItems for any problems detected on an application. </p>
929    #[serde(rename = "OpsCenterEnabled")]
930    #[serde(skip_serializing_if = "Option::is_none")]
931    pub ops_center_enabled: Option<bool>,
932    /// <p> The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
933    #[serde(rename = "OpsItemSNSTopicArn")]
934    #[serde(skip_serializing_if = "Option::is_none")]
935    pub ops_item_sns_topic_arn: Option<String>,
936    /// <p> Disassociates the SNS topic from the opsItem created for detected problems.</p>
937    #[serde(rename = "RemoveSNSTopic")]
938    #[serde(skip_serializing_if = "Option::is_none")]
939    pub remove_sns_topic: Option<bool>,
940    /// <p>The name of the resource group.</p>
941    #[serde(rename = "ResourceGroupName")]
942    pub resource_group_name: String,
943}
944
945#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
946#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
947pub struct UpdateApplicationResponse {
948    /// <p>Information about the application. </p>
949    #[serde(rename = "ApplicationInfo")]
950    #[serde(skip_serializing_if = "Option::is_none")]
951    pub application_info: Option<ApplicationInfo>,
952}
953
954#[derive(Clone, Debug, Default, PartialEq, Serialize)]
955#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
956pub struct UpdateComponentConfigurationRequest {
957    /// <p>The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see <a href="https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/working-with-json.html">Working with JSON</a>. You can send a request to <code>DescribeComponentConfigurationRecommendation</code> to see the recommended configuration for a component. For the complete format of the component configuration file, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/component-config.html">Component Configuration</a>.</p>
958    #[serde(rename = "ComponentConfiguration")]
959    #[serde(skip_serializing_if = "Option::is_none")]
960    pub component_configuration: Option<String>,
961    /// <p>The name of the component.</p>
962    #[serde(rename = "ComponentName")]
963    pub component_name: String,
964    /// <p>Indicates whether the application component is monitored.</p>
965    #[serde(rename = "Monitor")]
966    #[serde(skip_serializing_if = "Option::is_none")]
967    pub monitor: Option<bool>,
968    /// <p>The name of the resource group.</p>
969    #[serde(rename = "ResourceGroupName")]
970    pub resource_group_name: String,
971    /// <p>The tier of the application component. Supported tiers include <code>DOT_NET_WORKER</code>, <code>DOT_NET_WEB</code>, <code>DOT_NET_CORE</code>, <code>SQL_SERVER</code>, and <code>DEFAULT</code>.</p>
972    #[serde(rename = "Tier")]
973    #[serde(skip_serializing_if = "Option::is_none")]
974    pub tier: Option<String>,
975}
976
977#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
978#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
979pub struct UpdateComponentConfigurationResponse {}
980
981#[derive(Clone, Debug, Default, PartialEq, Serialize)]
982#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
983pub struct UpdateComponentRequest {
984    /// <p>The name of the component.</p>
985    #[serde(rename = "ComponentName")]
986    pub component_name: String,
987    /// <p>The new name of the component.</p>
988    #[serde(rename = "NewComponentName")]
989    #[serde(skip_serializing_if = "Option::is_none")]
990    pub new_component_name: Option<String>,
991    /// <p>The name of the resource group.</p>
992    #[serde(rename = "ResourceGroupName")]
993    pub resource_group_name: String,
994    /// <p>The list of resource ARNs that belong to the component.</p>
995    #[serde(rename = "ResourceList")]
996    #[serde(skip_serializing_if = "Option::is_none")]
997    pub resource_list: Option<Vec<String>>,
998}
999
1000#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1001#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1002pub struct UpdateComponentResponse {}
1003
1004#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1005#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1006pub struct UpdateLogPatternRequest {
1007    /// <p>The log pattern.</p>
1008    #[serde(rename = "Pattern")]
1009    #[serde(skip_serializing_if = "Option::is_none")]
1010    pub pattern: Option<String>,
1011    /// <p>The name of the log pattern.</p>
1012    #[serde(rename = "PatternName")]
1013    pub pattern_name: String,
1014    /// <p>The name of the log pattern set.</p>
1015    #[serde(rename = "PatternSetName")]
1016    pub pattern_set_name: String,
1017    /// <p>Rank of the log pattern.</p>
1018    #[serde(rename = "Rank")]
1019    #[serde(skip_serializing_if = "Option::is_none")]
1020    pub rank: Option<i64>,
1021    /// <p>The name of the resource group.</p>
1022    #[serde(rename = "ResourceGroupName")]
1023    pub resource_group_name: String,
1024}
1025
1026#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1027#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1028pub struct UpdateLogPatternResponse {
1029    /// <p>The successfully created log pattern.</p>
1030    #[serde(rename = "LogPattern")]
1031    #[serde(skip_serializing_if = "Option::is_none")]
1032    pub log_pattern: Option<LogPattern>,
1033    /// <p>The name of the resource group.</p>
1034    #[serde(rename = "ResourceGroupName")]
1035    #[serde(skip_serializing_if = "Option::is_none")]
1036    pub resource_group_name: Option<String>,
1037}
1038
1039/// Errors returned by CreateApplication
1040#[derive(Debug, PartialEq)]
1041pub enum CreateApplicationError {
1042    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1043    InternalServer(String),
1044    /// <p>The resource is already created or in use.</p>
1045    ResourceInUse(String),
1046    /// <p>The resource does not exist in the customer account.</p>
1047    ResourceNotFound(String),
1048    /// <p>Tags are already registered for the specified application ARN.</p>
1049    TagsAlreadyExist(String),
1050}
1051
1052impl CreateApplicationError {
1053    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApplicationError> {
1054        if let Some(err) = proto::json::Error::parse(&res) {
1055            match err.typ.as_str() {
1056                "InternalServerException" => {
1057                    return RusotoError::Service(CreateApplicationError::InternalServer(err.msg))
1058                }
1059                "ResourceInUseException" => {
1060                    return RusotoError::Service(CreateApplicationError::ResourceInUse(err.msg))
1061                }
1062                "ResourceNotFoundException" => {
1063                    return RusotoError::Service(CreateApplicationError::ResourceNotFound(err.msg))
1064                }
1065                "TagsAlreadyExistException" => {
1066                    return RusotoError::Service(CreateApplicationError::TagsAlreadyExist(err.msg))
1067                }
1068                "ValidationException" => return RusotoError::Validation(err.msg),
1069                _ => {}
1070            }
1071        }
1072        RusotoError::Unknown(res)
1073    }
1074}
1075impl fmt::Display for CreateApplicationError {
1076    #[allow(unused_variables)]
1077    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1078        match *self {
1079            CreateApplicationError::InternalServer(ref cause) => write!(f, "{}", cause),
1080            CreateApplicationError::ResourceInUse(ref cause) => write!(f, "{}", cause),
1081            CreateApplicationError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1082            CreateApplicationError::TagsAlreadyExist(ref cause) => write!(f, "{}", cause),
1083        }
1084    }
1085}
1086impl Error for CreateApplicationError {}
1087/// Errors returned by CreateComponent
1088#[derive(Debug, PartialEq)]
1089pub enum CreateComponentError {
1090    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1091    InternalServer(String),
1092    /// <p>The resource is already created or in use.</p>
1093    ResourceInUse(String),
1094    /// <p>The resource does not exist in the customer account.</p>
1095    ResourceNotFound(String),
1096}
1097
1098impl CreateComponentError {
1099    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateComponentError> {
1100        if let Some(err) = proto::json::Error::parse(&res) {
1101            match err.typ.as_str() {
1102                "InternalServerException" => {
1103                    return RusotoError::Service(CreateComponentError::InternalServer(err.msg))
1104                }
1105                "ResourceInUseException" => {
1106                    return RusotoError::Service(CreateComponentError::ResourceInUse(err.msg))
1107                }
1108                "ResourceNotFoundException" => {
1109                    return RusotoError::Service(CreateComponentError::ResourceNotFound(err.msg))
1110                }
1111                "ValidationException" => return RusotoError::Validation(err.msg),
1112                _ => {}
1113            }
1114        }
1115        RusotoError::Unknown(res)
1116    }
1117}
1118impl fmt::Display for CreateComponentError {
1119    #[allow(unused_variables)]
1120    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1121        match *self {
1122            CreateComponentError::InternalServer(ref cause) => write!(f, "{}", cause),
1123            CreateComponentError::ResourceInUse(ref cause) => write!(f, "{}", cause),
1124            CreateComponentError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1125        }
1126    }
1127}
1128impl Error for CreateComponentError {}
1129/// Errors returned by CreateLogPattern
1130#[derive(Debug, PartialEq)]
1131pub enum CreateLogPatternError {
1132    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1133    InternalServer(String),
1134    /// <p>The resource is already created or in use.</p>
1135    ResourceInUse(String),
1136    /// <p>The resource does not exist in the customer account.</p>
1137    ResourceNotFound(String),
1138}
1139
1140impl CreateLogPatternError {
1141    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLogPatternError> {
1142        if let Some(err) = proto::json::Error::parse(&res) {
1143            match err.typ.as_str() {
1144                "InternalServerException" => {
1145                    return RusotoError::Service(CreateLogPatternError::InternalServer(err.msg))
1146                }
1147                "ResourceInUseException" => {
1148                    return RusotoError::Service(CreateLogPatternError::ResourceInUse(err.msg))
1149                }
1150                "ResourceNotFoundException" => {
1151                    return RusotoError::Service(CreateLogPatternError::ResourceNotFound(err.msg))
1152                }
1153                "ValidationException" => return RusotoError::Validation(err.msg),
1154                _ => {}
1155            }
1156        }
1157        RusotoError::Unknown(res)
1158    }
1159}
1160impl fmt::Display for CreateLogPatternError {
1161    #[allow(unused_variables)]
1162    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1163        match *self {
1164            CreateLogPatternError::InternalServer(ref cause) => write!(f, "{}", cause),
1165            CreateLogPatternError::ResourceInUse(ref cause) => write!(f, "{}", cause),
1166            CreateLogPatternError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1167        }
1168    }
1169}
1170impl Error for CreateLogPatternError {}
1171/// Errors returned by DeleteApplication
1172#[derive(Debug, PartialEq)]
1173pub enum DeleteApplicationError {
1174    /// <p>The request is not understood by the server.</p>
1175    BadRequest(String),
1176    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1177    InternalServer(String),
1178    /// <p>The resource does not exist in the customer account.</p>
1179    ResourceNotFound(String),
1180}
1181
1182impl DeleteApplicationError {
1183    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApplicationError> {
1184        if let Some(err) = proto::json::Error::parse(&res) {
1185            match err.typ.as_str() {
1186                "BadRequestException" => {
1187                    return RusotoError::Service(DeleteApplicationError::BadRequest(err.msg))
1188                }
1189                "InternalServerException" => {
1190                    return RusotoError::Service(DeleteApplicationError::InternalServer(err.msg))
1191                }
1192                "ResourceNotFoundException" => {
1193                    return RusotoError::Service(DeleteApplicationError::ResourceNotFound(err.msg))
1194                }
1195                "ValidationException" => return RusotoError::Validation(err.msg),
1196                _ => {}
1197            }
1198        }
1199        RusotoError::Unknown(res)
1200    }
1201}
1202impl fmt::Display for DeleteApplicationError {
1203    #[allow(unused_variables)]
1204    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1205        match *self {
1206            DeleteApplicationError::BadRequest(ref cause) => write!(f, "{}", cause),
1207            DeleteApplicationError::InternalServer(ref cause) => write!(f, "{}", cause),
1208            DeleteApplicationError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1209        }
1210    }
1211}
1212impl Error for DeleteApplicationError {}
1213/// Errors returned by DeleteComponent
1214#[derive(Debug, PartialEq)]
1215pub enum DeleteComponentError {
1216    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1217    InternalServer(String),
1218    /// <p>The resource does not exist in the customer account.</p>
1219    ResourceNotFound(String),
1220}
1221
1222impl DeleteComponentError {
1223    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteComponentError> {
1224        if let Some(err) = proto::json::Error::parse(&res) {
1225            match err.typ.as_str() {
1226                "InternalServerException" => {
1227                    return RusotoError::Service(DeleteComponentError::InternalServer(err.msg))
1228                }
1229                "ResourceNotFoundException" => {
1230                    return RusotoError::Service(DeleteComponentError::ResourceNotFound(err.msg))
1231                }
1232                "ValidationException" => return RusotoError::Validation(err.msg),
1233                _ => {}
1234            }
1235        }
1236        RusotoError::Unknown(res)
1237    }
1238}
1239impl fmt::Display for DeleteComponentError {
1240    #[allow(unused_variables)]
1241    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1242        match *self {
1243            DeleteComponentError::InternalServer(ref cause) => write!(f, "{}", cause),
1244            DeleteComponentError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1245        }
1246    }
1247}
1248impl Error for DeleteComponentError {}
1249/// Errors returned by DeleteLogPattern
1250#[derive(Debug, PartialEq)]
1251pub enum DeleteLogPatternError {
1252    /// <p>The request is not understood by the server.</p>
1253    BadRequest(String),
1254    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1255    InternalServer(String),
1256    /// <p>The resource does not exist in the customer account.</p>
1257    ResourceNotFound(String),
1258}
1259
1260impl DeleteLogPatternError {
1261    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLogPatternError> {
1262        if let Some(err) = proto::json::Error::parse(&res) {
1263            match err.typ.as_str() {
1264                "BadRequestException" => {
1265                    return RusotoError::Service(DeleteLogPatternError::BadRequest(err.msg))
1266                }
1267                "InternalServerException" => {
1268                    return RusotoError::Service(DeleteLogPatternError::InternalServer(err.msg))
1269                }
1270                "ResourceNotFoundException" => {
1271                    return RusotoError::Service(DeleteLogPatternError::ResourceNotFound(err.msg))
1272                }
1273                "ValidationException" => return RusotoError::Validation(err.msg),
1274                _ => {}
1275            }
1276        }
1277        RusotoError::Unknown(res)
1278    }
1279}
1280impl fmt::Display for DeleteLogPatternError {
1281    #[allow(unused_variables)]
1282    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1283        match *self {
1284            DeleteLogPatternError::BadRequest(ref cause) => write!(f, "{}", cause),
1285            DeleteLogPatternError::InternalServer(ref cause) => write!(f, "{}", cause),
1286            DeleteLogPatternError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1287        }
1288    }
1289}
1290impl Error for DeleteLogPatternError {}
1291/// Errors returned by DescribeApplication
1292#[derive(Debug, PartialEq)]
1293pub enum DescribeApplicationError {
1294    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1295    InternalServer(String),
1296    /// <p>The resource does not exist in the customer account.</p>
1297    ResourceNotFound(String),
1298}
1299
1300impl DescribeApplicationError {
1301    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeApplicationError> {
1302        if let Some(err) = proto::json::Error::parse(&res) {
1303            match err.typ.as_str() {
1304                "InternalServerException" => {
1305                    return RusotoError::Service(DescribeApplicationError::InternalServer(err.msg))
1306                }
1307                "ResourceNotFoundException" => {
1308                    return RusotoError::Service(DescribeApplicationError::ResourceNotFound(
1309                        err.msg,
1310                    ))
1311                }
1312                "ValidationException" => return RusotoError::Validation(err.msg),
1313                _ => {}
1314            }
1315        }
1316        RusotoError::Unknown(res)
1317    }
1318}
1319impl fmt::Display for DescribeApplicationError {
1320    #[allow(unused_variables)]
1321    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1322        match *self {
1323            DescribeApplicationError::InternalServer(ref cause) => write!(f, "{}", cause),
1324            DescribeApplicationError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1325        }
1326    }
1327}
1328impl Error for DescribeApplicationError {}
1329/// Errors returned by DescribeComponent
1330#[derive(Debug, PartialEq)]
1331pub enum DescribeComponentError {
1332    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1333    InternalServer(String),
1334    /// <p>The resource does not exist in the customer account.</p>
1335    ResourceNotFound(String),
1336}
1337
1338impl DescribeComponentError {
1339    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeComponentError> {
1340        if let Some(err) = proto::json::Error::parse(&res) {
1341            match err.typ.as_str() {
1342                "InternalServerException" => {
1343                    return RusotoError::Service(DescribeComponentError::InternalServer(err.msg))
1344                }
1345                "ResourceNotFoundException" => {
1346                    return RusotoError::Service(DescribeComponentError::ResourceNotFound(err.msg))
1347                }
1348                "ValidationException" => return RusotoError::Validation(err.msg),
1349                _ => {}
1350            }
1351        }
1352        RusotoError::Unknown(res)
1353    }
1354}
1355impl fmt::Display for DescribeComponentError {
1356    #[allow(unused_variables)]
1357    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1358        match *self {
1359            DescribeComponentError::InternalServer(ref cause) => write!(f, "{}", cause),
1360            DescribeComponentError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1361        }
1362    }
1363}
1364impl Error for DescribeComponentError {}
1365/// Errors returned by DescribeComponentConfiguration
1366#[derive(Debug, PartialEq)]
1367pub enum DescribeComponentConfigurationError {
1368    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1369    InternalServer(String),
1370    /// <p>The resource does not exist in the customer account.</p>
1371    ResourceNotFound(String),
1372}
1373
1374impl DescribeComponentConfigurationError {
1375    pub fn from_response(
1376        res: BufferedHttpResponse,
1377    ) -> RusotoError<DescribeComponentConfigurationError> {
1378        if let Some(err) = proto::json::Error::parse(&res) {
1379            match err.typ.as_str() {
1380                "InternalServerException" => {
1381                    return RusotoError::Service(
1382                        DescribeComponentConfigurationError::InternalServer(err.msg),
1383                    )
1384                }
1385                "ResourceNotFoundException" => {
1386                    return RusotoError::Service(
1387                        DescribeComponentConfigurationError::ResourceNotFound(err.msg),
1388                    )
1389                }
1390                "ValidationException" => return RusotoError::Validation(err.msg),
1391                _ => {}
1392            }
1393        }
1394        RusotoError::Unknown(res)
1395    }
1396}
1397impl fmt::Display for DescribeComponentConfigurationError {
1398    #[allow(unused_variables)]
1399    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1400        match *self {
1401            DescribeComponentConfigurationError::InternalServer(ref cause) => {
1402                write!(f, "{}", cause)
1403            }
1404            DescribeComponentConfigurationError::ResourceNotFound(ref cause) => {
1405                write!(f, "{}", cause)
1406            }
1407        }
1408    }
1409}
1410impl Error for DescribeComponentConfigurationError {}
1411/// Errors returned by DescribeComponentConfigurationRecommendation
1412#[derive(Debug, PartialEq)]
1413pub enum DescribeComponentConfigurationRecommendationError {
1414    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1415    InternalServer(String),
1416    /// <p>The resource does not exist in the customer account.</p>
1417    ResourceNotFound(String),
1418}
1419
1420impl DescribeComponentConfigurationRecommendationError {
1421    pub fn from_response(
1422        res: BufferedHttpResponse,
1423    ) -> RusotoError<DescribeComponentConfigurationRecommendationError> {
1424        if let Some(err) = proto::json::Error::parse(&res) {
1425            match err.typ.as_str() {
1426                "InternalServerException" => {
1427                    return RusotoError::Service(
1428                        DescribeComponentConfigurationRecommendationError::InternalServer(err.msg),
1429                    )
1430                }
1431                "ResourceNotFoundException" => {
1432                    return RusotoError::Service(
1433                        DescribeComponentConfigurationRecommendationError::ResourceNotFound(
1434                            err.msg,
1435                        ),
1436                    )
1437                }
1438                "ValidationException" => return RusotoError::Validation(err.msg),
1439                _ => {}
1440            }
1441        }
1442        RusotoError::Unknown(res)
1443    }
1444}
1445impl fmt::Display for DescribeComponentConfigurationRecommendationError {
1446    #[allow(unused_variables)]
1447    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1448        match *self {
1449            DescribeComponentConfigurationRecommendationError::InternalServer(ref cause) => {
1450                write!(f, "{}", cause)
1451            }
1452            DescribeComponentConfigurationRecommendationError::ResourceNotFound(ref cause) => {
1453                write!(f, "{}", cause)
1454            }
1455        }
1456    }
1457}
1458impl Error for DescribeComponentConfigurationRecommendationError {}
1459/// Errors returned by DescribeLogPattern
1460#[derive(Debug, PartialEq)]
1461pub enum DescribeLogPatternError {
1462    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1463    InternalServer(String),
1464    /// <p>The resource does not exist in the customer account.</p>
1465    ResourceNotFound(String),
1466}
1467
1468impl DescribeLogPatternError {
1469    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLogPatternError> {
1470        if let Some(err) = proto::json::Error::parse(&res) {
1471            match err.typ.as_str() {
1472                "InternalServerException" => {
1473                    return RusotoError::Service(DescribeLogPatternError::InternalServer(err.msg))
1474                }
1475                "ResourceNotFoundException" => {
1476                    return RusotoError::Service(DescribeLogPatternError::ResourceNotFound(err.msg))
1477                }
1478                "ValidationException" => return RusotoError::Validation(err.msg),
1479                _ => {}
1480            }
1481        }
1482        RusotoError::Unknown(res)
1483    }
1484}
1485impl fmt::Display for DescribeLogPatternError {
1486    #[allow(unused_variables)]
1487    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1488        match *self {
1489            DescribeLogPatternError::InternalServer(ref cause) => write!(f, "{}", cause),
1490            DescribeLogPatternError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1491        }
1492    }
1493}
1494impl Error for DescribeLogPatternError {}
1495/// Errors returned by DescribeObservation
1496#[derive(Debug, PartialEq)]
1497pub enum DescribeObservationError {
1498    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1499    InternalServer(String),
1500    /// <p>The resource does not exist in the customer account.</p>
1501    ResourceNotFound(String),
1502}
1503
1504impl DescribeObservationError {
1505    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeObservationError> {
1506        if let Some(err) = proto::json::Error::parse(&res) {
1507            match err.typ.as_str() {
1508                "InternalServerException" => {
1509                    return RusotoError::Service(DescribeObservationError::InternalServer(err.msg))
1510                }
1511                "ResourceNotFoundException" => {
1512                    return RusotoError::Service(DescribeObservationError::ResourceNotFound(
1513                        err.msg,
1514                    ))
1515                }
1516                "ValidationException" => return RusotoError::Validation(err.msg),
1517                _ => {}
1518            }
1519        }
1520        RusotoError::Unknown(res)
1521    }
1522}
1523impl fmt::Display for DescribeObservationError {
1524    #[allow(unused_variables)]
1525    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1526        match *self {
1527            DescribeObservationError::InternalServer(ref cause) => write!(f, "{}", cause),
1528            DescribeObservationError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1529        }
1530    }
1531}
1532impl Error for DescribeObservationError {}
1533/// Errors returned by DescribeProblem
1534#[derive(Debug, PartialEq)]
1535pub enum DescribeProblemError {
1536    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1537    InternalServer(String),
1538    /// <p>The resource does not exist in the customer account.</p>
1539    ResourceNotFound(String),
1540}
1541
1542impl DescribeProblemError {
1543    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeProblemError> {
1544        if let Some(err) = proto::json::Error::parse(&res) {
1545            match err.typ.as_str() {
1546                "InternalServerException" => {
1547                    return RusotoError::Service(DescribeProblemError::InternalServer(err.msg))
1548                }
1549                "ResourceNotFoundException" => {
1550                    return RusotoError::Service(DescribeProblemError::ResourceNotFound(err.msg))
1551                }
1552                "ValidationException" => return RusotoError::Validation(err.msg),
1553                _ => {}
1554            }
1555        }
1556        RusotoError::Unknown(res)
1557    }
1558}
1559impl fmt::Display for DescribeProblemError {
1560    #[allow(unused_variables)]
1561    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1562        match *self {
1563            DescribeProblemError::InternalServer(ref cause) => write!(f, "{}", cause),
1564            DescribeProblemError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1565        }
1566    }
1567}
1568impl Error for DescribeProblemError {}
1569/// Errors returned by DescribeProblemObservations
1570#[derive(Debug, PartialEq)]
1571pub enum DescribeProblemObservationsError {
1572    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1573    InternalServer(String),
1574    /// <p>The resource does not exist in the customer account.</p>
1575    ResourceNotFound(String),
1576}
1577
1578impl DescribeProblemObservationsError {
1579    pub fn from_response(
1580        res: BufferedHttpResponse,
1581    ) -> RusotoError<DescribeProblemObservationsError> {
1582        if let Some(err) = proto::json::Error::parse(&res) {
1583            match err.typ.as_str() {
1584                "InternalServerException" => {
1585                    return RusotoError::Service(DescribeProblemObservationsError::InternalServer(
1586                        err.msg,
1587                    ))
1588                }
1589                "ResourceNotFoundException" => {
1590                    return RusotoError::Service(
1591                        DescribeProblemObservationsError::ResourceNotFound(err.msg),
1592                    )
1593                }
1594                "ValidationException" => return RusotoError::Validation(err.msg),
1595                _ => {}
1596            }
1597        }
1598        RusotoError::Unknown(res)
1599    }
1600}
1601impl fmt::Display for DescribeProblemObservationsError {
1602    #[allow(unused_variables)]
1603    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1604        match *self {
1605            DescribeProblemObservationsError::InternalServer(ref cause) => write!(f, "{}", cause),
1606            DescribeProblemObservationsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1607        }
1608    }
1609}
1610impl Error for DescribeProblemObservationsError {}
1611/// Errors returned by ListApplications
1612#[derive(Debug, PartialEq)]
1613pub enum ListApplicationsError {
1614    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1615    InternalServer(String),
1616}
1617
1618impl ListApplicationsError {
1619    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListApplicationsError> {
1620        if let Some(err) = proto::json::Error::parse(&res) {
1621            match err.typ.as_str() {
1622                "InternalServerException" => {
1623                    return RusotoError::Service(ListApplicationsError::InternalServer(err.msg))
1624                }
1625                "ValidationException" => return RusotoError::Validation(err.msg),
1626                _ => {}
1627            }
1628        }
1629        RusotoError::Unknown(res)
1630    }
1631}
1632impl fmt::Display for ListApplicationsError {
1633    #[allow(unused_variables)]
1634    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1635        match *self {
1636            ListApplicationsError::InternalServer(ref cause) => write!(f, "{}", cause),
1637        }
1638    }
1639}
1640impl Error for ListApplicationsError {}
1641/// Errors returned by ListComponents
1642#[derive(Debug, PartialEq)]
1643pub enum ListComponentsError {
1644    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1645    InternalServer(String),
1646    /// <p>The resource does not exist in the customer account.</p>
1647    ResourceNotFound(String),
1648}
1649
1650impl ListComponentsError {
1651    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListComponentsError> {
1652        if let Some(err) = proto::json::Error::parse(&res) {
1653            match err.typ.as_str() {
1654                "InternalServerException" => {
1655                    return RusotoError::Service(ListComponentsError::InternalServer(err.msg))
1656                }
1657                "ResourceNotFoundException" => {
1658                    return RusotoError::Service(ListComponentsError::ResourceNotFound(err.msg))
1659                }
1660                "ValidationException" => return RusotoError::Validation(err.msg),
1661                _ => {}
1662            }
1663        }
1664        RusotoError::Unknown(res)
1665    }
1666}
1667impl fmt::Display for ListComponentsError {
1668    #[allow(unused_variables)]
1669    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1670        match *self {
1671            ListComponentsError::InternalServer(ref cause) => write!(f, "{}", cause),
1672            ListComponentsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1673        }
1674    }
1675}
1676impl Error for ListComponentsError {}
1677/// Errors returned by ListConfigurationHistory
1678#[derive(Debug, PartialEq)]
1679pub enum ListConfigurationHistoryError {
1680    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1681    InternalServer(String),
1682    /// <p>The resource does not exist in the customer account.</p>
1683    ResourceNotFound(String),
1684}
1685
1686impl ListConfigurationHistoryError {
1687    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListConfigurationHistoryError> {
1688        if let Some(err) = proto::json::Error::parse(&res) {
1689            match err.typ.as_str() {
1690                "InternalServerException" => {
1691                    return RusotoError::Service(ListConfigurationHistoryError::InternalServer(
1692                        err.msg,
1693                    ))
1694                }
1695                "ResourceNotFoundException" => {
1696                    return RusotoError::Service(ListConfigurationHistoryError::ResourceNotFound(
1697                        err.msg,
1698                    ))
1699                }
1700                "ValidationException" => return RusotoError::Validation(err.msg),
1701                _ => {}
1702            }
1703        }
1704        RusotoError::Unknown(res)
1705    }
1706}
1707impl fmt::Display for ListConfigurationHistoryError {
1708    #[allow(unused_variables)]
1709    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1710        match *self {
1711            ListConfigurationHistoryError::InternalServer(ref cause) => write!(f, "{}", cause),
1712            ListConfigurationHistoryError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1713        }
1714    }
1715}
1716impl Error for ListConfigurationHistoryError {}
1717/// Errors returned by ListLogPatternSets
1718#[derive(Debug, PartialEq)]
1719pub enum ListLogPatternSetsError {
1720    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1721    InternalServer(String),
1722    /// <p>The resource does not exist in the customer account.</p>
1723    ResourceNotFound(String),
1724}
1725
1726impl ListLogPatternSetsError {
1727    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLogPatternSetsError> {
1728        if let Some(err) = proto::json::Error::parse(&res) {
1729            match err.typ.as_str() {
1730                "InternalServerException" => {
1731                    return RusotoError::Service(ListLogPatternSetsError::InternalServer(err.msg))
1732                }
1733                "ResourceNotFoundException" => {
1734                    return RusotoError::Service(ListLogPatternSetsError::ResourceNotFound(err.msg))
1735                }
1736                "ValidationException" => return RusotoError::Validation(err.msg),
1737                _ => {}
1738            }
1739        }
1740        RusotoError::Unknown(res)
1741    }
1742}
1743impl fmt::Display for ListLogPatternSetsError {
1744    #[allow(unused_variables)]
1745    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1746        match *self {
1747            ListLogPatternSetsError::InternalServer(ref cause) => write!(f, "{}", cause),
1748            ListLogPatternSetsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1749        }
1750    }
1751}
1752impl Error for ListLogPatternSetsError {}
1753/// Errors returned by ListLogPatterns
1754#[derive(Debug, PartialEq)]
1755pub enum ListLogPatternsError {
1756    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1757    InternalServer(String),
1758    /// <p>The resource does not exist in the customer account.</p>
1759    ResourceNotFound(String),
1760}
1761
1762impl ListLogPatternsError {
1763    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLogPatternsError> {
1764        if let Some(err) = proto::json::Error::parse(&res) {
1765            match err.typ.as_str() {
1766                "InternalServerException" => {
1767                    return RusotoError::Service(ListLogPatternsError::InternalServer(err.msg))
1768                }
1769                "ResourceNotFoundException" => {
1770                    return RusotoError::Service(ListLogPatternsError::ResourceNotFound(err.msg))
1771                }
1772                "ValidationException" => return RusotoError::Validation(err.msg),
1773                _ => {}
1774            }
1775        }
1776        RusotoError::Unknown(res)
1777    }
1778}
1779impl fmt::Display for ListLogPatternsError {
1780    #[allow(unused_variables)]
1781    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1782        match *self {
1783            ListLogPatternsError::InternalServer(ref cause) => write!(f, "{}", cause),
1784            ListLogPatternsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1785        }
1786    }
1787}
1788impl Error for ListLogPatternsError {}
1789/// Errors returned by ListProblems
1790#[derive(Debug, PartialEq)]
1791pub enum ListProblemsError {
1792    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1793    InternalServer(String),
1794    /// <p>The resource does not exist in the customer account.</p>
1795    ResourceNotFound(String),
1796}
1797
1798impl ListProblemsError {
1799    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProblemsError> {
1800        if let Some(err) = proto::json::Error::parse(&res) {
1801            match err.typ.as_str() {
1802                "InternalServerException" => {
1803                    return RusotoError::Service(ListProblemsError::InternalServer(err.msg))
1804                }
1805                "ResourceNotFoundException" => {
1806                    return RusotoError::Service(ListProblemsError::ResourceNotFound(err.msg))
1807                }
1808                "ValidationException" => return RusotoError::Validation(err.msg),
1809                _ => {}
1810            }
1811        }
1812        RusotoError::Unknown(res)
1813    }
1814}
1815impl fmt::Display for ListProblemsError {
1816    #[allow(unused_variables)]
1817    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1818        match *self {
1819            ListProblemsError::InternalServer(ref cause) => write!(f, "{}", cause),
1820            ListProblemsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1821        }
1822    }
1823}
1824impl Error for ListProblemsError {}
1825/// Errors returned by ListTagsForResource
1826#[derive(Debug, PartialEq)]
1827pub enum ListTagsForResourceError {
1828    /// <p>The resource does not exist in the customer account.</p>
1829    ResourceNotFound(String),
1830}
1831
1832impl ListTagsForResourceError {
1833    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
1834        if let Some(err) = proto::json::Error::parse(&res) {
1835            match err.typ.as_str() {
1836                "ResourceNotFoundException" => {
1837                    return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
1838                        err.msg,
1839                    ))
1840                }
1841                "ValidationException" => return RusotoError::Validation(err.msg),
1842                _ => {}
1843            }
1844        }
1845        RusotoError::Unknown(res)
1846    }
1847}
1848impl fmt::Display for ListTagsForResourceError {
1849    #[allow(unused_variables)]
1850    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1851        match *self {
1852            ListTagsForResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1853        }
1854    }
1855}
1856impl Error for ListTagsForResourceError {}
1857/// Errors returned by TagResource
1858#[derive(Debug, PartialEq)]
1859pub enum TagResourceError {
1860    /// <p>The resource does not exist in the customer account.</p>
1861    ResourceNotFound(String),
1862    /// <p>The number of the provided tags is beyond the limit, or the number of total tags you are trying to attach to the specified resource exceeds the limit.</p>
1863    TooManyTags(String),
1864}
1865
1866impl TagResourceError {
1867    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
1868        if let Some(err) = proto::json::Error::parse(&res) {
1869            match err.typ.as_str() {
1870                "ResourceNotFoundException" => {
1871                    return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
1872                }
1873                "TooManyTagsException" => {
1874                    return RusotoError::Service(TagResourceError::TooManyTags(err.msg))
1875                }
1876                "ValidationException" => return RusotoError::Validation(err.msg),
1877                _ => {}
1878            }
1879        }
1880        RusotoError::Unknown(res)
1881    }
1882}
1883impl fmt::Display for TagResourceError {
1884    #[allow(unused_variables)]
1885    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1886        match *self {
1887            TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1888            TagResourceError::TooManyTags(ref cause) => write!(f, "{}", cause),
1889        }
1890    }
1891}
1892impl Error for TagResourceError {}
1893/// Errors returned by UntagResource
1894#[derive(Debug, PartialEq)]
1895pub enum UntagResourceError {
1896    /// <p>The resource does not exist in the customer account.</p>
1897    ResourceNotFound(String),
1898}
1899
1900impl UntagResourceError {
1901    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
1902        if let Some(err) = proto::json::Error::parse(&res) {
1903            match err.typ.as_str() {
1904                "ResourceNotFoundException" => {
1905                    return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
1906                }
1907                "ValidationException" => return RusotoError::Validation(err.msg),
1908                _ => {}
1909            }
1910        }
1911        RusotoError::Unknown(res)
1912    }
1913}
1914impl fmt::Display for UntagResourceError {
1915    #[allow(unused_variables)]
1916    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1917        match *self {
1918            UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1919        }
1920    }
1921}
1922impl Error for UntagResourceError {}
1923/// Errors returned by UpdateApplication
1924#[derive(Debug, PartialEq)]
1925pub enum UpdateApplicationError {
1926    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1927    InternalServer(String),
1928    /// <p>The resource does not exist in the customer account.</p>
1929    ResourceNotFound(String),
1930}
1931
1932impl UpdateApplicationError {
1933    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApplicationError> {
1934        if let Some(err) = proto::json::Error::parse(&res) {
1935            match err.typ.as_str() {
1936                "InternalServerException" => {
1937                    return RusotoError::Service(UpdateApplicationError::InternalServer(err.msg))
1938                }
1939                "ResourceNotFoundException" => {
1940                    return RusotoError::Service(UpdateApplicationError::ResourceNotFound(err.msg))
1941                }
1942                "ValidationException" => return RusotoError::Validation(err.msg),
1943                _ => {}
1944            }
1945        }
1946        RusotoError::Unknown(res)
1947    }
1948}
1949impl fmt::Display for UpdateApplicationError {
1950    #[allow(unused_variables)]
1951    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1952        match *self {
1953            UpdateApplicationError::InternalServer(ref cause) => write!(f, "{}", cause),
1954            UpdateApplicationError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1955        }
1956    }
1957}
1958impl Error for UpdateApplicationError {}
1959/// Errors returned by UpdateComponent
1960#[derive(Debug, PartialEq)]
1961pub enum UpdateComponentError {
1962    /// <p>The server encountered an internal error and is unable to complete the request.</p>
1963    InternalServer(String),
1964    /// <p>The resource is already created or in use.</p>
1965    ResourceInUse(String),
1966    /// <p>The resource does not exist in the customer account.</p>
1967    ResourceNotFound(String),
1968}
1969
1970impl UpdateComponentError {
1971    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateComponentError> {
1972        if let Some(err) = proto::json::Error::parse(&res) {
1973            match err.typ.as_str() {
1974                "InternalServerException" => {
1975                    return RusotoError::Service(UpdateComponentError::InternalServer(err.msg))
1976                }
1977                "ResourceInUseException" => {
1978                    return RusotoError::Service(UpdateComponentError::ResourceInUse(err.msg))
1979                }
1980                "ResourceNotFoundException" => {
1981                    return RusotoError::Service(UpdateComponentError::ResourceNotFound(err.msg))
1982                }
1983                "ValidationException" => return RusotoError::Validation(err.msg),
1984                _ => {}
1985            }
1986        }
1987        RusotoError::Unknown(res)
1988    }
1989}
1990impl fmt::Display for UpdateComponentError {
1991    #[allow(unused_variables)]
1992    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1993        match *self {
1994            UpdateComponentError::InternalServer(ref cause) => write!(f, "{}", cause),
1995            UpdateComponentError::ResourceInUse(ref cause) => write!(f, "{}", cause),
1996            UpdateComponentError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1997        }
1998    }
1999}
2000impl Error for UpdateComponentError {}
2001/// Errors returned by UpdateComponentConfiguration
2002#[derive(Debug, PartialEq)]
2003pub enum UpdateComponentConfigurationError {
2004    /// <p>The server encountered an internal error and is unable to complete the request.</p>
2005    InternalServer(String),
2006    /// <p>The resource does not exist in the customer account.</p>
2007    ResourceNotFound(String),
2008}
2009
2010impl UpdateComponentConfigurationError {
2011    pub fn from_response(
2012        res: BufferedHttpResponse,
2013    ) -> RusotoError<UpdateComponentConfigurationError> {
2014        if let Some(err) = proto::json::Error::parse(&res) {
2015            match err.typ.as_str() {
2016                "InternalServerException" => {
2017                    return RusotoError::Service(UpdateComponentConfigurationError::InternalServer(
2018                        err.msg,
2019                    ))
2020                }
2021                "ResourceNotFoundException" => {
2022                    return RusotoError::Service(
2023                        UpdateComponentConfigurationError::ResourceNotFound(err.msg),
2024                    )
2025                }
2026                "ValidationException" => return RusotoError::Validation(err.msg),
2027                _ => {}
2028            }
2029        }
2030        RusotoError::Unknown(res)
2031    }
2032}
2033impl fmt::Display for UpdateComponentConfigurationError {
2034    #[allow(unused_variables)]
2035    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2036        match *self {
2037            UpdateComponentConfigurationError::InternalServer(ref cause) => write!(f, "{}", cause),
2038            UpdateComponentConfigurationError::ResourceNotFound(ref cause) => {
2039                write!(f, "{}", cause)
2040            }
2041        }
2042    }
2043}
2044impl Error for UpdateComponentConfigurationError {}
2045/// Errors returned by UpdateLogPattern
2046#[derive(Debug, PartialEq)]
2047pub enum UpdateLogPatternError {
2048    /// <p>The server encountered an internal error and is unable to complete the request.</p>
2049    InternalServer(String),
2050    /// <p>The resource is already created or in use.</p>
2051    ResourceInUse(String),
2052    /// <p>The resource does not exist in the customer account.</p>
2053    ResourceNotFound(String),
2054}
2055
2056impl UpdateLogPatternError {
2057    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateLogPatternError> {
2058        if let Some(err) = proto::json::Error::parse(&res) {
2059            match err.typ.as_str() {
2060                "InternalServerException" => {
2061                    return RusotoError::Service(UpdateLogPatternError::InternalServer(err.msg))
2062                }
2063                "ResourceInUseException" => {
2064                    return RusotoError::Service(UpdateLogPatternError::ResourceInUse(err.msg))
2065                }
2066                "ResourceNotFoundException" => {
2067                    return RusotoError::Service(UpdateLogPatternError::ResourceNotFound(err.msg))
2068                }
2069                "ValidationException" => return RusotoError::Validation(err.msg),
2070                _ => {}
2071            }
2072        }
2073        RusotoError::Unknown(res)
2074    }
2075}
2076impl fmt::Display for UpdateLogPatternError {
2077    #[allow(unused_variables)]
2078    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2079        match *self {
2080            UpdateLogPatternError::InternalServer(ref cause) => write!(f, "{}", cause),
2081            UpdateLogPatternError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2082            UpdateLogPatternError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2083        }
2084    }
2085}
2086impl Error for UpdateLogPatternError {}
2087/// Trait representing the capabilities of the Application Insights API. Application Insights clients implement this trait.
2088#[async_trait]
2089pub trait ApplicationInsights {
2090    /// <p>Adds an application that is created from a resource group.</p>
2091    async fn create_application(
2092        &self,
2093        input: CreateApplicationRequest,
2094    ) -> Result<CreateApplicationResponse, RusotoError<CreateApplicationError>>;
2095
2096    /// <p>Creates a custom component by grouping similar standalone instances to monitor.</p>
2097    async fn create_component(
2098        &self,
2099        input: CreateComponentRequest,
2100    ) -> Result<CreateComponentResponse, RusotoError<CreateComponentError>>;
2101
2102    /// <p>Adds an log pattern to a <code>LogPatternSet</code>.</p>
2103    async fn create_log_pattern(
2104        &self,
2105        input: CreateLogPatternRequest,
2106    ) -> Result<CreateLogPatternResponse, RusotoError<CreateLogPatternError>>;
2107
2108    /// <p>Removes the specified application from monitoring. Does not delete the application.</p>
2109    async fn delete_application(
2110        &self,
2111        input: DeleteApplicationRequest,
2112    ) -> Result<DeleteApplicationResponse, RusotoError<DeleteApplicationError>>;
2113
2114    /// <p>Ungroups a custom component. When you ungroup custom components, all applicable monitors that are set up for the component are removed and the instances revert to their standalone status.</p>
2115    async fn delete_component(
2116        &self,
2117        input: DeleteComponentRequest,
2118    ) -> Result<DeleteComponentResponse, RusotoError<DeleteComponentError>>;
2119
2120    /// <p>Removes the specified log pattern from a <code>LogPatternSet</code>.</p>
2121    async fn delete_log_pattern(
2122        &self,
2123        input: DeleteLogPatternRequest,
2124    ) -> Result<DeleteLogPatternResponse, RusotoError<DeleteLogPatternError>>;
2125
2126    /// <p>Describes the application.</p>
2127    async fn describe_application(
2128        &self,
2129        input: DescribeApplicationRequest,
2130    ) -> Result<DescribeApplicationResponse, RusotoError<DescribeApplicationError>>;
2131
2132    /// <p>Describes a component and lists the resources that are grouped together in a component.</p>
2133    async fn describe_component(
2134        &self,
2135        input: DescribeComponentRequest,
2136    ) -> Result<DescribeComponentResponse, RusotoError<DescribeComponentError>>;
2137
2138    /// <p>Describes the monitoring configuration of the component.</p>
2139    async fn describe_component_configuration(
2140        &self,
2141        input: DescribeComponentConfigurationRequest,
2142    ) -> Result<
2143        DescribeComponentConfigurationResponse,
2144        RusotoError<DescribeComponentConfigurationError>,
2145    >;
2146
2147    /// <p>Describes the recommended monitoring configuration of the component.</p>
2148    async fn describe_component_configuration_recommendation(
2149        &self,
2150        input: DescribeComponentConfigurationRecommendationRequest,
2151    ) -> Result<
2152        DescribeComponentConfigurationRecommendationResponse,
2153        RusotoError<DescribeComponentConfigurationRecommendationError>,
2154    >;
2155
2156    /// <p>Describe a specific log pattern from a <code>LogPatternSet</code>.</p>
2157    async fn describe_log_pattern(
2158        &self,
2159        input: DescribeLogPatternRequest,
2160    ) -> Result<DescribeLogPatternResponse, RusotoError<DescribeLogPatternError>>;
2161
2162    /// <p>Describes an anomaly or error with the application.</p>
2163    async fn describe_observation(
2164        &self,
2165        input: DescribeObservationRequest,
2166    ) -> Result<DescribeObservationResponse, RusotoError<DescribeObservationError>>;
2167
2168    /// <p>Describes an application problem.</p>
2169    async fn describe_problem(
2170        &self,
2171        input: DescribeProblemRequest,
2172    ) -> Result<DescribeProblemResponse, RusotoError<DescribeProblemError>>;
2173
2174    /// <p>Describes the anomalies or errors associated with the problem.</p>
2175    async fn describe_problem_observations(
2176        &self,
2177        input: DescribeProblemObservationsRequest,
2178    ) -> Result<DescribeProblemObservationsResponse, RusotoError<DescribeProblemObservationsError>>;
2179
2180    /// <p>Lists the IDs of the applications that you are monitoring. </p>
2181    async fn list_applications(
2182        &self,
2183        input: ListApplicationsRequest,
2184    ) -> Result<ListApplicationsResponse, RusotoError<ListApplicationsError>>;
2185
2186    /// <p>Lists the auto-grouped, standalone, and custom components of the application.</p>
2187    async fn list_components(
2188        &self,
2189        input: ListComponentsRequest,
2190    ) -> Result<ListComponentsResponse, RusotoError<ListComponentsError>>;
2191
2192    /// <p><p> Lists the INFO, WARN, and ERROR events for periodic configuration updates performed by Application Insights. Examples of events represented are: </p> <ul> <li> <p>INFO: creating a new alarm or updating an alarm threshold.</p> </li> <li> <p>WARN: alarm not created due to insufficient data points used to predict thresholds.</p> </li> <li> <p>ERROR: alarm not created due to permission errors or exceeding quotas. </p> </li> </ul></p>
2193    async fn list_configuration_history(
2194        &self,
2195        input: ListConfigurationHistoryRequest,
2196    ) -> Result<ListConfigurationHistoryResponse, RusotoError<ListConfigurationHistoryError>>;
2197
2198    /// <p>Lists the log pattern sets in the specific application.</p>
2199    async fn list_log_pattern_sets(
2200        &self,
2201        input: ListLogPatternSetsRequest,
2202    ) -> Result<ListLogPatternSetsResponse, RusotoError<ListLogPatternSetsError>>;
2203
2204    /// <p>Lists the log patterns in the specific log <code>LogPatternSet</code>.</p>
2205    async fn list_log_patterns(
2206        &self,
2207        input: ListLogPatternsRequest,
2208    ) -> Result<ListLogPatternsResponse, RusotoError<ListLogPatternsError>>;
2209
2210    /// <p>Lists the problems with your application.</p>
2211    async fn list_problems(
2212        &self,
2213        input: ListProblemsRequest,
2214    ) -> Result<ListProblemsResponse, RusotoError<ListProblemsError>>;
2215
2216    /// <p>Retrieve a list of the tags (keys and values) that are associated with a specified application. A <i>tag</i> is a label that you optionally define and associate with an application. Each tag consists of a required <i>tag key</i> and an optional associated <i>tag value</i>. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.</p>
2217    async fn list_tags_for_resource(
2218        &self,
2219        input: ListTagsForResourceRequest,
2220    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2221
2222    /// <p>Add one or more tags (keys and values) to a specified application. A <i>tag</i> is a label that you optionally define and associate with an application. Tags can help you categorize and manage application in different ways, such as by purpose, owner, environment, or other criteria. </p> <p>Each tag consists of a required <i>tag key</i> and an associated <i>tag value</i>, both of which you define. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.</p>
2223    async fn tag_resource(
2224        &self,
2225        input: TagResourceRequest,
2226    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
2227
2228    /// <p>Remove one or more tags (keys and values) from a specified application.</p>
2229    async fn untag_resource(
2230        &self,
2231        input: UntagResourceRequest,
2232    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
2233
2234    /// <p>Updates the application.</p>
2235    async fn update_application(
2236        &self,
2237        input: UpdateApplicationRequest,
2238    ) -> Result<UpdateApplicationResponse, RusotoError<UpdateApplicationError>>;
2239
2240    /// <p>Updates the custom component name and/or the list of resources that make up the component.</p>
2241    async fn update_component(
2242        &self,
2243        input: UpdateComponentRequest,
2244    ) -> Result<UpdateComponentResponse, RusotoError<UpdateComponentError>>;
2245
2246    /// <p>Updates the monitoring configurations for the component. The configuration input parameter is an escaped JSON of the configuration and should match the schema of what is returned by <code>DescribeComponentConfigurationRecommendation</code>. </p>
2247    async fn update_component_configuration(
2248        &self,
2249        input: UpdateComponentConfigurationRequest,
2250    ) -> Result<UpdateComponentConfigurationResponse, RusotoError<UpdateComponentConfigurationError>>;
2251
2252    /// <p>Adds a log pattern to a <code>LogPatternSet</code>.</p>
2253    async fn update_log_pattern(
2254        &self,
2255        input: UpdateLogPatternRequest,
2256    ) -> Result<UpdateLogPatternResponse, RusotoError<UpdateLogPatternError>>;
2257}
2258/// A client for the Application Insights API.
2259#[derive(Clone)]
2260pub struct ApplicationInsightsClient {
2261    client: Client,
2262    region: region::Region,
2263}
2264
2265impl ApplicationInsightsClient {
2266    /// Creates a client backed by the default tokio event loop.
2267    ///
2268    /// The client will use the default credentials provider and tls client.
2269    pub fn new(region: region::Region) -> ApplicationInsightsClient {
2270        ApplicationInsightsClient {
2271            client: Client::shared(),
2272            region,
2273        }
2274    }
2275
2276    pub fn new_with<P, D>(
2277        request_dispatcher: D,
2278        credentials_provider: P,
2279        region: region::Region,
2280    ) -> ApplicationInsightsClient
2281    where
2282        P: ProvideAwsCredentials + Send + Sync + 'static,
2283        D: DispatchSignedRequest + Send + Sync + 'static,
2284    {
2285        ApplicationInsightsClient {
2286            client: Client::new_with(credentials_provider, request_dispatcher),
2287            region,
2288        }
2289    }
2290
2291    pub fn new_with_client(client: Client, region: region::Region) -> ApplicationInsightsClient {
2292        ApplicationInsightsClient { client, region }
2293    }
2294}
2295
2296#[async_trait]
2297impl ApplicationInsights for ApplicationInsightsClient {
2298    /// <p>Adds an application that is created from a resource group.</p>
2299    async fn create_application(
2300        &self,
2301        input: CreateApplicationRequest,
2302    ) -> Result<CreateApplicationResponse, RusotoError<CreateApplicationError>> {
2303        let mut request = self.new_signed_request("POST", "/");
2304        request.add_header("x-amz-target", "EC2WindowsBarleyService.CreateApplication");
2305        let encoded = serde_json::to_string(&input).unwrap();
2306        request.set_payload(Some(encoded));
2307
2308        let response = self
2309            .sign_and_dispatch(request, CreateApplicationError::from_response)
2310            .await?;
2311        let mut response = response;
2312        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2313        proto::json::ResponsePayload::new(&response).deserialize::<CreateApplicationResponse, _>()
2314    }
2315
2316    /// <p>Creates a custom component by grouping similar standalone instances to monitor.</p>
2317    async fn create_component(
2318        &self,
2319        input: CreateComponentRequest,
2320    ) -> Result<CreateComponentResponse, RusotoError<CreateComponentError>> {
2321        let mut request = self.new_signed_request("POST", "/");
2322        request.add_header("x-amz-target", "EC2WindowsBarleyService.CreateComponent");
2323        let encoded = serde_json::to_string(&input).unwrap();
2324        request.set_payload(Some(encoded));
2325
2326        let response = self
2327            .sign_and_dispatch(request, CreateComponentError::from_response)
2328            .await?;
2329        let mut response = response;
2330        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2331        proto::json::ResponsePayload::new(&response).deserialize::<CreateComponentResponse, _>()
2332    }
2333
2334    /// <p>Adds an log pattern to a <code>LogPatternSet</code>.</p>
2335    async fn create_log_pattern(
2336        &self,
2337        input: CreateLogPatternRequest,
2338    ) -> Result<CreateLogPatternResponse, RusotoError<CreateLogPatternError>> {
2339        let mut request = self.new_signed_request("POST", "/");
2340        request.add_header("x-amz-target", "EC2WindowsBarleyService.CreateLogPattern");
2341        let encoded = serde_json::to_string(&input).unwrap();
2342        request.set_payload(Some(encoded));
2343
2344        let response = self
2345            .sign_and_dispatch(request, CreateLogPatternError::from_response)
2346            .await?;
2347        let mut response = response;
2348        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2349        proto::json::ResponsePayload::new(&response).deserialize::<CreateLogPatternResponse, _>()
2350    }
2351
2352    /// <p>Removes the specified application from monitoring. Does not delete the application.</p>
2353    async fn delete_application(
2354        &self,
2355        input: DeleteApplicationRequest,
2356    ) -> Result<DeleteApplicationResponse, RusotoError<DeleteApplicationError>> {
2357        let mut request = self.new_signed_request("POST", "/");
2358        request.add_header("x-amz-target", "EC2WindowsBarleyService.DeleteApplication");
2359        let encoded = serde_json::to_string(&input).unwrap();
2360        request.set_payload(Some(encoded));
2361
2362        let response = self
2363            .sign_and_dispatch(request, DeleteApplicationError::from_response)
2364            .await?;
2365        let mut response = response;
2366        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2367        proto::json::ResponsePayload::new(&response).deserialize::<DeleteApplicationResponse, _>()
2368    }
2369
2370    /// <p>Ungroups a custom component. When you ungroup custom components, all applicable monitors that are set up for the component are removed and the instances revert to their standalone status.</p>
2371    async fn delete_component(
2372        &self,
2373        input: DeleteComponentRequest,
2374    ) -> Result<DeleteComponentResponse, RusotoError<DeleteComponentError>> {
2375        let mut request = self.new_signed_request("POST", "/");
2376        request.add_header("x-amz-target", "EC2WindowsBarleyService.DeleteComponent");
2377        let encoded = serde_json::to_string(&input).unwrap();
2378        request.set_payload(Some(encoded));
2379
2380        let response = self
2381            .sign_and_dispatch(request, DeleteComponentError::from_response)
2382            .await?;
2383        let mut response = response;
2384        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2385        proto::json::ResponsePayload::new(&response).deserialize::<DeleteComponentResponse, _>()
2386    }
2387
2388    /// <p>Removes the specified log pattern from a <code>LogPatternSet</code>.</p>
2389    async fn delete_log_pattern(
2390        &self,
2391        input: DeleteLogPatternRequest,
2392    ) -> Result<DeleteLogPatternResponse, RusotoError<DeleteLogPatternError>> {
2393        let mut request = self.new_signed_request("POST", "/");
2394        request.add_header("x-amz-target", "EC2WindowsBarleyService.DeleteLogPattern");
2395        let encoded = serde_json::to_string(&input).unwrap();
2396        request.set_payload(Some(encoded));
2397
2398        let response = self
2399            .sign_and_dispatch(request, DeleteLogPatternError::from_response)
2400            .await?;
2401        let mut response = response;
2402        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2403        proto::json::ResponsePayload::new(&response).deserialize::<DeleteLogPatternResponse, _>()
2404    }
2405
2406    /// <p>Describes the application.</p>
2407    async fn describe_application(
2408        &self,
2409        input: DescribeApplicationRequest,
2410    ) -> Result<DescribeApplicationResponse, RusotoError<DescribeApplicationError>> {
2411        let mut request = self.new_signed_request("POST", "/");
2412        request.add_header(
2413            "x-amz-target",
2414            "EC2WindowsBarleyService.DescribeApplication",
2415        );
2416        let encoded = serde_json::to_string(&input).unwrap();
2417        request.set_payload(Some(encoded));
2418
2419        let response = self
2420            .sign_and_dispatch(request, DescribeApplicationError::from_response)
2421            .await?;
2422        let mut response = response;
2423        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2424        proto::json::ResponsePayload::new(&response).deserialize::<DescribeApplicationResponse, _>()
2425    }
2426
2427    /// <p>Describes a component and lists the resources that are grouped together in a component.</p>
2428    async fn describe_component(
2429        &self,
2430        input: DescribeComponentRequest,
2431    ) -> Result<DescribeComponentResponse, RusotoError<DescribeComponentError>> {
2432        let mut request = self.new_signed_request("POST", "/");
2433        request.add_header("x-amz-target", "EC2WindowsBarleyService.DescribeComponent");
2434        let encoded = serde_json::to_string(&input).unwrap();
2435        request.set_payload(Some(encoded));
2436
2437        let response = self
2438            .sign_and_dispatch(request, DescribeComponentError::from_response)
2439            .await?;
2440        let mut response = response;
2441        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2442        proto::json::ResponsePayload::new(&response).deserialize::<DescribeComponentResponse, _>()
2443    }
2444
2445    /// <p>Describes the monitoring configuration of the component.</p>
2446    async fn describe_component_configuration(
2447        &self,
2448        input: DescribeComponentConfigurationRequest,
2449    ) -> Result<
2450        DescribeComponentConfigurationResponse,
2451        RusotoError<DescribeComponentConfigurationError>,
2452    > {
2453        let mut request = self.new_signed_request("POST", "/");
2454        request.add_header(
2455            "x-amz-target",
2456            "EC2WindowsBarleyService.DescribeComponentConfiguration",
2457        );
2458        let encoded = serde_json::to_string(&input).unwrap();
2459        request.set_payload(Some(encoded));
2460
2461        let response = self
2462            .sign_and_dispatch(request, DescribeComponentConfigurationError::from_response)
2463            .await?;
2464        let mut response = response;
2465        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2466        proto::json::ResponsePayload::new(&response)
2467            .deserialize::<DescribeComponentConfigurationResponse, _>()
2468    }
2469
2470    /// <p>Describes the recommended monitoring configuration of the component.</p>
2471    async fn describe_component_configuration_recommendation(
2472        &self,
2473        input: DescribeComponentConfigurationRecommendationRequest,
2474    ) -> Result<
2475        DescribeComponentConfigurationRecommendationResponse,
2476        RusotoError<DescribeComponentConfigurationRecommendationError>,
2477    > {
2478        let mut request = self.new_signed_request("POST", "/");
2479        request.add_header(
2480            "x-amz-target",
2481            "EC2WindowsBarleyService.DescribeComponentConfigurationRecommendation",
2482        );
2483        let encoded = serde_json::to_string(&input).unwrap();
2484        request.set_payload(Some(encoded));
2485
2486        let response = self
2487            .sign_and_dispatch(
2488                request,
2489                DescribeComponentConfigurationRecommendationError::from_response,
2490            )
2491            .await?;
2492        let mut response = response;
2493        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2494        proto::json::ResponsePayload::new(&response)
2495            .deserialize::<DescribeComponentConfigurationRecommendationResponse, _>()
2496    }
2497
2498    /// <p>Describe a specific log pattern from a <code>LogPatternSet</code>.</p>
2499    async fn describe_log_pattern(
2500        &self,
2501        input: DescribeLogPatternRequest,
2502    ) -> Result<DescribeLogPatternResponse, RusotoError<DescribeLogPatternError>> {
2503        let mut request = self.new_signed_request("POST", "/");
2504        request.add_header("x-amz-target", "EC2WindowsBarleyService.DescribeLogPattern");
2505        let encoded = serde_json::to_string(&input).unwrap();
2506        request.set_payload(Some(encoded));
2507
2508        let response = self
2509            .sign_and_dispatch(request, DescribeLogPatternError::from_response)
2510            .await?;
2511        let mut response = response;
2512        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2513        proto::json::ResponsePayload::new(&response).deserialize::<DescribeLogPatternResponse, _>()
2514    }
2515
2516    /// <p>Describes an anomaly or error with the application.</p>
2517    async fn describe_observation(
2518        &self,
2519        input: DescribeObservationRequest,
2520    ) -> Result<DescribeObservationResponse, RusotoError<DescribeObservationError>> {
2521        let mut request = self.new_signed_request("POST", "/");
2522        request.add_header(
2523            "x-amz-target",
2524            "EC2WindowsBarleyService.DescribeObservation",
2525        );
2526        let encoded = serde_json::to_string(&input).unwrap();
2527        request.set_payload(Some(encoded));
2528
2529        let response = self
2530            .sign_and_dispatch(request, DescribeObservationError::from_response)
2531            .await?;
2532        let mut response = response;
2533        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2534        proto::json::ResponsePayload::new(&response).deserialize::<DescribeObservationResponse, _>()
2535    }
2536
2537    /// <p>Describes an application problem.</p>
2538    async fn describe_problem(
2539        &self,
2540        input: DescribeProblemRequest,
2541    ) -> Result<DescribeProblemResponse, RusotoError<DescribeProblemError>> {
2542        let mut request = self.new_signed_request("POST", "/");
2543        request.add_header("x-amz-target", "EC2WindowsBarleyService.DescribeProblem");
2544        let encoded = serde_json::to_string(&input).unwrap();
2545        request.set_payload(Some(encoded));
2546
2547        let response = self
2548            .sign_and_dispatch(request, DescribeProblemError::from_response)
2549            .await?;
2550        let mut response = response;
2551        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2552        proto::json::ResponsePayload::new(&response).deserialize::<DescribeProblemResponse, _>()
2553    }
2554
2555    /// <p>Describes the anomalies or errors associated with the problem.</p>
2556    async fn describe_problem_observations(
2557        &self,
2558        input: DescribeProblemObservationsRequest,
2559    ) -> Result<DescribeProblemObservationsResponse, RusotoError<DescribeProblemObservationsError>>
2560    {
2561        let mut request = self.new_signed_request("POST", "/");
2562        request.add_header(
2563            "x-amz-target",
2564            "EC2WindowsBarleyService.DescribeProblemObservations",
2565        );
2566        let encoded = serde_json::to_string(&input).unwrap();
2567        request.set_payload(Some(encoded));
2568
2569        let response = self
2570            .sign_and_dispatch(request, DescribeProblemObservationsError::from_response)
2571            .await?;
2572        let mut response = response;
2573        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2574        proto::json::ResponsePayload::new(&response)
2575            .deserialize::<DescribeProblemObservationsResponse, _>()
2576    }
2577
2578    /// <p>Lists the IDs of the applications that you are monitoring. </p>
2579    async fn list_applications(
2580        &self,
2581        input: ListApplicationsRequest,
2582    ) -> Result<ListApplicationsResponse, RusotoError<ListApplicationsError>> {
2583        let mut request = self.new_signed_request("POST", "/");
2584        request.add_header("x-amz-target", "EC2WindowsBarleyService.ListApplications");
2585        let encoded = serde_json::to_string(&input).unwrap();
2586        request.set_payload(Some(encoded));
2587
2588        let response = self
2589            .sign_and_dispatch(request, ListApplicationsError::from_response)
2590            .await?;
2591        let mut response = response;
2592        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2593        proto::json::ResponsePayload::new(&response).deserialize::<ListApplicationsResponse, _>()
2594    }
2595
2596    /// <p>Lists the auto-grouped, standalone, and custom components of the application.</p>
2597    async fn list_components(
2598        &self,
2599        input: ListComponentsRequest,
2600    ) -> Result<ListComponentsResponse, RusotoError<ListComponentsError>> {
2601        let mut request = self.new_signed_request("POST", "/");
2602        request.add_header("x-amz-target", "EC2WindowsBarleyService.ListComponents");
2603        let encoded = serde_json::to_string(&input).unwrap();
2604        request.set_payload(Some(encoded));
2605
2606        let response = self
2607            .sign_and_dispatch(request, ListComponentsError::from_response)
2608            .await?;
2609        let mut response = response;
2610        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2611        proto::json::ResponsePayload::new(&response).deserialize::<ListComponentsResponse, _>()
2612    }
2613
2614    /// <p><p> Lists the INFO, WARN, and ERROR events for periodic configuration updates performed by Application Insights. Examples of events represented are: </p> <ul> <li> <p>INFO: creating a new alarm or updating an alarm threshold.</p> </li> <li> <p>WARN: alarm not created due to insufficient data points used to predict thresholds.</p> </li> <li> <p>ERROR: alarm not created due to permission errors or exceeding quotas. </p> </li> </ul></p>
2615    async fn list_configuration_history(
2616        &self,
2617        input: ListConfigurationHistoryRequest,
2618    ) -> Result<ListConfigurationHistoryResponse, RusotoError<ListConfigurationHistoryError>> {
2619        let mut request = self.new_signed_request("POST", "/");
2620        request.add_header(
2621            "x-amz-target",
2622            "EC2WindowsBarleyService.ListConfigurationHistory",
2623        );
2624        let encoded = serde_json::to_string(&input).unwrap();
2625        request.set_payload(Some(encoded));
2626
2627        let response = self
2628            .sign_and_dispatch(request, ListConfigurationHistoryError::from_response)
2629            .await?;
2630        let mut response = response;
2631        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2632        proto::json::ResponsePayload::new(&response)
2633            .deserialize::<ListConfigurationHistoryResponse, _>()
2634    }
2635
2636    /// <p>Lists the log pattern sets in the specific application.</p>
2637    async fn list_log_pattern_sets(
2638        &self,
2639        input: ListLogPatternSetsRequest,
2640    ) -> Result<ListLogPatternSetsResponse, RusotoError<ListLogPatternSetsError>> {
2641        let mut request = self.new_signed_request("POST", "/");
2642        request.add_header("x-amz-target", "EC2WindowsBarleyService.ListLogPatternSets");
2643        let encoded = serde_json::to_string(&input).unwrap();
2644        request.set_payload(Some(encoded));
2645
2646        let response = self
2647            .sign_and_dispatch(request, ListLogPatternSetsError::from_response)
2648            .await?;
2649        let mut response = response;
2650        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2651        proto::json::ResponsePayload::new(&response).deserialize::<ListLogPatternSetsResponse, _>()
2652    }
2653
2654    /// <p>Lists the log patterns in the specific log <code>LogPatternSet</code>.</p>
2655    async fn list_log_patterns(
2656        &self,
2657        input: ListLogPatternsRequest,
2658    ) -> Result<ListLogPatternsResponse, RusotoError<ListLogPatternsError>> {
2659        let mut request = self.new_signed_request("POST", "/");
2660        request.add_header("x-amz-target", "EC2WindowsBarleyService.ListLogPatterns");
2661        let encoded = serde_json::to_string(&input).unwrap();
2662        request.set_payload(Some(encoded));
2663
2664        let response = self
2665            .sign_and_dispatch(request, ListLogPatternsError::from_response)
2666            .await?;
2667        let mut response = response;
2668        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2669        proto::json::ResponsePayload::new(&response).deserialize::<ListLogPatternsResponse, _>()
2670    }
2671
2672    /// <p>Lists the problems with your application.</p>
2673    async fn list_problems(
2674        &self,
2675        input: ListProblemsRequest,
2676    ) -> Result<ListProblemsResponse, RusotoError<ListProblemsError>> {
2677        let mut request = self.new_signed_request("POST", "/");
2678        request.add_header("x-amz-target", "EC2WindowsBarleyService.ListProblems");
2679        let encoded = serde_json::to_string(&input).unwrap();
2680        request.set_payload(Some(encoded));
2681
2682        let response = self
2683            .sign_and_dispatch(request, ListProblemsError::from_response)
2684            .await?;
2685        let mut response = response;
2686        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2687        proto::json::ResponsePayload::new(&response).deserialize::<ListProblemsResponse, _>()
2688    }
2689
2690    /// <p>Retrieve a list of the tags (keys and values) that are associated with a specified application. A <i>tag</i> is a label that you optionally define and associate with an application. Each tag consists of a required <i>tag key</i> and an optional associated <i>tag value</i>. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.</p>
2691    async fn list_tags_for_resource(
2692        &self,
2693        input: ListTagsForResourceRequest,
2694    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
2695        let mut request = self.new_signed_request("POST", "/");
2696        request.add_header(
2697            "x-amz-target",
2698            "EC2WindowsBarleyService.ListTagsForResource",
2699        );
2700        let encoded = serde_json::to_string(&input).unwrap();
2701        request.set_payload(Some(encoded));
2702
2703        let response = self
2704            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
2705            .await?;
2706        let mut response = response;
2707        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2708        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceResponse, _>()
2709    }
2710
2711    /// <p>Add one or more tags (keys and values) to a specified application. A <i>tag</i> is a label that you optionally define and associate with an application. Tags can help you categorize and manage application in different ways, such as by purpose, owner, environment, or other criteria. </p> <p>Each tag consists of a required <i>tag key</i> and an associated <i>tag value</i>, both of which you define. A tag key is a general label that acts as a category for more specific tag values. A tag value acts as a descriptor within a tag key.</p>
2712    async fn tag_resource(
2713        &self,
2714        input: TagResourceRequest,
2715    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
2716        let mut request = self.new_signed_request("POST", "/");
2717        request.add_header("x-amz-target", "EC2WindowsBarleyService.TagResource");
2718        let encoded = serde_json::to_string(&input).unwrap();
2719        request.set_payload(Some(encoded));
2720
2721        let response = self
2722            .sign_and_dispatch(request, TagResourceError::from_response)
2723            .await?;
2724        let mut response = response;
2725        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2726        proto::json::ResponsePayload::new(&response).deserialize::<TagResourceResponse, _>()
2727    }
2728
2729    /// <p>Remove one or more tags (keys and values) from a specified application.</p>
2730    async fn untag_resource(
2731        &self,
2732        input: UntagResourceRequest,
2733    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
2734        let mut request = self.new_signed_request("POST", "/");
2735        request.add_header("x-amz-target", "EC2WindowsBarleyService.UntagResource");
2736        let encoded = serde_json::to_string(&input).unwrap();
2737        request.set_payload(Some(encoded));
2738
2739        let response = self
2740            .sign_and_dispatch(request, UntagResourceError::from_response)
2741            .await?;
2742        let mut response = response;
2743        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2744        proto::json::ResponsePayload::new(&response).deserialize::<UntagResourceResponse, _>()
2745    }
2746
2747    /// <p>Updates the application.</p>
2748    async fn update_application(
2749        &self,
2750        input: UpdateApplicationRequest,
2751    ) -> Result<UpdateApplicationResponse, RusotoError<UpdateApplicationError>> {
2752        let mut request = self.new_signed_request("POST", "/");
2753        request.add_header("x-amz-target", "EC2WindowsBarleyService.UpdateApplication");
2754        let encoded = serde_json::to_string(&input).unwrap();
2755        request.set_payload(Some(encoded));
2756
2757        let response = self
2758            .sign_and_dispatch(request, UpdateApplicationError::from_response)
2759            .await?;
2760        let mut response = response;
2761        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2762        proto::json::ResponsePayload::new(&response).deserialize::<UpdateApplicationResponse, _>()
2763    }
2764
2765    /// <p>Updates the custom component name and/or the list of resources that make up the component.</p>
2766    async fn update_component(
2767        &self,
2768        input: UpdateComponentRequest,
2769    ) -> Result<UpdateComponentResponse, RusotoError<UpdateComponentError>> {
2770        let mut request = self.new_signed_request("POST", "/");
2771        request.add_header("x-amz-target", "EC2WindowsBarleyService.UpdateComponent");
2772        let encoded = serde_json::to_string(&input).unwrap();
2773        request.set_payload(Some(encoded));
2774
2775        let response = self
2776            .sign_and_dispatch(request, UpdateComponentError::from_response)
2777            .await?;
2778        let mut response = response;
2779        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2780        proto::json::ResponsePayload::new(&response).deserialize::<UpdateComponentResponse, _>()
2781    }
2782
2783    /// <p>Updates the monitoring configurations for the component. The configuration input parameter is an escaped JSON of the configuration and should match the schema of what is returned by <code>DescribeComponentConfigurationRecommendation</code>. </p>
2784    async fn update_component_configuration(
2785        &self,
2786        input: UpdateComponentConfigurationRequest,
2787    ) -> Result<UpdateComponentConfigurationResponse, RusotoError<UpdateComponentConfigurationError>>
2788    {
2789        let mut request = self.new_signed_request("POST", "/");
2790        request.add_header(
2791            "x-amz-target",
2792            "EC2WindowsBarleyService.UpdateComponentConfiguration",
2793        );
2794        let encoded = serde_json::to_string(&input).unwrap();
2795        request.set_payload(Some(encoded));
2796
2797        let response = self
2798            .sign_and_dispatch(request, UpdateComponentConfigurationError::from_response)
2799            .await?;
2800        let mut response = response;
2801        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2802        proto::json::ResponsePayload::new(&response)
2803            .deserialize::<UpdateComponentConfigurationResponse, _>()
2804    }
2805
2806    /// <p>Adds a log pattern to a <code>LogPatternSet</code>.</p>
2807    async fn update_log_pattern(
2808        &self,
2809        input: UpdateLogPatternRequest,
2810    ) -> Result<UpdateLogPatternResponse, RusotoError<UpdateLogPatternError>> {
2811        let mut request = self.new_signed_request("POST", "/");
2812        request.add_header("x-amz-target", "EC2WindowsBarleyService.UpdateLogPattern");
2813        let encoded = serde_json::to_string(&input).unwrap();
2814        request.set_payload(Some(encoded));
2815
2816        let response = self
2817            .sign_and_dispatch(request, UpdateLogPatternError::from_response)
2818            .await?;
2819        let mut response = response;
2820        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2821        proto::json::ResponsePayload::new(&response).deserialize::<UpdateLogPatternResponse, _>()
2822    }
2823}