rusoto_inspector/
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 InspectorClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "inspector", &self.region, request_uri);
31
32        request.set_content_type("application/x-amz-json-1.1".to_owned());
33
34        request
35    }
36
37    async fn sign_and_dispatch<E>(
38        &self,
39        request: SignedRequest,
40        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
41    ) -> Result<HttpResponse, RusotoError<E>> {
42        let mut response = self.client.sign_and_dispatch(request).await?;
43        if !response.status.is_success() {
44            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
45            return Err(from_response(response));
46        }
47
48        Ok(response)
49    }
50}
51
52use serde_json;
53#[derive(Clone, Debug, Default, PartialEq, Serialize)]
54#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
55pub struct AddAttributesToFindingsRequest {
56    /// <p>The array of attributes that you want to assign to specified findings.</p>
57    #[serde(rename = "attributes")]
58    pub attributes: Vec<Attribute>,
59    /// <p>The ARNs that specify the findings that you want to assign attributes to.</p>
60    #[serde(rename = "findingArns")]
61    pub finding_arns: Vec<String>,
62}
63
64#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
65#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
66pub struct AddAttributesToFindingsResponse {
67    /// <p>Attribute details that cannot be described. An error code is provided for each failed item.</p>
68    #[serde(rename = "failedItems")]
69    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
70}
71
72/// <p>Used in the exception error that is thrown if you start an assessment run for an assessment target that includes an EC2 instance that is already participating in another started assessment run.</p>
73#[derive(Clone, Debug, Default, PartialEq)]
74pub struct AgentAlreadyRunningAssessment {
75    /// <p>ID of the agent that is running on an EC2 instance that is already participating in another started assessment run.</p>
76    pub agent_id: String,
77    /// <p>The ARN of the assessment run that has already been started.</p>
78    pub assessment_run_arn: String,
79}
80
81/// <p>Contains information about an Amazon Inspector agent. This data type is used as a request parameter in the <a>ListAssessmentRunAgents</a> action.</p>
82#[derive(Clone, Debug, Default, PartialEq, Serialize)]
83#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
84pub struct AgentFilter {
85    /// <p>The detailed health state of the agent. Values can be set to <b>IDLE</b>, <b>RUNNING</b>, <b>SHUTDOWN</b>, <b>UNHEALTHY</b>, <b>THROTTLED</b>, and <b>UNKNOWN</b>. </p>
86    #[serde(rename = "agentHealthCodes")]
87    pub agent_health_codes: Vec<String>,
88    /// <p>The current health state of the agent. Values can be set to <b>HEALTHY</b> or <b>UNHEALTHY</b>.</p>
89    #[serde(rename = "agentHealths")]
90    pub agent_healths: Vec<String>,
91}
92
93/// <p>Used as a response element in the <a>PreviewAgents</a> action.</p>
94#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
95#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
96pub struct AgentPreview {
97    /// <p>The health status of the Amazon Inspector Agent.</p>
98    #[serde(rename = "agentHealth")]
99    #[serde(skip_serializing_if = "Option::is_none")]
100    pub agent_health: Option<String>,
101    /// <p>The ID of the EC2 instance where the agent is installed.</p>
102    #[serde(rename = "agentId")]
103    pub agent_id: String,
104    /// <p>The version of the Amazon Inspector Agent.</p>
105    #[serde(rename = "agentVersion")]
106    #[serde(skip_serializing_if = "Option::is_none")]
107    pub agent_version: Option<String>,
108    /// <p>The Auto Scaling group for the EC2 instance where the agent is installed.</p>
109    #[serde(rename = "autoScalingGroup")]
110    #[serde(skip_serializing_if = "Option::is_none")]
111    pub auto_scaling_group: Option<String>,
112    /// <p>The hostname of the EC2 instance on which the Amazon Inspector Agent is installed.</p>
113    #[serde(rename = "hostname")]
114    #[serde(skip_serializing_if = "Option::is_none")]
115    pub hostname: Option<String>,
116    /// <p>The IP address of the EC2 instance on which the Amazon Inspector Agent is installed.</p>
117    #[serde(rename = "ipv4Address")]
118    #[serde(skip_serializing_if = "Option::is_none")]
119    pub ipv_4_address: Option<String>,
120    /// <p>The kernel version of the operating system running on the EC2 instance on which the Amazon Inspector Agent is installed.</p>
121    #[serde(rename = "kernelVersion")]
122    #[serde(skip_serializing_if = "Option::is_none")]
123    pub kernel_version: Option<String>,
124    /// <p>The operating system running on the EC2 instance on which the Amazon Inspector Agent is installed.</p>
125    #[serde(rename = "operatingSystem")]
126    #[serde(skip_serializing_if = "Option::is_none")]
127    pub operating_system: Option<String>,
128}
129
130/// <p>A snapshot of an Amazon Inspector assessment run that contains the findings of the assessment run .</p> <p>Used as the response element in the <a>DescribeAssessmentRuns</a> action.</p>
131#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
132#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
133pub struct AssessmentRun {
134    /// <p>The ARN of the assessment run.</p>
135    #[serde(rename = "arn")]
136    pub arn: String,
137    /// <p>The ARN of the assessment template that is associated with the assessment run.</p>
138    #[serde(rename = "assessmentTemplateArn")]
139    pub assessment_template_arn: String,
140    /// <p>The assessment run completion time that corresponds to the rules packages evaluation completion time or failure.</p>
141    #[serde(rename = "completedAt")]
142    #[serde(skip_serializing_if = "Option::is_none")]
143    pub completed_at: Option<f64>,
144    /// <p>The time when <a>StartAssessmentRun</a> was called.</p>
145    #[serde(rename = "createdAt")]
146    pub created_at: f64,
147    /// <p>A Boolean value (true or false) that specifies whether the process of collecting data from the agents is completed.</p>
148    #[serde(rename = "dataCollected")]
149    pub data_collected: bool,
150    /// <p>The duration of the assessment run.</p>
151    #[serde(rename = "durationInSeconds")]
152    pub duration_in_seconds: i64,
153    /// <p>Provides a total count of generated findings per severity.</p>
154    #[serde(rename = "findingCounts")]
155    pub finding_counts: ::std::collections::HashMap<String, i64>,
156    /// <p>The auto-generated name for the assessment run.</p>
157    #[serde(rename = "name")]
158    pub name: String,
159    /// <p>A list of notifications for the event subscriptions. A notification about a particular generated finding is added to this list only once.</p>
160    #[serde(rename = "notifications")]
161    pub notifications: Vec<AssessmentRunNotification>,
162    /// <p>The rules packages selected for the assessment run.</p>
163    #[serde(rename = "rulesPackageArns")]
164    pub rules_package_arns: Vec<String>,
165    /// <p>The time when <a>StartAssessmentRun</a> was called.</p>
166    #[serde(rename = "startedAt")]
167    #[serde(skip_serializing_if = "Option::is_none")]
168    pub started_at: Option<f64>,
169    /// <p>The state of the assessment run.</p>
170    #[serde(rename = "state")]
171    pub state: String,
172    /// <p>The last time when the assessment run's state changed.</p>
173    #[serde(rename = "stateChangedAt")]
174    pub state_changed_at: f64,
175    /// <p>A list of the assessment run state changes.</p>
176    #[serde(rename = "stateChanges")]
177    pub state_changes: Vec<AssessmentRunStateChange>,
178    /// <p>The user-defined attributes that are assigned to every generated finding.</p>
179    #[serde(rename = "userAttributesForFindings")]
180    pub user_attributes_for_findings: Vec<Attribute>,
181}
182
183/// <p>Contains information about an Amazon Inspector agent. This data type is used as a response element in the <a>ListAssessmentRunAgents</a> action.</p>
184#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
185#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
186pub struct AssessmentRunAgent {
187    /// <p>The current health state of the agent.</p>
188    #[serde(rename = "agentHealth")]
189    pub agent_health: String,
190    /// <p>The detailed health state of the agent.</p>
191    #[serde(rename = "agentHealthCode")]
192    pub agent_health_code: String,
193    /// <p>The description for the agent health code.</p>
194    #[serde(rename = "agentHealthDetails")]
195    #[serde(skip_serializing_if = "Option::is_none")]
196    pub agent_health_details: Option<String>,
197    /// <p>The AWS account of the EC2 instance where the agent is installed.</p>
198    #[serde(rename = "agentId")]
199    pub agent_id: String,
200    /// <p>The ARN of the assessment run that is associated with the agent.</p>
201    #[serde(rename = "assessmentRunArn")]
202    pub assessment_run_arn: String,
203    /// <p>The Auto Scaling group of the EC2 instance that is specified by the agent ID.</p>
204    #[serde(rename = "autoScalingGroup")]
205    #[serde(skip_serializing_if = "Option::is_none")]
206    pub auto_scaling_group: Option<String>,
207    /// <p>The Amazon Inspector application data metrics that are collected by the agent.</p>
208    #[serde(rename = "telemetryMetadata")]
209    pub telemetry_metadata: Vec<TelemetryMetadata>,
210}
211
212/// <p>Used as the request parameter in the <a>ListAssessmentRuns</a> action.</p>
213#[derive(Clone, Debug, Default, PartialEq, Serialize)]
214#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
215pub struct AssessmentRunFilter {
216    /// <p>For a record to match a filter, the value that is specified for this data type property must inclusively match any value between the specified minimum and maximum values of the <b>completedAt</b> property of the <a>AssessmentRun</a> data type.</p>
217    #[serde(rename = "completionTimeRange")]
218    #[serde(skip_serializing_if = "Option::is_none")]
219    pub completion_time_range: Option<TimestampRange>,
220    /// <p>For a record to match a filter, the value that is specified for this data type property must inclusively match any value between the specified minimum and maximum values of the <b>durationInSeconds</b> property of the <a>AssessmentRun</a> data type.</p>
221    #[serde(rename = "durationRange")]
222    #[serde(skip_serializing_if = "Option::is_none")]
223    pub duration_range: Option<DurationRange>,
224    /// <p>For a record to match a filter, an explicit value or a string containing a wildcard that is specified for this data type property must match the value of the <b>assessmentRunName</b> property of the <a>AssessmentRun</a> data type.</p>
225    #[serde(rename = "namePattern")]
226    #[serde(skip_serializing_if = "Option::is_none")]
227    pub name_pattern: Option<String>,
228    /// <p>For a record to match a filter, the value that is specified for this data type property must be contained in the list of values of the <b>rulesPackages</b> property of the <a>AssessmentRun</a> data type.</p>
229    #[serde(rename = "rulesPackageArns")]
230    #[serde(skip_serializing_if = "Option::is_none")]
231    pub rules_package_arns: Option<Vec<String>>,
232    /// <p>For a record to match a filter, the value that is specified for this data type property must inclusively match any value between the specified minimum and maximum values of the <b>startTime</b> property of the <a>AssessmentRun</a> data type.</p>
233    #[serde(rename = "startTimeRange")]
234    #[serde(skip_serializing_if = "Option::is_none")]
235    pub start_time_range: Option<TimestampRange>,
236    /// <p>For a record to match a filter, the value that is specified for this data type property must match the <b>stateChangedAt</b> property of the <a>AssessmentRun</a> data type.</p>
237    #[serde(rename = "stateChangeTimeRange")]
238    #[serde(skip_serializing_if = "Option::is_none")]
239    pub state_change_time_range: Option<TimestampRange>,
240    /// <p>For a record to match a filter, one of the values specified for this data type property must be the exact match of the value of the <b>assessmentRunState</b> property of the <a>AssessmentRun</a> data type.</p>
241    #[serde(rename = "states")]
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub states: Option<Vec<String>>,
244}
245
246/// <p>Used as one of the elements of the <a>AssessmentRun</a> data type.</p>
247#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
248#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
249pub struct AssessmentRunNotification {
250    /// <p>The date of the notification.</p>
251    #[serde(rename = "date")]
252    pub date: f64,
253    /// <p>The Boolean value that specifies whether the notification represents an error.</p>
254    #[serde(rename = "error")]
255    pub error: bool,
256    /// <p>The event for which a notification is sent.</p>
257    #[serde(rename = "event")]
258    pub event: String,
259    /// <p>The message included in the notification.</p>
260    #[serde(rename = "message")]
261    #[serde(skip_serializing_if = "Option::is_none")]
262    pub message: Option<String>,
263    /// <p>The status code of the SNS notification.</p>
264    #[serde(rename = "snsPublishStatusCode")]
265    #[serde(skip_serializing_if = "Option::is_none")]
266    pub sns_publish_status_code: Option<String>,
267    /// <p>The SNS topic to which the SNS notification is sent.</p>
268    #[serde(rename = "snsTopicArn")]
269    #[serde(skip_serializing_if = "Option::is_none")]
270    pub sns_topic_arn: Option<String>,
271}
272
273/// <p>Used as one of the elements of the <a>AssessmentRun</a> data type.</p>
274#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
275#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
276pub struct AssessmentRunStateChange {
277    /// <p>The assessment run state.</p>
278    #[serde(rename = "state")]
279    pub state: String,
280    /// <p>The last time the assessment run state changed.</p>
281    #[serde(rename = "stateChangedAt")]
282    pub state_changed_at: f64,
283}
284
285/// <p>Contains information about an Amazon Inspector application. This data type is used as the response element in the <a>DescribeAssessmentTargets</a> action.</p>
286#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
287#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
288pub struct AssessmentTarget {
289    /// <p>The ARN that specifies the Amazon Inspector assessment target.</p>
290    #[serde(rename = "arn")]
291    pub arn: String,
292    /// <p>The time at which the assessment target is created.</p>
293    #[serde(rename = "createdAt")]
294    pub created_at: f64,
295    /// <p>The name of the Amazon Inspector assessment target.</p>
296    #[serde(rename = "name")]
297    pub name: String,
298    /// <p>The ARN that specifies the resource group that is associated with the assessment target.</p>
299    #[serde(rename = "resourceGroupArn")]
300    #[serde(skip_serializing_if = "Option::is_none")]
301    pub resource_group_arn: Option<String>,
302    /// <p>The time at which <a>UpdateAssessmentTarget</a> is called.</p>
303    #[serde(rename = "updatedAt")]
304    pub updated_at: f64,
305}
306
307/// <p>Used as the request parameter in the <a>ListAssessmentTargets</a> action.</p>
308#[derive(Clone, Debug, Default, PartialEq, Serialize)]
309#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
310pub struct AssessmentTargetFilter {
311    /// <p>For a record to match a filter, an explicit value or a string that contains a wildcard that is specified for this data type property must match the value of the <b>assessmentTargetName</b> property of the <a>AssessmentTarget</a> data type.</p>
312    #[serde(rename = "assessmentTargetNamePattern")]
313    #[serde(skip_serializing_if = "Option::is_none")]
314    pub assessment_target_name_pattern: Option<String>,
315}
316
317/// <p>Contains information about an Amazon Inspector assessment template. This data type is used as the response element in the <a>DescribeAssessmentTemplates</a> action.</p>
318#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
319#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
320pub struct AssessmentTemplate {
321    /// <p>The ARN of the assessment template.</p>
322    #[serde(rename = "arn")]
323    pub arn: String,
324    /// <p>The number of existing assessment runs associated with this assessment template. This value can be zero or a positive integer.</p>
325    #[serde(rename = "assessmentRunCount")]
326    pub assessment_run_count: i64,
327    /// <p>The ARN of the assessment target that corresponds to this assessment template.</p>
328    #[serde(rename = "assessmentTargetArn")]
329    pub assessment_target_arn: String,
330    /// <p>The time at which the assessment template is created.</p>
331    #[serde(rename = "createdAt")]
332    pub created_at: f64,
333    /// <p>The duration in seconds specified for this assessment template. The default value is 3600 seconds (one hour). The maximum value is 86400 seconds (one day).</p>
334    #[serde(rename = "durationInSeconds")]
335    pub duration_in_seconds: i64,
336    /// <p>The Amazon Resource Name (ARN) of the most recent assessment run associated with this assessment template. This value exists only when the value of assessmentRunCount is greaterpa than zero.</p>
337    #[serde(rename = "lastAssessmentRunArn")]
338    #[serde(skip_serializing_if = "Option::is_none")]
339    pub last_assessment_run_arn: Option<String>,
340    /// <p>The name of the assessment template.</p>
341    #[serde(rename = "name")]
342    pub name: String,
343    /// <p>The rules packages that are specified for this assessment template.</p>
344    #[serde(rename = "rulesPackageArns")]
345    pub rules_package_arns: Vec<String>,
346    /// <p>The user-defined attributes that are assigned to every generated finding from the assessment run that uses this assessment template.</p>
347    #[serde(rename = "userAttributesForFindings")]
348    pub user_attributes_for_findings: Vec<Attribute>,
349}
350
351/// <p>Used as the request parameter in the <a>ListAssessmentTemplates</a> action.</p>
352#[derive(Clone, Debug, Default, PartialEq, Serialize)]
353#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
354pub struct AssessmentTemplateFilter {
355    /// <p>For a record to match a filter, the value specified for this data type property must inclusively match any value between the specified minimum and maximum values of the <b>durationInSeconds</b> property of the <a>AssessmentTemplate</a> data type.</p>
356    #[serde(rename = "durationRange")]
357    #[serde(skip_serializing_if = "Option::is_none")]
358    pub duration_range: Option<DurationRange>,
359    /// <p>For a record to match a filter, an explicit value or a string that contains a wildcard that is specified for this data type property must match the value of the <b>assessmentTemplateName</b> property of the <a>AssessmentTemplate</a> data type.</p>
360    #[serde(rename = "namePattern")]
361    #[serde(skip_serializing_if = "Option::is_none")]
362    pub name_pattern: Option<String>,
363    /// <p>For a record to match a filter, the values that are specified for this data type property must be contained in the list of values of the <b>rulesPackageArns</b> property of the <a>AssessmentTemplate</a> data type.</p>
364    #[serde(rename = "rulesPackageArns")]
365    #[serde(skip_serializing_if = "Option::is_none")]
366    pub rules_package_arns: Option<Vec<String>>,
367}
368
369/// <p>A collection of attributes of the host from which the finding is generated.</p>
370#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
371#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
372pub struct AssetAttributes {
373    /// <p>The ID of the agent that is installed on the EC2 instance where the finding is generated.</p>
374    #[serde(rename = "agentId")]
375    #[serde(skip_serializing_if = "Option::is_none")]
376    pub agent_id: Option<String>,
377    /// <p>The ID of the Amazon Machine Image (AMI) that is installed on the EC2 instance where the finding is generated.</p>
378    #[serde(rename = "amiId")]
379    #[serde(skip_serializing_if = "Option::is_none")]
380    pub ami_id: Option<String>,
381    /// <p>The Auto Scaling group of the EC2 instance where the finding is generated.</p>
382    #[serde(rename = "autoScalingGroup")]
383    #[serde(skip_serializing_if = "Option::is_none")]
384    pub auto_scaling_group: Option<String>,
385    /// <p>The hostname of the EC2 instance where the finding is generated.</p>
386    #[serde(rename = "hostname")]
387    #[serde(skip_serializing_if = "Option::is_none")]
388    pub hostname: Option<String>,
389    /// <p>The list of IP v4 addresses of the EC2 instance where the finding is generated.</p>
390    #[serde(rename = "ipv4Addresses")]
391    #[serde(skip_serializing_if = "Option::is_none")]
392    pub ipv_4_addresses: Option<Vec<String>>,
393    /// <p>An array of the network interfaces interacting with the EC2 instance where the finding is generated.</p>
394    #[serde(rename = "networkInterfaces")]
395    #[serde(skip_serializing_if = "Option::is_none")]
396    pub network_interfaces: Option<Vec<NetworkInterface>>,
397    /// <p>The schema version of this data type.</p>
398    #[serde(rename = "schemaVersion")]
399    pub schema_version: i64,
400    /// <p>The tags related to the EC2 instance where the finding is generated.</p>
401    #[serde(rename = "tags")]
402    #[serde(skip_serializing_if = "Option::is_none")]
403    pub tags: Option<Vec<Tag>>,
404}
405
406/// <p>This data type is used as a request parameter in the <a>AddAttributesToFindings</a> and <a>CreateAssessmentTemplate</a> actions.</p>
407#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
408pub struct Attribute {
409    /// <p>The attribute key.</p>
410    #[serde(rename = "key")]
411    pub key: String,
412    /// <p>The value assigned to the attribute key.</p>
413    #[serde(rename = "value")]
414    #[serde(skip_serializing_if = "Option::is_none")]
415    pub value: Option<String>,
416}
417
418#[derive(Clone, Debug, Default, PartialEq, Serialize)]
419#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
420pub struct CreateAssessmentTargetRequest {
421    /// <p>The user-defined name that identifies the assessment target that you want to create. The name must be unique within the AWS account.</p>
422    #[serde(rename = "assessmentTargetName")]
423    pub assessment_target_name: String,
424    /// <p>The ARN that specifies the resource group that is used to create the assessment target. If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target.</p>
425    #[serde(rename = "resourceGroupArn")]
426    #[serde(skip_serializing_if = "Option::is_none")]
427    pub resource_group_arn: Option<String>,
428}
429
430#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
431#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
432pub struct CreateAssessmentTargetResponse {
433    /// <p>The ARN that specifies the assessment target that is created.</p>
434    #[serde(rename = "assessmentTargetArn")]
435    pub assessment_target_arn: String,
436}
437
438#[derive(Clone, Debug, Default, PartialEq, Serialize)]
439#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
440pub struct CreateAssessmentTemplateRequest {
441    /// <p>The ARN that specifies the assessment target for which you want to create the assessment template.</p>
442    #[serde(rename = "assessmentTargetArn")]
443    pub assessment_target_arn: String,
444    /// <p>The user-defined name that identifies the assessment template that you want to create. You can create several assessment templates for an assessment target. The names of the assessment templates that correspond to a particular assessment target must be unique.</p>
445    #[serde(rename = "assessmentTemplateName")]
446    pub assessment_template_name: String,
447    /// <p>The duration of the assessment run in seconds.</p>
448    #[serde(rename = "durationInSeconds")]
449    pub duration_in_seconds: i64,
450    /// <p>The ARNs that specify the rules packages that you want to attach to the assessment template.</p>
451    #[serde(rename = "rulesPackageArns")]
452    pub rules_package_arns: Vec<String>,
453    /// <p>The user-defined attributes that are assigned to every finding that is generated by the assessment run that uses this assessment template. An attribute is a key and value pair (an <a>Attribute</a> object). Within an assessment template, each key must be unique.</p>
454    #[serde(rename = "userAttributesForFindings")]
455    #[serde(skip_serializing_if = "Option::is_none")]
456    pub user_attributes_for_findings: Option<Vec<Attribute>>,
457}
458
459#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
460#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
461pub struct CreateAssessmentTemplateResponse {
462    /// <p>The ARN that specifies the assessment template that is created.</p>
463    #[serde(rename = "assessmentTemplateArn")]
464    pub assessment_template_arn: String,
465}
466
467#[derive(Clone, Debug, Default, PartialEq, Serialize)]
468#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
469pub struct CreateExclusionsPreviewRequest {
470    /// <p>The ARN that specifies the assessment template for which you want to create an exclusions preview.</p>
471    #[serde(rename = "assessmentTemplateArn")]
472    pub assessment_template_arn: String,
473}
474
475#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
476#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
477pub struct CreateExclusionsPreviewResponse {
478    /// <p>Specifies the unique identifier of the requested exclusions preview. You can use the unique identifier to retrieve the exclusions preview when running the GetExclusionsPreview API.</p>
479    #[serde(rename = "previewToken")]
480    pub preview_token: String,
481}
482
483#[derive(Clone, Debug, Default, PartialEq, Serialize)]
484#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
485pub struct CreateResourceGroupRequest {
486    /// <p>A collection of keys and an array of possible values, '[{"key":"key1","values":["Value1","Value2"]},{"key":"Key2","values":["Value3"]}]'.</p> <p>For example,'[{"key":"Name","values":["TestEC2Instance"]}]'.</p>
487    #[serde(rename = "resourceGroupTags")]
488    pub resource_group_tags: Vec<ResourceGroupTag>,
489}
490
491#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
492#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
493pub struct CreateResourceGroupResponse {
494    /// <p>The ARN that specifies the resource group that is created.</p>
495    #[serde(rename = "resourceGroupArn")]
496    pub resource_group_arn: String,
497}
498
499#[derive(Clone, Debug, Default, PartialEq, Serialize)]
500#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
501pub struct DeleteAssessmentRunRequest {
502    /// <p>The ARN that specifies the assessment run that you want to delete.</p>
503    #[serde(rename = "assessmentRunArn")]
504    pub assessment_run_arn: String,
505}
506
507#[derive(Clone, Debug, Default, PartialEq, Serialize)]
508#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
509pub struct DeleteAssessmentTargetRequest {
510    /// <p>The ARN that specifies the assessment target that you want to delete.</p>
511    #[serde(rename = "assessmentTargetArn")]
512    pub assessment_target_arn: String,
513}
514
515#[derive(Clone, Debug, Default, PartialEq, Serialize)]
516#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
517pub struct DeleteAssessmentTemplateRequest {
518    /// <p>The ARN that specifies the assessment template that you want to delete.</p>
519    #[serde(rename = "assessmentTemplateArn")]
520    pub assessment_template_arn: String,
521}
522
523#[derive(Clone, Debug, Default, PartialEq, Serialize)]
524#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
525pub struct DescribeAssessmentRunsRequest {
526    /// <p>The ARN that specifies the assessment run that you want to describe.</p>
527    #[serde(rename = "assessmentRunArns")]
528    pub assessment_run_arns: Vec<String>,
529}
530
531#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
532#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
533pub struct DescribeAssessmentRunsResponse {
534    /// <p>Information about the assessment run.</p>
535    #[serde(rename = "assessmentRuns")]
536    pub assessment_runs: Vec<AssessmentRun>,
537    /// <p>Assessment run details that cannot be described. An error code is provided for each failed item.</p>
538    #[serde(rename = "failedItems")]
539    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
540}
541
542#[derive(Clone, Debug, Default, PartialEq, Serialize)]
543#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
544pub struct DescribeAssessmentTargetsRequest {
545    /// <p>The ARNs that specifies the assessment targets that you want to describe.</p>
546    #[serde(rename = "assessmentTargetArns")]
547    pub assessment_target_arns: Vec<String>,
548}
549
550#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
551#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
552pub struct DescribeAssessmentTargetsResponse {
553    /// <p>Information about the assessment targets.</p>
554    #[serde(rename = "assessmentTargets")]
555    pub assessment_targets: Vec<AssessmentTarget>,
556    /// <p>Assessment target details that cannot be described. An error code is provided for each failed item.</p>
557    #[serde(rename = "failedItems")]
558    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
559}
560
561#[derive(Clone, Debug, Default, PartialEq, Serialize)]
562#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
563pub struct DescribeAssessmentTemplatesRequest {
564    #[serde(rename = "assessmentTemplateArns")]
565    pub assessment_template_arns: Vec<String>,
566}
567
568#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
569#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
570pub struct DescribeAssessmentTemplatesResponse {
571    /// <p>Information about the assessment templates.</p>
572    #[serde(rename = "assessmentTemplates")]
573    pub assessment_templates: Vec<AssessmentTemplate>,
574    /// <p>Assessment template details that cannot be described. An error code is provided for each failed item.</p>
575    #[serde(rename = "failedItems")]
576    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
577}
578
579#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
580#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
581pub struct DescribeCrossAccountAccessRoleResponse {
582    /// <p>The date when the cross-account access role was registered.</p>
583    #[serde(rename = "registeredAt")]
584    pub registered_at: f64,
585    /// <p>The ARN that specifies the IAM role that Amazon Inspector uses to access your AWS account.</p>
586    #[serde(rename = "roleArn")]
587    pub role_arn: String,
588    /// <p>A Boolean value that specifies whether the IAM role has the necessary policies attached to enable Amazon Inspector to access your AWS account.</p>
589    #[serde(rename = "valid")]
590    pub valid: bool,
591}
592
593#[derive(Clone, Debug, Default, PartialEq, Serialize)]
594#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
595pub struct DescribeExclusionsRequest {
596    /// <p>The list of ARNs that specify the exclusions that you want to describe.</p>
597    #[serde(rename = "exclusionArns")]
598    pub exclusion_arns: Vec<String>,
599    /// <p>The locale into which you want to translate the exclusion's title, description, and recommendation.</p>
600    #[serde(rename = "locale")]
601    #[serde(skip_serializing_if = "Option::is_none")]
602    pub locale: Option<String>,
603}
604
605#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
606#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
607pub struct DescribeExclusionsResponse {
608    /// <p>Information about the exclusions.</p>
609    #[serde(rename = "exclusions")]
610    pub exclusions: ::std::collections::HashMap<String, Exclusion>,
611    /// <p>Exclusion details that cannot be described. An error code is provided for each failed item.</p>
612    #[serde(rename = "failedItems")]
613    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
614}
615
616#[derive(Clone, Debug, Default, PartialEq, Serialize)]
617#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
618pub struct DescribeFindingsRequest {
619    /// <p>The ARN that specifies the finding that you want to describe.</p>
620    #[serde(rename = "findingArns")]
621    pub finding_arns: Vec<String>,
622    /// <p>The locale into which you want to translate a finding description, recommendation, and the short description that identifies the finding.</p>
623    #[serde(rename = "locale")]
624    #[serde(skip_serializing_if = "Option::is_none")]
625    pub locale: Option<String>,
626}
627
628#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
629#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
630pub struct DescribeFindingsResponse {
631    /// <p>Finding details that cannot be described. An error code is provided for each failed item.</p>
632    #[serde(rename = "failedItems")]
633    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
634    /// <p>Information about the finding.</p>
635    #[serde(rename = "findings")]
636    pub findings: Vec<Finding>,
637}
638
639#[derive(Clone, Debug, Default, PartialEq, Serialize)]
640#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
641pub struct DescribeResourceGroupsRequest {
642    /// <p>The ARN that specifies the resource group that you want to describe.</p>
643    #[serde(rename = "resourceGroupArns")]
644    pub resource_group_arns: Vec<String>,
645}
646
647#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
648#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
649pub struct DescribeResourceGroupsResponse {
650    /// <p>Resource group details that cannot be described. An error code is provided for each failed item.</p>
651    #[serde(rename = "failedItems")]
652    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
653    /// <p>Information about a resource group.</p>
654    #[serde(rename = "resourceGroups")]
655    pub resource_groups: Vec<ResourceGroup>,
656}
657
658#[derive(Clone, Debug, Default, PartialEq, Serialize)]
659#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
660pub struct DescribeRulesPackagesRequest {
661    /// <p>The locale that you want to translate a rules package description into.</p>
662    #[serde(rename = "locale")]
663    #[serde(skip_serializing_if = "Option::is_none")]
664    pub locale: Option<String>,
665    /// <p>The ARN that specifies the rules package that you want to describe.</p>
666    #[serde(rename = "rulesPackageArns")]
667    pub rules_package_arns: Vec<String>,
668}
669
670#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
671#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
672pub struct DescribeRulesPackagesResponse {
673    /// <p>Rules package details that cannot be described. An error code is provided for each failed item.</p>
674    #[serde(rename = "failedItems")]
675    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
676    /// <p>Information about the rules package.</p>
677    #[serde(rename = "rulesPackages")]
678    pub rules_packages: Vec<RulesPackage>,
679}
680
681/// <p>This data type is used in the <a>AssessmentTemplateFilter</a> data type.</p>
682#[derive(Clone, Debug, Default, PartialEq, Serialize)]
683#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
684pub struct DurationRange {
685    /// <p>The maximum value of the duration range. Must be less than or equal to 604800 seconds (1 week).</p>
686    #[serde(rename = "maxSeconds")]
687    #[serde(skip_serializing_if = "Option::is_none")]
688    pub max_seconds: Option<i64>,
689    /// <p>The minimum value of the duration range. Must be greater than zero.</p>
690    #[serde(rename = "minSeconds")]
691    #[serde(skip_serializing_if = "Option::is_none")]
692    pub min_seconds: Option<i64>,
693}
694
695/// <p>This data type is used in the <a>Subscription</a> data type.</p>
696#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
697#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
698pub struct EventSubscription {
699    /// <p>The event for which Amazon Simple Notification Service (SNS) notifications are sent.</p>
700    #[serde(rename = "event")]
701    pub event: String,
702    /// <p>The time at which <a>SubscribeToEvent</a> is called.</p>
703    #[serde(rename = "subscribedAt")]
704    pub subscribed_at: f64,
705}
706
707/// <p>Contains information about what was excluded from an assessment run.</p>
708#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
709#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
710pub struct Exclusion {
711    /// <p>The ARN that specifies the exclusion.</p>
712    #[serde(rename = "arn")]
713    pub arn: String,
714    /// <p>The system-defined attributes for the exclusion.</p>
715    #[serde(rename = "attributes")]
716    #[serde(skip_serializing_if = "Option::is_none")]
717    pub attributes: Option<Vec<Attribute>>,
718    /// <p>The description of the exclusion.</p>
719    #[serde(rename = "description")]
720    pub description: String,
721    /// <p>The recommendation for the exclusion.</p>
722    #[serde(rename = "recommendation")]
723    pub recommendation: String,
724    /// <p>The AWS resources for which the exclusion pertains.</p>
725    #[serde(rename = "scopes")]
726    pub scopes: Vec<Scope>,
727    /// <p>The name of the exclusion.</p>
728    #[serde(rename = "title")]
729    pub title: String,
730}
731
732/// <p>Contains information about what is excluded from an assessment run given the current state of the assessment template.</p>
733#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
734#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
735pub struct ExclusionPreview {
736    /// <p>The system-defined attributes for the exclusion preview.</p>
737    #[serde(rename = "attributes")]
738    #[serde(skip_serializing_if = "Option::is_none")]
739    pub attributes: Option<Vec<Attribute>>,
740    /// <p>The description of the exclusion preview.</p>
741    #[serde(rename = "description")]
742    pub description: String,
743    /// <p>The recommendation for the exclusion preview.</p>
744    #[serde(rename = "recommendation")]
745    pub recommendation: String,
746    /// <p>The AWS resources for which the exclusion preview pertains.</p>
747    #[serde(rename = "scopes")]
748    pub scopes: Vec<Scope>,
749    /// <p>The name of the exclusion preview.</p>
750    #[serde(rename = "title")]
751    pub title: String,
752}
753
754/// <p>Includes details about the failed items.</p>
755#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
756#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
757pub struct FailedItemDetails {
758    /// <p>The status code of a failed item.</p>
759    #[serde(rename = "failureCode")]
760    pub failure_code: String,
761    /// <p>Indicates whether you can immediately retry a request for this item for a specified resource.</p>
762    #[serde(rename = "retryable")]
763    pub retryable: bool,
764}
765
766/// <p>Contains information about an Amazon Inspector finding. This data type is used as the response element in the <a>DescribeFindings</a> action.</p>
767#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
768#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
769pub struct Finding {
770    /// <p>The ARN that specifies the finding.</p>
771    #[serde(rename = "arn")]
772    pub arn: String,
773    /// <p>A collection of attributes of the host from which the finding is generated.</p>
774    #[serde(rename = "assetAttributes")]
775    #[serde(skip_serializing_if = "Option::is_none")]
776    pub asset_attributes: Option<AssetAttributes>,
777    /// <p>The type of the host from which the finding is generated.</p>
778    #[serde(rename = "assetType")]
779    #[serde(skip_serializing_if = "Option::is_none")]
780    pub asset_type: Option<String>,
781    /// <p>The system-defined attributes for the finding.</p>
782    #[serde(rename = "attributes")]
783    pub attributes: Vec<Attribute>,
784    /// <p>This data element is currently not used.</p>
785    #[serde(rename = "confidence")]
786    #[serde(skip_serializing_if = "Option::is_none")]
787    pub confidence: Option<i64>,
788    /// <p>The time when the finding was generated.</p>
789    #[serde(rename = "createdAt")]
790    pub created_at: f64,
791    /// <p>The description of the finding.</p>
792    #[serde(rename = "description")]
793    #[serde(skip_serializing_if = "Option::is_none")]
794    pub description: Option<String>,
795    /// <p>The ID of the finding.</p>
796    #[serde(rename = "id")]
797    #[serde(skip_serializing_if = "Option::is_none")]
798    pub id: Option<String>,
799    /// <p>This data element is currently not used.</p>
800    #[serde(rename = "indicatorOfCompromise")]
801    #[serde(skip_serializing_if = "Option::is_none")]
802    pub indicator_of_compromise: Option<bool>,
803    /// <p>The numeric value of the finding severity.</p>
804    #[serde(rename = "numericSeverity")]
805    #[serde(skip_serializing_if = "Option::is_none")]
806    pub numeric_severity: Option<f64>,
807    /// <p>The recommendation for the finding.</p>
808    #[serde(rename = "recommendation")]
809    #[serde(skip_serializing_if = "Option::is_none")]
810    pub recommendation: Option<String>,
811    /// <p>The schema version of this data type.</p>
812    #[serde(rename = "schemaVersion")]
813    #[serde(skip_serializing_if = "Option::is_none")]
814    pub schema_version: Option<i64>,
815    /// <p>The data element is set to "Inspector".</p>
816    #[serde(rename = "service")]
817    #[serde(skip_serializing_if = "Option::is_none")]
818    pub service: Option<String>,
819    /// <p>This data type is used in the <a>Finding</a> data type.</p>
820    #[serde(rename = "serviceAttributes")]
821    #[serde(skip_serializing_if = "Option::is_none")]
822    pub service_attributes: Option<InspectorServiceAttributes>,
823    /// <p>The finding severity. Values can be set to High, Medium, Low, and Informational.</p>
824    #[serde(rename = "severity")]
825    #[serde(skip_serializing_if = "Option::is_none")]
826    pub severity: Option<String>,
827    /// <p>The name of the finding.</p>
828    #[serde(rename = "title")]
829    #[serde(skip_serializing_if = "Option::is_none")]
830    pub title: Option<String>,
831    /// <p>The time when <a>AddAttributesToFindings</a> is called.</p>
832    #[serde(rename = "updatedAt")]
833    pub updated_at: f64,
834    /// <p>The user-defined attributes that are assigned to the finding.</p>
835    #[serde(rename = "userAttributes")]
836    pub user_attributes: Vec<Attribute>,
837}
838
839/// <p>This data type is used as a request parameter in the <a>ListFindings</a> action.</p>
840#[derive(Clone, Debug, Default, PartialEq, Serialize)]
841#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
842pub struct FindingFilter {
843    /// <p>For a record to match a filter, one of the values that is specified for this data type property must be the exact match of the value of the <b>agentId</b> property of the <a>Finding</a> data type.</p>
844    #[serde(rename = "agentIds")]
845    #[serde(skip_serializing_if = "Option::is_none")]
846    pub agent_ids: Option<Vec<String>>,
847    /// <p>For a record to match a filter, the list of values that are specified for this data type property must be contained in the list of values of the <b>attributes</b> property of the <a>Finding</a> data type.</p>
848    #[serde(rename = "attributes")]
849    #[serde(skip_serializing_if = "Option::is_none")]
850    pub attributes: Option<Vec<Attribute>>,
851    /// <p>For a record to match a filter, one of the values that is specified for this data type property must be the exact match of the value of the <b>autoScalingGroup</b> property of the <a>Finding</a> data type.</p>
852    #[serde(rename = "autoScalingGroups")]
853    #[serde(skip_serializing_if = "Option::is_none")]
854    pub auto_scaling_groups: Option<Vec<String>>,
855    /// <p>The time range during which the finding is generated.</p>
856    #[serde(rename = "creationTimeRange")]
857    #[serde(skip_serializing_if = "Option::is_none")]
858    pub creation_time_range: Option<TimestampRange>,
859    /// <p>For a record to match a filter, one of the values that is specified for this data type property must be the exact match of the value of the <b>ruleName</b> property of the <a>Finding</a> data type.</p>
860    #[serde(rename = "ruleNames")]
861    #[serde(skip_serializing_if = "Option::is_none")]
862    pub rule_names: Option<Vec<String>>,
863    /// <p>For a record to match a filter, one of the values that is specified for this data type property must be the exact match of the value of the <b>rulesPackageArn</b> property of the <a>Finding</a> data type.</p>
864    #[serde(rename = "rulesPackageArns")]
865    #[serde(skip_serializing_if = "Option::is_none")]
866    pub rules_package_arns: Option<Vec<String>>,
867    /// <p>For a record to match a filter, one of the values that is specified for this data type property must be the exact match of the value of the <b>severity</b> property of the <a>Finding</a> data type.</p>
868    #[serde(rename = "severities")]
869    #[serde(skip_serializing_if = "Option::is_none")]
870    pub severities: Option<Vec<String>>,
871    /// <p>For a record to match a filter, the value that is specified for this data type property must be contained in the list of values of the <b>userAttributes</b> property of the <a>Finding</a> data type.</p>
872    #[serde(rename = "userAttributes")]
873    #[serde(skip_serializing_if = "Option::is_none")]
874    pub user_attributes: Option<Vec<Attribute>>,
875}
876
877#[derive(Clone, Debug, Default, PartialEq, Serialize)]
878#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
879pub struct GetAssessmentReportRequest {
880    /// <p>The ARN that specifies the assessment run for which you want to generate a report.</p>
881    #[serde(rename = "assessmentRunArn")]
882    pub assessment_run_arn: String,
883    /// <p>Specifies the file format (html or pdf) of the assessment report that you want to generate.</p>
884    #[serde(rename = "reportFileFormat")]
885    pub report_file_format: String,
886    /// <p>Specifies the type of the assessment report that you want to generate. There are two types of assessment reports: a finding report and a full report. For more information, see <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_reports.html">Assessment Reports</a>. </p>
887    #[serde(rename = "reportType")]
888    pub report_type: String,
889}
890
891#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
892#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
893pub struct GetAssessmentReportResponse {
894    /// <p>Specifies the status of the request to generate an assessment report. </p>
895    #[serde(rename = "status")]
896    pub status: String,
897    /// <p>Specifies the URL where you can find the generated assessment report. This parameter is only returned if the report is successfully generated.</p>
898    #[serde(rename = "url")]
899    #[serde(skip_serializing_if = "Option::is_none")]
900    pub url: Option<String>,
901}
902
903#[derive(Clone, Debug, Default, PartialEq, Serialize)]
904#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
905pub struct GetExclusionsPreviewRequest {
906    /// <p>The ARN that specifies the assessment template for which the exclusions preview was requested.</p>
907    #[serde(rename = "assessmentTemplateArn")]
908    pub assessment_template_arn: String,
909    /// <p>The locale into which you want to translate the exclusion's title, description, and recommendation.</p>
910    #[serde(rename = "locale")]
911    #[serde(skip_serializing_if = "Option::is_none")]
912    pub locale: Option<String>,
913    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 100. The maximum value is 500.</p>
914    #[serde(rename = "maxResults")]
915    #[serde(skip_serializing_if = "Option::is_none")]
916    pub max_results: Option<i64>,
917    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the GetExclusionsPreviewRequest action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.</p>
918    #[serde(rename = "nextToken")]
919    #[serde(skip_serializing_if = "Option::is_none")]
920    pub next_token: Option<String>,
921    /// <p>The unique identifier associated of the exclusions preview.</p>
922    #[serde(rename = "previewToken")]
923    pub preview_token: String,
924}
925
926#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
927#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
928pub struct GetExclusionsPreviewResponse {
929    /// <p>Information about the exclusions included in the preview.</p>
930    #[serde(rename = "exclusionPreviews")]
931    #[serde(skip_serializing_if = "Option::is_none")]
932    pub exclusion_previews: Option<Vec<ExclusionPreview>>,
933    /// <p>When a response is generated, if there is more data to be listed, this parameters is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
934    #[serde(rename = "nextToken")]
935    #[serde(skip_serializing_if = "Option::is_none")]
936    pub next_token: Option<String>,
937    /// <p>Specifies the status of the request to generate an exclusions preview.</p>
938    #[serde(rename = "previewStatus")]
939    pub preview_status: String,
940}
941
942#[derive(Clone, Debug, Default, PartialEq, Serialize)]
943#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
944pub struct GetTelemetryMetadataRequest {
945    /// <p>The ARN that specifies the assessment run that has the telemetry data that you want to obtain.</p>
946    #[serde(rename = "assessmentRunArn")]
947    pub assessment_run_arn: String,
948}
949
950#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
951#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
952pub struct GetTelemetryMetadataResponse {
953    /// <p>Telemetry details.</p>
954    #[serde(rename = "telemetryMetadata")]
955    pub telemetry_metadata: Vec<TelemetryMetadata>,
956}
957
958/// <p>This data type is used in the <a>Finding</a> data type.</p>
959#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
960#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
961pub struct InspectorServiceAttributes {
962    /// <p>The ARN of the assessment run during which the finding is generated.</p>
963    #[serde(rename = "assessmentRunArn")]
964    #[serde(skip_serializing_if = "Option::is_none")]
965    pub assessment_run_arn: Option<String>,
966    /// <p>The ARN of the rules package that is used to generate the finding.</p>
967    #[serde(rename = "rulesPackageArn")]
968    #[serde(skip_serializing_if = "Option::is_none")]
969    pub rules_package_arn: Option<String>,
970    /// <p>The schema version of this data type.</p>
971    #[serde(rename = "schemaVersion")]
972    pub schema_version: i64,
973}
974
975#[derive(Clone, Debug, Default, PartialEq, Serialize)]
976#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
977pub struct ListAssessmentRunAgentsRequest {
978    /// <p>The ARN that specifies the assessment run whose agents you want to list.</p>
979    #[serde(rename = "assessmentRunArn")]
980    pub assessment_run_arn: String,
981    /// <p>You can use this parameter to specify a subset of data to be included in the action's response.</p> <p>For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.</p>
982    #[serde(rename = "filter")]
983    #[serde(skip_serializing_if = "Option::is_none")]
984    pub filter: Option<AgentFilter>,
985    /// <p>You can use this parameter to indicate the maximum number of items that you want in the response. The default value is 10. The maximum value is 500.</p>
986    #[serde(rename = "maxResults")]
987    #[serde(skip_serializing_if = "Option::is_none")]
988    pub max_results: Option<i64>,
989    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>ListAssessmentRunAgents</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
990    #[serde(rename = "nextToken")]
991    #[serde(skip_serializing_if = "Option::is_none")]
992    pub next_token: Option<String>,
993}
994
995#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
996#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
997pub struct ListAssessmentRunAgentsResponse {
998    /// <p>A list of ARNs that specifies the agents returned by the action.</p>
999    #[serde(rename = "assessmentRunAgents")]
1000    pub assessment_run_agents: Vec<AssessmentRunAgent>,
1001    /// <p> When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1002    #[serde(rename = "nextToken")]
1003    #[serde(skip_serializing_if = "Option::is_none")]
1004    pub next_token: Option<String>,
1005}
1006
1007#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1008#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1009pub struct ListAssessmentRunsRequest {
1010    /// <p>The ARNs that specify the assessment templates whose assessment runs you want to list.</p>
1011    #[serde(rename = "assessmentTemplateArns")]
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    pub assessment_template_arns: Option<Vec<String>>,
1014    /// <p>You can use this parameter to specify a subset of data to be included in the action's response.</p> <p>For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.</p>
1015    #[serde(rename = "filter")]
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    pub filter: Option<AssessmentRunFilter>,
1018    /// <p>You can use this parameter to indicate the maximum number of items that you want in the response. The default value is 10. The maximum value is 500.</p>
1019    #[serde(rename = "maxResults")]
1020    #[serde(skip_serializing_if = "Option::is_none")]
1021    pub max_results: Option<i64>,
1022    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>ListAssessmentRuns</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
1023    #[serde(rename = "nextToken")]
1024    #[serde(skip_serializing_if = "Option::is_none")]
1025    pub next_token: Option<String>,
1026}
1027
1028#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1029#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1030pub struct ListAssessmentRunsResponse {
1031    /// <p>A list of ARNs that specifies the assessment runs that are returned by the action.</p>
1032    #[serde(rename = "assessmentRunArns")]
1033    pub assessment_run_arns: Vec<String>,
1034    /// <p> When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1035    #[serde(rename = "nextToken")]
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    pub next_token: Option<String>,
1038}
1039
1040#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1041#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1042pub struct ListAssessmentTargetsRequest {
1043    /// <p>You can use this parameter to specify a subset of data to be included in the action's response.</p> <p>For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.</p>
1044    #[serde(rename = "filter")]
1045    #[serde(skip_serializing_if = "Option::is_none")]
1046    pub filter: Option<AssessmentTargetFilter>,
1047    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
1048    #[serde(rename = "maxResults")]
1049    #[serde(skip_serializing_if = "Option::is_none")]
1050    pub max_results: Option<i64>,
1051    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>ListAssessmentTargets</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
1052    #[serde(rename = "nextToken")]
1053    #[serde(skip_serializing_if = "Option::is_none")]
1054    pub next_token: Option<String>,
1055}
1056
1057#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1058#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1059pub struct ListAssessmentTargetsResponse {
1060    /// <p>A list of ARNs that specifies the assessment targets that are returned by the action.</p>
1061    #[serde(rename = "assessmentTargetArns")]
1062    pub assessment_target_arns: Vec<String>,
1063    /// <p> When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1064    #[serde(rename = "nextToken")]
1065    #[serde(skip_serializing_if = "Option::is_none")]
1066    pub next_token: Option<String>,
1067}
1068
1069#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1070#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1071pub struct ListAssessmentTemplatesRequest {
1072    /// <p>A list of ARNs that specifies the assessment targets whose assessment templates you want to list.</p>
1073    #[serde(rename = "assessmentTargetArns")]
1074    #[serde(skip_serializing_if = "Option::is_none")]
1075    pub assessment_target_arns: Option<Vec<String>>,
1076    /// <p>You can use this parameter to specify a subset of data to be included in the action's response.</p> <p>For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.</p>
1077    #[serde(rename = "filter")]
1078    #[serde(skip_serializing_if = "Option::is_none")]
1079    pub filter: Option<AssessmentTemplateFilter>,
1080    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
1081    #[serde(rename = "maxResults")]
1082    #[serde(skip_serializing_if = "Option::is_none")]
1083    pub max_results: Option<i64>,
1084    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>ListAssessmentTemplates</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
1085    #[serde(rename = "nextToken")]
1086    #[serde(skip_serializing_if = "Option::is_none")]
1087    pub next_token: Option<String>,
1088}
1089
1090#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1091#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1092pub struct ListAssessmentTemplatesResponse {
1093    /// <p>A list of ARNs that specifies the assessment templates returned by the action.</p>
1094    #[serde(rename = "assessmentTemplateArns")]
1095    pub assessment_template_arns: Vec<String>,
1096    /// <p> When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1097    #[serde(rename = "nextToken")]
1098    #[serde(skip_serializing_if = "Option::is_none")]
1099    pub next_token: Option<String>,
1100}
1101
1102#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1103#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1104pub struct ListEventSubscriptionsRequest {
1105    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
1106    #[serde(rename = "maxResults")]
1107    #[serde(skip_serializing_if = "Option::is_none")]
1108    pub max_results: Option<i64>,
1109    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>ListEventSubscriptions</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
1110    #[serde(rename = "nextToken")]
1111    #[serde(skip_serializing_if = "Option::is_none")]
1112    pub next_token: Option<String>,
1113    /// <p>The ARN of the assessment template for which you want to list the existing event subscriptions.</p>
1114    #[serde(rename = "resourceArn")]
1115    #[serde(skip_serializing_if = "Option::is_none")]
1116    pub resource_arn: Option<String>,
1117}
1118
1119#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1120#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1121pub struct ListEventSubscriptionsResponse {
1122    /// <p> When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1123    #[serde(rename = "nextToken")]
1124    #[serde(skip_serializing_if = "Option::is_none")]
1125    pub next_token: Option<String>,
1126    /// <p>Details of the returned event subscriptions.</p>
1127    #[serde(rename = "subscriptions")]
1128    pub subscriptions: Vec<Subscription>,
1129}
1130
1131#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1132#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1133pub struct ListExclusionsRequest {
1134    /// <p>The ARN of the assessment run that generated the exclusions that you want to list.</p>
1135    #[serde(rename = "assessmentRunArn")]
1136    pub assessment_run_arn: String,
1137    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 100. The maximum value is 500.</p>
1138    #[serde(rename = "maxResults")]
1139    #[serde(skip_serializing_if = "Option::is_none")]
1140    pub max_results: Option<i64>,
1141    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the ListExclusionsRequest action. Subsequent calls to the action fill nextToken in the request with the value of nextToken from the previous response to continue listing data.</p>
1142    #[serde(rename = "nextToken")]
1143    #[serde(skip_serializing_if = "Option::is_none")]
1144    pub next_token: Option<String>,
1145}
1146
1147#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1148#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1149pub struct ListExclusionsResponse {
1150    /// <p>A list of exclusions' ARNs returned by the action.</p>
1151    #[serde(rename = "exclusionArns")]
1152    pub exclusion_arns: Vec<String>,
1153    /// <p>When a response is generated, if there is more data to be listed, this parameters is present in the response and contains the value to use for the nextToken parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1154    #[serde(rename = "nextToken")]
1155    #[serde(skip_serializing_if = "Option::is_none")]
1156    pub next_token: Option<String>,
1157}
1158
1159#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1160#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1161pub struct ListFindingsRequest {
1162    /// <p>The ARNs of the assessment runs that generate the findings that you want to list.</p>
1163    #[serde(rename = "assessmentRunArns")]
1164    #[serde(skip_serializing_if = "Option::is_none")]
1165    pub assessment_run_arns: Option<Vec<String>>,
1166    /// <p>You can use this parameter to specify a subset of data to be included in the action's response.</p> <p>For a record to match a filter, all specified filter attributes must match. When multiple values are specified for a filter attribute, any of the values can match.</p>
1167    #[serde(rename = "filter")]
1168    #[serde(skip_serializing_if = "Option::is_none")]
1169    pub filter: Option<FindingFilter>,
1170    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
1171    #[serde(rename = "maxResults")]
1172    #[serde(skip_serializing_if = "Option::is_none")]
1173    pub max_results: Option<i64>,
1174    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>ListFindings</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
1175    #[serde(rename = "nextToken")]
1176    #[serde(skip_serializing_if = "Option::is_none")]
1177    pub next_token: Option<String>,
1178}
1179
1180#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1181#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1182pub struct ListFindingsResponse {
1183    /// <p>A list of ARNs that specifies the findings returned by the action.</p>
1184    #[serde(rename = "findingArns")]
1185    pub finding_arns: Vec<String>,
1186    /// <p> When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1187    #[serde(rename = "nextToken")]
1188    #[serde(skip_serializing_if = "Option::is_none")]
1189    pub next_token: Option<String>,
1190}
1191
1192#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1193#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1194pub struct ListRulesPackagesRequest {
1195    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
1196    #[serde(rename = "maxResults")]
1197    #[serde(skip_serializing_if = "Option::is_none")]
1198    pub max_results: Option<i64>,
1199    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>ListRulesPackages</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
1200    #[serde(rename = "nextToken")]
1201    #[serde(skip_serializing_if = "Option::is_none")]
1202    pub next_token: Option<String>,
1203}
1204
1205#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1206#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1207pub struct ListRulesPackagesResponse {
1208    /// <p> When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1209    #[serde(rename = "nextToken")]
1210    #[serde(skip_serializing_if = "Option::is_none")]
1211    pub next_token: Option<String>,
1212    /// <p>The list of ARNs that specifies the rules packages returned by the action.</p>
1213    #[serde(rename = "rulesPackageArns")]
1214    pub rules_package_arns: Vec<String>,
1215}
1216
1217#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1218#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1219pub struct ListTagsForResourceRequest {
1220    /// <p>The ARN that specifies the assessment template whose tags you want to list.</p>
1221    #[serde(rename = "resourceArn")]
1222    pub resource_arn: String,
1223}
1224
1225#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1226#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1227pub struct ListTagsForResourceResponse {
1228    /// <p>A collection of key and value pairs.</p>
1229    #[serde(rename = "tags")]
1230    pub tags: Vec<Tag>,
1231}
1232
1233/// <p>Contains information about the network interfaces interacting with an EC2 instance. This data type is used as one of the elements of the <a>AssetAttributes</a> data type.</p>
1234#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1235#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1236pub struct NetworkInterface {
1237    /// <p>The IP addresses associated with the network interface.</p>
1238    #[serde(rename = "ipv6Addresses")]
1239    #[serde(skip_serializing_if = "Option::is_none")]
1240    pub ipv_6_addresses: Option<Vec<String>>,
1241    /// <p>The ID of the network interface.</p>
1242    #[serde(rename = "networkInterfaceId")]
1243    #[serde(skip_serializing_if = "Option::is_none")]
1244    pub network_interface_id: Option<String>,
1245    /// <p>The name of a private DNS associated with the network interface.</p>
1246    #[serde(rename = "privateDnsName")]
1247    #[serde(skip_serializing_if = "Option::is_none")]
1248    pub private_dns_name: Option<String>,
1249    /// <p>The private IP address associated with the network interface.</p>
1250    #[serde(rename = "privateIpAddress")]
1251    #[serde(skip_serializing_if = "Option::is_none")]
1252    pub private_ip_address: Option<String>,
1253    /// <p>A list of the private IP addresses associated with the network interface. Includes the privateDnsName and privateIpAddress.</p>
1254    #[serde(rename = "privateIpAddresses")]
1255    #[serde(skip_serializing_if = "Option::is_none")]
1256    pub private_ip_addresses: Option<Vec<PrivateIp>>,
1257    /// <p>The name of a public DNS associated with the network interface.</p>
1258    #[serde(rename = "publicDnsName")]
1259    #[serde(skip_serializing_if = "Option::is_none")]
1260    pub public_dns_name: Option<String>,
1261    /// <p>The public IP address from which the network interface is reachable.</p>
1262    #[serde(rename = "publicIp")]
1263    #[serde(skip_serializing_if = "Option::is_none")]
1264    pub public_ip: Option<String>,
1265    /// <p>A list of the security groups associated with the network interface. Includes the groupId and groupName.</p>
1266    #[serde(rename = "securityGroups")]
1267    #[serde(skip_serializing_if = "Option::is_none")]
1268    pub security_groups: Option<Vec<SecurityGroup>>,
1269    /// <p>The ID of a subnet associated with the network interface.</p>
1270    #[serde(rename = "subnetId")]
1271    #[serde(skip_serializing_if = "Option::is_none")]
1272    pub subnet_id: Option<String>,
1273    /// <p>The ID of a VPC associated with the network interface.</p>
1274    #[serde(rename = "vpcId")]
1275    #[serde(skip_serializing_if = "Option::is_none")]
1276    pub vpc_id: Option<String>,
1277}
1278
1279#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1280#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1281pub struct PreviewAgentsRequest {
1282    /// <p>You can use this parameter to indicate the maximum number of items you want in the response. The default value is 10. The maximum value is 500.</p>
1283    #[serde(rename = "maxResults")]
1284    #[serde(skip_serializing_if = "Option::is_none")]
1285    pub max_results: Option<i64>,
1286    /// <p>You can use this parameter when paginating results. Set the value of this parameter to null on your first call to the <b>PreviewAgents</b> action. Subsequent calls to the action fill <b>nextToken</b> in the request with the value of <b>NextToken</b> from the previous response to continue listing data.</p>
1287    #[serde(rename = "nextToken")]
1288    #[serde(skip_serializing_if = "Option::is_none")]
1289    pub next_token: Option<String>,
1290    /// <p>The ARN of the assessment target whose agents you want to preview.</p>
1291    #[serde(rename = "previewAgentsArn")]
1292    pub preview_agents_arn: String,
1293}
1294
1295#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1296#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1297pub struct PreviewAgentsResponse {
1298    /// <p>The resulting list of agents.</p>
1299    #[serde(rename = "agentPreviews")]
1300    pub agent_previews: Vec<AgentPreview>,
1301    /// <p> When a response is generated, if there is more data to be listed, this parameter is present in the response and contains the value to use for the <b>nextToken</b> parameter in a subsequent pagination request. If there is no more data to be listed, this parameter is set to null.</p>
1302    #[serde(rename = "nextToken")]
1303    #[serde(skip_serializing_if = "Option::is_none")]
1304    pub next_token: Option<String>,
1305}
1306
1307/// <p>Contains information about a private IP address associated with a network interface. This data type is used as a response element in the <a>DescribeFindings</a> action.</p>
1308#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1309#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1310pub struct PrivateIp {
1311    /// <p>The DNS name of the private IP address.</p>
1312    #[serde(rename = "privateDnsName")]
1313    #[serde(skip_serializing_if = "Option::is_none")]
1314    pub private_dns_name: Option<String>,
1315    /// <p>The full IP address of the network inteface.</p>
1316    #[serde(rename = "privateIpAddress")]
1317    #[serde(skip_serializing_if = "Option::is_none")]
1318    pub private_ip_address: Option<String>,
1319}
1320
1321#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1322#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1323pub struct RegisterCrossAccountAccessRoleRequest {
1324    /// <p>The ARN of the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments. </p>
1325    #[serde(rename = "roleArn")]
1326    pub role_arn: String,
1327}
1328
1329#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1330#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1331pub struct RemoveAttributesFromFindingsRequest {
1332    /// <p>The array of attribute keys that you want to remove from specified findings.</p>
1333    #[serde(rename = "attributeKeys")]
1334    pub attribute_keys: Vec<String>,
1335    /// <p>The ARNs that specify the findings that you want to remove attributes from.</p>
1336    #[serde(rename = "findingArns")]
1337    pub finding_arns: Vec<String>,
1338}
1339
1340#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1341#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1342pub struct RemoveAttributesFromFindingsResponse {
1343    /// <p>Attributes details that cannot be described. An error code is provided for each failed item.</p>
1344    #[serde(rename = "failedItems")]
1345    pub failed_items: ::std::collections::HashMap<String, FailedItemDetails>,
1346}
1347
1348/// <p>Contains information about a resource group. The resource group defines a set of tags that, when queried, identify the AWS resources that make up the assessment target. This data type is used as the response element in the <a>DescribeResourceGroups</a> action.</p>
1349#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1350#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1351pub struct ResourceGroup {
1352    /// <p>The ARN of the resource group.</p>
1353    #[serde(rename = "arn")]
1354    pub arn: String,
1355    /// <p>The time at which resource group is created.</p>
1356    #[serde(rename = "createdAt")]
1357    pub created_at: f64,
1358    /// <p>The tags (key and value pairs) of the resource group. This data type property is used in the <a>CreateResourceGroup</a> action.</p>
1359    #[serde(rename = "tags")]
1360    pub tags: Vec<ResourceGroupTag>,
1361}
1362
1363/// <p>This data type is used as one of the elements of the <a>ResourceGroup</a> data type.</p>
1364#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1365pub struct ResourceGroupTag {
1366    /// <p>A tag key.</p>
1367    #[serde(rename = "key")]
1368    pub key: String,
1369    /// <p>The value assigned to a tag key.</p>
1370    #[serde(rename = "value")]
1371    #[serde(skip_serializing_if = "Option::is_none")]
1372    pub value: Option<String>,
1373}
1374
1375/// <p>Contains information about an Amazon Inspector rules package. This data type is used as the response element in the <a>DescribeRulesPackages</a> action.</p>
1376#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1377#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1378pub struct RulesPackage {
1379    /// <p>The ARN of the rules package.</p>
1380    #[serde(rename = "arn")]
1381    pub arn: String,
1382    /// <p>The description of the rules package.</p>
1383    #[serde(rename = "description")]
1384    #[serde(skip_serializing_if = "Option::is_none")]
1385    pub description: Option<String>,
1386    /// <p>The name of the rules package.</p>
1387    #[serde(rename = "name")]
1388    pub name: String,
1389    /// <p>The provider of the rules package.</p>
1390    #[serde(rename = "provider")]
1391    pub provider: String,
1392    /// <p>The version ID of the rules package.</p>
1393    #[serde(rename = "version")]
1394    pub version: String,
1395}
1396
1397/// <p>This data type contains key-value pairs that identify various Amazon resources.</p>
1398#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1399#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1400pub struct Scope {
1401    /// <p>The type of the scope.</p>
1402    #[serde(rename = "key")]
1403    #[serde(skip_serializing_if = "Option::is_none")]
1404    pub key: Option<String>,
1405    /// <p>The resource identifier for the specified scope type.</p>
1406    #[serde(rename = "value")]
1407    #[serde(skip_serializing_if = "Option::is_none")]
1408    pub value: Option<String>,
1409}
1410
1411/// <p>Contains information about a security group associated with a network interface. This data type is used as one of the elements of the <a>NetworkInterface</a> data type.</p>
1412#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1413#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1414pub struct SecurityGroup {
1415    /// <p>The ID of the security group.</p>
1416    #[serde(rename = "groupId")]
1417    #[serde(skip_serializing_if = "Option::is_none")]
1418    pub group_id: Option<String>,
1419    /// <p>The name of the security group.</p>
1420    #[serde(rename = "groupName")]
1421    #[serde(skip_serializing_if = "Option::is_none")]
1422    pub group_name: Option<String>,
1423}
1424
1425#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1426#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1427pub struct SetTagsForResourceRequest {
1428    /// <p>The ARN of the assessment template that you want to set tags to.</p>
1429    #[serde(rename = "resourceArn")]
1430    pub resource_arn: String,
1431    /// <p>A collection of key and value pairs that you want to set to the assessment template.</p>
1432    #[serde(rename = "tags")]
1433    #[serde(skip_serializing_if = "Option::is_none")]
1434    pub tags: Option<Vec<Tag>>,
1435}
1436
1437#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1438#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1439pub struct StartAssessmentRunRequest {
1440    /// <p>You can specify the name for the assessment run. The name must be unique for the assessment template whose ARN is used to start the assessment run.</p>
1441    #[serde(rename = "assessmentRunName")]
1442    #[serde(skip_serializing_if = "Option::is_none")]
1443    pub assessment_run_name: Option<String>,
1444    /// <p>The ARN of the assessment template of the assessment run that you want to start.</p>
1445    #[serde(rename = "assessmentTemplateArn")]
1446    pub assessment_template_arn: String,
1447}
1448
1449#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1450#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1451pub struct StartAssessmentRunResponse {
1452    /// <p>The ARN of the assessment run that has been started.</p>
1453    #[serde(rename = "assessmentRunArn")]
1454    pub assessment_run_arn: String,
1455}
1456
1457#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1458#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1459pub struct StopAssessmentRunRequest {
1460    /// <p>The ARN of the assessment run that you want to stop.</p>
1461    #[serde(rename = "assessmentRunArn")]
1462    pub assessment_run_arn: String,
1463    /// <p>An input option that can be set to either START_EVALUATION or SKIP_EVALUATION. START_EVALUATION (the default value), stops the AWS agent from collecting data and begins the results evaluation and the findings generation process. SKIP_EVALUATION cancels the assessment run immediately, after which no findings are generated.</p>
1464    #[serde(rename = "stopAction")]
1465    #[serde(skip_serializing_if = "Option::is_none")]
1466    pub stop_action: Option<String>,
1467}
1468
1469#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1470#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1471pub struct SubscribeToEventRequest {
1472    /// <p>The event for which you want to receive SNS notifications.</p>
1473    #[serde(rename = "event")]
1474    pub event: String,
1475    /// <p>The ARN of the assessment template that is used during the event for which you want to receive SNS notifications.</p>
1476    #[serde(rename = "resourceArn")]
1477    pub resource_arn: String,
1478    /// <p>The ARN of the SNS topic to which the SNS notifications are sent.</p>
1479    #[serde(rename = "topicArn")]
1480    pub topic_arn: String,
1481}
1482
1483/// <p>This data type is used as a response element in the <a>ListEventSubscriptions</a> action.</p>
1484#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1485#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1486pub struct Subscription {
1487    /// <p>The list of existing event subscriptions.</p>
1488    #[serde(rename = "eventSubscriptions")]
1489    pub event_subscriptions: Vec<EventSubscription>,
1490    /// <p>The ARN of the assessment template that is used during the event for which the SNS notification is sent.</p>
1491    #[serde(rename = "resourceArn")]
1492    pub resource_arn: String,
1493    /// <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the SNS notifications are sent.</p>
1494    #[serde(rename = "topicArn")]
1495    pub topic_arn: String,
1496}
1497
1498/// <p>A key and value pair. This data type is used as a request parameter in the <a>SetTagsForResource</a> action and a response element in the <a>ListTagsForResource</a> action.</p>
1499#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1500pub struct Tag {
1501    /// <p>A tag key.</p>
1502    #[serde(rename = "key")]
1503    pub key: String,
1504    /// <p>A value assigned to a tag key.</p>
1505    #[serde(rename = "value")]
1506    #[serde(skip_serializing_if = "Option::is_none")]
1507    pub value: Option<String>,
1508}
1509
1510/// <p>The metadata about the Amazon Inspector application data metrics collected by the agent. This data type is used as the response element in the <a>GetTelemetryMetadata</a> action.</p>
1511#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1512#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1513pub struct TelemetryMetadata {
1514    /// <p>The count of messages that the agent sends to the Amazon Inspector service.</p>
1515    #[serde(rename = "count")]
1516    pub count: i64,
1517    /// <p>The data size of messages that the agent sends to the Amazon Inspector service.</p>
1518    #[serde(rename = "dataSize")]
1519    #[serde(skip_serializing_if = "Option::is_none")]
1520    pub data_size: Option<i64>,
1521    /// <p>A specific type of behavioral data that is collected by the agent.</p>
1522    #[serde(rename = "messageType")]
1523    pub message_type: String,
1524}
1525
1526/// <p>This data type is used in the <a>AssessmentRunFilter</a> data type.</p>
1527#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1528#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1529pub struct TimestampRange {
1530    /// <p>The minimum value of the timestamp range.</p>
1531    #[serde(rename = "beginDate")]
1532    #[serde(skip_serializing_if = "Option::is_none")]
1533    pub begin_date: Option<f64>,
1534    /// <p>The maximum value of the timestamp range.</p>
1535    #[serde(rename = "endDate")]
1536    #[serde(skip_serializing_if = "Option::is_none")]
1537    pub end_date: Option<f64>,
1538}
1539
1540#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1541#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1542pub struct UnsubscribeFromEventRequest {
1543    /// <p>The event for which you want to stop receiving SNS notifications.</p>
1544    #[serde(rename = "event")]
1545    pub event: String,
1546    /// <p>The ARN of the assessment template that is used during the event for which you want to stop receiving SNS notifications.</p>
1547    #[serde(rename = "resourceArn")]
1548    pub resource_arn: String,
1549    /// <p>The ARN of the SNS topic to which SNS notifications are sent.</p>
1550    #[serde(rename = "topicArn")]
1551    pub topic_arn: String,
1552}
1553
1554#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1555#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1556pub struct UpdateAssessmentTargetRequest {
1557    /// <p>The ARN of the assessment target that you want to update.</p>
1558    #[serde(rename = "assessmentTargetArn")]
1559    pub assessment_target_arn: String,
1560    /// <p>The name of the assessment target that you want to update.</p>
1561    #[serde(rename = "assessmentTargetName")]
1562    pub assessment_target_name: String,
1563    /// <p>The ARN of the resource group that is used to specify the new resource group to associate with the assessment target.</p>
1564    #[serde(rename = "resourceGroupArn")]
1565    #[serde(skip_serializing_if = "Option::is_none")]
1566    pub resource_group_arn: Option<String>,
1567}
1568
1569/// Errors returned by AddAttributesToFindings
1570#[derive(Debug, PartialEq)]
1571pub enum AddAttributesToFindingsError {
1572    /// <p>You do not have required permissions to access the requested resource.</p>
1573    AccessDenied(String),
1574    /// <p>Internal server error.</p>
1575    Internal(String),
1576    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
1577    InvalidInput(String),
1578    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
1579    NoSuchEntity(String),
1580    /// <p>The serice is temporary unavailable.</p>
1581    ServiceTemporarilyUnavailable(String),
1582}
1583
1584impl AddAttributesToFindingsError {
1585    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddAttributesToFindingsError> {
1586        if let Some(err) = proto::json::Error::parse(&res) {
1587            match err.typ.as_str() {
1588                "AccessDeniedException" => {
1589                    return RusotoError::Service(AddAttributesToFindingsError::AccessDenied(
1590                        err.msg,
1591                    ))
1592                }
1593                "InternalException" => {
1594                    return RusotoError::Service(AddAttributesToFindingsError::Internal(err.msg))
1595                }
1596                "InvalidInputException" => {
1597                    return RusotoError::Service(AddAttributesToFindingsError::InvalidInput(
1598                        err.msg,
1599                    ))
1600                }
1601                "NoSuchEntityException" => {
1602                    return RusotoError::Service(AddAttributesToFindingsError::NoSuchEntity(
1603                        err.msg,
1604                    ))
1605                }
1606                "ServiceTemporarilyUnavailableException" => {
1607                    return RusotoError::Service(
1608                        AddAttributesToFindingsError::ServiceTemporarilyUnavailable(err.msg),
1609                    )
1610                }
1611                "ValidationException" => return RusotoError::Validation(err.msg),
1612                _ => {}
1613            }
1614        }
1615        RusotoError::Unknown(res)
1616    }
1617}
1618impl fmt::Display for AddAttributesToFindingsError {
1619    #[allow(unused_variables)]
1620    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1621        match *self {
1622            AddAttributesToFindingsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1623            AddAttributesToFindingsError::Internal(ref cause) => write!(f, "{}", cause),
1624            AddAttributesToFindingsError::InvalidInput(ref cause) => write!(f, "{}", cause),
1625            AddAttributesToFindingsError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
1626            AddAttributesToFindingsError::ServiceTemporarilyUnavailable(ref cause) => {
1627                write!(f, "{}", cause)
1628            }
1629        }
1630    }
1631}
1632impl Error for AddAttributesToFindingsError {}
1633/// Errors returned by CreateAssessmentTarget
1634#[derive(Debug, PartialEq)]
1635pub enum CreateAssessmentTargetError {
1636    /// <p>You do not have required permissions to access the requested resource.</p>
1637    AccessDenied(String),
1638    /// <p>Internal server error.</p>
1639    Internal(String),
1640    /// <p>Amazon Inspector cannot assume the cross-account role that it needs to list your EC2 instances during the assessment run.</p>
1641    InvalidCrossAccountRole(String),
1642    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
1643    InvalidInput(String),
1644    /// <p>The request was rejected because it attempted to create resources beyond the current AWS account limits. The error code describes the limit exceeded.</p>
1645    LimitExceeded(String),
1646    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
1647    NoSuchEntity(String),
1648    /// <p>The serice is temporary unavailable.</p>
1649    ServiceTemporarilyUnavailable(String),
1650}
1651
1652impl CreateAssessmentTargetError {
1653    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAssessmentTargetError> {
1654        if let Some(err) = proto::json::Error::parse(&res) {
1655            match err.typ.as_str() {
1656                "AccessDeniedException" => {
1657                    return RusotoError::Service(CreateAssessmentTargetError::AccessDenied(err.msg))
1658                }
1659                "InternalException" => {
1660                    return RusotoError::Service(CreateAssessmentTargetError::Internal(err.msg))
1661                }
1662                "InvalidCrossAccountRoleException" => {
1663                    return RusotoError::Service(
1664                        CreateAssessmentTargetError::InvalidCrossAccountRole(err.msg),
1665                    )
1666                }
1667                "InvalidInputException" => {
1668                    return RusotoError::Service(CreateAssessmentTargetError::InvalidInput(err.msg))
1669                }
1670                "LimitExceededException" => {
1671                    return RusotoError::Service(CreateAssessmentTargetError::LimitExceeded(
1672                        err.msg,
1673                    ))
1674                }
1675                "NoSuchEntityException" => {
1676                    return RusotoError::Service(CreateAssessmentTargetError::NoSuchEntity(err.msg))
1677                }
1678                "ServiceTemporarilyUnavailableException" => {
1679                    return RusotoError::Service(
1680                        CreateAssessmentTargetError::ServiceTemporarilyUnavailable(err.msg),
1681                    )
1682                }
1683                "ValidationException" => return RusotoError::Validation(err.msg),
1684                _ => {}
1685            }
1686        }
1687        RusotoError::Unknown(res)
1688    }
1689}
1690impl fmt::Display for CreateAssessmentTargetError {
1691    #[allow(unused_variables)]
1692    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1693        match *self {
1694            CreateAssessmentTargetError::AccessDenied(ref cause) => write!(f, "{}", cause),
1695            CreateAssessmentTargetError::Internal(ref cause) => write!(f, "{}", cause),
1696            CreateAssessmentTargetError::InvalidCrossAccountRole(ref cause) => {
1697                write!(f, "{}", cause)
1698            }
1699            CreateAssessmentTargetError::InvalidInput(ref cause) => write!(f, "{}", cause),
1700            CreateAssessmentTargetError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1701            CreateAssessmentTargetError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
1702            CreateAssessmentTargetError::ServiceTemporarilyUnavailable(ref cause) => {
1703                write!(f, "{}", cause)
1704            }
1705        }
1706    }
1707}
1708impl Error for CreateAssessmentTargetError {}
1709/// Errors returned by CreateAssessmentTemplate
1710#[derive(Debug, PartialEq)]
1711pub enum CreateAssessmentTemplateError {
1712    /// <p>You do not have required permissions to access the requested resource.</p>
1713    AccessDenied(String),
1714    /// <p>Internal server error.</p>
1715    Internal(String),
1716    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
1717    InvalidInput(String),
1718    /// <p>The request was rejected because it attempted to create resources beyond the current AWS account limits. The error code describes the limit exceeded.</p>
1719    LimitExceeded(String),
1720    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
1721    NoSuchEntity(String),
1722    /// <p>The serice is temporary unavailable.</p>
1723    ServiceTemporarilyUnavailable(String),
1724}
1725
1726impl CreateAssessmentTemplateError {
1727    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAssessmentTemplateError> {
1728        if let Some(err) = proto::json::Error::parse(&res) {
1729            match err.typ.as_str() {
1730                "AccessDeniedException" => {
1731                    return RusotoError::Service(CreateAssessmentTemplateError::AccessDenied(
1732                        err.msg,
1733                    ))
1734                }
1735                "InternalException" => {
1736                    return RusotoError::Service(CreateAssessmentTemplateError::Internal(err.msg))
1737                }
1738                "InvalidInputException" => {
1739                    return RusotoError::Service(CreateAssessmentTemplateError::InvalidInput(
1740                        err.msg,
1741                    ))
1742                }
1743                "LimitExceededException" => {
1744                    return RusotoError::Service(CreateAssessmentTemplateError::LimitExceeded(
1745                        err.msg,
1746                    ))
1747                }
1748                "NoSuchEntityException" => {
1749                    return RusotoError::Service(CreateAssessmentTemplateError::NoSuchEntity(
1750                        err.msg,
1751                    ))
1752                }
1753                "ServiceTemporarilyUnavailableException" => {
1754                    return RusotoError::Service(
1755                        CreateAssessmentTemplateError::ServiceTemporarilyUnavailable(err.msg),
1756                    )
1757                }
1758                "ValidationException" => return RusotoError::Validation(err.msg),
1759                _ => {}
1760            }
1761        }
1762        RusotoError::Unknown(res)
1763    }
1764}
1765impl fmt::Display for CreateAssessmentTemplateError {
1766    #[allow(unused_variables)]
1767    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1768        match *self {
1769            CreateAssessmentTemplateError::AccessDenied(ref cause) => write!(f, "{}", cause),
1770            CreateAssessmentTemplateError::Internal(ref cause) => write!(f, "{}", cause),
1771            CreateAssessmentTemplateError::InvalidInput(ref cause) => write!(f, "{}", cause),
1772            CreateAssessmentTemplateError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1773            CreateAssessmentTemplateError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
1774            CreateAssessmentTemplateError::ServiceTemporarilyUnavailable(ref cause) => {
1775                write!(f, "{}", cause)
1776            }
1777        }
1778    }
1779}
1780impl Error for CreateAssessmentTemplateError {}
1781/// Errors returned by CreateExclusionsPreview
1782#[derive(Debug, PartialEq)]
1783pub enum CreateExclusionsPreviewError {
1784    /// <p>You do not have required permissions to access the requested resource.</p>
1785    AccessDenied(String),
1786    /// <p>Internal server error.</p>
1787    Internal(String),
1788    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
1789    InvalidInput(String),
1790    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
1791    NoSuchEntity(String),
1792    /// <p>The request is rejected. The specified assessment template is currently generating an exclusions preview.</p>
1793    PreviewGenerationInProgress(String),
1794    /// <p>The serice is temporary unavailable.</p>
1795    ServiceTemporarilyUnavailable(String),
1796}
1797
1798impl CreateExclusionsPreviewError {
1799    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateExclusionsPreviewError> {
1800        if let Some(err) = proto::json::Error::parse(&res) {
1801            match err.typ.as_str() {
1802                "AccessDeniedException" => {
1803                    return RusotoError::Service(CreateExclusionsPreviewError::AccessDenied(
1804                        err.msg,
1805                    ))
1806                }
1807                "InternalException" => {
1808                    return RusotoError::Service(CreateExclusionsPreviewError::Internal(err.msg))
1809                }
1810                "InvalidInputException" => {
1811                    return RusotoError::Service(CreateExclusionsPreviewError::InvalidInput(
1812                        err.msg,
1813                    ))
1814                }
1815                "NoSuchEntityException" => {
1816                    return RusotoError::Service(CreateExclusionsPreviewError::NoSuchEntity(
1817                        err.msg,
1818                    ))
1819                }
1820                "PreviewGenerationInProgressException" => {
1821                    return RusotoError::Service(
1822                        CreateExclusionsPreviewError::PreviewGenerationInProgress(err.msg),
1823                    )
1824                }
1825                "ServiceTemporarilyUnavailableException" => {
1826                    return RusotoError::Service(
1827                        CreateExclusionsPreviewError::ServiceTemporarilyUnavailable(err.msg),
1828                    )
1829                }
1830                "ValidationException" => return RusotoError::Validation(err.msg),
1831                _ => {}
1832            }
1833        }
1834        RusotoError::Unknown(res)
1835    }
1836}
1837impl fmt::Display for CreateExclusionsPreviewError {
1838    #[allow(unused_variables)]
1839    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1840        match *self {
1841            CreateExclusionsPreviewError::AccessDenied(ref cause) => write!(f, "{}", cause),
1842            CreateExclusionsPreviewError::Internal(ref cause) => write!(f, "{}", cause),
1843            CreateExclusionsPreviewError::InvalidInput(ref cause) => write!(f, "{}", cause),
1844            CreateExclusionsPreviewError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
1845            CreateExclusionsPreviewError::PreviewGenerationInProgress(ref cause) => {
1846                write!(f, "{}", cause)
1847            }
1848            CreateExclusionsPreviewError::ServiceTemporarilyUnavailable(ref cause) => {
1849                write!(f, "{}", cause)
1850            }
1851        }
1852    }
1853}
1854impl Error for CreateExclusionsPreviewError {}
1855/// Errors returned by CreateResourceGroup
1856#[derive(Debug, PartialEq)]
1857pub enum CreateResourceGroupError {
1858    /// <p>You do not have required permissions to access the requested resource.</p>
1859    AccessDenied(String),
1860    /// <p>Internal server error.</p>
1861    Internal(String),
1862    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
1863    InvalidInput(String),
1864    /// <p>The request was rejected because it attempted to create resources beyond the current AWS account limits. The error code describes the limit exceeded.</p>
1865    LimitExceeded(String),
1866    /// <p>The serice is temporary unavailable.</p>
1867    ServiceTemporarilyUnavailable(String),
1868}
1869
1870impl CreateResourceGroupError {
1871    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateResourceGroupError> {
1872        if let Some(err) = proto::json::Error::parse(&res) {
1873            match err.typ.as_str() {
1874                "AccessDeniedException" => {
1875                    return RusotoError::Service(CreateResourceGroupError::AccessDenied(err.msg))
1876                }
1877                "InternalException" => {
1878                    return RusotoError::Service(CreateResourceGroupError::Internal(err.msg))
1879                }
1880                "InvalidInputException" => {
1881                    return RusotoError::Service(CreateResourceGroupError::InvalidInput(err.msg))
1882                }
1883                "LimitExceededException" => {
1884                    return RusotoError::Service(CreateResourceGroupError::LimitExceeded(err.msg))
1885                }
1886                "ServiceTemporarilyUnavailableException" => {
1887                    return RusotoError::Service(
1888                        CreateResourceGroupError::ServiceTemporarilyUnavailable(err.msg),
1889                    )
1890                }
1891                "ValidationException" => return RusotoError::Validation(err.msg),
1892                _ => {}
1893            }
1894        }
1895        RusotoError::Unknown(res)
1896    }
1897}
1898impl fmt::Display for CreateResourceGroupError {
1899    #[allow(unused_variables)]
1900    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1901        match *self {
1902            CreateResourceGroupError::AccessDenied(ref cause) => write!(f, "{}", cause),
1903            CreateResourceGroupError::Internal(ref cause) => write!(f, "{}", cause),
1904            CreateResourceGroupError::InvalidInput(ref cause) => write!(f, "{}", cause),
1905            CreateResourceGroupError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1906            CreateResourceGroupError::ServiceTemporarilyUnavailable(ref cause) => {
1907                write!(f, "{}", cause)
1908            }
1909        }
1910    }
1911}
1912impl Error for CreateResourceGroupError {}
1913/// Errors returned by DeleteAssessmentRun
1914#[derive(Debug, PartialEq)]
1915pub enum DeleteAssessmentRunError {
1916    /// <p>You do not have required permissions to access the requested resource.</p>
1917    AccessDenied(String),
1918    /// <p>You cannot perform a specified action if an assessment run is currently in progress.</p>
1919    AssessmentRunInProgress(String),
1920    /// <p>Internal server error.</p>
1921    Internal(String),
1922    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
1923    InvalidInput(String),
1924    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
1925    NoSuchEntity(String),
1926    /// <p>The serice is temporary unavailable.</p>
1927    ServiceTemporarilyUnavailable(String),
1928}
1929
1930impl DeleteAssessmentRunError {
1931    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAssessmentRunError> {
1932        if let Some(err) = proto::json::Error::parse(&res) {
1933            match err.typ.as_str() {
1934                "AccessDeniedException" => {
1935                    return RusotoError::Service(DeleteAssessmentRunError::AccessDenied(err.msg))
1936                }
1937                "AssessmentRunInProgressException" => {
1938                    return RusotoError::Service(DeleteAssessmentRunError::AssessmentRunInProgress(
1939                        err.msg,
1940                    ))
1941                }
1942                "InternalException" => {
1943                    return RusotoError::Service(DeleteAssessmentRunError::Internal(err.msg))
1944                }
1945                "InvalidInputException" => {
1946                    return RusotoError::Service(DeleteAssessmentRunError::InvalidInput(err.msg))
1947                }
1948                "NoSuchEntityException" => {
1949                    return RusotoError::Service(DeleteAssessmentRunError::NoSuchEntity(err.msg))
1950                }
1951                "ServiceTemporarilyUnavailableException" => {
1952                    return RusotoError::Service(
1953                        DeleteAssessmentRunError::ServiceTemporarilyUnavailable(err.msg),
1954                    )
1955                }
1956                "ValidationException" => return RusotoError::Validation(err.msg),
1957                _ => {}
1958            }
1959        }
1960        RusotoError::Unknown(res)
1961    }
1962}
1963impl fmt::Display for DeleteAssessmentRunError {
1964    #[allow(unused_variables)]
1965    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1966        match *self {
1967            DeleteAssessmentRunError::AccessDenied(ref cause) => write!(f, "{}", cause),
1968            DeleteAssessmentRunError::AssessmentRunInProgress(ref cause) => write!(f, "{}", cause),
1969            DeleteAssessmentRunError::Internal(ref cause) => write!(f, "{}", cause),
1970            DeleteAssessmentRunError::InvalidInput(ref cause) => write!(f, "{}", cause),
1971            DeleteAssessmentRunError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
1972            DeleteAssessmentRunError::ServiceTemporarilyUnavailable(ref cause) => {
1973                write!(f, "{}", cause)
1974            }
1975        }
1976    }
1977}
1978impl Error for DeleteAssessmentRunError {}
1979/// Errors returned by DeleteAssessmentTarget
1980#[derive(Debug, PartialEq)]
1981pub enum DeleteAssessmentTargetError {
1982    /// <p>You do not have required permissions to access the requested resource.</p>
1983    AccessDenied(String),
1984    /// <p>You cannot perform a specified action if an assessment run is currently in progress.</p>
1985    AssessmentRunInProgress(String),
1986    /// <p>Internal server error.</p>
1987    Internal(String),
1988    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
1989    InvalidInput(String),
1990    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
1991    NoSuchEntity(String),
1992    /// <p>The serice is temporary unavailable.</p>
1993    ServiceTemporarilyUnavailable(String),
1994}
1995
1996impl DeleteAssessmentTargetError {
1997    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAssessmentTargetError> {
1998        if let Some(err) = proto::json::Error::parse(&res) {
1999            match err.typ.as_str() {
2000                "AccessDeniedException" => {
2001                    return RusotoError::Service(DeleteAssessmentTargetError::AccessDenied(err.msg))
2002                }
2003                "AssessmentRunInProgressException" => {
2004                    return RusotoError::Service(
2005                        DeleteAssessmentTargetError::AssessmentRunInProgress(err.msg),
2006                    )
2007                }
2008                "InternalException" => {
2009                    return RusotoError::Service(DeleteAssessmentTargetError::Internal(err.msg))
2010                }
2011                "InvalidInputException" => {
2012                    return RusotoError::Service(DeleteAssessmentTargetError::InvalidInput(err.msg))
2013                }
2014                "NoSuchEntityException" => {
2015                    return RusotoError::Service(DeleteAssessmentTargetError::NoSuchEntity(err.msg))
2016                }
2017                "ServiceTemporarilyUnavailableException" => {
2018                    return RusotoError::Service(
2019                        DeleteAssessmentTargetError::ServiceTemporarilyUnavailable(err.msg),
2020                    )
2021                }
2022                "ValidationException" => return RusotoError::Validation(err.msg),
2023                _ => {}
2024            }
2025        }
2026        RusotoError::Unknown(res)
2027    }
2028}
2029impl fmt::Display for DeleteAssessmentTargetError {
2030    #[allow(unused_variables)]
2031    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2032        match *self {
2033            DeleteAssessmentTargetError::AccessDenied(ref cause) => write!(f, "{}", cause),
2034            DeleteAssessmentTargetError::AssessmentRunInProgress(ref cause) => {
2035                write!(f, "{}", cause)
2036            }
2037            DeleteAssessmentTargetError::Internal(ref cause) => write!(f, "{}", cause),
2038            DeleteAssessmentTargetError::InvalidInput(ref cause) => write!(f, "{}", cause),
2039            DeleteAssessmentTargetError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2040            DeleteAssessmentTargetError::ServiceTemporarilyUnavailable(ref cause) => {
2041                write!(f, "{}", cause)
2042            }
2043        }
2044    }
2045}
2046impl Error for DeleteAssessmentTargetError {}
2047/// Errors returned by DeleteAssessmentTemplate
2048#[derive(Debug, PartialEq)]
2049pub enum DeleteAssessmentTemplateError {
2050    /// <p>You do not have required permissions to access the requested resource.</p>
2051    AccessDenied(String),
2052    /// <p>You cannot perform a specified action if an assessment run is currently in progress.</p>
2053    AssessmentRunInProgress(String),
2054    /// <p>Internal server error.</p>
2055    Internal(String),
2056    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2057    InvalidInput(String),
2058    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2059    NoSuchEntity(String),
2060    /// <p>The serice is temporary unavailable.</p>
2061    ServiceTemporarilyUnavailable(String),
2062}
2063
2064impl DeleteAssessmentTemplateError {
2065    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAssessmentTemplateError> {
2066        if let Some(err) = proto::json::Error::parse(&res) {
2067            match err.typ.as_str() {
2068                "AccessDeniedException" => {
2069                    return RusotoError::Service(DeleteAssessmentTemplateError::AccessDenied(
2070                        err.msg,
2071                    ))
2072                }
2073                "AssessmentRunInProgressException" => {
2074                    return RusotoError::Service(
2075                        DeleteAssessmentTemplateError::AssessmentRunInProgress(err.msg),
2076                    )
2077                }
2078                "InternalException" => {
2079                    return RusotoError::Service(DeleteAssessmentTemplateError::Internal(err.msg))
2080                }
2081                "InvalidInputException" => {
2082                    return RusotoError::Service(DeleteAssessmentTemplateError::InvalidInput(
2083                        err.msg,
2084                    ))
2085                }
2086                "NoSuchEntityException" => {
2087                    return RusotoError::Service(DeleteAssessmentTemplateError::NoSuchEntity(
2088                        err.msg,
2089                    ))
2090                }
2091                "ServiceTemporarilyUnavailableException" => {
2092                    return RusotoError::Service(
2093                        DeleteAssessmentTemplateError::ServiceTemporarilyUnavailable(err.msg),
2094                    )
2095                }
2096                "ValidationException" => return RusotoError::Validation(err.msg),
2097                _ => {}
2098            }
2099        }
2100        RusotoError::Unknown(res)
2101    }
2102}
2103impl fmt::Display for DeleteAssessmentTemplateError {
2104    #[allow(unused_variables)]
2105    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2106        match *self {
2107            DeleteAssessmentTemplateError::AccessDenied(ref cause) => write!(f, "{}", cause),
2108            DeleteAssessmentTemplateError::AssessmentRunInProgress(ref cause) => {
2109                write!(f, "{}", cause)
2110            }
2111            DeleteAssessmentTemplateError::Internal(ref cause) => write!(f, "{}", cause),
2112            DeleteAssessmentTemplateError::InvalidInput(ref cause) => write!(f, "{}", cause),
2113            DeleteAssessmentTemplateError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2114            DeleteAssessmentTemplateError::ServiceTemporarilyUnavailable(ref cause) => {
2115                write!(f, "{}", cause)
2116            }
2117        }
2118    }
2119}
2120impl Error for DeleteAssessmentTemplateError {}
2121/// Errors returned by DescribeAssessmentRuns
2122#[derive(Debug, PartialEq)]
2123pub enum DescribeAssessmentRunsError {
2124    /// <p>Internal server error.</p>
2125    Internal(String),
2126    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2127    InvalidInput(String),
2128}
2129
2130impl DescribeAssessmentRunsError {
2131    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAssessmentRunsError> {
2132        if let Some(err) = proto::json::Error::parse(&res) {
2133            match err.typ.as_str() {
2134                "InternalException" => {
2135                    return RusotoError::Service(DescribeAssessmentRunsError::Internal(err.msg))
2136                }
2137                "InvalidInputException" => {
2138                    return RusotoError::Service(DescribeAssessmentRunsError::InvalidInput(err.msg))
2139                }
2140                "ValidationException" => return RusotoError::Validation(err.msg),
2141                _ => {}
2142            }
2143        }
2144        RusotoError::Unknown(res)
2145    }
2146}
2147impl fmt::Display for DescribeAssessmentRunsError {
2148    #[allow(unused_variables)]
2149    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2150        match *self {
2151            DescribeAssessmentRunsError::Internal(ref cause) => write!(f, "{}", cause),
2152            DescribeAssessmentRunsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2153        }
2154    }
2155}
2156impl Error for DescribeAssessmentRunsError {}
2157/// Errors returned by DescribeAssessmentTargets
2158#[derive(Debug, PartialEq)]
2159pub enum DescribeAssessmentTargetsError {
2160    /// <p>Internal server error.</p>
2161    Internal(String),
2162    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2163    InvalidInput(String),
2164}
2165
2166impl DescribeAssessmentTargetsError {
2167    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAssessmentTargetsError> {
2168        if let Some(err) = proto::json::Error::parse(&res) {
2169            match err.typ.as_str() {
2170                "InternalException" => {
2171                    return RusotoError::Service(DescribeAssessmentTargetsError::Internal(err.msg))
2172                }
2173                "InvalidInputException" => {
2174                    return RusotoError::Service(DescribeAssessmentTargetsError::InvalidInput(
2175                        err.msg,
2176                    ))
2177                }
2178                "ValidationException" => return RusotoError::Validation(err.msg),
2179                _ => {}
2180            }
2181        }
2182        RusotoError::Unknown(res)
2183    }
2184}
2185impl fmt::Display for DescribeAssessmentTargetsError {
2186    #[allow(unused_variables)]
2187    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2188        match *self {
2189            DescribeAssessmentTargetsError::Internal(ref cause) => write!(f, "{}", cause),
2190            DescribeAssessmentTargetsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2191        }
2192    }
2193}
2194impl Error for DescribeAssessmentTargetsError {}
2195/// Errors returned by DescribeAssessmentTemplates
2196#[derive(Debug, PartialEq)]
2197pub enum DescribeAssessmentTemplatesError {
2198    /// <p>Internal server error.</p>
2199    Internal(String),
2200    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2201    InvalidInput(String),
2202}
2203
2204impl DescribeAssessmentTemplatesError {
2205    pub fn from_response(
2206        res: BufferedHttpResponse,
2207    ) -> RusotoError<DescribeAssessmentTemplatesError> {
2208        if let Some(err) = proto::json::Error::parse(&res) {
2209            match err.typ.as_str() {
2210                "InternalException" => {
2211                    return RusotoError::Service(DescribeAssessmentTemplatesError::Internal(
2212                        err.msg,
2213                    ))
2214                }
2215                "InvalidInputException" => {
2216                    return RusotoError::Service(DescribeAssessmentTemplatesError::InvalidInput(
2217                        err.msg,
2218                    ))
2219                }
2220                "ValidationException" => return RusotoError::Validation(err.msg),
2221                _ => {}
2222            }
2223        }
2224        RusotoError::Unknown(res)
2225    }
2226}
2227impl fmt::Display for DescribeAssessmentTemplatesError {
2228    #[allow(unused_variables)]
2229    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2230        match *self {
2231            DescribeAssessmentTemplatesError::Internal(ref cause) => write!(f, "{}", cause),
2232            DescribeAssessmentTemplatesError::InvalidInput(ref cause) => write!(f, "{}", cause),
2233        }
2234    }
2235}
2236impl Error for DescribeAssessmentTemplatesError {}
2237/// Errors returned by DescribeCrossAccountAccessRole
2238#[derive(Debug, PartialEq)]
2239pub enum DescribeCrossAccountAccessRoleError {
2240    /// <p>Internal server error.</p>
2241    Internal(String),
2242}
2243
2244impl DescribeCrossAccountAccessRoleError {
2245    pub fn from_response(
2246        res: BufferedHttpResponse,
2247    ) -> RusotoError<DescribeCrossAccountAccessRoleError> {
2248        if let Some(err) = proto::json::Error::parse(&res) {
2249            match err.typ.as_str() {
2250                "InternalException" => {
2251                    return RusotoError::Service(DescribeCrossAccountAccessRoleError::Internal(
2252                        err.msg,
2253                    ))
2254                }
2255                "ValidationException" => return RusotoError::Validation(err.msg),
2256                _ => {}
2257            }
2258        }
2259        RusotoError::Unknown(res)
2260    }
2261}
2262impl fmt::Display for DescribeCrossAccountAccessRoleError {
2263    #[allow(unused_variables)]
2264    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2265        match *self {
2266            DescribeCrossAccountAccessRoleError::Internal(ref cause) => write!(f, "{}", cause),
2267        }
2268    }
2269}
2270impl Error for DescribeCrossAccountAccessRoleError {}
2271/// Errors returned by DescribeExclusions
2272#[derive(Debug, PartialEq)]
2273pub enum DescribeExclusionsError {
2274    /// <p>Internal server error.</p>
2275    Internal(String),
2276    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2277    InvalidInput(String),
2278}
2279
2280impl DescribeExclusionsError {
2281    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeExclusionsError> {
2282        if let Some(err) = proto::json::Error::parse(&res) {
2283            match err.typ.as_str() {
2284                "InternalException" => {
2285                    return RusotoError::Service(DescribeExclusionsError::Internal(err.msg))
2286                }
2287                "InvalidInputException" => {
2288                    return RusotoError::Service(DescribeExclusionsError::InvalidInput(err.msg))
2289                }
2290                "ValidationException" => return RusotoError::Validation(err.msg),
2291                _ => {}
2292            }
2293        }
2294        RusotoError::Unknown(res)
2295    }
2296}
2297impl fmt::Display for DescribeExclusionsError {
2298    #[allow(unused_variables)]
2299    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2300        match *self {
2301            DescribeExclusionsError::Internal(ref cause) => write!(f, "{}", cause),
2302            DescribeExclusionsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2303        }
2304    }
2305}
2306impl Error for DescribeExclusionsError {}
2307/// Errors returned by DescribeFindings
2308#[derive(Debug, PartialEq)]
2309pub enum DescribeFindingsError {
2310    /// <p>Internal server error.</p>
2311    Internal(String),
2312    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2313    InvalidInput(String),
2314}
2315
2316impl DescribeFindingsError {
2317    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeFindingsError> {
2318        if let Some(err) = proto::json::Error::parse(&res) {
2319            match err.typ.as_str() {
2320                "InternalException" => {
2321                    return RusotoError::Service(DescribeFindingsError::Internal(err.msg))
2322                }
2323                "InvalidInputException" => {
2324                    return RusotoError::Service(DescribeFindingsError::InvalidInput(err.msg))
2325                }
2326                "ValidationException" => return RusotoError::Validation(err.msg),
2327                _ => {}
2328            }
2329        }
2330        RusotoError::Unknown(res)
2331    }
2332}
2333impl fmt::Display for DescribeFindingsError {
2334    #[allow(unused_variables)]
2335    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2336        match *self {
2337            DescribeFindingsError::Internal(ref cause) => write!(f, "{}", cause),
2338            DescribeFindingsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2339        }
2340    }
2341}
2342impl Error for DescribeFindingsError {}
2343/// Errors returned by DescribeResourceGroups
2344#[derive(Debug, PartialEq)]
2345pub enum DescribeResourceGroupsError {
2346    /// <p>Internal server error.</p>
2347    Internal(String),
2348    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2349    InvalidInput(String),
2350}
2351
2352impl DescribeResourceGroupsError {
2353    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeResourceGroupsError> {
2354        if let Some(err) = proto::json::Error::parse(&res) {
2355            match err.typ.as_str() {
2356                "InternalException" => {
2357                    return RusotoError::Service(DescribeResourceGroupsError::Internal(err.msg))
2358                }
2359                "InvalidInputException" => {
2360                    return RusotoError::Service(DescribeResourceGroupsError::InvalidInput(err.msg))
2361                }
2362                "ValidationException" => return RusotoError::Validation(err.msg),
2363                _ => {}
2364            }
2365        }
2366        RusotoError::Unknown(res)
2367    }
2368}
2369impl fmt::Display for DescribeResourceGroupsError {
2370    #[allow(unused_variables)]
2371    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2372        match *self {
2373            DescribeResourceGroupsError::Internal(ref cause) => write!(f, "{}", cause),
2374            DescribeResourceGroupsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2375        }
2376    }
2377}
2378impl Error for DescribeResourceGroupsError {}
2379/// Errors returned by DescribeRulesPackages
2380#[derive(Debug, PartialEq)]
2381pub enum DescribeRulesPackagesError {
2382    /// <p>Internal server error.</p>
2383    Internal(String),
2384    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2385    InvalidInput(String),
2386}
2387
2388impl DescribeRulesPackagesError {
2389    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRulesPackagesError> {
2390        if let Some(err) = proto::json::Error::parse(&res) {
2391            match err.typ.as_str() {
2392                "InternalException" => {
2393                    return RusotoError::Service(DescribeRulesPackagesError::Internal(err.msg))
2394                }
2395                "InvalidInputException" => {
2396                    return RusotoError::Service(DescribeRulesPackagesError::InvalidInput(err.msg))
2397                }
2398                "ValidationException" => return RusotoError::Validation(err.msg),
2399                _ => {}
2400            }
2401        }
2402        RusotoError::Unknown(res)
2403    }
2404}
2405impl fmt::Display for DescribeRulesPackagesError {
2406    #[allow(unused_variables)]
2407    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2408        match *self {
2409            DescribeRulesPackagesError::Internal(ref cause) => write!(f, "{}", cause),
2410            DescribeRulesPackagesError::InvalidInput(ref cause) => write!(f, "{}", cause),
2411        }
2412    }
2413}
2414impl Error for DescribeRulesPackagesError {}
2415/// Errors returned by GetAssessmentReport
2416#[derive(Debug, PartialEq)]
2417pub enum GetAssessmentReportError {
2418    /// <p>You do not have required permissions to access the requested resource.</p>
2419    AccessDenied(String),
2420    /// <p>You cannot perform a specified action if an assessment run is currently in progress.</p>
2421    AssessmentRunInProgress(String),
2422    /// <p>Internal server error.</p>
2423    Internal(String),
2424    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2425    InvalidInput(String),
2426    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2427    NoSuchEntity(String),
2428    /// <p>The serice is temporary unavailable.</p>
2429    ServiceTemporarilyUnavailable(String),
2430    /// <p>Used by the <a>GetAssessmentReport</a> API. The request was rejected because you tried to generate a report for an assessment run that existed before reporting was supported in Amazon Inspector. You can only generate reports for assessment runs that took place or will take place after generating reports in Amazon Inspector became available.</p>
2431    UnsupportedFeature(String),
2432}
2433
2434impl GetAssessmentReportError {
2435    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAssessmentReportError> {
2436        if let Some(err) = proto::json::Error::parse(&res) {
2437            match err.typ.as_str() {
2438                "AccessDeniedException" => {
2439                    return RusotoError::Service(GetAssessmentReportError::AccessDenied(err.msg))
2440                }
2441                "AssessmentRunInProgressException" => {
2442                    return RusotoError::Service(GetAssessmentReportError::AssessmentRunInProgress(
2443                        err.msg,
2444                    ))
2445                }
2446                "InternalException" => {
2447                    return RusotoError::Service(GetAssessmentReportError::Internal(err.msg))
2448                }
2449                "InvalidInputException" => {
2450                    return RusotoError::Service(GetAssessmentReportError::InvalidInput(err.msg))
2451                }
2452                "NoSuchEntityException" => {
2453                    return RusotoError::Service(GetAssessmentReportError::NoSuchEntity(err.msg))
2454                }
2455                "ServiceTemporarilyUnavailableException" => {
2456                    return RusotoError::Service(
2457                        GetAssessmentReportError::ServiceTemporarilyUnavailable(err.msg),
2458                    )
2459                }
2460                "UnsupportedFeatureException" => {
2461                    return RusotoError::Service(GetAssessmentReportError::UnsupportedFeature(
2462                        err.msg,
2463                    ))
2464                }
2465                "ValidationException" => return RusotoError::Validation(err.msg),
2466                _ => {}
2467            }
2468        }
2469        RusotoError::Unknown(res)
2470    }
2471}
2472impl fmt::Display for GetAssessmentReportError {
2473    #[allow(unused_variables)]
2474    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2475        match *self {
2476            GetAssessmentReportError::AccessDenied(ref cause) => write!(f, "{}", cause),
2477            GetAssessmentReportError::AssessmentRunInProgress(ref cause) => write!(f, "{}", cause),
2478            GetAssessmentReportError::Internal(ref cause) => write!(f, "{}", cause),
2479            GetAssessmentReportError::InvalidInput(ref cause) => write!(f, "{}", cause),
2480            GetAssessmentReportError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2481            GetAssessmentReportError::ServiceTemporarilyUnavailable(ref cause) => {
2482                write!(f, "{}", cause)
2483            }
2484            GetAssessmentReportError::UnsupportedFeature(ref cause) => write!(f, "{}", cause),
2485        }
2486    }
2487}
2488impl Error for GetAssessmentReportError {}
2489/// Errors returned by GetExclusionsPreview
2490#[derive(Debug, PartialEq)]
2491pub enum GetExclusionsPreviewError {
2492    /// <p>You do not have required permissions to access the requested resource.</p>
2493    AccessDenied(String),
2494    /// <p>Internal server error.</p>
2495    Internal(String),
2496    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2497    InvalidInput(String),
2498    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2499    NoSuchEntity(String),
2500}
2501
2502impl GetExclusionsPreviewError {
2503    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetExclusionsPreviewError> {
2504        if let Some(err) = proto::json::Error::parse(&res) {
2505            match err.typ.as_str() {
2506                "AccessDeniedException" => {
2507                    return RusotoError::Service(GetExclusionsPreviewError::AccessDenied(err.msg))
2508                }
2509                "InternalException" => {
2510                    return RusotoError::Service(GetExclusionsPreviewError::Internal(err.msg))
2511                }
2512                "InvalidInputException" => {
2513                    return RusotoError::Service(GetExclusionsPreviewError::InvalidInput(err.msg))
2514                }
2515                "NoSuchEntityException" => {
2516                    return RusotoError::Service(GetExclusionsPreviewError::NoSuchEntity(err.msg))
2517                }
2518                "ValidationException" => return RusotoError::Validation(err.msg),
2519                _ => {}
2520            }
2521        }
2522        RusotoError::Unknown(res)
2523    }
2524}
2525impl fmt::Display for GetExclusionsPreviewError {
2526    #[allow(unused_variables)]
2527    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2528        match *self {
2529            GetExclusionsPreviewError::AccessDenied(ref cause) => write!(f, "{}", cause),
2530            GetExclusionsPreviewError::Internal(ref cause) => write!(f, "{}", cause),
2531            GetExclusionsPreviewError::InvalidInput(ref cause) => write!(f, "{}", cause),
2532            GetExclusionsPreviewError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2533        }
2534    }
2535}
2536impl Error for GetExclusionsPreviewError {}
2537/// Errors returned by GetTelemetryMetadata
2538#[derive(Debug, PartialEq)]
2539pub enum GetTelemetryMetadataError {
2540    /// <p>You do not have required permissions to access the requested resource.</p>
2541    AccessDenied(String),
2542    /// <p>Internal server error.</p>
2543    Internal(String),
2544    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2545    InvalidInput(String),
2546    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2547    NoSuchEntity(String),
2548}
2549
2550impl GetTelemetryMetadataError {
2551    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTelemetryMetadataError> {
2552        if let Some(err) = proto::json::Error::parse(&res) {
2553            match err.typ.as_str() {
2554                "AccessDeniedException" => {
2555                    return RusotoError::Service(GetTelemetryMetadataError::AccessDenied(err.msg))
2556                }
2557                "InternalException" => {
2558                    return RusotoError::Service(GetTelemetryMetadataError::Internal(err.msg))
2559                }
2560                "InvalidInputException" => {
2561                    return RusotoError::Service(GetTelemetryMetadataError::InvalidInput(err.msg))
2562                }
2563                "NoSuchEntityException" => {
2564                    return RusotoError::Service(GetTelemetryMetadataError::NoSuchEntity(err.msg))
2565                }
2566                "ValidationException" => return RusotoError::Validation(err.msg),
2567                _ => {}
2568            }
2569        }
2570        RusotoError::Unknown(res)
2571    }
2572}
2573impl fmt::Display for GetTelemetryMetadataError {
2574    #[allow(unused_variables)]
2575    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2576        match *self {
2577            GetTelemetryMetadataError::AccessDenied(ref cause) => write!(f, "{}", cause),
2578            GetTelemetryMetadataError::Internal(ref cause) => write!(f, "{}", cause),
2579            GetTelemetryMetadataError::InvalidInput(ref cause) => write!(f, "{}", cause),
2580            GetTelemetryMetadataError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2581        }
2582    }
2583}
2584impl Error for GetTelemetryMetadataError {}
2585/// Errors returned by ListAssessmentRunAgents
2586#[derive(Debug, PartialEq)]
2587pub enum ListAssessmentRunAgentsError {
2588    /// <p>You do not have required permissions to access the requested resource.</p>
2589    AccessDenied(String),
2590    /// <p>Internal server error.</p>
2591    Internal(String),
2592    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2593    InvalidInput(String),
2594    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2595    NoSuchEntity(String),
2596}
2597
2598impl ListAssessmentRunAgentsError {
2599    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAssessmentRunAgentsError> {
2600        if let Some(err) = proto::json::Error::parse(&res) {
2601            match err.typ.as_str() {
2602                "AccessDeniedException" => {
2603                    return RusotoError::Service(ListAssessmentRunAgentsError::AccessDenied(
2604                        err.msg,
2605                    ))
2606                }
2607                "InternalException" => {
2608                    return RusotoError::Service(ListAssessmentRunAgentsError::Internal(err.msg))
2609                }
2610                "InvalidInputException" => {
2611                    return RusotoError::Service(ListAssessmentRunAgentsError::InvalidInput(
2612                        err.msg,
2613                    ))
2614                }
2615                "NoSuchEntityException" => {
2616                    return RusotoError::Service(ListAssessmentRunAgentsError::NoSuchEntity(
2617                        err.msg,
2618                    ))
2619                }
2620                "ValidationException" => return RusotoError::Validation(err.msg),
2621                _ => {}
2622            }
2623        }
2624        RusotoError::Unknown(res)
2625    }
2626}
2627impl fmt::Display for ListAssessmentRunAgentsError {
2628    #[allow(unused_variables)]
2629    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2630        match *self {
2631            ListAssessmentRunAgentsError::AccessDenied(ref cause) => write!(f, "{}", cause),
2632            ListAssessmentRunAgentsError::Internal(ref cause) => write!(f, "{}", cause),
2633            ListAssessmentRunAgentsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2634            ListAssessmentRunAgentsError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2635        }
2636    }
2637}
2638impl Error for ListAssessmentRunAgentsError {}
2639/// Errors returned by ListAssessmentRuns
2640#[derive(Debug, PartialEq)]
2641pub enum ListAssessmentRunsError {
2642    /// <p>You do not have required permissions to access the requested resource.</p>
2643    AccessDenied(String),
2644    /// <p>Internal server error.</p>
2645    Internal(String),
2646    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2647    InvalidInput(String),
2648    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2649    NoSuchEntity(String),
2650}
2651
2652impl ListAssessmentRunsError {
2653    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAssessmentRunsError> {
2654        if let Some(err) = proto::json::Error::parse(&res) {
2655            match err.typ.as_str() {
2656                "AccessDeniedException" => {
2657                    return RusotoError::Service(ListAssessmentRunsError::AccessDenied(err.msg))
2658                }
2659                "InternalException" => {
2660                    return RusotoError::Service(ListAssessmentRunsError::Internal(err.msg))
2661                }
2662                "InvalidInputException" => {
2663                    return RusotoError::Service(ListAssessmentRunsError::InvalidInput(err.msg))
2664                }
2665                "NoSuchEntityException" => {
2666                    return RusotoError::Service(ListAssessmentRunsError::NoSuchEntity(err.msg))
2667                }
2668                "ValidationException" => return RusotoError::Validation(err.msg),
2669                _ => {}
2670            }
2671        }
2672        RusotoError::Unknown(res)
2673    }
2674}
2675impl fmt::Display for ListAssessmentRunsError {
2676    #[allow(unused_variables)]
2677    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2678        match *self {
2679            ListAssessmentRunsError::AccessDenied(ref cause) => write!(f, "{}", cause),
2680            ListAssessmentRunsError::Internal(ref cause) => write!(f, "{}", cause),
2681            ListAssessmentRunsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2682            ListAssessmentRunsError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2683        }
2684    }
2685}
2686impl Error for ListAssessmentRunsError {}
2687/// Errors returned by ListAssessmentTargets
2688#[derive(Debug, PartialEq)]
2689pub enum ListAssessmentTargetsError {
2690    /// <p>You do not have required permissions to access the requested resource.</p>
2691    AccessDenied(String),
2692    /// <p>Internal server error.</p>
2693    Internal(String),
2694    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2695    InvalidInput(String),
2696}
2697
2698impl ListAssessmentTargetsError {
2699    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAssessmentTargetsError> {
2700        if let Some(err) = proto::json::Error::parse(&res) {
2701            match err.typ.as_str() {
2702                "AccessDeniedException" => {
2703                    return RusotoError::Service(ListAssessmentTargetsError::AccessDenied(err.msg))
2704                }
2705                "InternalException" => {
2706                    return RusotoError::Service(ListAssessmentTargetsError::Internal(err.msg))
2707                }
2708                "InvalidInputException" => {
2709                    return RusotoError::Service(ListAssessmentTargetsError::InvalidInput(err.msg))
2710                }
2711                "ValidationException" => return RusotoError::Validation(err.msg),
2712                _ => {}
2713            }
2714        }
2715        RusotoError::Unknown(res)
2716    }
2717}
2718impl fmt::Display for ListAssessmentTargetsError {
2719    #[allow(unused_variables)]
2720    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2721        match *self {
2722            ListAssessmentTargetsError::AccessDenied(ref cause) => write!(f, "{}", cause),
2723            ListAssessmentTargetsError::Internal(ref cause) => write!(f, "{}", cause),
2724            ListAssessmentTargetsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2725        }
2726    }
2727}
2728impl Error for ListAssessmentTargetsError {}
2729/// Errors returned by ListAssessmentTemplates
2730#[derive(Debug, PartialEq)]
2731pub enum ListAssessmentTemplatesError {
2732    /// <p>You do not have required permissions to access the requested resource.</p>
2733    AccessDenied(String),
2734    /// <p>Internal server error.</p>
2735    Internal(String),
2736    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2737    InvalidInput(String),
2738    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2739    NoSuchEntity(String),
2740}
2741
2742impl ListAssessmentTemplatesError {
2743    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAssessmentTemplatesError> {
2744        if let Some(err) = proto::json::Error::parse(&res) {
2745            match err.typ.as_str() {
2746                "AccessDeniedException" => {
2747                    return RusotoError::Service(ListAssessmentTemplatesError::AccessDenied(
2748                        err.msg,
2749                    ))
2750                }
2751                "InternalException" => {
2752                    return RusotoError::Service(ListAssessmentTemplatesError::Internal(err.msg))
2753                }
2754                "InvalidInputException" => {
2755                    return RusotoError::Service(ListAssessmentTemplatesError::InvalidInput(
2756                        err.msg,
2757                    ))
2758                }
2759                "NoSuchEntityException" => {
2760                    return RusotoError::Service(ListAssessmentTemplatesError::NoSuchEntity(
2761                        err.msg,
2762                    ))
2763                }
2764                "ValidationException" => return RusotoError::Validation(err.msg),
2765                _ => {}
2766            }
2767        }
2768        RusotoError::Unknown(res)
2769    }
2770}
2771impl fmt::Display for ListAssessmentTemplatesError {
2772    #[allow(unused_variables)]
2773    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2774        match *self {
2775            ListAssessmentTemplatesError::AccessDenied(ref cause) => write!(f, "{}", cause),
2776            ListAssessmentTemplatesError::Internal(ref cause) => write!(f, "{}", cause),
2777            ListAssessmentTemplatesError::InvalidInput(ref cause) => write!(f, "{}", cause),
2778            ListAssessmentTemplatesError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2779        }
2780    }
2781}
2782impl Error for ListAssessmentTemplatesError {}
2783/// Errors returned by ListEventSubscriptions
2784#[derive(Debug, PartialEq)]
2785pub enum ListEventSubscriptionsError {
2786    /// <p>You do not have required permissions to access the requested resource.</p>
2787    AccessDenied(String),
2788    /// <p>Internal server error.</p>
2789    Internal(String),
2790    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2791    InvalidInput(String),
2792    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2793    NoSuchEntity(String),
2794}
2795
2796impl ListEventSubscriptionsError {
2797    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListEventSubscriptionsError> {
2798        if let Some(err) = proto::json::Error::parse(&res) {
2799            match err.typ.as_str() {
2800                "AccessDeniedException" => {
2801                    return RusotoError::Service(ListEventSubscriptionsError::AccessDenied(err.msg))
2802                }
2803                "InternalException" => {
2804                    return RusotoError::Service(ListEventSubscriptionsError::Internal(err.msg))
2805                }
2806                "InvalidInputException" => {
2807                    return RusotoError::Service(ListEventSubscriptionsError::InvalidInput(err.msg))
2808                }
2809                "NoSuchEntityException" => {
2810                    return RusotoError::Service(ListEventSubscriptionsError::NoSuchEntity(err.msg))
2811                }
2812                "ValidationException" => return RusotoError::Validation(err.msg),
2813                _ => {}
2814            }
2815        }
2816        RusotoError::Unknown(res)
2817    }
2818}
2819impl fmt::Display for ListEventSubscriptionsError {
2820    #[allow(unused_variables)]
2821    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2822        match *self {
2823            ListEventSubscriptionsError::AccessDenied(ref cause) => write!(f, "{}", cause),
2824            ListEventSubscriptionsError::Internal(ref cause) => write!(f, "{}", cause),
2825            ListEventSubscriptionsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2826            ListEventSubscriptionsError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2827        }
2828    }
2829}
2830impl Error for ListEventSubscriptionsError {}
2831/// Errors returned by ListExclusions
2832#[derive(Debug, PartialEq)]
2833pub enum ListExclusionsError {
2834    /// <p>You do not have required permissions to access the requested resource.</p>
2835    AccessDenied(String),
2836    /// <p>Internal server error.</p>
2837    Internal(String),
2838    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2839    InvalidInput(String),
2840    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2841    NoSuchEntity(String),
2842}
2843
2844impl ListExclusionsError {
2845    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListExclusionsError> {
2846        if let Some(err) = proto::json::Error::parse(&res) {
2847            match err.typ.as_str() {
2848                "AccessDeniedException" => {
2849                    return RusotoError::Service(ListExclusionsError::AccessDenied(err.msg))
2850                }
2851                "InternalException" => {
2852                    return RusotoError::Service(ListExclusionsError::Internal(err.msg))
2853                }
2854                "InvalidInputException" => {
2855                    return RusotoError::Service(ListExclusionsError::InvalidInput(err.msg))
2856                }
2857                "NoSuchEntityException" => {
2858                    return RusotoError::Service(ListExclusionsError::NoSuchEntity(err.msg))
2859                }
2860                "ValidationException" => return RusotoError::Validation(err.msg),
2861                _ => {}
2862            }
2863        }
2864        RusotoError::Unknown(res)
2865    }
2866}
2867impl fmt::Display for ListExclusionsError {
2868    #[allow(unused_variables)]
2869    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2870        match *self {
2871            ListExclusionsError::AccessDenied(ref cause) => write!(f, "{}", cause),
2872            ListExclusionsError::Internal(ref cause) => write!(f, "{}", cause),
2873            ListExclusionsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2874            ListExclusionsError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2875        }
2876    }
2877}
2878impl Error for ListExclusionsError {}
2879/// Errors returned by ListFindings
2880#[derive(Debug, PartialEq)]
2881pub enum ListFindingsError {
2882    /// <p>You do not have required permissions to access the requested resource.</p>
2883    AccessDenied(String),
2884    /// <p>Internal server error.</p>
2885    Internal(String),
2886    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2887    InvalidInput(String),
2888    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2889    NoSuchEntity(String),
2890}
2891
2892impl ListFindingsError {
2893    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFindingsError> {
2894        if let Some(err) = proto::json::Error::parse(&res) {
2895            match err.typ.as_str() {
2896                "AccessDeniedException" => {
2897                    return RusotoError::Service(ListFindingsError::AccessDenied(err.msg))
2898                }
2899                "InternalException" => {
2900                    return RusotoError::Service(ListFindingsError::Internal(err.msg))
2901                }
2902                "InvalidInputException" => {
2903                    return RusotoError::Service(ListFindingsError::InvalidInput(err.msg))
2904                }
2905                "NoSuchEntityException" => {
2906                    return RusotoError::Service(ListFindingsError::NoSuchEntity(err.msg))
2907                }
2908                "ValidationException" => return RusotoError::Validation(err.msg),
2909                _ => {}
2910            }
2911        }
2912        RusotoError::Unknown(res)
2913    }
2914}
2915impl fmt::Display for ListFindingsError {
2916    #[allow(unused_variables)]
2917    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2918        match *self {
2919            ListFindingsError::AccessDenied(ref cause) => write!(f, "{}", cause),
2920            ListFindingsError::Internal(ref cause) => write!(f, "{}", cause),
2921            ListFindingsError::InvalidInput(ref cause) => write!(f, "{}", cause),
2922            ListFindingsError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
2923        }
2924    }
2925}
2926impl Error for ListFindingsError {}
2927/// Errors returned by ListRulesPackages
2928#[derive(Debug, PartialEq)]
2929pub enum ListRulesPackagesError {
2930    /// <p>You do not have required permissions to access the requested resource.</p>
2931    AccessDenied(String),
2932    /// <p>Internal server error.</p>
2933    Internal(String),
2934    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2935    InvalidInput(String),
2936}
2937
2938impl ListRulesPackagesError {
2939    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRulesPackagesError> {
2940        if let Some(err) = proto::json::Error::parse(&res) {
2941            match err.typ.as_str() {
2942                "AccessDeniedException" => {
2943                    return RusotoError::Service(ListRulesPackagesError::AccessDenied(err.msg))
2944                }
2945                "InternalException" => {
2946                    return RusotoError::Service(ListRulesPackagesError::Internal(err.msg))
2947                }
2948                "InvalidInputException" => {
2949                    return RusotoError::Service(ListRulesPackagesError::InvalidInput(err.msg))
2950                }
2951                "ValidationException" => return RusotoError::Validation(err.msg),
2952                _ => {}
2953            }
2954        }
2955        RusotoError::Unknown(res)
2956    }
2957}
2958impl fmt::Display for ListRulesPackagesError {
2959    #[allow(unused_variables)]
2960    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2961        match *self {
2962            ListRulesPackagesError::AccessDenied(ref cause) => write!(f, "{}", cause),
2963            ListRulesPackagesError::Internal(ref cause) => write!(f, "{}", cause),
2964            ListRulesPackagesError::InvalidInput(ref cause) => write!(f, "{}", cause),
2965        }
2966    }
2967}
2968impl Error for ListRulesPackagesError {}
2969/// Errors returned by ListTagsForResource
2970#[derive(Debug, PartialEq)]
2971pub enum ListTagsForResourceError {
2972    /// <p>You do not have required permissions to access the requested resource.</p>
2973    AccessDenied(String),
2974    /// <p>Internal server error.</p>
2975    Internal(String),
2976    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
2977    InvalidInput(String),
2978    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
2979    NoSuchEntity(String),
2980}
2981
2982impl ListTagsForResourceError {
2983    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
2984        if let Some(err) = proto::json::Error::parse(&res) {
2985            match err.typ.as_str() {
2986                "AccessDeniedException" => {
2987                    return RusotoError::Service(ListTagsForResourceError::AccessDenied(err.msg))
2988                }
2989                "InternalException" => {
2990                    return RusotoError::Service(ListTagsForResourceError::Internal(err.msg))
2991                }
2992                "InvalidInputException" => {
2993                    return RusotoError::Service(ListTagsForResourceError::InvalidInput(err.msg))
2994                }
2995                "NoSuchEntityException" => {
2996                    return RusotoError::Service(ListTagsForResourceError::NoSuchEntity(err.msg))
2997                }
2998                "ValidationException" => return RusotoError::Validation(err.msg),
2999                _ => {}
3000            }
3001        }
3002        RusotoError::Unknown(res)
3003    }
3004}
3005impl fmt::Display for ListTagsForResourceError {
3006    #[allow(unused_variables)]
3007    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3008        match *self {
3009            ListTagsForResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
3010            ListTagsForResourceError::Internal(ref cause) => write!(f, "{}", cause),
3011            ListTagsForResourceError::InvalidInput(ref cause) => write!(f, "{}", cause),
3012            ListTagsForResourceError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3013        }
3014    }
3015}
3016impl Error for ListTagsForResourceError {}
3017/// Errors returned by PreviewAgents
3018#[derive(Debug, PartialEq)]
3019pub enum PreviewAgentsError {
3020    /// <p>You do not have required permissions to access the requested resource.</p>
3021    AccessDenied(String),
3022    /// <p>Internal server error.</p>
3023    Internal(String),
3024    /// <p>Amazon Inspector cannot assume the cross-account role that it needs to list your EC2 instances during the assessment run.</p>
3025    InvalidCrossAccountRole(String),
3026    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3027    InvalidInput(String),
3028    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
3029    NoSuchEntity(String),
3030}
3031
3032impl PreviewAgentsError {
3033    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PreviewAgentsError> {
3034        if let Some(err) = proto::json::Error::parse(&res) {
3035            match err.typ.as_str() {
3036                "AccessDeniedException" => {
3037                    return RusotoError::Service(PreviewAgentsError::AccessDenied(err.msg))
3038                }
3039                "InternalException" => {
3040                    return RusotoError::Service(PreviewAgentsError::Internal(err.msg))
3041                }
3042                "InvalidCrossAccountRoleException" => {
3043                    return RusotoError::Service(PreviewAgentsError::InvalidCrossAccountRole(
3044                        err.msg,
3045                    ))
3046                }
3047                "InvalidInputException" => {
3048                    return RusotoError::Service(PreviewAgentsError::InvalidInput(err.msg))
3049                }
3050                "NoSuchEntityException" => {
3051                    return RusotoError::Service(PreviewAgentsError::NoSuchEntity(err.msg))
3052                }
3053                "ValidationException" => return RusotoError::Validation(err.msg),
3054                _ => {}
3055            }
3056        }
3057        RusotoError::Unknown(res)
3058    }
3059}
3060impl fmt::Display for PreviewAgentsError {
3061    #[allow(unused_variables)]
3062    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3063        match *self {
3064            PreviewAgentsError::AccessDenied(ref cause) => write!(f, "{}", cause),
3065            PreviewAgentsError::Internal(ref cause) => write!(f, "{}", cause),
3066            PreviewAgentsError::InvalidCrossAccountRole(ref cause) => write!(f, "{}", cause),
3067            PreviewAgentsError::InvalidInput(ref cause) => write!(f, "{}", cause),
3068            PreviewAgentsError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3069        }
3070    }
3071}
3072impl Error for PreviewAgentsError {}
3073/// Errors returned by RegisterCrossAccountAccessRole
3074#[derive(Debug, PartialEq)]
3075pub enum RegisterCrossAccountAccessRoleError {
3076    /// <p>You do not have required permissions to access the requested resource.</p>
3077    AccessDenied(String),
3078    /// <p>Internal server error.</p>
3079    Internal(String),
3080    /// <p>Amazon Inspector cannot assume the cross-account role that it needs to list your EC2 instances during the assessment run.</p>
3081    InvalidCrossAccountRole(String),
3082    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3083    InvalidInput(String),
3084    /// <p>The serice is temporary unavailable.</p>
3085    ServiceTemporarilyUnavailable(String),
3086}
3087
3088impl RegisterCrossAccountAccessRoleError {
3089    pub fn from_response(
3090        res: BufferedHttpResponse,
3091    ) -> RusotoError<RegisterCrossAccountAccessRoleError> {
3092        if let Some(err) = proto::json::Error::parse(&res) {
3093            match err.typ.as_str() {
3094                "AccessDeniedException" => {
3095                    return RusotoError::Service(RegisterCrossAccountAccessRoleError::AccessDenied(
3096                        err.msg,
3097                    ))
3098                }
3099                "InternalException" => {
3100                    return RusotoError::Service(RegisterCrossAccountAccessRoleError::Internal(
3101                        err.msg,
3102                    ))
3103                }
3104                "InvalidCrossAccountRoleException" => {
3105                    return RusotoError::Service(
3106                        RegisterCrossAccountAccessRoleError::InvalidCrossAccountRole(err.msg),
3107                    )
3108                }
3109                "InvalidInputException" => {
3110                    return RusotoError::Service(RegisterCrossAccountAccessRoleError::InvalidInput(
3111                        err.msg,
3112                    ))
3113                }
3114                "ServiceTemporarilyUnavailableException" => {
3115                    return RusotoError::Service(
3116                        RegisterCrossAccountAccessRoleError::ServiceTemporarilyUnavailable(err.msg),
3117                    )
3118                }
3119                "ValidationException" => return RusotoError::Validation(err.msg),
3120                _ => {}
3121            }
3122        }
3123        RusotoError::Unknown(res)
3124    }
3125}
3126impl fmt::Display for RegisterCrossAccountAccessRoleError {
3127    #[allow(unused_variables)]
3128    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3129        match *self {
3130            RegisterCrossAccountAccessRoleError::AccessDenied(ref cause) => write!(f, "{}", cause),
3131            RegisterCrossAccountAccessRoleError::Internal(ref cause) => write!(f, "{}", cause),
3132            RegisterCrossAccountAccessRoleError::InvalidCrossAccountRole(ref cause) => {
3133                write!(f, "{}", cause)
3134            }
3135            RegisterCrossAccountAccessRoleError::InvalidInput(ref cause) => write!(f, "{}", cause),
3136            RegisterCrossAccountAccessRoleError::ServiceTemporarilyUnavailable(ref cause) => {
3137                write!(f, "{}", cause)
3138            }
3139        }
3140    }
3141}
3142impl Error for RegisterCrossAccountAccessRoleError {}
3143/// Errors returned by RemoveAttributesFromFindings
3144#[derive(Debug, PartialEq)]
3145pub enum RemoveAttributesFromFindingsError {
3146    /// <p>You do not have required permissions to access the requested resource.</p>
3147    AccessDenied(String),
3148    /// <p>Internal server error.</p>
3149    Internal(String),
3150    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3151    InvalidInput(String),
3152    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
3153    NoSuchEntity(String),
3154    /// <p>The serice is temporary unavailable.</p>
3155    ServiceTemporarilyUnavailable(String),
3156}
3157
3158impl RemoveAttributesFromFindingsError {
3159    pub fn from_response(
3160        res: BufferedHttpResponse,
3161    ) -> RusotoError<RemoveAttributesFromFindingsError> {
3162        if let Some(err) = proto::json::Error::parse(&res) {
3163            match err.typ.as_str() {
3164                "AccessDeniedException" => {
3165                    return RusotoError::Service(RemoveAttributesFromFindingsError::AccessDenied(
3166                        err.msg,
3167                    ))
3168                }
3169                "InternalException" => {
3170                    return RusotoError::Service(RemoveAttributesFromFindingsError::Internal(
3171                        err.msg,
3172                    ))
3173                }
3174                "InvalidInputException" => {
3175                    return RusotoError::Service(RemoveAttributesFromFindingsError::InvalidInput(
3176                        err.msg,
3177                    ))
3178                }
3179                "NoSuchEntityException" => {
3180                    return RusotoError::Service(RemoveAttributesFromFindingsError::NoSuchEntity(
3181                        err.msg,
3182                    ))
3183                }
3184                "ServiceTemporarilyUnavailableException" => {
3185                    return RusotoError::Service(
3186                        RemoveAttributesFromFindingsError::ServiceTemporarilyUnavailable(err.msg),
3187                    )
3188                }
3189                "ValidationException" => return RusotoError::Validation(err.msg),
3190                _ => {}
3191            }
3192        }
3193        RusotoError::Unknown(res)
3194    }
3195}
3196impl fmt::Display for RemoveAttributesFromFindingsError {
3197    #[allow(unused_variables)]
3198    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3199        match *self {
3200            RemoveAttributesFromFindingsError::AccessDenied(ref cause) => write!(f, "{}", cause),
3201            RemoveAttributesFromFindingsError::Internal(ref cause) => write!(f, "{}", cause),
3202            RemoveAttributesFromFindingsError::InvalidInput(ref cause) => write!(f, "{}", cause),
3203            RemoveAttributesFromFindingsError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3204            RemoveAttributesFromFindingsError::ServiceTemporarilyUnavailable(ref cause) => {
3205                write!(f, "{}", cause)
3206            }
3207        }
3208    }
3209}
3210impl Error for RemoveAttributesFromFindingsError {}
3211/// Errors returned by SetTagsForResource
3212#[derive(Debug, PartialEq)]
3213pub enum SetTagsForResourceError {
3214    /// <p>You do not have required permissions to access the requested resource.</p>
3215    AccessDenied(String),
3216    /// <p>Internal server error.</p>
3217    Internal(String),
3218    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3219    InvalidInput(String),
3220    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
3221    NoSuchEntity(String),
3222    /// <p>The serice is temporary unavailable.</p>
3223    ServiceTemporarilyUnavailable(String),
3224}
3225
3226impl SetTagsForResourceError {
3227    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetTagsForResourceError> {
3228        if let Some(err) = proto::json::Error::parse(&res) {
3229            match err.typ.as_str() {
3230                "AccessDeniedException" => {
3231                    return RusotoError::Service(SetTagsForResourceError::AccessDenied(err.msg))
3232                }
3233                "InternalException" => {
3234                    return RusotoError::Service(SetTagsForResourceError::Internal(err.msg))
3235                }
3236                "InvalidInputException" => {
3237                    return RusotoError::Service(SetTagsForResourceError::InvalidInput(err.msg))
3238                }
3239                "NoSuchEntityException" => {
3240                    return RusotoError::Service(SetTagsForResourceError::NoSuchEntity(err.msg))
3241                }
3242                "ServiceTemporarilyUnavailableException" => {
3243                    return RusotoError::Service(
3244                        SetTagsForResourceError::ServiceTemporarilyUnavailable(err.msg),
3245                    )
3246                }
3247                "ValidationException" => return RusotoError::Validation(err.msg),
3248                _ => {}
3249            }
3250        }
3251        RusotoError::Unknown(res)
3252    }
3253}
3254impl fmt::Display for SetTagsForResourceError {
3255    #[allow(unused_variables)]
3256    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3257        match *self {
3258            SetTagsForResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
3259            SetTagsForResourceError::Internal(ref cause) => write!(f, "{}", cause),
3260            SetTagsForResourceError::InvalidInput(ref cause) => write!(f, "{}", cause),
3261            SetTagsForResourceError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3262            SetTagsForResourceError::ServiceTemporarilyUnavailable(ref cause) => {
3263                write!(f, "{}", cause)
3264            }
3265        }
3266    }
3267}
3268impl Error for SetTagsForResourceError {}
3269/// Errors returned by StartAssessmentRun
3270#[derive(Debug, PartialEq)]
3271pub enum StartAssessmentRunError {
3272    /// <p>You do not have required permissions to access the requested resource.</p>
3273    AccessDenied(String),
3274    /// <p>You started an assessment run, but one of the instances is already participating in another assessment run.</p>
3275    AgentsAlreadyRunningAssessment(String),
3276    /// <p>Internal server error.</p>
3277    Internal(String),
3278    /// <p>Amazon Inspector cannot assume the cross-account role that it needs to list your EC2 instances during the assessment run.</p>
3279    InvalidCrossAccountRole(String),
3280    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3281    InvalidInput(String),
3282    /// <p>The request was rejected because it attempted to create resources beyond the current AWS account limits. The error code describes the limit exceeded.</p>
3283    LimitExceeded(String),
3284    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
3285    NoSuchEntity(String),
3286    /// <p>The serice is temporary unavailable.</p>
3287    ServiceTemporarilyUnavailable(String),
3288}
3289
3290impl StartAssessmentRunError {
3291    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartAssessmentRunError> {
3292        if let Some(err) = proto::json::Error::parse(&res) {
3293            match err.typ.as_str() {
3294                "AccessDeniedException" => {
3295                    return RusotoError::Service(StartAssessmentRunError::AccessDenied(err.msg))
3296                }
3297                "AgentsAlreadyRunningAssessmentException" => {
3298                    return RusotoError::Service(
3299                        StartAssessmentRunError::AgentsAlreadyRunningAssessment(err.msg),
3300                    )
3301                }
3302                "InternalException" => {
3303                    return RusotoError::Service(StartAssessmentRunError::Internal(err.msg))
3304                }
3305                "InvalidCrossAccountRoleException" => {
3306                    return RusotoError::Service(StartAssessmentRunError::InvalidCrossAccountRole(
3307                        err.msg,
3308                    ))
3309                }
3310                "InvalidInputException" => {
3311                    return RusotoError::Service(StartAssessmentRunError::InvalidInput(err.msg))
3312                }
3313                "LimitExceededException" => {
3314                    return RusotoError::Service(StartAssessmentRunError::LimitExceeded(err.msg))
3315                }
3316                "NoSuchEntityException" => {
3317                    return RusotoError::Service(StartAssessmentRunError::NoSuchEntity(err.msg))
3318                }
3319                "ServiceTemporarilyUnavailableException" => {
3320                    return RusotoError::Service(
3321                        StartAssessmentRunError::ServiceTemporarilyUnavailable(err.msg),
3322                    )
3323                }
3324                "ValidationException" => return RusotoError::Validation(err.msg),
3325                _ => {}
3326            }
3327        }
3328        RusotoError::Unknown(res)
3329    }
3330}
3331impl fmt::Display for StartAssessmentRunError {
3332    #[allow(unused_variables)]
3333    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3334        match *self {
3335            StartAssessmentRunError::AccessDenied(ref cause) => write!(f, "{}", cause),
3336            StartAssessmentRunError::AgentsAlreadyRunningAssessment(ref cause) => {
3337                write!(f, "{}", cause)
3338            }
3339            StartAssessmentRunError::Internal(ref cause) => write!(f, "{}", cause),
3340            StartAssessmentRunError::InvalidCrossAccountRole(ref cause) => write!(f, "{}", cause),
3341            StartAssessmentRunError::InvalidInput(ref cause) => write!(f, "{}", cause),
3342            StartAssessmentRunError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3343            StartAssessmentRunError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3344            StartAssessmentRunError::ServiceTemporarilyUnavailable(ref cause) => {
3345                write!(f, "{}", cause)
3346            }
3347        }
3348    }
3349}
3350impl Error for StartAssessmentRunError {}
3351/// Errors returned by StopAssessmentRun
3352#[derive(Debug, PartialEq)]
3353pub enum StopAssessmentRunError {
3354    /// <p>You do not have required permissions to access the requested resource.</p>
3355    AccessDenied(String),
3356    /// <p>Internal server error.</p>
3357    Internal(String),
3358    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3359    InvalidInput(String),
3360    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
3361    NoSuchEntity(String),
3362    /// <p>The serice is temporary unavailable.</p>
3363    ServiceTemporarilyUnavailable(String),
3364}
3365
3366impl StopAssessmentRunError {
3367    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopAssessmentRunError> {
3368        if let Some(err) = proto::json::Error::parse(&res) {
3369            match err.typ.as_str() {
3370                "AccessDeniedException" => {
3371                    return RusotoError::Service(StopAssessmentRunError::AccessDenied(err.msg))
3372                }
3373                "InternalException" => {
3374                    return RusotoError::Service(StopAssessmentRunError::Internal(err.msg))
3375                }
3376                "InvalidInputException" => {
3377                    return RusotoError::Service(StopAssessmentRunError::InvalidInput(err.msg))
3378                }
3379                "NoSuchEntityException" => {
3380                    return RusotoError::Service(StopAssessmentRunError::NoSuchEntity(err.msg))
3381                }
3382                "ServiceTemporarilyUnavailableException" => {
3383                    return RusotoError::Service(
3384                        StopAssessmentRunError::ServiceTemporarilyUnavailable(err.msg),
3385                    )
3386                }
3387                "ValidationException" => return RusotoError::Validation(err.msg),
3388                _ => {}
3389            }
3390        }
3391        RusotoError::Unknown(res)
3392    }
3393}
3394impl fmt::Display for StopAssessmentRunError {
3395    #[allow(unused_variables)]
3396    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3397        match *self {
3398            StopAssessmentRunError::AccessDenied(ref cause) => write!(f, "{}", cause),
3399            StopAssessmentRunError::Internal(ref cause) => write!(f, "{}", cause),
3400            StopAssessmentRunError::InvalidInput(ref cause) => write!(f, "{}", cause),
3401            StopAssessmentRunError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3402            StopAssessmentRunError::ServiceTemporarilyUnavailable(ref cause) => {
3403                write!(f, "{}", cause)
3404            }
3405        }
3406    }
3407}
3408impl Error for StopAssessmentRunError {}
3409/// Errors returned by SubscribeToEvent
3410#[derive(Debug, PartialEq)]
3411pub enum SubscribeToEventError {
3412    /// <p>You do not have required permissions to access the requested resource.</p>
3413    AccessDenied(String),
3414    /// <p>Internal server error.</p>
3415    Internal(String),
3416    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3417    InvalidInput(String),
3418    /// <p>The request was rejected because it attempted to create resources beyond the current AWS account limits. The error code describes the limit exceeded.</p>
3419    LimitExceeded(String),
3420    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
3421    NoSuchEntity(String),
3422    /// <p>The serice is temporary unavailable.</p>
3423    ServiceTemporarilyUnavailable(String),
3424}
3425
3426impl SubscribeToEventError {
3427    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SubscribeToEventError> {
3428        if let Some(err) = proto::json::Error::parse(&res) {
3429            match err.typ.as_str() {
3430                "AccessDeniedException" => {
3431                    return RusotoError::Service(SubscribeToEventError::AccessDenied(err.msg))
3432                }
3433                "InternalException" => {
3434                    return RusotoError::Service(SubscribeToEventError::Internal(err.msg))
3435                }
3436                "InvalidInputException" => {
3437                    return RusotoError::Service(SubscribeToEventError::InvalidInput(err.msg))
3438                }
3439                "LimitExceededException" => {
3440                    return RusotoError::Service(SubscribeToEventError::LimitExceeded(err.msg))
3441                }
3442                "NoSuchEntityException" => {
3443                    return RusotoError::Service(SubscribeToEventError::NoSuchEntity(err.msg))
3444                }
3445                "ServiceTemporarilyUnavailableException" => {
3446                    return RusotoError::Service(
3447                        SubscribeToEventError::ServiceTemporarilyUnavailable(err.msg),
3448                    )
3449                }
3450                "ValidationException" => return RusotoError::Validation(err.msg),
3451                _ => {}
3452            }
3453        }
3454        RusotoError::Unknown(res)
3455    }
3456}
3457impl fmt::Display for SubscribeToEventError {
3458    #[allow(unused_variables)]
3459    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3460        match *self {
3461            SubscribeToEventError::AccessDenied(ref cause) => write!(f, "{}", cause),
3462            SubscribeToEventError::Internal(ref cause) => write!(f, "{}", cause),
3463            SubscribeToEventError::InvalidInput(ref cause) => write!(f, "{}", cause),
3464            SubscribeToEventError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3465            SubscribeToEventError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3466            SubscribeToEventError::ServiceTemporarilyUnavailable(ref cause) => {
3467                write!(f, "{}", cause)
3468            }
3469        }
3470    }
3471}
3472impl Error for SubscribeToEventError {}
3473/// Errors returned by UnsubscribeFromEvent
3474#[derive(Debug, PartialEq)]
3475pub enum UnsubscribeFromEventError {
3476    /// <p>You do not have required permissions to access the requested resource.</p>
3477    AccessDenied(String),
3478    /// <p>Internal server error.</p>
3479    Internal(String),
3480    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3481    InvalidInput(String),
3482    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
3483    NoSuchEntity(String),
3484    /// <p>The serice is temporary unavailable.</p>
3485    ServiceTemporarilyUnavailable(String),
3486}
3487
3488impl UnsubscribeFromEventError {
3489    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UnsubscribeFromEventError> {
3490        if let Some(err) = proto::json::Error::parse(&res) {
3491            match err.typ.as_str() {
3492                "AccessDeniedException" => {
3493                    return RusotoError::Service(UnsubscribeFromEventError::AccessDenied(err.msg))
3494                }
3495                "InternalException" => {
3496                    return RusotoError::Service(UnsubscribeFromEventError::Internal(err.msg))
3497                }
3498                "InvalidInputException" => {
3499                    return RusotoError::Service(UnsubscribeFromEventError::InvalidInput(err.msg))
3500                }
3501                "NoSuchEntityException" => {
3502                    return RusotoError::Service(UnsubscribeFromEventError::NoSuchEntity(err.msg))
3503                }
3504                "ServiceTemporarilyUnavailableException" => {
3505                    return RusotoError::Service(
3506                        UnsubscribeFromEventError::ServiceTemporarilyUnavailable(err.msg),
3507                    )
3508                }
3509                "ValidationException" => return RusotoError::Validation(err.msg),
3510                _ => {}
3511            }
3512        }
3513        RusotoError::Unknown(res)
3514    }
3515}
3516impl fmt::Display for UnsubscribeFromEventError {
3517    #[allow(unused_variables)]
3518    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3519        match *self {
3520            UnsubscribeFromEventError::AccessDenied(ref cause) => write!(f, "{}", cause),
3521            UnsubscribeFromEventError::Internal(ref cause) => write!(f, "{}", cause),
3522            UnsubscribeFromEventError::InvalidInput(ref cause) => write!(f, "{}", cause),
3523            UnsubscribeFromEventError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3524            UnsubscribeFromEventError::ServiceTemporarilyUnavailable(ref cause) => {
3525                write!(f, "{}", cause)
3526            }
3527        }
3528    }
3529}
3530impl Error for UnsubscribeFromEventError {}
3531/// Errors returned by UpdateAssessmentTarget
3532#[derive(Debug, PartialEq)]
3533pub enum UpdateAssessmentTargetError {
3534    /// <p>You do not have required permissions to access the requested resource.</p>
3535    AccessDenied(String),
3536    /// <p>Internal server error.</p>
3537    Internal(String),
3538    /// <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
3539    InvalidInput(String),
3540    /// <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
3541    NoSuchEntity(String),
3542    /// <p>The serice is temporary unavailable.</p>
3543    ServiceTemporarilyUnavailable(String),
3544}
3545
3546impl UpdateAssessmentTargetError {
3547    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAssessmentTargetError> {
3548        if let Some(err) = proto::json::Error::parse(&res) {
3549            match err.typ.as_str() {
3550                "AccessDeniedException" => {
3551                    return RusotoError::Service(UpdateAssessmentTargetError::AccessDenied(err.msg))
3552                }
3553                "InternalException" => {
3554                    return RusotoError::Service(UpdateAssessmentTargetError::Internal(err.msg))
3555                }
3556                "InvalidInputException" => {
3557                    return RusotoError::Service(UpdateAssessmentTargetError::InvalidInput(err.msg))
3558                }
3559                "NoSuchEntityException" => {
3560                    return RusotoError::Service(UpdateAssessmentTargetError::NoSuchEntity(err.msg))
3561                }
3562                "ServiceTemporarilyUnavailableException" => {
3563                    return RusotoError::Service(
3564                        UpdateAssessmentTargetError::ServiceTemporarilyUnavailable(err.msg),
3565                    )
3566                }
3567                "ValidationException" => return RusotoError::Validation(err.msg),
3568                _ => {}
3569            }
3570        }
3571        RusotoError::Unknown(res)
3572    }
3573}
3574impl fmt::Display for UpdateAssessmentTargetError {
3575    #[allow(unused_variables)]
3576    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3577        match *self {
3578            UpdateAssessmentTargetError::AccessDenied(ref cause) => write!(f, "{}", cause),
3579            UpdateAssessmentTargetError::Internal(ref cause) => write!(f, "{}", cause),
3580            UpdateAssessmentTargetError::InvalidInput(ref cause) => write!(f, "{}", cause),
3581            UpdateAssessmentTargetError::NoSuchEntity(ref cause) => write!(f, "{}", cause),
3582            UpdateAssessmentTargetError::ServiceTemporarilyUnavailable(ref cause) => {
3583                write!(f, "{}", cause)
3584            }
3585        }
3586    }
3587}
3588impl Error for UpdateAssessmentTargetError {}
3589/// Trait representing the capabilities of the Amazon Inspector API. Amazon Inspector clients implement this trait.
3590#[async_trait]
3591pub trait Inspector {
3592    /// <p>Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.</p>
3593    async fn add_attributes_to_findings(
3594        &self,
3595        input: AddAttributesToFindingsRequest,
3596    ) -> Result<AddAttributesToFindingsResponse, RusotoError<AddAttributesToFindingsError>>;
3597
3598    /// <p>Creates a new assessment target using the ARN of the resource group that is generated by <a>CreateResourceGroup</a>. If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target. If the <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html">service-linked role</a> isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments. You can create up to 50 assessment targets per AWS account. You can run up to 500 concurrent agents per AWS account. For more information, see <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html"> Amazon Inspector Assessment Targets</a>.</p>
3599    async fn create_assessment_target(
3600        &self,
3601        input: CreateAssessmentTargetRequest,
3602    ) -> Result<CreateAssessmentTargetResponse, RusotoError<CreateAssessmentTargetError>>;
3603
3604    /// <p>Creates an assessment template for the assessment target that is specified by the ARN of the assessment target. If the <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html">service-linked role</a> isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments.</p>
3605    async fn create_assessment_template(
3606        &self,
3607        input: CreateAssessmentTemplateRequest,
3608    ) -> Result<CreateAssessmentTemplateResponse, RusotoError<CreateAssessmentTemplateError>>;
3609
3610    /// <p>Starts the generation of an exclusions preview for the specified assessment template. The exclusions preview lists the potential exclusions (ExclusionPreview) that Inspector can detect before it runs the assessment. </p>
3611    async fn create_exclusions_preview(
3612        &self,
3613        input: CreateExclusionsPreviewRequest,
3614    ) -> Result<CreateExclusionsPreviewResponse, RusotoError<CreateExclusionsPreviewError>>;
3615
3616    /// <p>Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource group is then used to create an Amazon Inspector assessment target. For more information, see <a>CreateAssessmentTarget</a>.</p>
3617    async fn create_resource_group(
3618        &self,
3619        input: CreateResourceGroupRequest,
3620    ) -> Result<CreateResourceGroupResponse, RusotoError<CreateResourceGroupError>>;
3621
3622    /// <p>Deletes the assessment run that is specified by the ARN of the assessment run.</p>
3623    async fn delete_assessment_run(
3624        &self,
3625        input: DeleteAssessmentRunRequest,
3626    ) -> Result<(), RusotoError<DeleteAssessmentRunError>>;
3627
3628    /// <p>Deletes the assessment target that is specified by the ARN of the assessment target.</p>
3629    async fn delete_assessment_target(
3630        &self,
3631        input: DeleteAssessmentTargetRequest,
3632    ) -> Result<(), RusotoError<DeleteAssessmentTargetError>>;
3633
3634    /// <p>Deletes the assessment template that is specified by the ARN of the assessment template.</p>
3635    async fn delete_assessment_template(
3636        &self,
3637        input: DeleteAssessmentTemplateRequest,
3638    ) -> Result<(), RusotoError<DeleteAssessmentTemplateError>>;
3639
3640    /// <p>Describes the assessment runs that are specified by the ARNs of the assessment runs.</p>
3641    async fn describe_assessment_runs(
3642        &self,
3643        input: DescribeAssessmentRunsRequest,
3644    ) -> Result<DescribeAssessmentRunsResponse, RusotoError<DescribeAssessmentRunsError>>;
3645
3646    /// <p>Describes the assessment targets that are specified by the ARNs of the assessment targets.</p>
3647    async fn describe_assessment_targets(
3648        &self,
3649        input: DescribeAssessmentTargetsRequest,
3650    ) -> Result<DescribeAssessmentTargetsResponse, RusotoError<DescribeAssessmentTargetsError>>;
3651
3652    /// <p>Describes the assessment templates that are specified by the ARNs of the assessment templates.</p>
3653    async fn describe_assessment_templates(
3654        &self,
3655        input: DescribeAssessmentTemplatesRequest,
3656    ) -> Result<DescribeAssessmentTemplatesResponse, RusotoError<DescribeAssessmentTemplatesError>>;
3657
3658    /// <p>Describes the IAM role that enables Amazon Inspector to access your AWS account.</p>
3659    async fn describe_cross_account_access_role(
3660        &self,
3661    ) -> Result<
3662        DescribeCrossAccountAccessRoleResponse,
3663        RusotoError<DescribeCrossAccountAccessRoleError>,
3664    >;
3665
3666    /// <p>Describes the exclusions that are specified by the exclusions' ARNs.</p>
3667    async fn describe_exclusions(
3668        &self,
3669        input: DescribeExclusionsRequest,
3670    ) -> Result<DescribeExclusionsResponse, RusotoError<DescribeExclusionsError>>;
3671
3672    /// <p>Describes the findings that are specified by the ARNs of the findings.</p>
3673    async fn describe_findings(
3674        &self,
3675        input: DescribeFindingsRequest,
3676    ) -> Result<DescribeFindingsResponse, RusotoError<DescribeFindingsError>>;
3677
3678    /// <p>Describes the resource groups that are specified by the ARNs of the resource groups.</p>
3679    async fn describe_resource_groups(
3680        &self,
3681        input: DescribeResourceGroupsRequest,
3682    ) -> Result<DescribeResourceGroupsResponse, RusotoError<DescribeResourceGroupsError>>;
3683
3684    /// <p>Describes the rules packages that are specified by the ARNs of the rules packages.</p>
3685    async fn describe_rules_packages(
3686        &self,
3687        input: DescribeRulesPackagesRequest,
3688    ) -> Result<DescribeRulesPackagesResponse, RusotoError<DescribeRulesPackagesError>>;
3689
3690    /// <p>Produces an assessment report that includes detailed and comprehensive results of a specified assessment run. </p>
3691    async fn get_assessment_report(
3692        &self,
3693        input: GetAssessmentReportRequest,
3694    ) -> Result<GetAssessmentReportResponse, RusotoError<GetAssessmentReportError>>;
3695
3696    /// <p>Retrieves the exclusions preview (a list of ExclusionPreview objects) specified by the preview token. You can obtain the preview token by running the CreateExclusionsPreview API.</p>
3697    async fn get_exclusions_preview(
3698        &self,
3699        input: GetExclusionsPreviewRequest,
3700    ) -> Result<GetExclusionsPreviewResponse, RusotoError<GetExclusionsPreviewError>>;
3701
3702    /// <p>Information about the data that is collected for the specified assessment run.</p>
3703    async fn get_telemetry_metadata(
3704        &self,
3705        input: GetTelemetryMetadataRequest,
3706    ) -> Result<GetTelemetryMetadataResponse, RusotoError<GetTelemetryMetadataError>>;
3707
3708    /// <p>Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs.</p>
3709    async fn list_assessment_run_agents(
3710        &self,
3711        input: ListAssessmentRunAgentsRequest,
3712    ) -> Result<ListAssessmentRunAgentsResponse, RusotoError<ListAssessmentRunAgentsError>>;
3713
3714    /// <p>Lists the assessment runs that correspond to the assessment templates that are specified by the ARNs of the assessment templates.</p>
3715    async fn list_assessment_runs(
3716        &self,
3717        input: ListAssessmentRunsRequest,
3718    ) -> Result<ListAssessmentRunsResponse, RusotoError<ListAssessmentRunsError>>;
3719
3720    /// <p>Lists the ARNs of the assessment targets within this AWS account. For more information about assessment targets, see <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html">Amazon Inspector Assessment Targets</a>.</p>
3721    async fn list_assessment_targets(
3722        &self,
3723        input: ListAssessmentTargetsRequest,
3724    ) -> Result<ListAssessmentTargetsResponse, RusotoError<ListAssessmentTargetsError>>;
3725
3726    /// <p>Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.</p>
3727    async fn list_assessment_templates(
3728        &self,
3729        input: ListAssessmentTemplatesRequest,
3730    ) -> Result<ListAssessmentTemplatesResponse, RusotoError<ListAssessmentTemplatesError>>;
3731
3732    /// <p>Lists all the event subscriptions for the assessment template that is specified by the ARN of the assessment template. For more information, see <a>SubscribeToEvent</a> and <a>UnsubscribeFromEvent</a>.</p>
3733    async fn list_event_subscriptions(
3734        &self,
3735        input: ListEventSubscriptionsRequest,
3736    ) -> Result<ListEventSubscriptionsResponse, RusotoError<ListEventSubscriptionsError>>;
3737
3738    /// <p>List exclusions that are generated by the assessment run.</p>
3739    async fn list_exclusions(
3740        &self,
3741        input: ListExclusionsRequest,
3742    ) -> Result<ListExclusionsResponse, RusotoError<ListExclusionsError>>;
3743
3744    /// <p>Lists findings that are generated by the assessment runs that are specified by the ARNs of the assessment runs.</p>
3745    async fn list_findings(
3746        &self,
3747        input: ListFindingsRequest,
3748    ) -> Result<ListFindingsResponse, RusotoError<ListFindingsError>>;
3749
3750    /// <p>Lists all available Amazon Inspector rules packages.</p>
3751    async fn list_rules_packages(
3752        &self,
3753        input: ListRulesPackagesRequest,
3754    ) -> Result<ListRulesPackagesResponse, RusotoError<ListRulesPackagesError>>;
3755
3756    /// <p>Lists all tags associated with an assessment template.</p>
3757    async fn list_tags_for_resource(
3758        &self,
3759        input: ListTagsForResourceRequest,
3760    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
3761
3762    /// <p>Previews the agents installed on the EC2 instances that are part of the specified assessment target.</p>
3763    async fn preview_agents(
3764        &self,
3765        input: PreviewAgentsRequest,
3766    ) -> Result<PreviewAgentsResponse, RusotoError<PreviewAgentsError>>;
3767
3768    /// <p>Registers the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.</p>
3769    async fn register_cross_account_access_role(
3770        &self,
3771        input: RegisterCrossAccountAccessRoleRequest,
3772    ) -> Result<(), RusotoError<RegisterCrossAccountAccessRoleError>>;
3773
3774    /// <p>Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.</p>
3775    async fn remove_attributes_from_findings(
3776        &self,
3777        input: RemoveAttributesFromFindingsRequest,
3778    ) -> Result<RemoveAttributesFromFindingsResponse, RusotoError<RemoveAttributesFromFindingsError>>;
3779
3780    /// <p>Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.</p>
3781    async fn set_tags_for_resource(
3782        &self,
3783        input: SetTagsForResourceRequest,
3784    ) -> Result<(), RusotoError<SetTagsForResourceError>>;
3785
3786    /// <p>Starts the assessment run specified by the ARN of the assessment template. For this API to function properly, you must not exceed the limit of running up to 500 concurrent agents per AWS account.</p>
3787    async fn start_assessment_run(
3788        &self,
3789        input: StartAssessmentRunRequest,
3790    ) -> Result<StartAssessmentRunResponse, RusotoError<StartAssessmentRunError>>;
3791
3792    /// <p>Stops the assessment run that is specified by the ARN of the assessment run.</p>
3793    async fn stop_assessment_run(
3794        &self,
3795        input: StopAssessmentRunRequest,
3796    ) -> Result<(), RusotoError<StopAssessmentRunError>>;
3797
3798    /// <p>Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.</p>
3799    async fn subscribe_to_event(
3800        &self,
3801        input: SubscribeToEventRequest,
3802    ) -> Result<(), RusotoError<SubscribeToEventError>>;
3803
3804    /// <p>Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.</p>
3805    async fn unsubscribe_from_event(
3806        &self,
3807        input: UnsubscribeFromEventRequest,
3808    ) -> Result<(), RusotoError<UnsubscribeFromEventError>>;
3809
3810    /// <p>Updates the assessment target that is specified by the ARN of the assessment target.</p> <p>If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target.</p>
3811    async fn update_assessment_target(
3812        &self,
3813        input: UpdateAssessmentTargetRequest,
3814    ) -> Result<(), RusotoError<UpdateAssessmentTargetError>>;
3815}
3816/// A client for the Amazon Inspector API.
3817#[derive(Clone)]
3818pub struct InspectorClient {
3819    client: Client,
3820    region: region::Region,
3821}
3822
3823impl InspectorClient {
3824    /// Creates a client backed by the default tokio event loop.
3825    ///
3826    /// The client will use the default credentials provider and tls client.
3827    pub fn new(region: region::Region) -> InspectorClient {
3828        InspectorClient {
3829            client: Client::shared(),
3830            region,
3831        }
3832    }
3833
3834    pub fn new_with<P, D>(
3835        request_dispatcher: D,
3836        credentials_provider: P,
3837        region: region::Region,
3838    ) -> InspectorClient
3839    where
3840        P: ProvideAwsCredentials + Send + Sync + 'static,
3841        D: DispatchSignedRequest + Send + Sync + 'static,
3842    {
3843        InspectorClient {
3844            client: Client::new_with(credentials_provider, request_dispatcher),
3845            region,
3846        }
3847    }
3848
3849    pub fn new_with_client(client: Client, region: region::Region) -> InspectorClient {
3850        InspectorClient { client, region }
3851    }
3852}
3853
3854#[async_trait]
3855impl Inspector for InspectorClient {
3856    /// <p>Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.</p>
3857    async fn add_attributes_to_findings(
3858        &self,
3859        input: AddAttributesToFindingsRequest,
3860    ) -> Result<AddAttributesToFindingsResponse, RusotoError<AddAttributesToFindingsError>> {
3861        let mut request = self.new_signed_request("POST", "/");
3862        request.add_header("x-amz-target", "InspectorService.AddAttributesToFindings");
3863        let encoded = serde_json::to_string(&input).unwrap();
3864        request.set_payload(Some(encoded));
3865
3866        let response = self
3867            .sign_and_dispatch(request, AddAttributesToFindingsError::from_response)
3868            .await?;
3869        let mut response = response;
3870        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3871        proto::json::ResponsePayload::new(&response)
3872            .deserialize::<AddAttributesToFindingsResponse, _>()
3873    }
3874
3875    /// <p>Creates a new assessment target using the ARN of the resource group that is generated by <a>CreateResourceGroup</a>. If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target. If the <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html">service-linked role</a> isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments. You can create up to 50 assessment targets per AWS account. You can run up to 500 concurrent agents per AWS account. For more information, see <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html"> Amazon Inspector Assessment Targets</a>.</p>
3876    async fn create_assessment_target(
3877        &self,
3878        input: CreateAssessmentTargetRequest,
3879    ) -> Result<CreateAssessmentTargetResponse, RusotoError<CreateAssessmentTargetError>> {
3880        let mut request = self.new_signed_request("POST", "/");
3881        request.add_header("x-amz-target", "InspectorService.CreateAssessmentTarget");
3882        let encoded = serde_json::to_string(&input).unwrap();
3883        request.set_payload(Some(encoded));
3884
3885        let response = self
3886            .sign_and_dispatch(request, CreateAssessmentTargetError::from_response)
3887            .await?;
3888        let mut response = response;
3889        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3890        proto::json::ResponsePayload::new(&response)
3891            .deserialize::<CreateAssessmentTargetResponse, _>()
3892    }
3893
3894    /// <p>Creates an assessment template for the assessment target that is specified by the ARN of the assessment target. If the <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_slr.html">service-linked role</a> isn’t already registered, this action also creates and registers a service-linked role to grant Amazon Inspector access to AWS Services needed to perform security assessments.</p>
3895    async fn create_assessment_template(
3896        &self,
3897        input: CreateAssessmentTemplateRequest,
3898    ) -> Result<CreateAssessmentTemplateResponse, RusotoError<CreateAssessmentTemplateError>> {
3899        let mut request = self.new_signed_request("POST", "/");
3900        request.add_header("x-amz-target", "InspectorService.CreateAssessmentTemplate");
3901        let encoded = serde_json::to_string(&input).unwrap();
3902        request.set_payload(Some(encoded));
3903
3904        let response = self
3905            .sign_and_dispatch(request, CreateAssessmentTemplateError::from_response)
3906            .await?;
3907        let mut response = response;
3908        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3909        proto::json::ResponsePayload::new(&response)
3910            .deserialize::<CreateAssessmentTemplateResponse, _>()
3911    }
3912
3913    /// <p>Starts the generation of an exclusions preview for the specified assessment template. The exclusions preview lists the potential exclusions (ExclusionPreview) that Inspector can detect before it runs the assessment. </p>
3914    async fn create_exclusions_preview(
3915        &self,
3916        input: CreateExclusionsPreviewRequest,
3917    ) -> Result<CreateExclusionsPreviewResponse, RusotoError<CreateExclusionsPreviewError>> {
3918        let mut request = self.new_signed_request("POST", "/");
3919        request.add_header("x-amz-target", "InspectorService.CreateExclusionsPreview");
3920        let encoded = serde_json::to_string(&input).unwrap();
3921        request.set_payload(Some(encoded));
3922
3923        let response = self
3924            .sign_and_dispatch(request, CreateExclusionsPreviewError::from_response)
3925            .await?;
3926        let mut response = response;
3927        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3928        proto::json::ResponsePayload::new(&response)
3929            .deserialize::<CreateExclusionsPreviewResponse, _>()
3930    }
3931
3932    /// <p>Creates a resource group using the specified set of tags (key and value pairs) that are used to select the EC2 instances to be included in an Amazon Inspector assessment target. The created resource group is then used to create an Amazon Inspector assessment target. For more information, see <a>CreateAssessmentTarget</a>.</p>
3933    async fn create_resource_group(
3934        &self,
3935        input: CreateResourceGroupRequest,
3936    ) -> Result<CreateResourceGroupResponse, RusotoError<CreateResourceGroupError>> {
3937        let mut request = self.new_signed_request("POST", "/");
3938        request.add_header("x-amz-target", "InspectorService.CreateResourceGroup");
3939        let encoded = serde_json::to_string(&input).unwrap();
3940        request.set_payload(Some(encoded));
3941
3942        let response = self
3943            .sign_and_dispatch(request, CreateResourceGroupError::from_response)
3944            .await?;
3945        let mut response = response;
3946        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3947        proto::json::ResponsePayload::new(&response).deserialize::<CreateResourceGroupResponse, _>()
3948    }
3949
3950    /// <p>Deletes the assessment run that is specified by the ARN of the assessment run.</p>
3951    async fn delete_assessment_run(
3952        &self,
3953        input: DeleteAssessmentRunRequest,
3954    ) -> Result<(), RusotoError<DeleteAssessmentRunError>> {
3955        let mut request = self.new_signed_request("POST", "/");
3956        request.add_header("x-amz-target", "InspectorService.DeleteAssessmentRun");
3957        let encoded = serde_json::to_string(&input).unwrap();
3958        request.set_payload(Some(encoded));
3959
3960        let response = self
3961            .sign_and_dispatch(request, DeleteAssessmentRunError::from_response)
3962            .await?;
3963        std::mem::drop(response);
3964        Ok(())
3965    }
3966
3967    /// <p>Deletes the assessment target that is specified by the ARN of the assessment target.</p>
3968    async fn delete_assessment_target(
3969        &self,
3970        input: DeleteAssessmentTargetRequest,
3971    ) -> Result<(), RusotoError<DeleteAssessmentTargetError>> {
3972        let mut request = self.new_signed_request("POST", "/");
3973        request.add_header("x-amz-target", "InspectorService.DeleteAssessmentTarget");
3974        let encoded = serde_json::to_string(&input).unwrap();
3975        request.set_payload(Some(encoded));
3976
3977        let response = self
3978            .sign_and_dispatch(request, DeleteAssessmentTargetError::from_response)
3979            .await?;
3980        std::mem::drop(response);
3981        Ok(())
3982    }
3983
3984    /// <p>Deletes the assessment template that is specified by the ARN of the assessment template.</p>
3985    async fn delete_assessment_template(
3986        &self,
3987        input: DeleteAssessmentTemplateRequest,
3988    ) -> Result<(), RusotoError<DeleteAssessmentTemplateError>> {
3989        let mut request = self.new_signed_request("POST", "/");
3990        request.add_header("x-amz-target", "InspectorService.DeleteAssessmentTemplate");
3991        let encoded = serde_json::to_string(&input).unwrap();
3992        request.set_payload(Some(encoded));
3993
3994        let response = self
3995            .sign_and_dispatch(request, DeleteAssessmentTemplateError::from_response)
3996            .await?;
3997        std::mem::drop(response);
3998        Ok(())
3999    }
4000
4001    /// <p>Describes the assessment runs that are specified by the ARNs of the assessment runs.</p>
4002    async fn describe_assessment_runs(
4003        &self,
4004        input: DescribeAssessmentRunsRequest,
4005    ) -> Result<DescribeAssessmentRunsResponse, RusotoError<DescribeAssessmentRunsError>> {
4006        let mut request = self.new_signed_request("POST", "/");
4007        request.add_header("x-amz-target", "InspectorService.DescribeAssessmentRuns");
4008        let encoded = serde_json::to_string(&input).unwrap();
4009        request.set_payload(Some(encoded));
4010
4011        let response = self
4012            .sign_and_dispatch(request, DescribeAssessmentRunsError::from_response)
4013            .await?;
4014        let mut response = response;
4015        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4016        proto::json::ResponsePayload::new(&response)
4017            .deserialize::<DescribeAssessmentRunsResponse, _>()
4018    }
4019
4020    /// <p>Describes the assessment targets that are specified by the ARNs of the assessment targets.</p>
4021    async fn describe_assessment_targets(
4022        &self,
4023        input: DescribeAssessmentTargetsRequest,
4024    ) -> Result<DescribeAssessmentTargetsResponse, RusotoError<DescribeAssessmentTargetsError>>
4025    {
4026        let mut request = self.new_signed_request("POST", "/");
4027        request.add_header("x-amz-target", "InspectorService.DescribeAssessmentTargets");
4028        let encoded = serde_json::to_string(&input).unwrap();
4029        request.set_payload(Some(encoded));
4030
4031        let response = self
4032            .sign_and_dispatch(request, DescribeAssessmentTargetsError::from_response)
4033            .await?;
4034        let mut response = response;
4035        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4036        proto::json::ResponsePayload::new(&response)
4037            .deserialize::<DescribeAssessmentTargetsResponse, _>()
4038    }
4039
4040    /// <p>Describes the assessment templates that are specified by the ARNs of the assessment templates.</p>
4041    async fn describe_assessment_templates(
4042        &self,
4043        input: DescribeAssessmentTemplatesRequest,
4044    ) -> Result<DescribeAssessmentTemplatesResponse, RusotoError<DescribeAssessmentTemplatesError>>
4045    {
4046        let mut request = self.new_signed_request("POST", "/");
4047        request.add_header(
4048            "x-amz-target",
4049            "InspectorService.DescribeAssessmentTemplates",
4050        );
4051        let encoded = serde_json::to_string(&input).unwrap();
4052        request.set_payload(Some(encoded));
4053
4054        let response = self
4055            .sign_and_dispatch(request, DescribeAssessmentTemplatesError::from_response)
4056            .await?;
4057        let mut response = response;
4058        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4059        proto::json::ResponsePayload::new(&response)
4060            .deserialize::<DescribeAssessmentTemplatesResponse, _>()
4061    }
4062
4063    /// <p>Describes the IAM role that enables Amazon Inspector to access your AWS account.</p>
4064    async fn describe_cross_account_access_role(
4065        &self,
4066    ) -> Result<
4067        DescribeCrossAccountAccessRoleResponse,
4068        RusotoError<DescribeCrossAccountAccessRoleError>,
4069    > {
4070        let mut request = self.new_signed_request("POST", "/");
4071        request.add_header(
4072            "x-amz-target",
4073            "InspectorService.DescribeCrossAccountAccessRole",
4074        );
4075        request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
4076
4077        let response = self
4078            .sign_and_dispatch(request, DescribeCrossAccountAccessRoleError::from_response)
4079            .await?;
4080        let mut response = response;
4081        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4082        proto::json::ResponsePayload::new(&response)
4083            .deserialize::<DescribeCrossAccountAccessRoleResponse, _>()
4084    }
4085
4086    /// <p>Describes the exclusions that are specified by the exclusions' ARNs.</p>
4087    async fn describe_exclusions(
4088        &self,
4089        input: DescribeExclusionsRequest,
4090    ) -> Result<DescribeExclusionsResponse, RusotoError<DescribeExclusionsError>> {
4091        let mut request = self.new_signed_request("POST", "/");
4092        request.add_header("x-amz-target", "InspectorService.DescribeExclusions");
4093        let encoded = serde_json::to_string(&input).unwrap();
4094        request.set_payload(Some(encoded));
4095
4096        let response = self
4097            .sign_and_dispatch(request, DescribeExclusionsError::from_response)
4098            .await?;
4099        let mut response = response;
4100        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4101        proto::json::ResponsePayload::new(&response).deserialize::<DescribeExclusionsResponse, _>()
4102    }
4103
4104    /// <p>Describes the findings that are specified by the ARNs of the findings.</p>
4105    async fn describe_findings(
4106        &self,
4107        input: DescribeFindingsRequest,
4108    ) -> Result<DescribeFindingsResponse, RusotoError<DescribeFindingsError>> {
4109        let mut request = self.new_signed_request("POST", "/");
4110        request.add_header("x-amz-target", "InspectorService.DescribeFindings");
4111        let encoded = serde_json::to_string(&input).unwrap();
4112        request.set_payload(Some(encoded));
4113
4114        let response = self
4115            .sign_and_dispatch(request, DescribeFindingsError::from_response)
4116            .await?;
4117        let mut response = response;
4118        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4119        proto::json::ResponsePayload::new(&response).deserialize::<DescribeFindingsResponse, _>()
4120    }
4121
4122    /// <p>Describes the resource groups that are specified by the ARNs of the resource groups.</p>
4123    async fn describe_resource_groups(
4124        &self,
4125        input: DescribeResourceGroupsRequest,
4126    ) -> Result<DescribeResourceGroupsResponse, RusotoError<DescribeResourceGroupsError>> {
4127        let mut request = self.new_signed_request("POST", "/");
4128        request.add_header("x-amz-target", "InspectorService.DescribeResourceGroups");
4129        let encoded = serde_json::to_string(&input).unwrap();
4130        request.set_payload(Some(encoded));
4131
4132        let response = self
4133            .sign_and_dispatch(request, DescribeResourceGroupsError::from_response)
4134            .await?;
4135        let mut response = response;
4136        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4137        proto::json::ResponsePayload::new(&response)
4138            .deserialize::<DescribeResourceGroupsResponse, _>()
4139    }
4140
4141    /// <p>Describes the rules packages that are specified by the ARNs of the rules packages.</p>
4142    async fn describe_rules_packages(
4143        &self,
4144        input: DescribeRulesPackagesRequest,
4145    ) -> Result<DescribeRulesPackagesResponse, RusotoError<DescribeRulesPackagesError>> {
4146        let mut request = self.new_signed_request("POST", "/");
4147        request.add_header("x-amz-target", "InspectorService.DescribeRulesPackages");
4148        let encoded = serde_json::to_string(&input).unwrap();
4149        request.set_payload(Some(encoded));
4150
4151        let response = self
4152            .sign_and_dispatch(request, DescribeRulesPackagesError::from_response)
4153            .await?;
4154        let mut response = response;
4155        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4156        proto::json::ResponsePayload::new(&response)
4157            .deserialize::<DescribeRulesPackagesResponse, _>()
4158    }
4159
4160    /// <p>Produces an assessment report that includes detailed and comprehensive results of a specified assessment run. </p>
4161    async fn get_assessment_report(
4162        &self,
4163        input: GetAssessmentReportRequest,
4164    ) -> Result<GetAssessmentReportResponse, RusotoError<GetAssessmentReportError>> {
4165        let mut request = self.new_signed_request("POST", "/");
4166        request.add_header("x-amz-target", "InspectorService.GetAssessmentReport");
4167        let encoded = serde_json::to_string(&input).unwrap();
4168        request.set_payload(Some(encoded));
4169
4170        let response = self
4171            .sign_and_dispatch(request, GetAssessmentReportError::from_response)
4172            .await?;
4173        let mut response = response;
4174        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4175        proto::json::ResponsePayload::new(&response).deserialize::<GetAssessmentReportResponse, _>()
4176    }
4177
4178    /// <p>Retrieves the exclusions preview (a list of ExclusionPreview objects) specified by the preview token. You can obtain the preview token by running the CreateExclusionsPreview API.</p>
4179    async fn get_exclusions_preview(
4180        &self,
4181        input: GetExclusionsPreviewRequest,
4182    ) -> Result<GetExclusionsPreviewResponse, RusotoError<GetExclusionsPreviewError>> {
4183        let mut request = self.new_signed_request("POST", "/");
4184        request.add_header("x-amz-target", "InspectorService.GetExclusionsPreview");
4185        let encoded = serde_json::to_string(&input).unwrap();
4186        request.set_payload(Some(encoded));
4187
4188        let response = self
4189            .sign_and_dispatch(request, GetExclusionsPreviewError::from_response)
4190            .await?;
4191        let mut response = response;
4192        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4193        proto::json::ResponsePayload::new(&response)
4194            .deserialize::<GetExclusionsPreviewResponse, _>()
4195    }
4196
4197    /// <p>Information about the data that is collected for the specified assessment run.</p>
4198    async fn get_telemetry_metadata(
4199        &self,
4200        input: GetTelemetryMetadataRequest,
4201    ) -> Result<GetTelemetryMetadataResponse, RusotoError<GetTelemetryMetadataError>> {
4202        let mut request = self.new_signed_request("POST", "/");
4203        request.add_header("x-amz-target", "InspectorService.GetTelemetryMetadata");
4204        let encoded = serde_json::to_string(&input).unwrap();
4205        request.set_payload(Some(encoded));
4206
4207        let response = self
4208            .sign_and_dispatch(request, GetTelemetryMetadataError::from_response)
4209            .await?;
4210        let mut response = response;
4211        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4212        proto::json::ResponsePayload::new(&response)
4213            .deserialize::<GetTelemetryMetadataResponse, _>()
4214    }
4215
4216    /// <p>Lists the agents of the assessment runs that are specified by the ARNs of the assessment runs.</p>
4217    async fn list_assessment_run_agents(
4218        &self,
4219        input: ListAssessmentRunAgentsRequest,
4220    ) -> Result<ListAssessmentRunAgentsResponse, RusotoError<ListAssessmentRunAgentsError>> {
4221        let mut request = self.new_signed_request("POST", "/");
4222        request.add_header("x-amz-target", "InspectorService.ListAssessmentRunAgents");
4223        let encoded = serde_json::to_string(&input).unwrap();
4224        request.set_payload(Some(encoded));
4225
4226        let response = self
4227            .sign_and_dispatch(request, ListAssessmentRunAgentsError::from_response)
4228            .await?;
4229        let mut response = response;
4230        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4231        proto::json::ResponsePayload::new(&response)
4232            .deserialize::<ListAssessmentRunAgentsResponse, _>()
4233    }
4234
4235    /// <p>Lists the assessment runs that correspond to the assessment templates that are specified by the ARNs of the assessment templates.</p>
4236    async fn list_assessment_runs(
4237        &self,
4238        input: ListAssessmentRunsRequest,
4239    ) -> Result<ListAssessmentRunsResponse, RusotoError<ListAssessmentRunsError>> {
4240        let mut request = self.new_signed_request("POST", "/");
4241        request.add_header("x-amz-target", "InspectorService.ListAssessmentRuns");
4242        let encoded = serde_json::to_string(&input).unwrap();
4243        request.set_payload(Some(encoded));
4244
4245        let response = self
4246            .sign_and_dispatch(request, ListAssessmentRunsError::from_response)
4247            .await?;
4248        let mut response = response;
4249        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4250        proto::json::ResponsePayload::new(&response).deserialize::<ListAssessmentRunsResponse, _>()
4251    }
4252
4253    /// <p>Lists the ARNs of the assessment targets within this AWS account. For more information about assessment targets, see <a href="https://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html">Amazon Inspector Assessment Targets</a>.</p>
4254    async fn list_assessment_targets(
4255        &self,
4256        input: ListAssessmentTargetsRequest,
4257    ) -> Result<ListAssessmentTargetsResponse, RusotoError<ListAssessmentTargetsError>> {
4258        let mut request = self.new_signed_request("POST", "/");
4259        request.add_header("x-amz-target", "InspectorService.ListAssessmentTargets");
4260        let encoded = serde_json::to_string(&input).unwrap();
4261        request.set_payload(Some(encoded));
4262
4263        let response = self
4264            .sign_and_dispatch(request, ListAssessmentTargetsError::from_response)
4265            .await?;
4266        let mut response = response;
4267        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4268        proto::json::ResponsePayload::new(&response)
4269            .deserialize::<ListAssessmentTargetsResponse, _>()
4270    }
4271
4272    /// <p>Lists the assessment templates that correspond to the assessment targets that are specified by the ARNs of the assessment targets.</p>
4273    async fn list_assessment_templates(
4274        &self,
4275        input: ListAssessmentTemplatesRequest,
4276    ) -> Result<ListAssessmentTemplatesResponse, RusotoError<ListAssessmentTemplatesError>> {
4277        let mut request = self.new_signed_request("POST", "/");
4278        request.add_header("x-amz-target", "InspectorService.ListAssessmentTemplates");
4279        let encoded = serde_json::to_string(&input).unwrap();
4280        request.set_payload(Some(encoded));
4281
4282        let response = self
4283            .sign_and_dispatch(request, ListAssessmentTemplatesError::from_response)
4284            .await?;
4285        let mut response = response;
4286        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4287        proto::json::ResponsePayload::new(&response)
4288            .deserialize::<ListAssessmentTemplatesResponse, _>()
4289    }
4290
4291    /// <p>Lists all the event subscriptions for the assessment template that is specified by the ARN of the assessment template. For more information, see <a>SubscribeToEvent</a> and <a>UnsubscribeFromEvent</a>.</p>
4292    async fn list_event_subscriptions(
4293        &self,
4294        input: ListEventSubscriptionsRequest,
4295    ) -> Result<ListEventSubscriptionsResponse, RusotoError<ListEventSubscriptionsError>> {
4296        let mut request = self.new_signed_request("POST", "/");
4297        request.add_header("x-amz-target", "InspectorService.ListEventSubscriptions");
4298        let encoded = serde_json::to_string(&input).unwrap();
4299        request.set_payload(Some(encoded));
4300
4301        let response = self
4302            .sign_and_dispatch(request, ListEventSubscriptionsError::from_response)
4303            .await?;
4304        let mut response = response;
4305        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4306        proto::json::ResponsePayload::new(&response)
4307            .deserialize::<ListEventSubscriptionsResponse, _>()
4308    }
4309
4310    /// <p>List exclusions that are generated by the assessment run.</p>
4311    async fn list_exclusions(
4312        &self,
4313        input: ListExclusionsRequest,
4314    ) -> Result<ListExclusionsResponse, RusotoError<ListExclusionsError>> {
4315        let mut request = self.new_signed_request("POST", "/");
4316        request.add_header("x-amz-target", "InspectorService.ListExclusions");
4317        let encoded = serde_json::to_string(&input).unwrap();
4318        request.set_payload(Some(encoded));
4319
4320        let response = self
4321            .sign_and_dispatch(request, ListExclusionsError::from_response)
4322            .await?;
4323        let mut response = response;
4324        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4325        proto::json::ResponsePayload::new(&response).deserialize::<ListExclusionsResponse, _>()
4326    }
4327
4328    /// <p>Lists findings that are generated by the assessment runs that are specified by the ARNs of the assessment runs.</p>
4329    async fn list_findings(
4330        &self,
4331        input: ListFindingsRequest,
4332    ) -> Result<ListFindingsResponse, RusotoError<ListFindingsError>> {
4333        let mut request = self.new_signed_request("POST", "/");
4334        request.add_header("x-amz-target", "InspectorService.ListFindings");
4335        let encoded = serde_json::to_string(&input).unwrap();
4336        request.set_payload(Some(encoded));
4337
4338        let response = self
4339            .sign_and_dispatch(request, ListFindingsError::from_response)
4340            .await?;
4341        let mut response = response;
4342        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4343        proto::json::ResponsePayload::new(&response).deserialize::<ListFindingsResponse, _>()
4344    }
4345
4346    /// <p>Lists all available Amazon Inspector rules packages.</p>
4347    async fn list_rules_packages(
4348        &self,
4349        input: ListRulesPackagesRequest,
4350    ) -> Result<ListRulesPackagesResponse, RusotoError<ListRulesPackagesError>> {
4351        let mut request = self.new_signed_request("POST", "/");
4352        request.add_header("x-amz-target", "InspectorService.ListRulesPackages");
4353        let encoded = serde_json::to_string(&input).unwrap();
4354        request.set_payload(Some(encoded));
4355
4356        let response = self
4357            .sign_and_dispatch(request, ListRulesPackagesError::from_response)
4358            .await?;
4359        let mut response = response;
4360        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4361        proto::json::ResponsePayload::new(&response).deserialize::<ListRulesPackagesResponse, _>()
4362    }
4363
4364    /// <p>Lists all tags associated with an assessment template.</p>
4365    async fn list_tags_for_resource(
4366        &self,
4367        input: ListTagsForResourceRequest,
4368    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
4369        let mut request = self.new_signed_request("POST", "/");
4370        request.add_header("x-amz-target", "InspectorService.ListTagsForResource");
4371        let encoded = serde_json::to_string(&input).unwrap();
4372        request.set_payload(Some(encoded));
4373
4374        let response = self
4375            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
4376            .await?;
4377        let mut response = response;
4378        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4379        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceResponse, _>()
4380    }
4381
4382    /// <p>Previews the agents installed on the EC2 instances that are part of the specified assessment target.</p>
4383    async fn preview_agents(
4384        &self,
4385        input: PreviewAgentsRequest,
4386    ) -> Result<PreviewAgentsResponse, RusotoError<PreviewAgentsError>> {
4387        let mut request = self.new_signed_request("POST", "/");
4388        request.add_header("x-amz-target", "InspectorService.PreviewAgents");
4389        let encoded = serde_json::to_string(&input).unwrap();
4390        request.set_payload(Some(encoded));
4391
4392        let response = self
4393            .sign_and_dispatch(request, PreviewAgentsError::from_response)
4394            .await?;
4395        let mut response = response;
4396        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4397        proto::json::ResponsePayload::new(&response).deserialize::<PreviewAgentsResponse, _>()
4398    }
4399
4400    /// <p>Registers the IAM role that grants Amazon Inspector access to AWS Services needed to perform security assessments.</p>
4401    async fn register_cross_account_access_role(
4402        &self,
4403        input: RegisterCrossAccountAccessRoleRequest,
4404    ) -> Result<(), RusotoError<RegisterCrossAccountAccessRoleError>> {
4405        let mut request = self.new_signed_request("POST", "/");
4406        request.add_header(
4407            "x-amz-target",
4408            "InspectorService.RegisterCrossAccountAccessRole",
4409        );
4410        let encoded = serde_json::to_string(&input).unwrap();
4411        request.set_payload(Some(encoded));
4412
4413        let response = self
4414            .sign_and_dispatch(request, RegisterCrossAccountAccessRoleError::from_response)
4415            .await?;
4416        std::mem::drop(response);
4417        Ok(())
4418    }
4419
4420    /// <p>Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.</p>
4421    async fn remove_attributes_from_findings(
4422        &self,
4423        input: RemoveAttributesFromFindingsRequest,
4424    ) -> Result<RemoveAttributesFromFindingsResponse, RusotoError<RemoveAttributesFromFindingsError>>
4425    {
4426        let mut request = self.new_signed_request("POST", "/");
4427        request.add_header(
4428            "x-amz-target",
4429            "InspectorService.RemoveAttributesFromFindings",
4430        );
4431        let encoded = serde_json::to_string(&input).unwrap();
4432        request.set_payload(Some(encoded));
4433
4434        let response = self
4435            .sign_and_dispatch(request, RemoveAttributesFromFindingsError::from_response)
4436            .await?;
4437        let mut response = response;
4438        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4439        proto::json::ResponsePayload::new(&response)
4440            .deserialize::<RemoveAttributesFromFindingsResponse, _>()
4441    }
4442
4443    /// <p>Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.</p>
4444    async fn set_tags_for_resource(
4445        &self,
4446        input: SetTagsForResourceRequest,
4447    ) -> Result<(), RusotoError<SetTagsForResourceError>> {
4448        let mut request = self.new_signed_request("POST", "/");
4449        request.add_header("x-amz-target", "InspectorService.SetTagsForResource");
4450        let encoded = serde_json::to_string(&input).unwrap();
4451        request.set_payload(Some(encoded));
4452
4453        let response = self
4454            .sign_and_dispatch(request, SetTagsForResourceError::from_response)
4455            .await?;
4456        std::mem::drop(response);
4457        Ok(())
4458    }
4459
4460    /// <p>Starts the assessment run specified by the ARN of the assessment template. For this API to function properly, you must not exceed the limit of running up to 500 concurrent agents per AWS account.</p>
4461    async fn start_assessment_run(
4462        &self,
4463        input: StartAssessmentRunRequest,
4464    ) -> Result<StartAssessmentRunResponse, RusotoError<StartAssessmentRunError>> {
4465        let mut request = self.new_signed_request("POST", "/");
4466        request.add_header("x-amz-target", "InspectorService.StartAssessmentRun");
4467        let encoded = serde_json::to_string(&input).unwrap();
4468        request.set_payload(Some(encoded));
4469
4470        let response = self
4471            .sign_and_dispatch(request, StartAssessmentRunError::from_response)
4472            .await?;
4473        let mut response = response;
4474        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4475        proto::json::ResponsePayload::new(&response).deserialize::<StartAssessmentRunResponse, _>()
4476    }
4477
4478    /// <p>Stops the assessment run that is specified by the ARN of the assessment run.</p>
4479    async fn stop_assessment_run(
4480        &self,
4481        input: StopAssessmentRunRequest,
4482    ) -> Result<(), RusotoError<StopAssessmentRunError>> {
4483        let mut request = self.new_signed_request("POST", "/");
4484        request.add_header("x-amz-target", "InspectorService.StopAssessmentRun");
4485        let encoded = serde_json::to_string(&input).unwrap();
4486        request.set_payload(Some(encoded));
4487
4488        let response = self
4489            .sign_and_dispatch(request, StopAssessmentRunError::from_response)
4490            .await?;
4491        std::mem::drop(response);
4492        Ok(())
4493    }
4494
4495    /// <p>Enables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.</p>
4496    async fn subscribe_to_event(
4497        &self,
4498        input: SubscribeToEventRequest,
4499    ) -> Result<(), RusotoError<SubscribeToEventError>> {
4500        let mut request = self.new_signed_request("POST", "/");
4501        request.add_header("x-amz-target", "InspectorService.SubscribeToEvent");
4502        let encoded = serde_json::to_string(&input).unwrap();
4503        request.set_payload(Some(encoded));
4504
4505        let response = self
4506            .sign_and_dispatch(request, SubscribeToEventError::from_response)
4507            .await?;
4508        std::mem::drop(response);
4509        Ok(())
4510    }
4511
4512    /// <p>Disables the process of sending Amazon Simple Notification Service (SNS) notifications about a specified event to a specified SNS topic.</p>
4513    async fn unsubscribe_from_event(
4514        &self,
4515        input: UnsubscribeFromEventRequest,
4516    ) -> Result<(), RusotoError<UnsubscribeFromEventError>> {
4517        let mut request = self.new_signed_request("POST", "/");
4518        request.add_header("x-amz-target", "InspectorService.UnsubscribeFromEvent");
4519        let encoded = serde_json::to_string(&input).unwrap();
4520        request.set_payload(Some(encoded));
4521
4522        let response = self
4523            .sign_and_dispatch(request, UnsubscribeFromEventError::from_response)
4524            .await?;
4525        std::mem::drop(response);
4526        Ok(())
4527    }
4528
4529    /// <p>Updates the assessment target that is specified by the ARN of the assessment target.</p> <p>If resourceGroupArn is not specified, all EC2 instances in the current AWS account and region are included in the assessment target.</p>
4530    async fn update_assessment_target(
4531        &self,
4532        input: UpdateAssessmentTargetRequest,
4533    ) -> Result<(), RusotoError<UpdateAssessmentTargetError>> {
4534        let mut request = self.new_signed_request("POST", "/");
4535        request.add_header("x-amz-target", "InspectorService.UpdateAssessmentTarget");
4536        let encoded = serde_json::to_string(&input).unwrap();
4537        request.set_payload(Some(encoded));
4538
4539        let response = self
4540            .sign_and_dispatch(request, UpdateAssessmentTargetError::from_response)
4541            .await?;
4542        std::mem::drop(response);
4543        Ok(())
4544    }
4545}