use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AbortConfig {
#[serde(rename = "criteriaList")]
pub criteria_list: Vec<AbortCriteria>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AbortCriteria {
#[serde(rename = "action")]
pub action: String,
#[serde(rename = "failureType")]
pub failure_type: String,
#[serde(rename = "minNumberOfExecutedThings")]
pub min_number_of_executed_things: i64,
#[serde(rename = "thresholdPercentage")]
pub threshold_percentage: f64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AcceptCertificateTransferRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
#[serde(rename = "setAsActive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub set_as_active: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Action {
#[serde(rename = "cloudwatchAlarm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloudwatch_alarm: Option<CloudwatchAlarmAction>,
#[serde(rename = "cloudwatchMetric")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloudwatch_metric: Option<CloudwatchMetricAction>,
#[serde(rename = "dynamoDB")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dynamo_db: Option<DynamoDBAction>,
#[serde(rename = "dynamoDBv2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dynamo_d_bv_2: Option<DynamoDBv2Action>,
#[serde(rename = "elasticsearch")]
#[serde(skip_serializing_if = "Option::is_none")]
pub elasticsearch: Option<ElasticsearchAction>,
#[serde(rename = "firehose")]
#[serde(skip_serializing_if = "Option::is_none")]
pub firehose: Option<FirehoseAction>,
#[serde(rename = "iotAnalytics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iot_analytics: Option<IotAnalyticsAction>,
#[serde(rename = "iotEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iot_events: Option<IotEventsAction>,
#[serde(rename = "kinesis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kinesis: Option<KinesisAction>,
#[serde(rename = "lambda")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda: Option<LambdaAction>,
#[serde(rename = "republish")]
#[serde(skip_serializing_if = "Option::is_none")]
pub republish: Option<RepublishAction>,
#[serde(rename = "s3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3: Option<S3Action>,
#[serde(rename = "salesforce")]
#[serde(skip_serializing_if = "Option::is_none")]
pub salesforce: Option<SalesforceAction>,
#[serde(rename = "sns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sns: Option<SnsAction>,
#[serde(rename = "sqs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sqs: Option<SqsAction>,
#[serde(rename = "stepFunctions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub step_functions: Option<StepFunctionsAction>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ActiveViolation {
#[serde(rename = "behavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub behavior: Option<Behavior>,
#[serde(rename = "lastViolationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_violation_time: Option<f64>,
#[serde(rename = "lastViolationValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_violation_value: Option<MetricValue>,
#[serde(rename = "securityProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_name: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
#[serde(rename = "violationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub violation_id: Option<String>,
#[serde(rename = "violationStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub violation_start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddThingToBillingGroupRequest {
#[serde(rename = "billingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_arn: Option<String>,
#[serde(rename = "billingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_name: Option<String>,
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddThingToBillingGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddThingToThingGroupRequest {
#[serde(rename = "overrideDynamicGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub override_dynamic_groups: Option<bool>,
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
#[serde(rename = "thingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_arn: Option<String>,
#[serde(rename = "thingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_name: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddThingToThingGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AlertTarget {
#[serde(rename = "alertTargetArn")]
pub alert_target_arn: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Allowed {
#[serde(rename = "policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<Vec<Policy>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateTargetsWithJobRequest {
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[serde(rename = "jobId")]
pub job_id: String,
#[serde(rename = "targets")]
pub targets: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateTargetsWithJobResponse {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "jobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_arn: Option<String>,
#[serde(rename = "jobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachPolicyRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
#[serde(rename = "target")]
pub target: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachPrincipalPolicyRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
#[serde(rename = "principal")]
pub principal: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachSecurityProfileRequest {
#[serde(rename = "securityProfileName")]
pub security_profile_name: String,
#[serde(rename = "securityProfileTargetArn")]
pub security_profile_target_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AttachSecurityProfileResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachThingPrincipalRequest {
#[serde(rename = "principal")]
pub principal: String,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AttachThingPrincipalResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AttributePayload {
#[serde(rename = "attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "merge")]
#[serde(skip_serializing_if = "Option::is_none")]
pub merge: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AuditCheckConfiguration {
#[serde(rename = "enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuditCheckDetails {
#[serde(rename = "checkCompliant")]
#[serde(skip_serializing_if = "Option::is_none")]
pub check_compliant: Option<bool>,
#[serde(rename = "checkRunStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub check_run_status: Option<String>,
#[serde(rename = "errorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "nonCompliantResourcesCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub non_compliant_resources_count: Option<i64>,
#[serde(rename = "totalResourcesCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_resources_count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuditFinding {
#[serde(rename = "checkName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub check_name: Option<String>,
#[serde(rename = "findingTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub finding_time: Option<f64>,
#[serde(rename = "nonCompliantResource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub non_compliant_resource: Option<NonCompliantResource>,
#[serde(rename = "reasonForNonCompliance")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reason_for_non_compliance: Option<String>,
#[serde(rename = "reasonForNonComplianceCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reason_for_non_compliance_code: Option<String>,
#[serde(rename = "relatedResources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub related_resources: Option<Vec<RelatedResource>>,
#[serde(rename = "severity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub severity: Option<String>,
#[serde(rename = "taskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_id: Option<String>,
#[serde(rename = "taskStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AuditNotificationTarget {
#[serde(rename = "enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "targetArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuditTaskMetadata {
#[serde(rename = "taskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_id: Option<String>,
#[serde(rename = "taskStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_status: Option<String>,
#[serde(rename = "taskType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AuthInfo {
#[serde(rename = "actionType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub action_type: Option<String>,
#[serde(rename = "resources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resources: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuthResult {
#[serde(rename = "allowed")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed: Option<Allowed>,
#[serde(rename = "authDecision")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_decision: Option<String>,
#[serde(rename = "authInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_info: Option<AuthInfo>,
#[serde(rename = "denied")]
#[serde(skip_serializing_if = "Option::is_none")]
pub denied: Option<Denied>,
#[serde(rename = "missingContextValues")]
#[serde(skip_serializing_if = "Option::is_none")]
pub missing_context_values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuthorizerDescription {
#[serde(rename = "authorizerArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_arn: Option<String>,
#[serde(rename = "authorizerFunctionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_function_arn: Option<String>,
#[serde(rename = "authorizerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_name: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "tokenKeyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub token_key_name: Option<String>,
#[serde(rename = "tokenSigningPublicKeys")]
#[serde(skip_serializing_if = "Option::is_none")]
pub token_signing_public_keys: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuthorizerSummary {
#[serde(rename = "authorizerArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_arn: Option<String>,
#[serde(rename = "authorizerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AwsJobExecutionsRolloutConfig {
#[serde(rename = "maximumPerMinute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_per_minute: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Behavior {
#[serde(rename = "criteria")]
#[serde(skip_serializing_if = "Option::is_none")]
pub criteria: Option<BehaviorCriteria>,
#[serde(rename = "metric")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metric: Option<String>,
#[serde(rename = "name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BehaviorCriteria {
#[serde(rename = "comparisonOperator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comparison_operator: Option<String>,
#[serde(rename = "consecutiveDatapointsToAlarm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consecutive_datapoints_to_alarm: Option<i64>,
#[serde(rename = "consecutiveDatapointsToClear")]
#[serde(skip_serializing_if = "Option::is_none")]
pub consecutive_datapoints_to_clear: Option<i64>,
#[serde(rename = "durationSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub duration_seconds: Option<i64>,
#[serde(rename = "statisticalThreshold")]
#[serde(skip_serializing_if = "Option::is_none")]
pub statistical_threshold: Option<StatisticalThreshold>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<MetricValue>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BillingGroupMetadata {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BillingGroupProperties {
#[serde(rename = "billingGroupDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CACertificate {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CACertificateDescription {
#[serde(rename = "autoRegistrationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_registration_status: Option<String>,
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
#[serde(rename = "certificatePem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_pem: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "customerVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_version: Option<i64>,
#[serde(rename = "generationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generation_id: Option<String>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "ownedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owned_by: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "validity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validity: Option<CertificateValidity>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelAuditTaskRequest {
#[serde(rename = "taskId")]
pub task_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CancelAuditTaskResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelCertificateTransferRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelJobExecutionRequest {
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "force")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
#[serde(rename = "jobId")]
pub job_id: String,
#[serde(rename = "statusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelJobRequest {
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[serde(rename = "force")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
#[serde(rename = "jobId")]
pub job_id: String,
#[serde(rename = "reasonCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reason_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CancelJobResponse {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "jobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_arn: Option<String>,
#[serde(rename = "jobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Certificate {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CertificateDescription {
#[serde(rename = "caCertificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ca_certificate_id: Option<String>,
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
#[serde(rename = "certificatePem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_pem: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "customerVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_version: Option<i64>,
#[serde(rename = "generationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generation_id: Option<String>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "ownedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owned_by: Option<String>,
#[serde(rename = "previousOwnedBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub previous_owned_by: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "transferData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_data: Option<TransferData>,
#[serde(rename = "validity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validity: Option<CertificateValidity>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CertificateValidity {
#[serde(rename = "notAfter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub not_after: Option<f64>,
#[serde(rename = "notBefore")]
#[serde(skip_serializing_if = "Option::is_none")]
pub not_before: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ClearDefaultAuthorizerRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ClearDefaultAuthorizerResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CloudwatchAlarmAction {
#[serde(rename = "alarmName")]
pub alarm_name: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "stateReason")]
pub state_reason: String,
#[serde(rename = "stateValue")]
pub state_value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CloudwatchMetricAction {
#[serde(rename = "metricName")]
pub metric_name: String,
#[serde(rename = "metricNamespace")]
pub metric_namespace: String,
#[serde(rename = "metricTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metric_timestamp: Option<String>,
#[serde(rename = "metricUnit")]
pub metric_unit: String,
#[serde(rename = "metricValue")]
pub metric_value: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CodeSigning {
#[serde(rename = "awsSignerJobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_signer_job_id: Option<String>,
#[serde(rename = "customCodeSigning")]
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_code_signing: Option<CustomCodeSigning>,
#[serde(rename = "startSigningJobParameter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_signing_job_parameter: Option<StartSigningJobParameter>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CodeSigningCertificateChain {
#[serde(rename = "certificateName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_name: Option<String>,
#[serde(rename = "inlineDocument")]
#[serde(skip_serializing_if = "Option::is_none")]
pub inline_document: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CodeSigningSignature {
#[serde(rename = "inlineDocument")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub inline_document: Option<bytes::Bytes>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Configuration {
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateAuthorizerRequest {
#[serde(rename = "authorizerFunctionArn")]
pub authorizer_function_arn: String,
#[serde(rename = "authorizerName")]
pub authorizer_name: String,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "tokenKeyName")]
pub token_key_name: String,
#[serde(rename = "tokenSigningPublicKeys")]
pub token_signing_public_keys: ::std::collections::HashMap<String, String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateAuthorizerResponse {
#[serde(rename = "authorizerArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_arn: Option<String>,
#[serde(rename = "authorizerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateBillingGroupRequest {
#[serde(rename = "billingGroupName")]
pub billing_group_name: String,
#[serde(rename = "billingGroupProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_properties: Option<BillingGroupProperties>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateBillingGroupResponse {
#[serde(rename = "billingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_arn: Option<String>,
#[serde(rename = "billingGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_id: Option<String>,
#[serde(rename = "billingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateCertificateFromCsrRequest {
#[serde(rename = "certificateSigningRequest")]
pub certificate_signing_request: String,
#[serde(rename = "setAsActive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub set_as_active: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateCertificateFromCsrResponse {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
#[serde(rename = "certificatePem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_pem: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDynamicThingGroupRequest {
#[serde(rename = "indexName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_name: Option<String>,
#[serde(rename = "queryString")]
pub query_string: String,
#[serde(rename = "queryVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_version: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "thingGroupName")]
pub thing_group_name: String,
#[serde(rename = "thingGroupProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_properties: Option<ThingGroupProperties>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDynamicThingGroupResponse {
#[serde(rename = "indexName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_name: Option<String>,
#[serde(rename = "queryString")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_string: Option<String>,
#[serde(rename = "queryVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_version: Option<String>,
#[serde(rename = "thingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_arn: Option<String>,
#[serde(rename = "thingGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_id: Option<String>,
#[serde(rename = "thingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateJobRequest {
#[serde(rename = "abortConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub abort_config: Option<AbortConfig>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "document")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document: Option<String>,
#[serde(rename = "documentSource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_source: Option<String>,
#[serde(rename = "jobExecutionsRolloutConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_executions_rollout_config: Option<JobExecutionsRolloutConfig>,
#[serde(rename = "jobId")]
pub job_id: String,
#[serde(rename = "presignedUrlConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub presigned_url_config: Option<PresignedUrlConfig>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "targetSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_selection: Option<String>,
#[serde(rename = "targets")]
pub targets: Vec<String>,
#[serde(rename = "timeoutConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_config: Option<TimeoutConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateJobResponse {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "jobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_arn: Option<String>,
#[serde(rename = "jobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateKeysAndCertificateRequest {
#[serde(rename = "setAsActive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub set_as_active: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateKeysAndCertificateResponse {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
#[serde(rename = "certificatePem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_pem: Option<String>,
#[serde(rename = "keyPair")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_pair: Option<KeyPair>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateOTAUpdateRequest {
#[serde(rename = "additionalParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "awsJobExecutionsRolloutConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_job_executions_rollout_config: Option<AwsJobExecutionsRolloutConfig>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "files")]
pub files: Vec<OTAUpdateFile>,
#[serde(rename = "otaUpdateId")]
pub ota_update_id: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "targetSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_selection: Option<String>,
#[serde(rename = "targets")]
pub targets: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateOTAUpdateResponse {
#[serde(rename = "awsIotJobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_iot_job_arn: Option<String>,
#[serde(rename = "awsIotJobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_iot_job_id: Option<String>,
#[serde(rename = "otaUpdateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_arn: Option<String>,
#[serde(rename = "otaUpdateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_id: Option<String>,
#[serde(rename = "otaUpdateStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreatePolicyRequest {
#[serde(rename = "policyDocument")]
pub policy_document: String,
#[serde(rename = "policyName")]
pub policy_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreatePolicyResponse {
#[serde(rename = "policyArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_arn: Option<String>,
#[serde(rename = "policyDocument")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_document: Option<String>,
#[serde(rename = "policyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_name: Option<String>,
#[serde(rename = "policyVersionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreatePolicyVersionRequest {
#[serde(rename = "policyDocument")]
pub policy_document: String,
#[serde(rename = "policyName")]
pub policy_name: String,
#[serde(rename = "setAsDefault")]
#[serde(skip_serializing_if = "Option::is_none")]
pub set_as_default: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreatePolicyVersionResponse {
#[serde(rename = "isDefaultVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default_version: Option<bool>,
#[serde(rename = "policyArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_arn: Option<String>,
#[serde(rename = "policyDocument")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_document: Option<String>,
#[serde(rename = "policyVersionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateRoleAliasRequest {
#[serde(rename = "credentialDurationSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credential_duration_seconds: Option<i64>,
#[serde(rename = "roleAlias")]
pub role_alias: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateRoleAliasResponse {
#[serde(rename = "roleAlias")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_alias: Option<String>,
#[serde(rename = "roleAliasArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_alias_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateScheduledAuditRequest {
#[serde(rename = "dayOfMonth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_month: Option<String>,
#[serde(rename = "dayOfWeek")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_week: Option<String>,
#[serde(rename = "frequency")]
pub frequency: String,
#[serde(rename = "scheduledAuditName")]
pub scheduled_audit_name: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "targetCheckNames")]
pub target_check_names: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateScheduledAuditResponse {
#[serde(rename = "scheduledAuditArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_audit_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSecurityProfileRequest {
#[serde(rename = "additionalMetricsToRetain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_metrics_to_retain: Option<Vec<String>>,
#[serde(rename = "alertTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alert_targets: Option<::std::collections::HashMap<String, AlertTarget>>,
#[serde(rename = "behaviors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub behaviors: Option<Vec<Behavior>>,
#[serde(rename = "securityProfileDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_description: Option<String>,
#[serde(rename = "securityProfileName")]
pub security_profile_name: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSecurityProfileResponse {
#[serde(rename = "securityProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_arn: Option<String>,
#[serde(rename = "securityProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateStreamRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "files")]
pub files: Vec<StreamFile>,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "streamId")]
pub stream_id: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateStreamResponse {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "streamArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_arn: Option<String>,
#[serde(rename = "streamId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
#[serde(rename = "streamVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateThingGroupRequest {
#[serde(rename = "parentGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_group_name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "thingGroupName")]
pub thing_group_name: String,
#[serde(rename = "thingGroupProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_properties: Option<ThingGroupProperties>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateThingGroupResponse {
#[serde(rename = "thingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_arn: Option<String>,
#[serde(rename = "thingGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_id: Option<String>,
#[serde(rename = "thingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateThingRequest {
#[serde(rename = "attributePayload")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_payload: Option<AttributePayload>,
#[serde(rename = "billingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_name: Option<String>,
#[serde(rename = "thingName")]
pub thing_name: String,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateThingResponse {
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
#[serde(rename = "thingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_id: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateThingTypeRequest {
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "thingTypeName")]
pub thing_type_name: String,
#[serde(rename = "thingTypeProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_properties: Option<ThingTypeProperties>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateThingTypeResponse {
#[serde(rename = "thingTypeArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_arn: Option<String>,
#[serde(rename = "thingTypeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_id: Option<String>,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTopicRuleRequest {
#[serde(rename = "ruleName")]
pub rule_name: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<String>,
#[serde(rename = "topicRulePayload")]
pub topic_rule_payload: TopicRulePayload,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CustomCodeSigning {
#[serde(rename = "certificateChain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_chain: Option<CodeSigningCertificateChain>,
#[serde(rename = "hashAlgorithm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hash_algorithm: Option<String>,
#[serde(rename = "signature")]
#[serde(skip_serializing_if = "Option::is_none")]
pub signature: Option<CodeSigningSignature>,
#[serde(rename = "signatureAlgorithm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub signature_algorithm: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAccountAuditConfigurationRequest {
#[serde(rename = "deleteScheduledAudits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_scheduled_audits: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteAccountAuditConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAuthorizerRequest {
#[serde(rename = "authorizerName")]
pub authorizer_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteAuthorizerResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteBillingGroupRequest {
#[serde(rename = "billingGroupName")]
pub billing_group_name: String,
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteBillingGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteCACertificateRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteCACertificateResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteCertificateRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
#[serde(rename = "forceDelete")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_delete: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDynamicThingGroupRequest {
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "thingGroupName")]
pub thing_group_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDynamicThingGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteJobExecutionRequest {
#[serde(rename = "executionNumber")]
pub execution_number: i64,
#[serde(rename = "force")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
#[serde(rename = "jobId")]
pub job_id: String,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteJobRequest {
#[serde(rename = "force")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
#[serde(rename = "jobId")]
pub job_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteOTAUpdateRequest {
#[serde(rename = "deleteStream")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_stream: Option<bool>,
#[serde(rename = "forceDeleteAWSJob")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_delete_aws_job: Option<bool>,
#[serde(rename = "otaUpdateId")]
pub ota_update_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteOTAUpdateResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeletePolicyRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeletePolicyVersionRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
#[serde(rename = "policyVersionId")]
pub policy_version_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteRegistrationCodeRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteRegistrationCodeResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteRoleAliasRequest {
#[serde(rename = "roleAlias")]
pub role_alias: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteRoleAliasResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteScheduledAuditRequest {
#[serde(rename = "scheduledAuditName")]
pub scheduled_audit_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteScheduledAuditResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteSecurityProfileRequest {
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "securityProfileName")]
pub security_profile_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteSecurityProfileResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteStreamRequest {
#[serde(rename = "streamId")]
pub stream_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteStreamResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteThingGroupRequest {
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "thingGroupName")]
pub thing_group_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteThingGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteThingRequest {
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteThingResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteThingTypeRequest {
#[serde(rename = "thingTypeName")]
pub thing_type_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteThingTypeResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTopicRuleRequest {
#[serde(rename = "ruleName")]
pub rule_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteV2LoggingLevelRequest {
#[serde(rename = "targetName")]
pub target_name: String,
#[serde(rename = "targetType")]
pub target_type: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Denied {
#[serde(rename = "explicitDeny")]
#[serde(skip_serializing_if = "Option::is_none")]
pub explicit_deny: Option<ExplicitDeny>,
#[serde(rename = "implicitDeny")]
#[serde(skip_serializing_if = "Option::is_none")]
pub implicit_deny: Option<ImplicitDeny>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeprecateThingTypeRequest {
#[serde(rename = "thingTypeName")]
pub thing_type_name: String,
#[serde(rename = "undoDeprecate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub undo_deprecate: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeprecateThingTypeResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAccountAuditConfigurationRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAccountAuditConfigurationResponse {
#[serde(rename = "auditCheckConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audit_check_configurations:
Option<::std::collections::HashMap<String, AuditCheckConfiguration>>,
#[serde(rename = "auditNotificationTargetConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audit_notification_target_configurations:
Option<::std::collections::HashMap<String, AuditNotificationTarget>>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAuditTaskRequest {
#[serde(rename = "taskId")]
pub task_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAuditTaskResponse {
#[serde(rename = "auditDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audit_details: Option<::std::collections::HashMap<String, AuditCheckDetails>>,
#[serde(rename = "scheduledAuditName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_audit_name: Option<String>,
#[serde(rename = "taskStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_start_time: Option<f64>,
#[serde(rename = "taskStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_statistics: Option<TaskStatistics>,
#[serde(rename = "taskStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_status: Option<String>,
#[serde(rename = "taskType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAuthorizerRequest {
#[serde(rename = "authorizerName")]
pub authorizer_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAuthorizerResponse {
#[serde(rename = "authorizerDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_description: Option<AuthorizerDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeBillingGroupRequest {
#[serde(rename = "billingGroupName")]
pub billing_group_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeBillingGroupResponse {
#[serde(rename = "billingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_arn: Option<String>,
#[serde(rename = "billingGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_id: Option<String>,
#[serde(rename = "billingGroupMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_metadata: Option<BillingGroupMetadata>,
#[serde(rename = "billingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_name: Option<String>,
#[serde(rename = "billingGroupProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_properties: Option<BillingGroupProperties>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeCACertificateRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeCACertificateResponse {
#[serde(rename = "certificateDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_description: Option<CACertificateDescription>,
#[serde(rename = "registrationConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_config: Option<RegistrationConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeCertificateRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeCertificateResponse {
#[serde(rename = "certificateDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_description: Option<CertificateDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDefaultAuthorizerRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDefaultAuthorizerResponse {
#[serde(rename = "authorizerDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_description: Option<AuthorizerDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeEndpointRequest {
#[serde(rename = "endpointType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeEndpointResponse {
#[serde(rename = "endpointAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint_address: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeEventConfigurationsRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeEventConfigurationsResponse {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "eventConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_configurations: Option<::std::collections::HashMap<String, Configuration>>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeIndexRequest {
#[serde(rename = "indexName")]
pub index_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeIndexResponse {
#[serde(rename = "indexName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_name: Option<String>,
#[serde(rename = "indexStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_status: Option<String>,
#[serde(rename = "schema")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeJobExecutionRequest {
#[serde(rename = "executionNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_number: Option<i64>,
#[serde(rename = "jobId")]
pub job_id: String,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeJobExecutionResponse {
#[serde(rename = "execution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution: Option<JobExecution>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeJobRequest {
#[serde(rename = "jobId")]
pub job_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeJobResponse {
#[serde(rename = "documentSource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document_source: Option<String>,
#[serde(rename = "job")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job: Option<Job>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeRoleAliasRequest {
#[serde(rename = "roleAlias")]
pub role_alias: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeRoleAliasResponse {
#[serde(rename = "roleAliasDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_alias_description: Option<RoleAliasDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeScheduledAuditRequest {
#[serde(rename = "scheduledAuditName")]
pub scheduled_audit_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeScheduledAuditResponse {
#[serde(rename = "dayOfMonth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_month: Option<String>,
#[serde(rename = "dayOfWeek")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_week: Option<String>,
#[serde(rename = "frequency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frequency: Option<String>,
#[serde(rename = "scheduledAuditArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_audit_arn: Option<String>,
#[serde(rename = "scheduledAuditName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_audit_name: Option<String>,
#[serde(rename = "targetCheckNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_check_names: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeSecurityProfileRequest {
#[serde(rename = "securityProfileName")]
pub security_profile_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeSecurityProfileResponse {
#[serde(rename = "additionalMetricsToRetain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_metrics_to_retain: Option<Vec<String>>,
#[serde(rename = "alertTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alert_targets: Option<::std::collections::HashMap<String, AlertTarget>>,
#[serde(rename = "behaviors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub behaviors: Option<Vec<Behavior>>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "securityProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_arn: Option<String>,
#[serde(rename = "securityProfileDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_description: Option<String>,
#[serde(rename = "securityProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_name: Option<String>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeStreamRequest {
#[serde(rename = "streamId")]
pub stream_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeStreamResponse {
#[serde(rename = "streamInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_info: Option<StreamInfo>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeThingGroupRequest {
#[serde(rename = "thingGroupName")]
pub thing_group_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeThingGroupResponse {
#[serde(rename = "indexName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_name: Option<String>,
#[serde(rename = "queryString")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_string: Option<String>,
#[serde(rename = "queryVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_version: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "thingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_arn: Option<String>,
#[serde(rename = "thingGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_id: Option<String>,
#[serde(rename = "thingGroupMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_metadata: Option<ThingGroupMetadata>,
#[serde(rename = "thingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_name: Option<String>,
#[serde(rename = "thingGroupProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_properties: Option<ThingGroupProperties>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeThingRegistrationTaskRequest {
#[serde(rename = "taskId")]
pub task_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeThingRegistrationTaskResponse {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "failureCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_count: Option<i64>,
#[serde(rename = "inputFileBucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_file_bucket: Option<String>,
#[serde(rename = "inputFileKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_file_key: Option<String>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "percentageProgress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub percentage_progress: Option<i64>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "successCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub success_count: Option<i64>,
#[serde(rename = "taskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_id: Option<String>,
#[serde(rename = "templateBody")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_body: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeThingRequest {
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeThingResponse {
#[serde(rename = "attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "billingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_name: Option<String>,
#[serde(rename = "defaultClientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_client_id: Option<String>,
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
#[serde(rename = "thingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_id: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeThingTypeRequest {
#[serde(rename = "thingTypeName")]
pub thing_type_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeThingTypeResponse {
#[serde(rename = "thingTypeArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_arn: Option<String>,
#[serde(rename = "thingTypeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_id: Option<String>,
#[serde(rename = "thingTypeMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_metadata: Option<ThingTypeMetadata>,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
#[serde(rename = "thingTypeProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_properties: Option<ThingTypeProperties>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Destination {
#[serde(rename = "s3Destination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_destination: Option<S3Destination>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachPolicyRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
#[serde(rename = "target")]
pub target: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachPrincipalPolicyRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
#[serde(rename = "principal")]
pub principal: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachSecurityProfileRequest {
#[serde(rename = "securityProfileName")]
pub security_profile_name: String,
#[serde(rename = "securityProfileTargetArn")]
pub security_profile_target_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DetachSecurityProfileResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachThingPrincipalRequest {
#[serde(rename = "principal")]
pub principal: String,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DetachThingPrincipalResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisableTopicRuleRequest {
#[serde(rename = "ruleName")]
pub rule_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DynamoDBAction {
#[serde(rename = "hashKeyField")]
pub hash_key_field: String,
#[serde(rename = "hashKeyType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hash_key_type: Option<String>,
#[serde(rename = "hashKeyValue")]
pub hash_key_value: String,
#[serde(rename = "operation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operation: Option<String>,
#[serde(rename = "payloadField")]
#[serde(skip_serializing_if = "Option::is_none")]
pub payload_field: Option<String>,
#[serde(rename = "rangeKeyField")]
#[serde(skip_serializing_if = "Option::is_none")]
pub range_key_field: Option<String>,
#[serde(rename = "rangeKeyType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub range_key_type: Option<String>,
#[serde(rename = "rangeKeyValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub range_key_value: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "tableName")]
pub table_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DynamoDBv2Action {
#[serde(rename = "putItem")]
pub put_item: PutItemInput,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EffectivePolicy {
#[serde(rename = "policyArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_arn: Option<String>,
#[serde(rename = "policyDocument")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_document: Option<String>,
#[serde(rename = "policyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ElasticsearchAction {
#[serde(rename = "endpoint")]
pub endpoint: String,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "index")]
pub index: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct EnableTopicRuleRequest {
#[serde(rename = "ruleName")]
pub rule_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ErrorInfo {
#[serde(rename = "code")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
#[serde(rename = "message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ExplicitDeny {
#[serde(rename = "policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<Vec<Policy>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ExponentialRolloutRate {
#[serde(rename = "baseRatePerMinute")]
pub base_rate_per_minute: i64,
#[serde(rename = "incrementFactor")]
pub increment_factor: f64,
#[serde(rename = "rateIncreaseCriteria")]
pub rate_increase_criteria: RateIncreaseCriteria,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FileLocation {
#[serde(rename = "s3Location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_location: Option<S3Location>,
#[serde(rename = "stream")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream: Option<Stream>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FirehoseAction {
#[serde(rename = "deliveryStreamName")]
pub delivery_stream_name: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "separator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub separator: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetEffectivePoliciesRequest {
#[serde(rename = "cognitoIdentityPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cognito_identity_pool_id: Option<String>,
#[serde(rename = "principal")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principal: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetEffectivePoliciesResponse {
#[serde(rename = "effectivePolicies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_policies: Option<Vec<EffectivePolicy>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetIndexingConfigurationRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetIndexingConfigurationResponse {
#[serde(rename = "thingGroupIndexingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_indexing_configuration: Option<ThingGroupIndexingConfiguration>,
#[serde(rename = "thingIndexingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_indexing_configuration: Option<ThingIndexingConfiguration>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetJobDocumentRequest {
#[serde(rename = "jobId")]
pub job_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetJobDocumentResponse {
#[serde(rename = "document")]
#[serde(skip_serializing_if = "Option::is_none")]
pub document: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetLoggingOptionsRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetLoggingOptionsResponse {
#[serde(rename = "logLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetOTAUpdateRequest {
#[serde(rename = "otaUpdateId")]
pub ota_update_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetOTAUpdateResponse {
#[serde(rename = "otaUpdateInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_info: Option<OTAUpdateInfo>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetPolicyRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetPolicyResponse {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "defaultVersionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_version_id: Option<String>,
#[serde(rename = "generationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generation_id: Option<String>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "policyArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_arn: Option<String>,
#[serde(rename = "policyDocument")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_document: Option<String>,
#[serde(rename = "policyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetPolicyVersionRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
#[serde(rename = "policyVersionId")]
pub policy_version_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetPolicyVersionResponse {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "generationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generation_id: Option<String>,
#[serde(rename = "isDefaultVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default_version: Option<bool>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "policyArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_arn: Option<String>,
#[serde(rename = "policyDocument")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_document: Option<String>,
#[serde(rename = "policyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_name: Option<String>,
#[serde(rename = "policyVersionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRegistrationCodeRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRegistrationCodeResponse {
#[serde(rename = "registrationCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetStatisticsRequest {
#[serde(rename = "aggregationField")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aggregation_field: Option<String>,
#[serde(rename = "indexName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_name: Option<String>,
#[serde(rename = "queryString")]
pub query_string: String,
#[serde(rename = "queryVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetStatisticsResponse {
#[serde(rename = "statistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub statistics: Option<Statistics>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetTopicRuleRequest {
#[serde(rename = "ruleName")]
pub rule_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetTopicRuleResponse {
#[serde(rename = "rule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule: Option<TopicRule>,
#[serde(rename = "ruleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetV2LoggingOptionsRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetV2LoggingOptionsResponse {
#[serde(rename = "defaultLogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_log_level: Option<String>,
#[serde(rename = "disableAllLogs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_all_logs: Option<bool>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GroupNameAndArn {
#[serde(rename = "groupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
#[serde(rename = "groupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ImplicitDeny {
#[serde(rename = "policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<Vec<Policy>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct IotAnalyticsAction {
#[serde(rename = "channelArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_arn: Option<String>,
#[serde(rename = "channelName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_name: Option<String>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct IotEventsAction {
#[serde(rename = "inputName")]
pub input_name: String,
#[serde(rename = "messageId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message_id: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Job {
#[serde(rename = "abortConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub abort_config: Option<AbortConfig>,
#[serde(rename = "comment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
#[serde(rename = "completedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub completed_at: Option<f64>,
#[serde(rename = "createdAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "forceCanceled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_canceled: Option<bool>,
#[serde(rename = "jobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_arn: Option<String>,
#[serde(rename = "jobExecutionsRolloutConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_executions_rollout_config: Option<JobExecutionsRolloutConfig>,
#[serde(rename = "jobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<String>,
#[serde(rename = "jobProcessDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_process_details: Option<JobProcessDetails>,
#[serde(rename = "lastUpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_at: Option<f64>,
#[serde(rename = "presignedUrlConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub presigned_url_config: Option<PresignedUrlConfig>,
#[serde(rename = "reasonCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reason_code: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "targetSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_selection: Option<String>,
#[serde(rename = "targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<String>>,
#[serde(rename = "timeoutConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_config: Option<TimeoutConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct JobExecution {
#[serde(rename = "approximateSecondsBeforeTimedOut")]
#[serde(skip_serializing_if = "Option::is_none")]
pub approximate_seconds_before_timed_out: Option<i64>,
#[serde(rename = "executionNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_number: Option<i64>,
#[serde(rename = "forceCanceled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_canceled: Option<bool>,
#[serde(rename = "jobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<String>,
#[serde(rename = "lastUpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_at: Option<f64>,
#[serde(rename = "queuedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub queued_at: Option<f64>,
#[serde(rename = "startedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub started_at: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "statusDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_details: Option<JobExecutionStatusDetails>,
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
#[serde(rename = "versionNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version_number: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct JobExecutionStatusDetails {
#[serde(rename = "detailsMap")]
#[serde(skip_serializing_if = "Option::is_none")]
pub details_map: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct JobExecutionSummary {
#[serde(rename = "executionNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_number: Option<i64>,
#[serde(rename = "lastUpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_at: Option<f64>,
#[serde(rename = "queuedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub queued_at: Option<f64>,
#[serde(rename = "startedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub started_at: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct JobExecutionSummaryForJob {
#[serde(rename = "jobExecutionSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_execution_summary: Option<JobExecutionSummary>,
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct JobExecutionSummaryForThing {
#[serde(rename = "jobExecutionSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_execution_summary: Option<JobExecutionSummary>,
#[serde(rename = "jobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct JobExecutionsRolloutConfig {
#[serde(rename = "exponentialRate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exponential_rate: Option<ExponentialRolloutRate>,
#[serde(rename = "maximumPerMinute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub maximum_per_minute: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct JobProcessDetails {
#[serde(rename = "numberOfCanceledThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_canceled_things: Option<i64>,
#[serde(rename = "numberOfFailedThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_failed_things: Option<i64>,
#[serde(rename = "numberOfInProgressThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_in_progress_things: Option<i64>,
#[serde(rename = "numberOfQueuedThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_queued_things: Option<i64>,
#[serde(rename = "numberOfRejectedThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_rejected_things: Option<i64>,
#[serde(rename = "numberOfRemovedThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_removed_things: Option<i64>,
#[serde(rename = "numberOfSucceededThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_succeeded_things: Option<i64>,
#[serde(rename = "numberOfTimedOutThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_timed_out_things: Option<i64>,
#[serde(rename = "processingTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub processing_targets: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct JobSummary {
#[serde(rename = "completedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub completed_at: Option<f64>,
#[serde(rename = "createdAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<f64>,
#[serde(rename = "jobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_arn: Option<String>,
#[serde(rename = "jobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_id: Option<String>,
#[serde(rename = "lastUpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_at: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "targetSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_selection: Option<String>,
#[serde(rename = "thingGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct KeyPair {
#[serde(rename = "PrivateKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub private_key: Option<String>,
#[serde(rename = "PublicKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub public_key: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct KinesisAction {
#[serde(rename = "partitionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub partition_key: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "streamName")]
pub stream_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LambdaAction {
#[serde(rename = "functionArn")]
pub function_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListActiveViolationsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "securityProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_name: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListActiveViolationsResponse {
#[serde(rename = "activeViolations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub active_violations: Option<Vec<ActiveViolation>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAttachedPoliciesRequest {
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
#[serde(rename = "recursive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recursive: Option<bool>,
#[serde(rename = "target")]
pub target: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAttachedPoliciesResponse {
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
#[serde(rename = "policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<Vec<Policy>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAuditFindingsRequest {
#[serde(rename = "checkName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub check_name: Option<String>,
#[serde(rename = "endTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "resourceIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_identifier: Option<ResourceIdentifier>,
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "taskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAuditFindingsResponse {
#[serde(rename = "findings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub findings: Option<Vec<AuditFinding>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAuditTasksRequest {
#[serde(rename = "endTime")]
pub end_time: f64,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "startTime")]
pub start_time: f64,
#[serde(rename = "taskStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_status: Option<String>,
#[serde(rename = "taskType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAuditTasksResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "tasks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tasks: Option<Vec<AuditTaskMetadata>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAuthorizersRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAuthorizersResponse {
#[serde(rename = "authorizers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizers: Option<Vec<AuthorizerSummary>>,
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListBillingGroupsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "namePrefixFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_prefix_filter: Option<String>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListBillingGroupsResponse {
#[serde(rename = "billingGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_groups: Option<Vec<GroupNameAndArn>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListCACertificatesRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListCACertificatesResponse {
#[serde(rename = "certificates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificates: Option<Vec<CACertificate>>,
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListCertificatesByCARequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "caCertificateId")]
pub ca_certificate_id: String,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListCertificatesByCAResponse {
#[serde(rename = "certificates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificates: Option<Vec<Certificate>>,
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListCertificatesRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListCertificatesResponse {
#[serde(rename = "certificates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificates: Option<Vec<Certificate>>,
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListIndicesRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListIndicesResponse {
#[serde(rename = "indexNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_names: Option<Vec<String>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListJobExecutionsForJobRequest {
#[serde(rename = "jobId")]
pub job_id: String,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListJobExecutionsForJobResponse {
#[serde(rename = "executionSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_summaries: Option<Vec<JobExecutionSummaryForJob>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListJobExecutionsForThingRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListJobExecutionsForThingResponse {
#[serde(rename = "executionSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_summaries: Option<Vec<JobExecutionSummaryForThing>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListJobsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "targetSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_selection: Option<String>,
#[serde(rename = "thingGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_id: Option<String>,
#[serde(rename = "thingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListJobsResponse {
#[serde(rename = "jobs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub jobs: Option<Vec<JobSummary>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListOTAUpdatesRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "otaUpdateStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListOTAUpdatesResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "otaUpdates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_updates: Option<Vec<OTAUpdateSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListOutgoingCertificatesRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListOutgoingCertificatesResponse {
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
#[serde(rename = "outgoingCertificates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outgoing_certificates: Option<Vec<OutgoingCertificate>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPoliciesRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPoliciesResponse {
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
#[serde(rename = "policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<Vec<Policy>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPolicyPrincipalsRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
#[serde(rename = "policyName")]
pub policy_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPolicyPrincipalsResponse {
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
#[serde(rename = "principals")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principals: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPolicyVersionsRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPolicyVersionsResponse {
#[serde(rename = "policyVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_versions: Option<Vec<PolicyVersion>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPrincipalPoliciesRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
#[serde(rename = "principal")]
pub principal: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPrincipalPoliciesResponse {
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
#[serde(rename = "policies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policies: Option<Vec<Policy>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPrincipalThingsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "principal")]
pub principal: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPrincipalThingsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "things")]
#[serde(skip_serializing_if = "Option::is_none")]
pub things: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListRoleAliasesRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListRoleAliasesResponse {
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
#[serde(rename = "roleAliases")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_aliases: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListScheduledAuditsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListScheduledAuditsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "scheduledAudits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_audits: Option<Vec<ScheduledAuditMetadata>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSecurityProfilesForTargetRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "recursive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recursive: Option<bool>,
#[serde(rename = "securityProfileTargetArn")]
pub security_profile_target_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListSecurityProfilesForTargetResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "securityProfileTargetMappings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_target_mappings: Option<Vec<SecurityProfileTargetMapping>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSecurityProfilesRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListSecurityProfilesResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "securityProfileIdentifiers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_identifiers: Option<Vec<SecurityProfileIdentifier>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListStreamsRequest {
#[serde(rename = "ascendingOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ascending_order: Option<bool>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListStreamsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "streams")]
#[serde(skip_serializing_if = "Option::is_none")]
pub streams: Option<Vec<StreamSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "resourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTargetsForPolicyRequest {
#[serde(rename = "marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "pageSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub page_size: Option<i64>,
#[serde(rename = "policyName")]
pub policy_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTargetsForPolicyResponse {
#[serde(rename = "nextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
#[serde(rename = "targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTargetsForSecurityProfileRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "securityProfileName")]
pub security_profile_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTargetsForSecurityProfileResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "securityProfileTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_targets: Option<Vec<SecurityProfileTarget>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingGroupsForThingRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingGroupsForThingResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "thingGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_groups: Option<Vec<GroupNameAndArn>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingGroupsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "namePrefixFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_prefix_filter: Option<String>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "parentGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_group: Option<String>,
#[serde(rename = "recursive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recursive: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingGroupsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "thingGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_groups: Option<Vec<GroupNameAndArn>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingPrincipalsRequest {
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingPrincipalsResponse {
#[serde(rename = "principals")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principals: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingRegistrationTaskReportsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "reportType")]
pub report_type: String,
#[serde(rename = "taskId")]
pub task_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingRegistrationTaskReportsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "reportType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub report_type: Option<String>,
#[serde(rename = "resourceLinks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_links: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingRegistrationTasksRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingRegistrationTasksResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "taskIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingTypesRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingTypesResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "thingTypes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_types: Option<Vec<ThingTypeDefinition>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingsInBillingGroupRequest {
#[serde(rename = "billingGroupName")]
pub billing_group_name: String,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingsInBillingGroupResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "things")]
#[serde(skip_serializing_if = "Option::is_none")]
pub things: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingsInThingGroupRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "recursive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recursive: Option<bool>,
#[serde(rename = "thingGroupName")]
pub thing_group_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingsInThingGroupResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "things")]
#[serde(skip_serializing_if = "Option::is_none")]
pub things: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListThingsRequest {
#[serde(rename = "attributeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_name: Option<String>,
#[serde(rename = "attributeValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_value: Option<String>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListThingsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "things")]
#[serde(skip_serializing_if = "Option::is_none")]
pub things: Option<Vec<ThingAttribute>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTopicRulesRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ruleDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_disabled: Option<bool>,
#[serde(rename = "topic")]
#[serde(skip_serializing_if = "Option::is_none")]
pub topic: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTopicRulesResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "rules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rules: Option<Vec<TopicRuleListItem>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListV2LoggingLevelsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "targetType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListV2LoggingLevelsResponse {
#[serde(rename = "logTargetConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_target_configurations: Option<Vec<LogTargetConfiguration>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListViolationEventsRequest {
#[serde(rename = "endTime")]
pub end_time: f64,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "securityProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_name: Option<String>,
#[serde(rename = "startTime")]
pub start_time: f64,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListViolationEventsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "violationEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub violation_events: Option<Vec<ViolationEvent>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LogTarget {
#[serde(rename = "targetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_name: Option<String>,
#[serde(rename = "targetType")]
pub target_type: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct LogTargetConfiguration {
#[serde(rename = "logLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "logTarget")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_target: Option<LogTarget>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct LoggingOptionsPayload {
#[serde(rename = "logLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_level: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MetricValue {
#[serde(rename = "cidrs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidrs: Option<Vec<String>>,
#[serde(rename = "count")]
#[serde(skip_serializing_if = "Option::is_none")]
pub count: Option<i64>,
#[serde(rename = "ports")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ports: Option<Vec<i64>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct NonCompliantResource {
#[serde(rename = "additionalInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_info: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "resourceIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_identifier: Option<ResourceIdentifier>,
#[serde(rename = "resourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OTAUpdateFile {
#[serde(rename = "attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "codeSigning")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code_signing: Option<CodeSigning>,
#[serde(rename = "fileLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_location: Option<FileLocation>,
#[serde(rename = "fileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_name: Option<String>,
#[serde(rename = "fileVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct OTAUpdateInfo {
#[serde(rename = "additionalParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "awsIotJobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_iot_job_arn: Option<String>,
#[serde(rename = "awsIotJobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_iot_job_id: Option<String>,
#[serde(rename = "awsJobExecutionsRolloutConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_job_executions_rollout_config: Option<AwsJobExecutionsRolloutConfig>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "errorInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_info: Option<ErrorInfo>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "otaUpdateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_arn: Option<String>,
#[serde(rename = "otaUpdateFiles")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_files: Option<Vec<OTAUpdateFile>>,
#[serde(rename = "otaUpdateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_id: Option<String>,
#[serde(rename = "otaUpdateStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_status: Option<String>,
#[serde(rename = "targetSelection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_selection: Option<String>,
#[serde(rename = "targets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub targets: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct OTAUpdateSummary {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "otaUpdateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_arn: Option<String>,
#[serde(rename = "otaUpdateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ota_update_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct OutgoingCertificate {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "transferDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_date: Option<f64>,
#[serde(rename = "transferMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_message: Option<String>,
#[serde(rename = "transferredTo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transferred_to: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Policy {
#[serde(rename = "policyArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_arn: Option<String>,
#[serde(rename = "policyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PolicyVersion {
#[serde(rename = "createDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub create_date: Option<f64>,
#[serde(rename = "isDefaultVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_default_version: Option<bool>,
#[serde(rename = "versionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PolicyVersionIdentifier {
#[serde(rename = "policyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_name: Option<String>,
#[serde(rename = "policyVersionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PresignedUrlConfig {
#[serde(rename = "expiresInSec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expires_in_sec: Option<i64>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PutItemInput {
#[serde(rename = "tableName")]
pub table_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RateIncreaseCriteria {
#[serde(rename = "numberOfNotifiedThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_notified_things: Option<i64>,
#[serde(rename = "numberOfSucceededThings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_succeeded_things: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterCACertificateRequest {
#[serde(rename = "allowAutoRegistration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_auto_registration: Option<bool>,
#[serde(rename = "caCertificate")]
pub ca_certificate: String,
#[serde(rename = "registrationConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_config: Option<RegistrationConfig>,
#[serde(rename = "setAsActive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub set_as_active: Option<bool>,
#[serde(rename = "verificationCertificate")]
pub verification_certificate: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterCACertificateResponse {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterCertificateRequest {
#[serde(rename = "caCertificatePem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ca_certificate_pem: Option<String>,
#[serde(rename = "certificatePem")]
pub certificate_pem: String,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterCertificateResponse {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterThingRequest {
#[serde(rename = "parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "templateBody")]
pub template_body: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterThingResponse {
#[serde(rename = "certificatePem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_pem: Option<String>,
#[serde(rename = "resourceArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_arns: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RegistrationConfig {
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "templateBody")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_body: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RejectCertificateTransferRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
#[serde(rename = "rejectReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reject_reason: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RelatedResource {
#[serde(rename = "additionalInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_info: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "resourceIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_identifier: Option<ResourceIdentifier>,
#[serde(rename = "resourceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RemoveThingFromBillingGroupRequest {
#[serde(rename = "billingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_arn: Option<String>,
#[serde(rename = "billingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub billing_group_name: Option<String>,
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RemoveThingFromBillingGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RemoveThingFromThingGroupRequest {
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
#[serde(rename = "thingGroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_arn: Option<String>,
#[serde(rename = "thingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_name: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RemoveThingFromThingGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ReplaceTopicRuleRequest {
#[serde(rename = "ruleName")]
pub rule_name: String,
#[serde(rename = "topicRulePayload")]
pub topic_rule_payload: TopicRulePayload,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RepublishAction {
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "topic")]
pub topic: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceIdentifier {
#[serde(rename = "account")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account: Option<String>,
#[serde(rename = "caCertificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ca_certificate_id: Option<String>,
#[serde(rename = "clientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "cognitoIdentityPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cognito_identity_pool_id: Option<String>,
#[serde(rename = "deviceCertificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_certificate_id: Option<String>,
#[serde(rename = "policyVersionIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_version_identifier: Option<PolicyVersionIdentifier>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RoleAliasDescription {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "credentialDurationSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credential_duration_seconds: Option<i64>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "owner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
#[serde(rename = "roleAlias")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_alias: Option<String>,
#[serde(rename = "roleAliasArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_alias_arn: Option<String>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3Action {
#[serde(rename = "bucketName")]
pub bucket_name: String,
#[serde(rename = "cannedAcl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub canned_acl: Option<String>,
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3Destination {
#[serde(rename = "bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(rename = "prefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefix: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3Location {
#[serde(rename = "bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(rename = "key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SalesforceAction {
#[serde(rename = "token")]
pub token: String,
#[serde(rename = "url")]
pub url: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ScheduledAuditMetadata {
#[serde(rename = "dayOfMonth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_month: Option<String>,
#[serde(rename = "dayOfWeek")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_week: Option<String>,
#[serde(rename = "frequency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frequency: Option<String>,
#[serde(rename = "scheduledAuditArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_audit_arn: Option<String>,
#[serde(rename = "scheduledAuditName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_audit_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SearchIndexRequest {
#[serde(rename = "indexName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_name: Option<String>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "queryString")]
pub query_string: String,
#[serde(rename = "queryVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SearchIndexResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "thingGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_groups: Option<Vec<ThingGroupDocument>>,
#[serde(rename = "things")]
#[serde(skip_serializing_if = "Option::is_none")]
pub things: Option<Vec<ThingDocument>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SecurityProfileIdentifier {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SecurityProfileTarget {
#[serde(rename = "arn")]
pub arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SecurityProfileTargetMapping {
#[serde(rename = "securityProfileIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_identifier: Option<SecurityProfileIdentifier>,
#[serde(rename = "target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<SecurityProfileTarget>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetDefaultAuthorizerRequest {
#[serde(rename = "authorizerName")]
pub authorizer_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SetDefaultAuthorizerResponse {
#[serde(rename = "authorizerArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_arn: Option<String>,
#[serde(rename = "authorizerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetDefaultPolicyVersionRequest {
#[serde(rename = "policyName")]
pub policy_name: String,
#[serde(rename = "policyVersionId")]
pub policy_version_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetLoggingOptionsRequest {
#[serde(rename = "loggingOptionsPayload")]
pub logging_options_payload: LoggingOptionsPayload,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetV2LoggingLevelRequest {
#[serde(rename = "logLevel")]
pub log_level: String,
#[serde(rename = "logTarget")]
pub log_target: LogTarget,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetV2LoggingOptionsRequest {
#[serde(rename = "defaultLogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_log_level: Option<String>,
#[serde(rename = "disableAllLogs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_all_logs: Option<bool>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SigningProfileParameter {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificatePathOnDevice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_path_on_device: Option<String>,
#[serde(rename = "platform")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SnsAction {
#[serde(rename = "messageFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message_format: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "targetArn")]
pub target_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SqsAction {
#[serde(rename = "queueUrl")]
pub queue_url: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "useBase64")]
#[serde(skip_serializing_if = "Option::is_none")]
pub use_base_64: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartOnDemandAuditTaskRequest {
#[serde(rename = "targetCheckNames")]
pub target_check_names: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartOnDemandAuditTaskResponse {
#[serde(rename = "taskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StartSigningJobParameter {
#[serde(rename = "destination")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination: Option<Destination>,
#[serde(rename = "signingProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub signing_profile_name: Option<String>,
#[serde(rename = "signingProfileParameter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub signing_profile_parameter: Option<SigningProfileParameter>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartThingRegistrationTaskRequest {
#[serde(rename = "inputFileBucket")]
pub input_file_bucket: String,
#[serde(rename = "inputFileKey")]
pub input_file_key: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "templateBody")]
pub template_body: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartThingRegistrationTaskResponse {
#[serde(rename = "taskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StatisticalThreshold {
#[serde(rename = "statistic")]
#[serde(skip_serializing_if = "Option::is_none")]
pub statistic: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Statistics {
#[serde(rename = "count")]
#[serde(skip_serializing_if = "Option::is_none")]
pub count: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StepFunctionsAction {
#[serde(rename = "executionNamePrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_name_prefix: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "stateMachineName")]
pub state_machine_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopThingRegistrationTaskRequest {
#[serde(rename = "taskId")]
pub task_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopThingRegistrationTaskResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Stream {
#[serde(rename = "fileId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_id: Option<i64>,
#[serde(rename = "streamId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StreamFile {
#[serde(rename = "fileId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_id: Option<i64>,
#[serde(rename = "s3Location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_location: Option<S3Location>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StreamInfo {
#[serde(rename = "createdAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "files")]
#[serde(skip_serializing_if = "Option::is_none")]
pub files: Option<Vec<StreamFile>>,
#[serde(rename = "lastUpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_at: Option<f64>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "streamArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_arn: Option<String>,
#[serde(rename = "streamId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
#[serde(rename = "streamVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StreamSummary {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "streamArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_arn: Option<String>,
#[serde(rename = "streamId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
#[serde(rename = "streamVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "Key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TaskStatistics {
#[serde(rename = "canceledChecks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub canceled_checks: Option<i64>,
#[serde(rename = "compliantChecks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compliant_checks: Option<i64>,
#[serde(rename = "failedChecks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_checks: Option<i64>,
#[serde(rename = "inProgressChecks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub in_progress_checks: Option<i64>,
#[serde(rename = "nonCompliantChecks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub non_compliant_checks: Option<i64>,
#[serde(rename = "totalChecks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_checks: Option<i64>,
#[serde(rename = "waitingForDataCollectionChecks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub waiting_for_data_collection_checks: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TestAuthorizationRequest {
#[serde(rename = "authInfos")]
pub auth_infos: Vec<AuthInfo>,
#[serde(rename = "clientId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_id: Option<String>,
#[serde(rename = "cognitoIdentityPoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cognito_identity_pool_id: Option<String>,
#[serde(rename = "policyNamesToAdd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_names_to_add: Option<Vec<String>>,
#[serde(rename = "policyNamesToSkip")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_names_to_skip: Option<Vec<String>>,
#[serde(rename = "principal")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principal: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TestAuthorizationResponse {
#[serde(rename = "authResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_results: Option<Vec<AuthResult>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TestInvokeAuthorizerRequest {
#[serde(rename = "authorizerName")]
pub authorizer_name: String,
#[serde(rename = "token")]
pub token: String,
#[serde(rename = "tokenSignature")]
pub token_signature: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TestInvokeAuthorizerResponse {
#[serde(rename = "disconnectAfterInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disconnect_after_in_seconds: Option<i64>,
#[serde(rename = "isAuthenticated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_authenticated: Option<bool>,
#[serde(rename = "policyDocuments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy_documents: Option<Vec<String>>,
#[serde(rename = "principalId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principal_id: Option<String>,
#[serde(rename = "refreshAfterInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub refresh_after_in_seconds: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ThingAttribute {
#[serde(rename = "attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "thingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ThingConnectivity {
#[serde(rename = "connected")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connected: Option<bool>,
#[serde(rename = "timestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ThingDocument {
#[serde(rename = "attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "connectivity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connectivity: Option<ThingConnectivity>,
#[serde(rename = "shadow")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shadow: Option<String>,
#[serde(rename = "thingGroupNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_names: Option<Vec<String>>,
#[serde(rename = "thingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_id: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ThingGroupDocument {
#[serde(rename = "attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "parentGroupNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_group_names: Option<Vec<String>>,
#[serde(rename = "thingGroupDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_description: Option<String>,
#[serde(rename = "thingGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_id: Option<String>,
#[serde(rename = "thingGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ThingGroupIndexingConfiguration {
#[serde(rename = "thingGroupIndexingMode")]
pub thing_group_indexing_mode: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ThingGroupMetadata {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "parentGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_group_name: Option<String>,
#[serde(rename = "rootToParentThingGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_to_parent_thing_groups: Option<Vec<GroupNameAndArn>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ThingGroupProperties {
#[serde(rename = "attributePayload")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_payload: Option<AttributePayload>,
#[serde(rename = "thingGroupDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ThingIndexingConfiguration {
#[serde(rename = "thingConnectivityIndexingMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_connectivity_indexing_mode: Option<String>,
#[serde(rename = "thingIndexingMode")]
pub thing_indexing_mode: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ThingTypeDefinition {
#[serde(rename = "thingTypeArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_arn: Option<String>,
#[serde(rename = "thingTypeMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_metadata: Option<ThingTypeMetadata>,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
#[serde(rename = "thingTypeProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_properties: Option<ThingTypeProperties>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ThingTypeMetadata {
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "deprecated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deprecated: Option<bool>,
#[serde(rename = "deprecationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deprecation_date: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ThingTypeProperties {
#[serde(rename = "searchableAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub searchable_attributes: Option<Vec<String>>,
#[serde(rename = "thingTypeDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TimeoutConfig {
#[serde(rename = "inProgressTimeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub in_progress_timeout_in_minutes: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TopicRule {
#[serde(rename = "actions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub actions: Option<Vec<Action>>,
#[serde(rename = "awsIotSqlVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_iot_sql_version: Option<String>,
#[serde(rename = "createdAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "errorAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_action: Option<Action>,
#[serde(rename = "ruleDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_disabled: Option<bool>,
#[serde(rename = "ruleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_name: Option<String>,
#[serde(rename = "sql")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sql: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TopicRuleListItem {
#[serde(rename = "createdAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<f64>,
#[serde(rename = "ruleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_arn: Option<String>,
#[serde(rename = "ruleDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_disabled: Option<bool>,
#[serde(rename = "ruleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_name: Option<String>,
#[serde(rename = "topicPattern")]
#[serde(skip_serializing_if = "Option::is_none")]
pub topic_pattern: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TopicRulePayload {
#[serde(rename = "actions")]
pub actions: Vec<Action>,
#[serde(rename = "awsIotSqlVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_iot_sql_version: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "errorAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_action: Option<Action>,
#[serde(rename = "ruleDisabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_disabled: Option<bool>,
#[serde(rename = "sql")]
pub sql: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TransferCertificateRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
#[serde(rename = "targetAwsAccount")]
pub target_aws_account: String,
#[serde(rename = "transferMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TransferCertificateResponse {
#[serde(rename = "transferredCertificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transferred_certificate_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TransferData {
#[serde(rename = "acceptDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accept_date: Option<f64>,
#[serde(rename = "rejectDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reject_date: Option<f64>,
#[serde(rename = "rejectReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reject_reason: Option<String>,
#[serde(rename = "transferDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_date: Option<f64>,
#[serde(rename = "transferMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transfer_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UntagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UntagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateAccountAuditConfigurationRequest {
#[serde(rename = "auditCheckConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audit_check_configurations:
Option<::std::collections::HashMap<String, AuditCheckConfiguration>>,
#[serde(rename = "auditNotificationTargetConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audit_notification_target_configurations:
Option<::std::collections::HashMap<String, AuditNotificationTarget>>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAccountAuditConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateAuthorizerRequest {
#[serde(rename = "authorizerFunctionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_function_arn: Option<String>,
#[serde(rename = "authorizerName")]
pub authorizer_name: String,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "tokenKeyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub token_key_name: Option<String>,
#[serde(rename = "tokenSigningPublicKeys")]
#[serde(skip_serializing_if = "Option::is_none")]
pub token_signing_public_keys: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAuthorizerResponse {
#[serde(rename = "authorizerArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_arn: Option<String>,
#[serde(rename = "authorizerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateBillingGroupRequest {
#[serde(rename = "billingGroupName")]
pub billing_group_name: String,
#[serde(rename = "billingGroupProperties")]
pub billing_group_properties: BillingGroupProperties,
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateBillingGroupResponse {
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateCACertificateRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
#[serde(rename = "newAutoRegistrationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub new_auto_registration_status: Option<String>,
#[serde(rename = "newStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub new_status: Option<String>,
#[serde(rename = "registrationConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_config: Option<RegistrationConfig>,
#[serde(rename = "removeAutoRegistration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remove_auto_registration: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateCertificateRequest {
#[serde(rename = "certificateId")]
pub certificate_id: String,
#[serde(rename = "newStatus")]
pub new_status: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDynamicThingGroupRequest {
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "indexName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub index_name: Option<String>,
#[serde(rename = "queryString")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_string: Option<String>,
#[serde(rename = "queryVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_version: Option<String>,
#[serde(rename = "thingGroupName")]
pub thing_group_name: String,
#[serde(rename = "thingGroupProperties")]
pub thing_group_properties: ThingGroupProperties,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDynamicThingGroupResponse {
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateEventConfigurationsRequest {
#[serde(rename = "eventConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_configurations: Option<::std::collections::HashMap<String, Configuration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateEventConfigurationsResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateIndexingConfigurationRequest {
#[serde(rename = "thingGroupIndexingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_group_indexing_configuration: Option<ThingGroupIndexingConfiguration>,
#[serde(rename = "thingIndexingConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_indexing_configuration: Option<ThingIndexingConfiguration>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateIndexingConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateJobRequest {
#[serde(rename = "abortConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub abort_config: Option<AbortConfig>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "jobExecutionsRolloutConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub job_executions_rollout_config: Option<JobExecutionsRolloutConfig>,
#[serde(rename = "jobId")]
pub job_id: String,
#[serde(rename = "presignedUrlConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub presigned_url_config: Option<PresignedUrlConfig>,
#[serde(rename = "timeoutConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_config: Option<TimeoutConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateRoleAliasRequest {
#[serde(rename = "credentialDurationSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credential_duration_seconds: Option<i64>,
#[serde(rename = "roleAlias")]
pub role_alias: String,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateRoleAliasResponse {
#[serde(rename = "roleAlias")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_alias: Option<String>,
#[serde(rename = "roleAliasArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_alias_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateScheduledAuditRequest {
#[serde(rename = "dayOfMonth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_month: Option<String>,
#[serde(rename = "dayOfWeek")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_week: Option<String>,
#[serde(rename = "frequency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frequency: Option<String>,
#[serde(rename = "scheduledAuditName")]
pub scheduled_audit_name: String,
#[serde(rename = "targetCheckNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_check_names: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateScheduledAuditResponse {
#[serde(rename = "scheduledAuditArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_audit_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateSecurityProfileRequest {
#[serde(rename = "additionalMetricsToRetain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_metrics_to_retain: Option<Vec<String>>,
#[serde(rename = "alertTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alert_targets: Option<::std::collections::HashMap<String, AlertTarget>>,
#[serde(rename = "behaviors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub behaviors: Option<Vec<Behavior>>,
#[serde(rename = "deleteAdditionalMetricsToRetain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_additional_metrics_to_retain: Option<bool>,
#[serde(rename = "deleteAlertTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_alert_targets: Option<bool>,
#[serde(rename = "deleteBehaviors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_behaviors: Option<bool>,
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "securityProfileDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_description: Option<String>,
#[serde(rename = "securityProfileName")]
pub security_profile_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateSecurityProfileResponse {
#[serde(rename = "additionalMetricsToRetain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_metrics_to_retain: Option<Vec<String>>,
#[serde(rename = "alertTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alert_targets: Option<::std::collections::HashMap<String, AlertTarget>>,
#[serde(rename = "behaviors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub behaviors: Option<Vec<Behavior>>,
#[serde(rename = "creationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_date: Option<f64>,
#[serde(rename = "lastModifiedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_date: Option<f64>,
#[serde(rename = "securityProfileArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_arn: Option<String>,
#[serde(rename = "securityProfileDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_description: Option<String>,
#[serde(rename = "securityProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_name: Option<String>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateStreamRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "files")]
#[serde(skip_serializing_if = "Option::is_none")]
pub files: Option<Vec<StreamFile>>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
#[serde(rename = "streamId")]
pub stream_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateStreamResponse {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "streamArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_arn: Option<String>,
#[serde(rename = "streamId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_id: Option<String>,
#[serde(rename = "streamVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stream_version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateThingGroupRequest {
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "thingGroupName")]
pub thing_group_name: String,
#[serde(rename = "thingGroupProperties")]
pub thing_group_properties: ThingGroupProperties,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateThingGroupResponse {
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateThingGroupsForThingRequest {
#[serde(rename = "overrideDynamicGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub override_dynamic_groups: Option<bool>,
#[serde(rename = "thingGroupsToAdd")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_groups_to_add: Option<Vec<String>>,
#[serde(rename = "thingGroupsToRemove")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_groups_to_remove: Option<Vec<String>>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateThingGroupsForThingResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateThingRequest {
#[serde(rename = "attributePayload")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attribute_payload: Option<AttributePayload>,
#[serde(rename = "expectedVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expected_version: Option<i64>,
#[serde(rename = "removeThingType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remove_thing_type: Option<bool>,
#[serde(rename = "thingName")]
pub thing_name: String,
#[serde(rename = "thingTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_type_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateThingResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ValidateSecurityProfileBehaviorsRequest {
#[serde(rename = "behaviors")]
pub behaviors: Vec<Behavior>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ValidateSecurityProfileBehaviorsResponse {
#[serde(rename = "valid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub valid: Option<bool>,
#[serde(rename = "validationErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validation_errors: Option<Vec<ValidationError>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ValidationError {
#[serde(rename = "errorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ViolationEvent {
#[serde(rename = "behavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub behavior: Option<Behavior>,
#[serde(rename = "metricValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metric_value: Option<MetricValue>,
#[serde(rename = "securityProfileName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_profile_name: Option<String>,
#[serde(rename = "thingName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_name: Option<String>,
#[serde(rename = "violationEventTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub violation_event_time: Option<f64>,
#[serde(rename = "violationEventType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub violation_event_type: Option<String>,
#[serde(rename = "violationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub violation_id: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum AcceptCertificateTransferError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
TransferAlreadyCompleted(String),
Unauthorized(String),
}
impl AcceptCertificateTransferError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AcceptCertificateTransferError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(AcceptCertificateTransferError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(AcceptCertificateTransferError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AcceptCertificateTransferError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
AcceptCertificateTransferError::ServiceUnavailable(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(AcceptCertificateTransferError::Throttling(
err.msg,
))
}
"TransferAlreadyCompletedException" => {
return RusotoError::Service(
AcceptCertificateTransferError::TransferAlreadyCompleted(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(AcceptCertificateTransferError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AcceptCertificateTransferError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AcceptCertificateTransferError {
fn description(&self) -> &str {
match *self {
AcceptCertificateTransferError::InternalFailure(ref cause) => cause,
AcceptCertificateTransferError::InvalidRequest(ref cause) => cause,
AcceptCertificateTransferError::ResourceNotFound(ref cause) => cause,
AcceptCertificateTransferError::ServiceUnavailable(ref cause) => cause,
AcceptCertificateTransferError::Throttling(ref cause) => cause,
AcceptCertificateTransferError::TransferAlreadyCompleted(ref cause) => cause,
AcceptCertificateTransferError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddThingToBillingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl AddThingToBillingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddThingToBillingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(AddThingToBillingGroupError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(AddThingToBillingGroupError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AddThingToBillingGroupError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(AddThingToBillingGroupError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddThingToBillingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddThingToBillingGroupError {
fn description(&self) -> &str {
match *self {
AddThingToBillingGroupError::InternalFailure(ref cause) => cause,
AddThingToBillingGroupError::InvalidRequest(ref cause) => cause,
AddThingToBillingGroupError::ResourceNotFound(ref cause) => cause,
AddThingToBillingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddThingToThingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl AddThingToThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddThingToThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(AddThingToThingGroupError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(AddThingToThingGroupError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AddThingToThingGroupError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(AddThingToThingGroupError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddThingToThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddThingToThingGroupError {
fn description(&self) -> &str {
match *self {
AddThingToThingGroupError::InternalFailure(ref cause) => cause,
AddThingToThingGroupError::InvalidRequest(ref cause) => cause,
AddThingToThingGroupError::ResourceNotFound(ref cause) => cause,
AddThingToThingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateTargetsWithJobError {
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl AssociateTargetsWithJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateTargetsWithJobError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(AssociateTargetsWithJobError::InvalidRequest(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(AssociateTargetsWithJobError::LimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AssociateTargetsWithJobError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(AssociateTargetsWithJobError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(AssociateTargetsWithJobError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateTargetsWithJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateTargetsWithJobError {
fn description(&self) -> &str {
match *self {
AssociateTargetsWithJobError::InvalidRequest(ref cause) => cause,
AssociateTargetsWithJobError::LimitExceeded(ref cause) => cause,
AssociateTargetsWithJobError::ResourceNotFound(ref cause) => cause,
AssociateTargetsWithJobError::ServiceUnavailable(ref cause) => cause,
AssociateTargetsWithJobError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachPolicyError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl AttachPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(AttachPolicyError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(AttachPolicyError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AttachPolicyError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AttachPolicyError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(AttachPolicyError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(AttachPolicyError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(AttachPolicyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachPolicyError {
fn description(&self) -> &str {
match *self {
AttachPolicyError::InternalFailure(ref cause) => cause,
AttachPolicyError::InvalidRequest(ref cause) => cause,
AttachPolicyError::LimitExceeded(ref cause) => cause,
AttachPolicyError::ResourceNotFound(ref cause) => cause,
AttachPolicyError::ServiceUnavailable(ref cause) => cause,
AttachPolicyError::Throttling(ref cause) => cause,
AttachPolicyError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachPrincipalPolicyError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl AttachPrincipalPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachPrincipalPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(AttachPrincipalPolicyError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(AttachPrincipalPolicyError::InvalidRequest(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(AttachPrincipalPolicyError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AttachPrincipalPolicyError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(AttachPrincipalPolicyError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(AttachPrincipalPolicyError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(AttachPrincipalPolicyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachPrincipalPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachPrincipalPolicyError {
fn description(&self) -> &str {
match *self {
AttachPrincipalPolicyError::InternalFailure(ref cause) => cause,
AttachPrincipalPolicyError::InvalidRequest(ref cause) => cause,
AttachPrincipalPolicyError::LimitExceeded(ref cause) => cause,
AttachPrincipalPolicyError::ResourceNotFound(ref cause) => cause,
AttachPrincipalPolicyError::ServiceUnavailable(ref cause) => cause,
AttachPrincipalPolicyError::Throttling(ref cause) => cause,
AttachPrincipalPolicyError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachSecurityProfileError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
Throttling(String),
VersionConflict(String),
}
impl AttachSecurityProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachSecurityProfileError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(AttachSecurityProfileError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(AttachSecurityProfileError::InvalidRequest(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(AttachSecurityProfileError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AttachSecurityProfileError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(AttachSecurityProfileError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(AttachSecurityProfileError::VersionConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachSecurityProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachSecurityProfileError {
fn description(&self) -> &str {
match *self {
AttachSecurityProfileError::InternalFailure(ref cause) => cause,
AttachSecurityProfileError::InvalidRequest(ref cause) => cause,
AttachSecurityProfileError::LimitExceeded(ref cause) => cause,
AttachSecurityProfileError::ResourceNotFound(ref cause) => cause,
AttachSecurityProfileError::Throttling(ref cause) => cause,
AttachSecurityProfileError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachThingPrincipalError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl AttachThingPrincipalError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachThingPrincipalError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(AttachThingPrincipalError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(AttachThingPrincipalError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AttachThingPrincipalError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(AttachThingPrincipalError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(AttachThingPrincipalError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(AttachThingPrincipalError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachThingPrincipalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachThingPrincipalError {
fn description(&self) -> &str {
match *self {
AttachThingPrincipalError::InternalFailure(ref cause) => cause,
AttachThingPrincipalError::InvalidRequest(ref cause) => cause,
AttachThingPrincipalError::ResourceNotFound(ref cause) => cause,
AttachThingPrincipalError::ServiceUnavailable(ref cause) => cause,
AttachThingPrincipalError::Throttling(ref cause) => cause,
AttachThingPrincipalError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelAuditTaskError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl CancelAuditTaskError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelAuditTaskError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CancelAuditTaskError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CancelAuditTaskError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CancelAuditTaskError::ResourceNotFound(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CancelAuditTaskError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CancelAuditTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelAuditTaskError {
fn description(&self) -> &str {
match *self {
CancelAuditTaskError::InternalFailure(ref cause) => cause,
CancelAuditTaskError::InvalidRequest(ref cause) => cause,
CancelAuditTaskError::ResourceNotFound(ref cause) => cause,
CancelAuditTaskError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelCertificateTransferError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
TransferAlreadyCompleted(String),
Unauthorized(String),
}
impl CancelCertificateTransferError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelCertificateTransferError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CancelCertificateTransferError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(CancelCertificateTransferError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CancelCertificateTransferError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
CancelCertificateTransferError::ServiceUnavailable(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(CancelCertificateTransferError::Throttling(
err.msg,
))
}
"TransferAlreadyCompletedException" => {
return RusotoError::Service(
CancelCertificateTransferError::TransferAlreadyCompleted(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(CancelCertificateTransferError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CancelCertificateTransferError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelCertificateTransferError {
fn description(&self) -> &str {
match *self {
CancelCertificateTransferError::InternalFailure(ref cause) => cause,
CancelCertificateTransferError::InvalidRequest(ref cause) => cause,
CancelCertificateTransferError::ResourceNotFound(ref cause) => cause,
CancelCertificateTransferError::ServiceUnavailable(ref cause) => cause,
CancelCertificateTransferError::Throttling(ref cause) => cause,
CancelCertificateTransferError::TransferAlreadyCompleted(ref cause) => cause,
CancelCertificateTransferError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelJobError {
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl CancelJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelJobError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(CancelJobError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CancelJobError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CancelJobError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CancelJobError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CancelJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelJobError {
fn description(&self) -> &str {
match *self {
CancelJobError::InvalidRequest(ref cause) => cause,
CancelJobError::ResourceNotFound(ref cause) => cause,
CancelJobError::ServiceUnavailable(ref cause) => cause,
CancelJobError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelJobExecutionError {
InvalidRequest(String),
InvalidStateTransition(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
VersionConflict(String),
}
impl CancelJobExecutionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelJobExecutionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(CancelJobExecutionError::InvalidRequest(err.msg))
}
"InvalidStateTransitionException" => {
return RusotoError::Service(CancelJobExecutionError::InvalidStateTransition(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CancelJobExecutionError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CancelJobExecutionError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CancelJobExecutionError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(CancelJobExecutionError::VersionConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CancelJobExecutionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelJobExecutionError {
fn description(&self) -> &str {
match *self {
CancelJobExecutionError::InvalidRequest(ref cause) => cause,
CancelJobExecutionError::InvalidStateTransition(ref cause) => cause,
CancelJobExecutionError::ResourceNotFound(ref cause) => cause,
CancelJobExecutionError::ServiceUnavailable(ref cause) => cause,
CancelJobExecutionError::Throttling(ref cause) => cause,
CancelJobExecutionError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ClearDefaultAuthorizerError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ClearDefaultAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ClearDefaultAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ClearDefaultAuthorizerError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ClearDefaultAuthorizerError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ClearDefaultAuthorizerError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ClearDefaultAuthorizerError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ClearDefaultAuthorizerError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ClearDefaultAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ClearDefaultAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ClearDefaultAuthorizerError {
fn description(&self) -> &str {
match *self {
ClearDefaultAuthorizerError::InternalFailure(ref cause) => cause,
ClearDefaultAuthorizerError::InvalidRequest(ref cause) => cause,
ClearDefaultAuthorizerError::ResourceNotFound(ref cause) => cause,
ClearDefaultAuthorizerError::ServiceUnavailable(ref cause) => cause,
ClearDefaultAuthorizerError::Throttling(ref cause) => cause,
ClearDefaultAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAuthorizerError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreateAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateAuthorizerError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateAuthorizerError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateAuthorizerError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateAuthorizerError::ResourceAlreadyExists(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateAuthorizerError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateAuthorizerError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAuthorizerError {
fn description(&self) -> &str {
match *self {
CreateAuthorizerError::InternalFailure(ref cause) => cause,
CreateAuthorizerError::InvalidRequest(ref cause) => cause,
CreateAuthorizerError::LimitExceeded(ref cause) => cause,
CreateAuthorizerError::ResourceAlreadyExists(ref cause) => cause,
CreateAuthorizerError::ServiceUnavailable(ref cause) => cause,
CreateAuthorizerError::Throttling(ref cause) => cause,
CreateAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateBillingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
Throttling(String),
}
impl CreateBillingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBillingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateBillingGroupError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateBillingGroupError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateBillingGroupError::ResourceAlreadyExists(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CreateBillingGroupError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateBillingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateBillingGroupError {
fn description(&self) -> &str {
match *self {
CreateBillingGroupError::InternalFailure(ref cause) => cause,
CreateBillingGroupError::InvalidRequest(ref cause) => cause,
CreateBillingGroupError::ResourceAlreadyExists(ref cause) => cause,
CreateBillingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateCertificateFromCsrError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreateCertificateFromCsrError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCertificateFromCsrError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateCertificateFromCsrError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateCertificateFromCsrError::InvalidRequest(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateCertificateFromCsrError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CreateCertificateFromCsrError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateCertificateFromCsrError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateCertificateFromCsrError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateCertificateFromCsrError {
fn description(&self) -> &str {
match *self {
CreateCertificateFromCsrError::InternalFailure(ref cause) => cause,
CreateCertificateFromCsrError::InvalidRequest(ref cause) => cause,
CreateCertificateFromCsrError::ServiceUnavailable(ref cause) => cause,
CreateCertificateFromCsrError::Throttling(ref cause) => cause,
CreateCertificateFromCsrError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDynamicThingGroupError {
InternalFailure(String),
InvalidQuery(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
Throttling(String),
}
impl CreateDynamicThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDynamicThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateDynamicThingGroupError::InternalFailure(
err.msg,
))
}
"InvalidQueryException" => {
return RusotoError::Service(CreateDynamicThingGroupError::InvalidQuery(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateDynamicThingGroupError::InvalidRequest(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateDynamicThingGroupError::LimitExceeded(
err.msg,
))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(
CreateDynamicThingGroupError::ResourceAlreadyExists(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateDynamicThingGroupError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CreateDynamicThingGroupError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDynamicThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDynamicThingGroupError {
fn description(&self) -> &str {
match *self {
CreateDynamicThingGroupError::InternalFailure(ref cause) => cause,
CreateDynamicThingGroupError::InvalidQuery(ref cause) => cause,
CreateDynamicThingGroupError::InvalidRequest(ref cause) => cause,
CreateDynamicThingGroupError::LimitExceeded(ref cause) => cause,
CreateDynamicThingGroupError::ResourceAlreadyExists(ref cause) => cause,
CreateDynamicThingGroupError::ResourceNotFound(ref cause) => cause,
CreateDynamicThingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateJobError {
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl CreateJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateJobError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(CreateJobError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateJobError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateJobError::ResourceAlreadyExists(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateJobError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateJobError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateJobError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateJobError {
fn description(&self) -> &str {
match *self {
CreateJobError::InvalidRequest(ref cause) => cause,
CreateJobError::LimitExceeded(ref cause) => cause,
CreateJobError::ResourceAlreadyExists(ref cause) => cause,
CreateJobError::ResourceNotFound(ref cause) => cause,
CreateJobError::ServiceUnavailable(ref cause) => cause,
CreateJobError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateKeysAndCertificateError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreateKeysAndCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateKeysAndCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateKeysAndCertificateError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateKeysAndCertificateError::InvalidRequest(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateKeysAndCertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CreateKeysAndCertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateKeysAndCertificateError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateKeysAndCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateKeysAndCertificateError {
fn description(&self) -> &str {
match *self {
CreateKeysAndCertificateError::InternalFailure(ref cause) => cause,
CreateKeysAndCertificateError::InvalidRequest(ref cause) => cause,
CreateKeysAndCertificateError::ServiceUnavailable(ref cause) => cause,
CreateKeysAndCertificateError::Throttling(ref cause) => cause,
CreateKeysAndCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateOTAUpdateError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreateOTAUpdateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateOTAUpdateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateOTAUpdateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateOTAUpdateError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateOTAUpdateError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateOTAUpdateError::ResourceAlreadyExists(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateOTAUpdateError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateOTAUpdateError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateOTAUpdateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateOTAUpdateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateOTAUpdateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateOTAUpdateError {
fn description(&self) -> &str {
match *self {
CreateOTAUpdateError::InternalFailure(ref cause) => cause,
CreateOTAUpdateError::InvalidRequest(ref cause) => cause,
CreateOTAUpdateError::LimitExceeded(ref cause) => cause,
CreateOTAUpdateError::ResourceAlreadyExists(ref cause) => cause,
CreateOTAUpdateError::ResourceNotFound(ref cause) => cause,
CreateOTAUpdateError::ServiceUnavailable(ref cause) => cause,
CreateOTAUpdateError::Throttling(ref cause) => cause,
CreateOTAUpdateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePolicyError {
InternalFailure(String),
InvalidRequest(String),
MalformedPolicy(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreatePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreatePolicyError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreatePolicyError::InvalidRequest(err.msg))
}
"MalformedPolicyException" => {
return RusotoError::Service(CreatePolicyError::MalformedPolicy(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreatePolicyError::ResourceAlreadyExists(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreatePolicyError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreatePolicyError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreatePolicyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreatePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePolicyError {
fn description(&self) -> &str {
match *self {
CreatePolicyError::InternalFailure(ref cause) => cause,
CreatePolicyError::InvalidRequest(ref cause) => cause,
CreatePolicyError::MalformedPolicy(ref cause) => cause,
CreatePolicyError::ResourceAlreadyExists(ref cause) => cause,
CreatePolicyError::ServiceUnavailable(ref cause) => cause,
CreatePolicyError::Throttling(ref cause) => cause,
CreatePolicyError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePolicyVersionError {
InternalFailure(String),
InvalidRequest(String),
MalformedPolicy(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
VersionsLimitExceeded(String),
}
impl CreatePolicyVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePolicyVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreatePolicyVersionError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreatePolicyVersionError::InvalidRequest(err.msg))
}
"MalformedPolicyException" => {
return RusotoError::Service(CreatePolicyVersionError::MalformedPolicy(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreatePolicyVersionError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreatePolicyVersionError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CreatePolicyVersionError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreatePolicyVersionError::Unauthorized(err.msg))
}
"VersionsLimitExceededException" => {
return RusotoError::Service(CreatePolicyVersionError::VersionsLimitExceeded(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreatePolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePolicyVersionError {
fn description(&self) -> &str {
match *self {
CreatePolicyVersionError::InternalFailure(ref cause) => cause,
CreatePolicyVersionError::InvalidRequest(ref cause) => cause,
CreatePolicyVersionError::MalformedPolicy(ref cause) => cause,
CreatePolicyVersionError::ResourceNotFound(ref cause) => cause,
CreatePolicyVersionError::ServiceUnavailable(ref cause) => cause,
CreatePolicyVersionError::Throttling(ref cause) => cause,
CreatePolicyVersionError::Unauthorized(ref cause) => cause,
CreatePolicyVersionError::VersionsLimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateRoleAliasError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreateRoleAliasError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRoleAliasError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateRoleAliasError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateRoleAliasError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateRoleAliasError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateRoleAliasError::ResourceAlreadyExists(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateRoleAliasError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateRoleAliasError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateRoleAliasError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateRoleAliasError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRoleAliasError {
fn description(&self) -> &str {
match *self {
CreateRoleAliasError::InternalFailure(ref cause) => cause,
CreateRoleAliasError::InvalidRequest(ref cause) => cause,
CreateRoleAliasError::LimitExceeded(ref cause) => cause,
CreateRoleAliasError::ResourceAlreadyExists(ref cause) => cause,
CreateRoleAliasError::ServiceUnavailable(ref cause) => cause,
CreateRoleAliasError::Throttling(ref cause) => cause,
CreateRoleAliasError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateScheduledAuditError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
Throttling(String),
}
impl CreateScheduledAuditError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateScheduledAuditError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateScheduledAuditError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateScheduledAuditError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateScheduledAuditError::LimitExceeded(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateScheduledAuditError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateScheduledAuditError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateScheduledAuditError {
fn description(&self) -> &str {
match *self {
CreateScheduledAuditError::InternalFailure(ref cause) => cause,
CreateScheduledAuditError::InvalidRequest(ref cause) => cause,
CreateScheduledAuditError::LimitExceeded(ref cause) => cause,
CreateScheduledAuditError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSecurityProfileError {
InternalFailure(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
Throttling(String),
}
impl CreateSecurityProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSecurityProfileError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateSecurityProfileError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateSecurityProfileError::InvalidRequest(
err.msg,
))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateSecurityProfileError::ResourceAlreadyExists(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CreateSecurityProfileError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSecurityProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSecurityProfileError {
fn description(&self) -> &str {
match *self {
CreateSecurityProfileError::InternalFailure(ref cause) => cause,
CreateSecurityProfileError::InvalidRequest(ref cause) => cause,
CreateSecurityProfileError::ResourceAlreadyExists(ref cause) => cause,
CreateSecurityProfileError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStreamError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreateStreamError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStreamError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateStreamError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateStreamError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateStreamError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateStreamError::ResourceAlreadyExists(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateStreamError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateStreamError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateStreamError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateStreamError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateStreamError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStreamError {
fn description(&self) -> &str {
match *self {
CreateStreamError::InternalFailure(ref cause) => cause,
CreateStreamError::InvalidRequest(ref cause) => cause,
CreateStreamError::LimitExceeded(ref cause) => cause,
CreateStreamError::ResourceAlreadyExists(ref cause) => cause,
CreateStreamError::ResourceNotFound(ref cause) => cause,
CreateStreamError::ServiceUnavailable(ref cause) => cause,
CreateStreamError::Throttling(ref cause) => cause,
CreateStreamError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateThingError {
InternalFailure(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreateThingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateThingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateThingError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateThingError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateThingError::ResourceAlreadyExists(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateThingError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateThingError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateThingError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateThingError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateThingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateThingError {
fn description(&self) -> &str {
match *self {
CreateThingError::InternalFailure(ref cause) => cause,
CreateThingError::InvalidRequest(ref cause) => cause,
CreateThingError::ResourceAlreadyExists(ref cause) => cause,
CreateThingError::ResourceNotFound(ref cause) => cause,
CreateThingError::ServiceUnavailable(ref cause) => cause,
CreateThingError::Throttling(ref cause) => cause,
CreateThingError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateThingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
Throttling(String),
}
impl CreateThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateThingGroupError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateThingGroupError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateThingGroupError::ResourceAlreadyExists(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CreateThingGroupError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateThingGroupError {
fn description(&self) -> &str {
match *self {
CreateThingGroupError::InternalFailure(ref cause) => cause,
CreateThingGroupError::InvalidRequest(ref cause) => cause,
CreateThingGroupError::ResourceAlreadyExists(ref cause) => cause,
CreateThingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateThingTypeError {
InternalFailure(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl CreateThingTypeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateThingTypeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateThingTypeError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateThingTypeError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateThingTypeError::ResourceAlreadyExists(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateThingTypeError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateThingTypeError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateThingTypeError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateThingTypeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateThingTypeError {
fn description(&self) -> &str {
match *self {
CreateThingTypeError::InternalFailure(ref cause) => cause,
CreateThingTypeError::InvalidRequest(ref cause) => cause,
CreateThingTypeError::ResourceAlreadyExists(ref cause) => cause,
CreateThingTypeError::ServiceUnavailable(ref cause) => cause,
CreateThingTypeError::Throttling(ref cause) => cause,
CreateThingTypeError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTopicRuleError {
ConflictingResourceUpdate(String),
Internal(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
SqlParse(String),
}
impl CreateTopicRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTopicRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ConflictingResourceUpdateException" => {
return RusotoError::Service(CreateTopicRuleError::ConflictingResourceUpdate(
err.msg,
))
}
"InternalException" => {
return RusotoError::Service(CreateTopicRuleError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateTopicRuleError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateTopicRuleError::ResourceAlreadyExists(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateTopicRuleError::ServiceUnavailable(err.msg))
}
"SqlParseException" => {
return RusotoError::Service(CreateTopicRuleError::SqlParse(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateTopicRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTopicRuleError {
fn description(&self) -> &str {
match *self {
CreateTopicRuleError::ConflictingResourceUpdate(ref cause) => cause,
CreateTopicRuleError::Internal(ref cause) => cause,
CreateTopicRuleError::InvalidRequest(ref cause) => cause,
CreateTopicRuleError::ResourceAlreadyExists(ref cause) => cause,
CreateTopicRuleError::ServiceUnavailable(ref cause) => cause,
CreateTopicRuleError::SqlParse(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAccountAuditConfigurationError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl DeleteAccountAuditConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteAccountAuditConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(
DeleteAccountAuditConfigurationError::InternalFailure(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DeleteAccountAuditConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DeleteAccountAuditConfigurationError::ResourceNotFound(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(DeleteAccountAuditConfigurationError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteAccountAuditConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAccountAuditConfigurationError {
fn description(&self) -> &str {
match *self {
DeleteAccountAuditConfigurationError::InternalFailure(ref cause) => cause,
DeleteAccountAuditConfigurationError::InvalidRequest(ref cause) => cause,
DeleteAccountAuditConfigurationError::ResourceNotFound(ref cause) => cause,
DeleteAccountAuditConfigurationError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAuthorizerError {
DeleteConflict(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeleteAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"DeleteConflictException" => {
return RusotoError::Service(DeleteAuthorizerError::DeleteConflict(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(DeleteAuthorizerError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteAuthorizerError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteAuthorizerError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteAuthorizerError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteAuthorizerError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAuthorizerError {
fn description(&self) -> &str {
match *self {
DeleteAuthorizerError::DeleteConflict(ref cause) => cause,
DeleteAuthorizerError::InternalFailure(ref cause) => cause,
DeleteAuthorizerError::InvalidRequest(ref cause) => cause,
DeleteAuthorizerError::ResourceNotFound(ref cause) => cause,
DeleteAuthorizerError::ServiceUnavailable(ref cause) => cause,
DeleteAuthorizerError::Throttling(ref cause) => cause,
DeleteAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteBillingGroupError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
VersionConflict(String),
}
impl DeleteBillingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBillingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteBillingGroupError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteBillingGroupError::InvalidRequest(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteBillingGroupError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(DeleteBillingGroupError::VersionConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteBillingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteBillingGroupError {
fn description(&self) -> &str {
match *self {
DeleteBillingGroupError::InternalFailure(ref cause) => cause,
DeleteBillingGroupError::InvalidRequest(ref cause) => cause,
DeleteBillingGroupError::Throttling(ref cause) => cause,
DeleteBillingGroupError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteCACertificateError {
CertificateState(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeleteCACertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCACertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"CertificateStateException" => {
return RusotoError::Service(DeleteCACertificateError::CertificateState(
err.msg,
))
}
"InternalFailureException" => {
return RusotoError::Service(DeleteCACertificateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteCACertificateError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteCACertificateError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteCACertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteCACertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteCACertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteCACertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteCACertificateError {
fn description(&self) -> &str {
match *self {
DeleteCACertificateError::CertificateState(ref cause) => cause,
DeleteCACertificateError::InternalFailure(ref cause) => cause,
DeleteCACertificateError::InvalidRequest(ref cause) => cause,
DeleteCACertificateError::ResourceNotFound(ref cause) => cause,
DeleteCACertificateError::ServiceUnavailable(ref cause) => cause,
DeleteCACertificateError::Throttling(ref cause) => cause,
DeleteCACertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteCertificateError {
CertificateState(String),
DeleteConflict(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeleteCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"CertificateStateException" => {
return RusotoError::Service(DeleteCertificateError::CertificateState(err.msg))
}
"DeleteConflictException" => {
return RusotoError::Service(DeleteCertificateError::DeleteConflict(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(DeleteCertificateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteCertificateError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteCertificateError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteCertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteCertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteCertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteCertificateError {
fn description(&self) -> &str {
match *self {
DeleteCertificateError::CertificateState(ref cause) => cause,
DeleteCertificateError::DeleteConflict(ref cause) => cause,
DeleteCertificateError::InternalFailure(ref cause) => cause,
DeleteCertificateError::InvalidRequest(ref cause) => cause,
DeleteCertificateError::ResourceNotFound(ref cause) => cause,
DeleteCertificateError::ServiceUnavailable(ref cause) => cause,
DeleteCertificateError::Throttling(ref cause) => cause,
DeleteCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDynamicThingGroupError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
VersionConflict(String),
}
impl DeleteDynamicThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDynamicThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteDynamicThingGroupError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteDynamicThingGroupError::InvalidRequest(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteDynamicThingGroupError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(DeleteDynamicThingGroupError::VersionConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDynamicThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDynamicThingGroupError {
fn description(&self) -> &str {
match *self {
DeleteDynamicThingGroupError::InternalFailure(ref cause) => cause,
DeleteDynamicThingGroupError::InvalidRequest(ref cause) => cause,
DeleteDynamicThingGroupError::Throttling(ref cause) => cause,
DeleteDynamicThingGroupError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteJobError {
InvalidRequest(String),
InvalidStateTransition(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DeleteJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteJobError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(DeleteJobError::InvalidRequest(err.msg))
}
"InvalidStateTransitionException" => {
return RusotoError::Service(DeleteJobError::InvalidStateTransition(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DeleteJobError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteJobError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteJobError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteJobError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteJobError {
fn description(&self) -> &str {
match *self {
DeleteJobError::InvalidRequest(ref cause) => cause,
DeleteJobError::InvalidStateTransition(ref cause) => cause,
DeleteJobError::LimitExceeded(ref cause) => cause,
DeleteJobError::ResourceNotFound(ref cause) => cause,
DeleteJobError::ServiceUnavailable(ref cause) => cause,
DeleteJobError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteJobExecutionError {
InvalidRequest(String),
InvalidStateTransition(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DeleteJobExecutionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteJobExecutionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(DeleteJobExecutionError::InvalidRequest(err.msg))
}
"InvalidStateTransitionException" => {
return RusotoError::Service(DeleteJobExecutionError::InvalidStateTransition(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteJobExecutionError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteJobExecutionError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteJobExecutionError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteJobExecutionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteJobExecutionError {
fn description(&self) -> &str {
match *self {
DeleteJobExecutionError::InvalidRequest(ref cause) => cause,
DeleteJobExecutionError::InvalidStateTransition(ref cause) => cause,
DeleteJobExecutionError::ResourceNotFound(ref cause) => cause,
DeleteJobExecutionError::ServiceUnavailable(ref cause) => cause,
DeleteJobExecutionError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteOTAUpdateError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
VersionConflict(String),
}
impl DeleteOTAUpdateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteOTAUpdateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteOTAUpdateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteOTAUpdateError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteOTAUpdateError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteOTAUpdateError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteOTAUpdateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteOTAUpdateError::Unauthorized(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(DeleteOTAUpdateError::VersionConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteOTAUpdateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteOTAUpdateError {
fn description(&self) -> &str {
match *self {
DeleteOTAUpdateError::InternalFailure(ref cause) => cause,
DeleteOTAUpdateError::InvalidRequest(ref cause) => cause,
DeleteOTAUpdateError::ResourceNotFound(ref cause) => cause,
DeleteOTAUpdateError::ServiceUnavailable(ref cause) => cause,
DeleteOTAUpdateError::Throttling(ref cause) => cause,
DeleteOTAUpdateError::Unauthorized(ref cause) => cause,
DeleteOTAUpdateError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePolicyError {
DeleteConflict(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeletePolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"DeleteConflictException" => {
return RusotoError::Service(DeletePolicyError::DeleteConflict(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(DeletePolicyError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeletePolicyError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeletePolicyError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeletePolicyError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeletePolicyError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeletePolicyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeletePolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeletePolicyError {
fn description(&self) -> &str {
match *self {
DeletePolicyError::DeleteConflict(ref cause) => cause,
DeletePolicyError::InternalFailure(ref cause) => cause,
DeletePolicyError::InvalidRequest(ref cause) => cause,
DeletePolicyError::ResourceNotFound(ref cause) => cause,
DeletePolicyError::ServiceUnavailable(ref cause) => cause,
DeletePolicyError::Throttling(ref cause) => cause,
DeletePolicyError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePolicyVersionError {
DeleteConflict(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeletePolicyVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePolicyVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"DeleteConflictException" => {
return RusotoError::Service(DeletePolicyVersionError::DeleteConflict(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(DeletePolicyVersionError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeletePolicyVersionError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeletePolicyVersionError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeletePolicyVersionError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeletePolicyVersionError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeletePolicyVersionError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeletePolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeletePolicyVersionError {
fn description(&self) -> &str {
match *self {
DeletePolicyVersionError::DeleteConflict(ref cause) => cause,
DeletePolicyVersionError::InternalFailure(ref cause) => cause,
DeletePolicyVersionError::InvalidRequest(ref cause) => cause,
DeletePolicyVersionError::ResourceNotFound(ref cause) => cause,
DeletePolicyVersionError::ServiceUnavailable(ref cause) => cause,
DeletePolicyVersionError::Throttling(ref cause) => cause,
DeletePolicyVersionError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRegistrationCodeError {
InternalFailure(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeleteRegistrationCodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRegistrationCodeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteRegistrationCodeError::InternalFailure(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteRegistrationCodeError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteRegistrationCodeError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteRegistrationCodeError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteRegistrationCodeError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRegistrationCodeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRegistrationCodeError {
fn description(&self) -> &str {
match *self {
DeleteRegistrationCodeError::InternalFailure(ref cause) => cause,
DeleteRegistrationCodeError::ResourceNotFound(ref cause) => cause,
DeleteRegistrationCodeError::ServiceUnavailable(ref cause) => cause,
DeleteRegistrationCodeError::Throttling(ref cause) => cause,
DeleteRegistrationCodeError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRoleAliasError {
DeleteConflict(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeleteRoleAliasError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRoleAliasError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"DeleteConflictException" => {
return RusotoError::Service(DeleteRoleAliasError::DeleteConflict(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(DeleteRoleAliasError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteRoleAliasError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteRoleAliasError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteRoleAliasError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteRoleAliasError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteRoleAliasError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRoleAliasError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRoleAliasError {
fn description(&self) -> &str {
match *self {
DeleteRoleAliasError::DeleteConflict(ref cause) => cause,
DeleteRoleAliasError::InternalFailure(ref cause) => cause,
DeleteRoleAliasError::InvalidRequest(ref cause) => cause,
DeleteRoleAliasError::ResourceNotFound(ref cause) => cause,
DeleteRoleAliasError::ServiceUnavailable(ref cause) => cause,
DeleteRoleAliasError::Throttling(ref cause) => cause,
DeleteRoleAliasError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteScheduledAuditError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl DeleteScheduledAuditError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteScheduledAuditError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteScheduledAuditError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteScheduledAuditError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteScheduledAuditError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteScheduledAuditError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteScheduledAuditError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteScheduledAuditError {
fn description(&self) -> &str {
match *self {
DeleteScheduledAuditError::InternalFailure(ref cause) => cause,
DeleteScheduledAuditError::InvalidRequest(ref cause) => cause,
DeleteScheduledAuditError::ResourceNotFound(ref cause) => cause,
DeleteScheduledAuditError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSecurityProfileError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
VersionConflict(String),
}
impl DeleteSecurityProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSecurityProfileError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteSecurityProfileError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteSecurityProfileError::InvalidRequest(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteSecurityProfileError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(DeleteSecurityProfileError::VersionConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteSecurityProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSecurityProfileError {
fn description(&self) -> &str {
match *self {
DeleteSecurityProfileError::InternalFailure(ref cause) => cause,
DeleteSecurityProfileError::InvalidRequest(ref cause) => cause,
DeleteSecurityProfileError::Throttling(ref cause) => cause,
DeleteSecurityProfileError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteStreamError {
DeleteConflict(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeleteStreamError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStreamError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"DeleteConflictException" => {
return RusotoError::Service(DeleteStreamError::DeleteConflict(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(DeleteStreamError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteStreamError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteStreamError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteStreamError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteStreamError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteStreamError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteStreamError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteStreamError {
fn description(&self) -> &str {
match *self {
DeleteStreamError::DeleteConflict(ref cause) => cause,
DeleteStreamError::InternalFailure(ref cause) => cause,
DeleteStreamError::InvalidRequest(ref cause) => cause,
DeleteStreamError::ResourceNotFound(ref cause) => cause,
DeleteStreamError::ServiceUnavailable(ref cause) => cause,
DeleteStreamError::Throttling(ref cause) => cause,
DeleteStreamError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteThingError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
VersionConflict(String),
}
impl DeleteThingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteThingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteThingError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteThingError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteThingError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteThingError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteThingError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteThingError::Unauthorized(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(DeleteThingError::VersionConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteThingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteThingError {
fn description(&self) -> &str {
match *self {
DeleteThingError::InternalFailure(ref cause) => cause,
DeleteThingError::InvalidRequest(ref cause) => cause,
DeleteThingError::ResourceNotFound(ref cause) => cause,
DeleteThingError::ServiceUnavailable(ref cause) => cause,
DeleteThingError::Throttling(ref cause) => cause,
DeleteThingError::Unauthorized(ref cause) => cause,
DeleteThingError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteThingGroupError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
VersionConflict(String),
}
impl DeleteThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteThingGroupError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteThingGroupError::InvalidRequest(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteThingGroupError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(DeleteThingGroupError::VersionConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteThingGroupError {
fn description(&self) -> &str {
match *self {
DeleteThingGroupError::InternalFailure(ref cause) => cause,
DeleteThingGroupError::InvalidRequest(ref cause) => cause,
DeleteThingGroupError::Throttling(ref cause) => cause,
DeleteThingGroupError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteThingTypeError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeleteThingTypeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteThingTypeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteThingTypeError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteThingTypeError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteThingTypeError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteThingTypeError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteThingTypeError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteThingTypeError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteThingTypeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteThingTypeError {
fn description(&self) -> &str {
match *self {
DeleteThingTypeError::InternalFailure(ref cause) => cause,
DeleteThingTypeError::InvalidRequest(ref cause) => cause,
DeleteThingTypeError::ResourceNotFound(ref cause) => cause,
DeleteThingTypeError::ServiceUnavailable(ref cause) => cause,
DeleteThingTypeError::Throttling(ref cause) => cause,
DeleteThingTypeError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTopicRuleError {
ConflictingResourceUpdate(String),
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
Unauthorized(String),
}
impl DeleteTopicRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTopicRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ConflictingResourceUpdateException" => {
return RusotoError::Service(DeleteTopicRuleError::ConflictingResourceUpdate(
err.msg,
))
}
"InternalException" => {
return RusotoError::Service(DeleteTopicRuleError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteTopicRuleError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteTopicRuleError::ServiceUnavailable(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteTopicRuleError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteTopicRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTopicRuleError {
fn description(&self) -> &str {
match *self {
DeleteTopicRuleError::ConflictingResourceUpdate(ref cause) => cause,
DeleteTopicRuleError::Internal(ref cause) => cause,
DeleteTopicRuleError::InvalidRequest(ref cause) => cause,
DeleteTopicRuleError::ServiceUnavailable(ref cause) => cause,
DeleteTopicRuleError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteV2LoggingLevelError {
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
}
impl DeleteV2LoggingLevelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteV2LoggingLevelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(DeleteV2LoggingLevelError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteV2LoggingLevelError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteV2LoggingLevelError::ServiceUnavailable(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteV2LoggingLevelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteV2LoggingLevelError {
fn description(&self) -> &str {
match *self {
DeleteV2LoggingLevelError::Internal(ref cause) => cause,
DeleteV2LoggingLevelError::InvalidRequest(ref cause) => cause,
DeleteV2LoggingLevelError::ServiceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeprecateThingTypeError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DeprecateThingTypeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeprecateThingTypeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeprecateThingTypeError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeprecateThingTypeError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeprecateThingTypeError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeprecateThingTypeError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeprecateThingTypeError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeprecateThingTypeError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeprecateThingTypeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeprecateThingTypeError {
fn description(&self) -> &str {
match *self {
DeprecateThingTypeError::InternalFailure(ref cause) => cause,
DeprecateThingTypeError::InvalidRequest(ref cause) => cause,
DeprecateThingTypeError::ResourceNotFound(ref cause) => cause,
DeprecateThingTypeError::ServiceUnavailable(ref cause) => cause,
DeprecateThingTypeError::Throttling(ref cause) => cause,
DeprecateThingTypeError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountAuditConfigurationError {
InternalFailure(String),
Throttling(String),
}
impl DescribeAccountAuditConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeAccountAuditConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(
DescribeAccountAuditConfigurationError::InternalFailure(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(
DescribeAccountAuditConfigurationError::Throttling(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeAccountAuditConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAccountAuditConfigurationError {
fn description(&self) -> &str {
match *self {
DescribeAccountAuditConfigurationError::InternalFailure(ref cause) => cause,
DescribeAccountAuditConfigurationError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAuditTaskError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl DescribeAuditTaskError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAuditTaskError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeAuditTaskError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeAuditTaskError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeAuditTaskError::ResourceNotFound(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeAuditTaskError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeAuditTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAuditTaskError {
fn description(&self) -> &str {
match *self {
DescribeAuditTaskError::InternalFailure(ref cause) => cause,
DescribeAuditTaskError::InvalidRequest(ref cause) => cause,
DescribeAuditTaskError::ResourceNotFound(ref cause) => cause,
DescribeAuditTaskError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAuthorizerError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeAuthorizerError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeAuthorizerError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeAuthorizerError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeAuthorizerError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeAuthorizerError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAuthorizerError {
fn description(&self) -> &str {
match *self {
DescribeAuthorizerError::InternalFailure(ref cause) => cause,
DescribeAuthorizerError::InvalidRequest(ref cause) => cause,
DescribeAuthorizerError::ResourceNotFound(ref cause) => cause,
DescribeAuthorizerError::ServiceUnavailable(ref cause) => cause,
DescribeAuthorizerError::Throttling(ref cause) => cause,
DescribeAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeBillingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl DescribeBillingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBillingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeBillingGroupError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeBillingGroupError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeBillingGroupError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeBillingGroupError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeBillingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeBillingGroupError {
fn description(&self) -> &str {
match *self {
DescribeBillingGroupError::InternalFailure(ref cause) => cause,
DescribeBillingGroupError::InvalidRequest(ref cause) => cause,
DescribeBillingGroupError::ResourceNotFound(ref cause) => cause,
DescribeBillingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeCACertificateError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeCACertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCACertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeCACertificateError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeCACertificateError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeCACertificateError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeCACertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeCACertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeCACertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeCACertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeCACertificateError {
fn description(&self) -> &str {
match *self {
DescribeCACertificateError::InternalFailure(ref cause) => cause,
DescribeCACertificateError::InvalidRequest(ref cause) => cause,
DescribeCACertificateError::ResourceNotFound(ref cause) => cause,
DescribeCACertificateError::ServiceUnavailable(ref cause) => cause,
DescribeCACertificateError::Throttling(ref cause) => cause,
DescribeCACertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeCertificateError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeCertificateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeCertificateError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeCertificateError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeCertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeCertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeCertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeCertificateError {
fn description(&self) -> &str {
match *self {
DescribeCertificateError::InternalFailure(ref cause) => cause,
DescribeCertificateError::InvalidRequest(ref cause) => cause,
DescribeCertificateError::ResourceNotFound(ref cause) => cause,
DescribeCertificateError::ServiceUnavailable(ref cause) => cause,
DescribeCertificateError::Throttling(ref cause) => cause,
DescribeCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDefaultAuthorizerError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeDefaultAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDefaultAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeDefaultAuthorizerError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeDefaultAuthorizerError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeDefaultAuthorizerError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
DescribeDefaultAuthorizerError::ServiceUnavailable(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(DescribeDefaultAuthorizerError::Throttling(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeDefaultAuthorizerError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDefaultAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDefaultAuthorizerError {
fn description(&self) -> &str {
match *self {
DescribeDefaultAuthorizerError::InternalFailure(ref cause) => cause,
DescribeDefaultAuthorizerError::InvalidRequest(ref cause) => cause,
DescribeDefaultAuthorizerError::ResourceNotFound(ref cause) => cause,
DescribeDefaultAuthorizerError::ServiceUnavailable(ref cause) => cause,
DescribeDefaultAuthorizerError::Throttling(ref cause) => cause,
DescribeDefaultAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEndpointError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeEndpointError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEndpointError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeEndpointError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeEndpointError::InvalidRequest(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeEndpointError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeEndpointError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeEndpointError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEndpointError {
fn description(&self) -> &str {
match *self {
DescribeEndpointError::InternalFailure(ref cause) => cause,
DescribeEndpointError::InvalidRequest(ref cause) => cause,
DescribeEndpointError::Throttling(ref cause) => cause,
DescribeEndpointError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventConfigurationsError {
InternalFailure(String),
Throttling(String),
}
impl DescribeEventConfigurationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeEventConfigurationsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeEventConfigurationsError::InternalFailure(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeEventConfigurationsError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeEventConfigurationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventConfigurationsError {
fn description(&self) -> &str {
match *self {
DescribeEventConfigurationsError::InternalFailure(ref cause) => cause,
DescribeEventConfigurationsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeIndexError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeIndexError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeIndexError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeIndexError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeIndexError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeIndexError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeIndexError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeIndexError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeIndexError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeIndexError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeIndexError {
fn description(&self) -> &str {
match *self {
DescribeIndexError::InternalFailure(ref cause) => cause,
DescribeIndexError::InvalidRequest(ref cause) => cause,
DescribeIndexError::ResourceNotFound(ref cause) => cause,
DescribeIndexError::ServiceUnavailable(ref cause) => cause,
DescribeIndexError::Throttling(ref cause) => cause,
DescribeIndexError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeJobError {
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DescribeJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeJobError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(DescribeJobError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeJobError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeJobError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeJobError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeJobError {
fn description(&self) -> &str {
match *self {
DescribeJobError::InvalidRequest(ref cause) => cause,
DescribeJobError::ResourceNotFound(ref cause) => cause,
DescribeJobError::ServiceUnavailable(ref cause) => cause,
DescribeJobError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeJobExecutionError {
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DescribeJobExecutionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeJobExecutionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(DescribeJobExecutionError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeJobExecutionError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeJobExecutionError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeJobExecutionError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeJobExecutionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeJobExecutionError {
fn description(&self) -> &str {
match *self {
DescribeJobExecutionError::InvalidRequest(ref cause) => cause,
DescribeJobExecutionError::ResourceNotFound(ref cause) => cause,
DescribeJobExecutionError::ServiceUnavailable(ref cause) => cause,
DescribeJobExecutionError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeRoleAliasError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeRoleAliasError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRoleAliasError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeRoleAliasError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeRoleAliasError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeRoleAliasError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeRoleAliasError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeRoleAliasError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeRoleAliasError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeRoleAliasError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeRoleAliasError {
fn description(&self) -> &str {
match *self {
DescribeRoleAliasError::InternalFailure(ref cause) => cause,
DescribeRoleAliasError::InvalidRequest(ref cause) => cause,
DescribeRoleAliasError::ResourceNotFound(ref cause) => cause,
DescribeRoleAliasError::ServiceUnavailable(ref cause) => cause,
DescribeRoleAliasError::Throttling(ref cause) => cause,
DescribeRoleAliasError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeScheduledAuditError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl DescribeScheduledAuditError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeScheduledAuditError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeScheduledAuditError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeScheduledAuditError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeScheduledAuditError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeScheduledAuditError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeScheduledAuditError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeScheduledAuditError {
fn description(&self) -> &str {
match *self {
DescribeScheduledAuditError::InternalFailure(ref cause) => cause,
DescribeScheduledAuditError::InvalidRequest(ref cause) => cause,
DescribeScheduledAuditError::ResourceNotFound(ref cause) => cause,
DescribeScheduledAuditError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSecurityProfileError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl DescribeSecurityProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSecurityProfileError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeSecurityProfileError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeSecurityProfileError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeSecurityProfileError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeSecurityProfileError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeSecurityProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSecurityProfileError {
fn description(&self) -> &str {
match *self {
DescribeSecurityProfileError::InternalFailure(ref cause) => cause,
DescribeSecurityProfileError::InvalidRequest(ref cause) => cause,
DescribeSecurityProfileError::ResourceNotFound(ref cause) => cause,
DescribeSecurityProfileError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStreamError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeStreamError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStreamError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeStreamError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeStreamError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeStreamError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeStreamError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeStreamError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeStreamError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeStreamError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStreamError {
fn description(&self) -> &str {
match *self {
DescribeStreamError::InternalFailure(ref cause) => cause,
DescribeStreamError::InvalidRequest(ref cause) => cause,
DescribeStreamError::ResourceNotFound(ref cause) => cause,
DescribeStreamError::ServiceUnavailable(ref cause) => cause,
DescribeStreamError::Throttling(ref cause) => cause,
DescribeStreamError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeThingError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeThingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeThingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeThingError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeThingError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeThingError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeThingError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeThingError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeThingError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeThingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeThingError {
fn description(&self) -> &str {
match *self {
DescribeThingError::InternalFailure(ref cause) => cause,
DescribeThingError::InvalidRequest(ref cause) => cause,
DescribeThingError::ResourceNotFound(ref cause) => cause,
DescribeThingError::ServiceUnavailable(ref cause) => cause,
DescribeThingError::Throttling(ref cause) => cause,
DescribeThingError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeThingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl DescribeThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeThingGroupError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeThingGroupError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeThingGroupError::ResourceNotFound(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeThingGroupError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeThingGroupError {
fn description(&self) -> &str {
match *self {
DescribeThingGroupError::InternalFailure(ref cause) => cause,
DescribeThingGroupError::InvalidRequest(ref cause) => cause,
DescribeThingGroupError::ResourceNotFound(ref cause) => cause,
DescribeThingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeThingRegistrationTaskError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeThingRegistrationTaskError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeThingRegistrationTaskError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(
DescribeThingRegistrationTaskError::InternalFailure(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DescribeThingRegistrationTaskError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DescribeThingRegistrationTaskError::ResourceNotFound(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(DescribeThingRegistrationTaskError::Throttling(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeThingRegistrationTaskError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeThingRegistrationTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeThingRegistrationTaskError {
fn description(&self) -> &str {
match *self {
DescribeThingRegistrationTaskError::InternalFailure(ref cause) => cause,
DescribeThingRegistrationTaskError::InvalidRequest(ref cause) => cause,
DescribeThingRegistrationTaskError::ResourceNotFound(ref cause) => cause,
DescribeThingRegistrationTaskError::Throttling(ref cause) => cause,
DescribeThingRegistrationTaskError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeThingTypeError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DescribeThingTypeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeThingTypeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeThingTypeError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeThingTypeError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeThingTypeError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeThingTypeError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeThingTypeError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeThingTypeError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeThingTypeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeThingTypeError {
fn description(&self) -> &str {
match *self {
DescribeThingTypeError::InternalFailure(ref cause) => cause,
DescribeThingTypeError::InvalidRequest(ref cause) => cause,
DescribeThingTypeError::ResourceNotFound(ref cause) => cause,
DescribeThingTypeError::ServiceUnavailable(ref cause) => cause,
DescribeThingTypeError::Throttling(ref cause) => cause,
DescribeThingTypeError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachPolicyError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DetachPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DetachPolicyError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DetachPolicyError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(DetachPolicyError::LimitExceeded(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DetachPolicyError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DetachPolicyError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DetachPolicyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachPolicyError {
fn description(&self) -> &str {
match *self {
DetachPolicyError::InternalFailure(ref cause) => cause,
DetachPolicyError::InvalidRequest(ref cause) => cause,
DetachPolicyError::LimitExceeded(ref cause) => cause,
DetachPolicyError::ServiceUnavailable(ref cause) => cause,
DetachPolicyError::Throttling(ref cause) => cause,
DetachPolicyError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachPrincipalPolicyError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DetachPrincipalPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachPrincipalPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DetachPrincipalPolicyError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DetachPrincipalPolicyError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DetachPrincipalPolicyError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DetachPrincipalPolicyError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DetachPrincipalPolicyError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DetachPrincipalPolicyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachPrincipalPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachPrincipalPolicyError {
fn description(&self) -> &str {
match *self {
DetachPrincipalPolicyError::InternalFailure(ref cause) => cause,
DetachPrincipalPolicyError::InvalidRequest(ref cause) => cause,
DetachPrincipalPolicyError::ResourceNotFound(ref cause) => cause,
DetachPrincipalPolicyError::ServiceUnavailable(ref cause) => cause,
DetachPrincipalPolicyError::Throttling(ref cause) => cause,
DetachPrincipalPolicyError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachSecurityProfileError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl DetachSecurityProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachSecurityProfileError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DetachSecurityProfileError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DetachSecurityProfileError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DetachSecurityProfileError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DetachSecurityProfileError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachSecurityProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachSecurityProfileError {
fn description(&self) -> &str {
match *self {
DetachSecurityProfileError::InternalFailure(ref cause) => cause,
DetachSecurityProfileError::InvalidRequest(ref cause) => cause,
DetachSecurityProfileError::ResourceNotFound(ref cause) => cause,
DetachSecurityProfileError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachThingPrincipalError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl DetachThingPrincipalError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachThingPrincipalError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DetachThingPrincipalError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DetachThingPrincipalError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DetachThingPrincipalError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DetachThingPrincipalError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DetachThingPrincipalError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DetachThingPrincipalError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachThingPrincipalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachThingPrincipalError {
fn description(&self) -> &str {
match *self {
DetachThingPrincipalError::InternalFailure(ref cause) => cause,
DetachThingPrincipalError::InvalidRequest(ref cause) => cause,
DetachThingPrincipalError::ResourceNotFound(ref cause) => cause,
DetachThingPrincipalError::ServiceUnavailable(ref cause) => cause,
DetachThingPrincipalError::Throttling(ref cause) => cause,
DetachThingPrincipalError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableTopicRuleError {
ConflictingResourceUpdate(String),
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
Unauthorized(String),
}
impl DisableTopicRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableTopicRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ConflictingResourceUpdateException" => {
return RusotoError::Service(DisableTopicRuleError::ConflictingResourceUpdate(
err.msg,
))
}
"InternalException" => {
return RusotoError::Service(DisableTopicRuleError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DisableTopicRuleError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DisableTopicRuleError::ServiceUnavailable(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DisableTopicRuleError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisableTopicRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableTopicRuleError {
fn description(&self) -> &str {
match *self {
DisableTopicRuleError::ConflictingResourceUpdate(ref cause) => cause,
DisableTopicRuleError::Internal(ref cause) => cause,
DisableTopicRuleError::InvalidRequest(ref cause) => cause,
DisableTopicRuleError::ServiceUnavailable(ref cause) => cause,
DisableTopicRuleError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableTopicRuleError {
ConflictingResourceUpdate(String),
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
Unauthorized(String),
}
impl EnableTopicRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableTopicRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ConflictingResourceUpdateException" => {
return RusotoError::Service(EnableTopicRuleError::ConflictingResourceUpdate(
err.msg,
))
}
"InternalException" => {
return RusotoError::Service(EnableTopicRuleError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(EnableTopicRuleError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(EnableTopicRuleError::ServiceUnavailable(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(EnableTopicRuleError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for EnableTopicRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableTopicRuleError {
fn description(&self) -> &str {
match *self {
EnableTopicRuleError::ConflictingResourceUpdate(ref cause) => cause,
EnableTopicRuleError::Internal(ref cause) => cause,
EnableTopicRuleError::InvalidRequest(ref cause) => cause,
EnableTopicRuleError::ServiceUnavailable(ref cause) => cause,
EnableTopicRuleError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetEffectivePoliciesError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl GetEffectivePoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetEffectivePoliciesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(GetEffectivePoliciesError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(GetEffectivePoliciesError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetEffectivePoliciesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetEffectivePoliciesError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetEffectivePoliciesError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(GetEffectivePoliciesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetEffectivePoliciesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetEffectivePoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetEffectivePoliciesError {
fn description(&self) -> &str {
match *self {
GetEffectivePoliciesError::InternalFailure(ref cause) => cause,
GetEffectivePoliciesError::InvalidRequest(ref cause) => cause,
GetEffectivePoliciesError::LimitExceeded(ref cause) => cause,
GetEffectivePoliciesError::ResourceNotFound(ref cause) => cause,
GetEffectivePoliciesError::ServiceUnavailable(ref cause) => cause,
GetEffectivePoliciesError::Throttling(ref cause) => cause,
GetEffectivePoliciesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIndexingConfigurationError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl GetIndexingConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIndexingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(GetIndexingConfigurationError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(GetIndexingConfigurationError::InvalidRequest(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetIndexingConfigurationError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(GetIndexingConfigurationError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetIndexingConfigurationError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetIndexingConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIndexingConfigurationError {
fn description(&self) -> &str {
match *self {
GetIndexingConfigurationError::InternalFailure(ref cause) => cause,
GetIndexingConfigurationError::InvalidRequest(ref cause) => cause,
GetIndexingConfigurationError::ServiceUnavailable(ref cause) => cause,
GetIndexingConfigurationError::Throttling(ref cause) => cause,
GetIndexingConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetJobDocumentError {
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl GetJobDocumentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetJobDocumentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(GetJobDocumentError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetJobDocumentError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetJobDocumentError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(GetJobDocumentError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetJobDocumentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetJobDocumentError {
fn description(&self) -> &str {
match *self {
GetJobDocumentError::InvalidRequest(ref cause) => cause,
GetJobDocumentError::ResourceNotFound(ref cause) => cause,
GetJobDocumentError::ServiceUnavailable(ref cause) => cause,
GetJobDocumentError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetLoggingOptionsError {
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
}
impl GetLoggingOptionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLoggingOptionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetLoggingOptionsError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(GetLoggingOptionsError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetLoggingOptionsError::ServiceUnavailable(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetLoggingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetLoggingOptionsError {
fn description(&self) -> &str {
match *self {
GetLoggingOptionsError::Internal(ref cause) => cause,
GetLoggingOptionsError::InvalidRequest(ref cause) => cause,
GetLoggingOptionsError::ServiceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetOTAUpdateError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl GetOTAUpdateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetOTAUpdateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(GetOTAUpdateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(GetOTAUpdateError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetOTAUpdateError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetOTAUpdateError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(GetOTAUpdateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetOTAUpdateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetOTAUpdateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetOTAUpdateError {
fn description(&self) -> &str {
match *self {
GetOTAUpdateError::InternalFailure(ref cause) => cause,
GetOTAUpdateError::InvalidRequest(ref cause) => cause,
GetOTAUpdateError::ResourceNotFound(ref cause) => cause,
GetOTAUpdateError::ServiceUnavailable(ref cause) => cause,
GetOTAUpdateError::Throttling(ref cause) => cause,
GetOTAUpdateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetPolicyError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl GetPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(GetPolicyError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(GetPolicyError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetPolicyError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetPolicyError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(GetPolicyError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetPolicyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetPolicyError {
fn description(&self) -> &str {
match *self {
GetPolicyError::InternalFailure(ref cause) => cause,
GetPolicyError::InvalidRequest(ref cause) => cause,
GetPolicyError::ResourceNotFound(ref cause) => cause,
GetPolicyError::ServiceUnavailable(ref cause) => cause,
GetPolicyError::Throttling(ref cause) => cause,
GetPolicyError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetPolicyVersionError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl GetPolicyVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPolicyVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(GetPolicyVersionError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(GetPolicyVersionError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetPolicyVersionError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetPolicyVersionError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(GetPolicyVersionError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetPolicyVersionError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetPolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetPolicyVersionError {
fn description(&self) -> &str {
match *self {
GetPolicyVersionError::InternalFailure(ref cause) => cause,
GetPolicyVersionError::InvalidRequest(ref cause) => cause,
GetPolicyVersionError::ResourceNotFound(ref cause) => cause,
GetPolicyVersionError::ServiceUnavailable(ref cause) => cause,
GetPolicyVersionError::Throttling(ref cause) => cause,
GetPolicyVersionError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRegistrationCodeError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl GetRegistrationCodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRegistrationCodeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(GetRegistrationCodeError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(GetRegistrationCodeError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetRegistrationCodeError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(GetRegistrationCodeError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetRegistrationCodeError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRegistrationCodeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRegistrationCodeError {
fn description(&self) -> &str {
match *self {
GetRegistrationCodeError::InternalFailure(ref cause) => cause,
GetRegistrationCodeError::InvalidRequest(ref cause) => cause,
GetRegistrationCodeError::ServiceUnavailable(ref cause) => cause,
GetRegistrationCodeError::Throttling(ref cause) => cause,
GetRegistrationCodeError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetStatisticsError {
IndexNotReady(String),
InternalFailure(String),
InvalidAggregation(String),
InvalidQuery(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl GetStatisticsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetStatisticsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"IndexNotReadyException" => {
return RusotoError::Service(GetStatisticsError::IndexNotReady(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(GetStatisticsError::InternalFailure(err.msg))
}
"InvalidAggregationException" => {
return RusotoError::Service(GetStatisticsError::InvalidAggregation(err.msg))
}
"InvalidQueryException" => {
return RusotoError::Service(GetStatisticsError::InvalidQuery(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(GetStatisticsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetStatisticsError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetStatisticsError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(GetStatisticsError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetStatisticsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetStatisticsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetStatisticsError {
fn description(&self) -> &str {
match *self {
GetStatisticsError::IndexNotReady(ref cause) => cause,
GetStatisticsError::InternalFailure(ref cause) => cause,
GetStatisticsError::InvalidAggregation(ref cause) => cause,
GetStatisticsError::InvalidQuery(ref cause) => cause,
GetStatisticsError::InvalidRequest(ref cause) => cause,
GetStatisticsError::ResourceNotFound(ref cause) => cause,
GetStatisticsError::ServiceUnavailable(ref cause) => cause,
GetStatisticsError::Throttling(ref cause) => cause,
GetStatisticsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetTopicRuleError {
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
Unauthorized(String),
}
impl GetTopicRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTopicRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetTopicRuleError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(GetTopicRuleError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetTopicRuleError::ServiceUnavailable(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetTopicRuleError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetTopicRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTopicRuleError {
fn description(&self) -> &str {
match *self {
GetTopicRuleError::Internal(ref cause) => cause,
GetTopicRuleError::InvalidRequest(ref cause) => cause,
GetTopicRuleError::ServiceUnavailable(ref cause) => cause,
GetTopicRuleError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetV2LoggingOptionsError {
Internal(String),
NotConfigured(String),
ServiceUnavailable(String),
}
impl GetV2LoggingOptionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetV2LoggingOptionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(GetV2LoggingOptionsError::Internal(err.msg))
}
"NotConfiguredException" => {
return RusotoError::Service(GetV2LoggingOptionsError::NotConfigured(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetV2LoggingOptionsError::ServiceUnavailable(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetV2LoggingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetV2LoggingOptionsError {
fn description(&self) -> &str {
match *self {
GetV2LoggingOptionsError::Internal(ref cause) => cause,
GetV2LoggingOptionsError::NotConfigured(ref cause) => cause,
GetV2LoggingOptionsError::ServiceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListActiveViolationsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl ListActiveViolationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListActiveViolationsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListActiveViolationsError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListActiveViolationsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListActiveViolationsError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListActiveViolationsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListActiveViolationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListActiveViolationsError {
fn description(&self) -> &str {
match *self {
ListActiveViolationsError::InternalFailure(ref cause) => cause,
ListActiveViolationsError::InvalidRequest(ref cause) => cause,
ListActiveViolationsError::ResourceNotFound(ref cause) => cause,
ListActiveViolationsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAttachedPoliciesError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListAttachedPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAttachedPoliciesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListAttachedPoliciesError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListAttachedPoliciesError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListAttachedPoliciesError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListAttachedPoliciesError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListAttachedPoliciesError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListAttachedPoliciesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListAttachedPoliciesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAttachedPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAttachedPoliciesError {
fn description(&self) -> &str {
match *self {
ListAttachedPoliciesError::InternalFailure(ref cause) => cause,
ListAttachedPoliciesError::InvalidRequest(ref cause) => cause,
ListAttachedPoliciesError::LimitExceeded(ref cause) => cause,
ListAttachedPoliciesError::ResourceNotFound(ref cause) => cause,
ListAttachedPoliciesError::ServiceUnavailable(ref cause) => cause,
ListAttachedPoliciesError::Throttling(ref cause) => cause,
ListAttachedPoliciesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAuditFindingsError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
}
impl ListAuditFindingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAuditFindingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListAuditFindingsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListAuditFindingsError::InvalidRequest(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListAuditFindingsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAuditFindingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAuditFindingsError {
fn description(&self) -> &str {
match *self {
ListAuditFindingsError::InternalFailure(ref cause) => cause,
ListAuditFindingsError::InvalidRequest(ref cause) => cause,
ListAuditFindingsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAuditTasksError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
}
impl ListAuditTasksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAuditTasksError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListAuditTasksError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListAuditTasksError::InvalidRequest(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListAuditTasksError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAuditTasksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAuditTasksError {
fn description(&self) -> &str {
match *self {
ListAuditTasksError::InternalFailure(ref cause) => cause,
ListAuditTasksError::InvalidRequest(ref cause) => cause,
ListAuditTasksError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAuthorizersError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListAuthorizersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAuthorizersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListAuthorizersError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListAuthorizersError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListAuthorizersError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListAuthorizersError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListAuthorizersError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAuthorizersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAuthorizersError {
fn description(&self) -> &str {
match *self {
ListAuthorizersError::InternalFailure(ref cause) => cause,
ListAuthorizersError::InvalidRequest(ref cause) => cause,
ListAuthorizersError::ServiceUnavailable(ref cause) => cause,
ListAuthorizersError::Throttling(ref cause) => cause,
ListAuthorizersError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListBillingGroupsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl ListBillingGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBillingGroupsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListBillingGroupsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListBillingGroupsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListBillingGroupsError::ResourceNotFound(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListBillingGroupsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListBillingGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListBillingGroupsError {
fn description(&self) -> &str {
match *self {
ListBillingGroupsError::InternalFailure(ref cause) => cause,
ListBillingGroupsError::InvalidRequest(ref cause) => cause,
ListBillingGroupsError::ResourceNotFound(ref cause) => cause,
ListBillingGroupsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListCACertificatesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListCACertificatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListCACertificatesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListCACertificatesError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListCACertificatesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListCACertificatesError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListCACertificatesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListCACertificatesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListCACertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListCACertificatesError {
fn description(&self) -> &str {
match *self {
ListCACertificatesError::InternalFailure(ref cause) => cause,
ListCACertificatesError::InvalidRequest(ref cause) => cause,
ListCACertificatesError::ServiceUnavailable(ref cause) => cause,
ListCACertificatesError::Throttling(ref cause) => cause,
ListCACertificatesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListCertificatesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListCertificatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListCertificatesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListCertificatesError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListCertificatesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListCertificatesError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListCertificatesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListCertificatesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListCertificatesError {
fn description(&self) -> &str {
match *self {
ListCertificatesError::InternalFailure(ref cause) => cause,
ListCertificatesError::InvalidRequest(ref cause) => cause,
ListCertificatesError::ServiceUnavailable(ref cause) => cause,
ListCertificatesError::Throttling(ref cause) => cause,
ListCertificatesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListCertificatesByCAError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListCertificatesByCAError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListCertificatesByCAError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListCertificatesByCAError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListCertificatesByCAError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListCertificatesByCAError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListCertificatesByCAError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListCertificatesByCAError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListCertificatesByCAError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListCertificatesByCAError {
fn description(&self) -> &str {
match *self {
ListCertificatesByCAError::InternalFailure(ref cause) => cause,
ListCertificatesByCAError::InvalidRequest(ref cause) => cause,
ListCertificatesByCAError::ServiceUnavailable(ref cause) => cause,
ListCertificatesByCAError::Throttling(ref cause) => cause,
ListCertificatesByCAError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListIndicesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListIndicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListIndicesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListIndicesError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListIndicesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListIndicesError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListIndicesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListIndicesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListIndicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListIndicesError {
fn description(&self) -> &str {
match *self {
ListIndicesError::InternalFailure(ref cause) => cause,
ListIndicesError::InvalidRequest(ref cause) => cause,
ListIndicesError::ServiceUnavailable(ref cause) => cause,
ListIndicesError::Throttling(ref cause) => cause,
ListIndicesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListJobExecutionsForJobError {
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListJobExecutionsForJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListJobExecutionsForJobError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(ListJobExecutionsForJobError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListJobExecutionsForJobError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListJobExecutionsForJobError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListJobExecutionsForJobError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListJobExecutionsForJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListJobExecutionsForJobError {
fn description(&self) -> &str {
match *self {
ListJobExecutionsForJobError::InvalidRequest(ref cause) => cause,
ListJobExecutionsForJobError::ResourceNotFound(ref cause) => cause,
ListJobExecutionsForJobError::ServiceUnavailable(ref cause) => cause,
ListJobExecutionsForJobError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListJobExecutionsForThingError {
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListJobExecutionsForThingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListJobExecutionsForThingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(ListJobExecutionsForThingError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListJobExecutionsForThingError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
ListJobExecutionsForThingError::ServiceUnavailable(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(ListJobExecutionsForThingError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListJobExecutionsForThingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListJobExecutionsForThingError {
fn description(&self) -> &str {
match *self {
ListJobExecutionsForThingError::InvalidRequest(ref cause) => cause,
ListJobExecutionsForThingError::ResourceNotFound(ref cause) => cause,
ListJobExecutionsForThingError::ServiceUnavailable(ref cause) => cause,
ListJobExecutionsForThingError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListJobsError {
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListJobsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListJobsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(ListJobsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListJobsError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListJobsError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListJobsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListJobsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListJobsError {
fn description(&self) -> &str {
match *self {
ListJobsError::InvalidRequest(ref cause) => cause,
ListJobsError::ResourceNotFound(ref cause) => cause,
ListJobsError::ServiceUnavailable(ref cause) => cause,
ListJobsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListOTAUpdatesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListOTAUpdatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListOTAUpdatesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListOTAUpdatesError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListOTAUpdatesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListOTAUpdatesError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListOTAUpdatesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListOTAUpdatesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListOTAUpdatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListOTAUpdatesError {
fn description(&self) -> &str {
match *self {
ListOTAUpdatesError::InternalFailure(ref cause) => cause,
ListOTAUpdatesError::InvalidRequest(ref cause) => cause,
ListOTAUpdatesError::ServiceUnavailable(ref cause) => cause,
ListOTAUpdatesError::Throttling(ref cause) => cause,
ListOTAUpdatesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListOutgoingCertificatesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListOutgoingCertificatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListOutgoingCertificatesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListOutgoingCertificatesError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListOutgoingCertificatesError::InvalidRequest(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListOutgoingCertificatesError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListOutgoingCertificatesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListOutgoingCertificatesError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListOutgoingCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListOutgoingCertificatesError {
fn description(&self) -> &str {
match *self {
ListOutgoingCertificatesError::InternalFailure(ref cause) => cause,
ListOutgoingCertificatesError::InvalidRequest(ref cause) => cause,
ListOutgoingCertificatesError::ServiceUnavailable(ref cause) => cause,
ListOutgoingCertificatesError::Throttling(ref cause) => cause,
ListOutgoingCertificatesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPoliciesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPoliciesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListPoliciesError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListPoliciesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListPoliciesError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListPoliciesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListPoliciesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPoliciesError {
fn description(&self) -> &str {
match *self {
ListPoliciesError::InternalFailure(ref cause) => cause,
ListPoliciesError::InvalidRequest(ref cause) => cause,
ListPoliciesError::ServiceUnavailable(ref cause) => cause,
ListPoliciesError::Throttling(ref cause) => cause,
ListPoliciesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPolicyPrincipalsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListPolicyPrincipalsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPolicyPrincipalsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListPolicyPrincipalsError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListPolicyPrincipalsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListPolicyPrincipalsError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListPolicyPrincipalsError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListPolicyPrincipalsError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListPolicyPrincipalsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPolicyPrincipalsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPolicyPrincipalsError {
fn description(&self) -> &str {
match *self {
ListPolicyPrincipalsError::InternalFailure(ref cause) => cause,
ListPolicyPrincipalsError::InvalidRequest(ref cause) => cause,
ListPolicyPrincipalsError::ResourceNotFound(ref cause) => cause,
ListPolicyPrincipalsError::ServiceUnavailable(ref cause) => cause,
ListPolicyPrincipalsError::Throttling(ref cause) => cause,
ListPolicyPrincipalsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPolicyVersionsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListPolicyVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPolicyVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListPolicyVersionsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListPolicyVersionsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListPolicyVersionsError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListPolicyVersionsError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListPolicyVersionsError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListPolicyVersionsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPolicyVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPolicyVersionsError {
fn description(&self) -> &str {
match *self {
ListPolicyVersionsError::InternalFailure(ref cause) => cause,
ListPolicyVersionsError::InvalidRequest(ref cause) => cause,
ListPolicyVersionsError::ResourceNotFound(ref cause) => cause,
ListPolicyVersionsError::ServiceUnavailable(ref cause) => cause,
ListPolicyVersionsError::Throttling(ref cause) => cause,
ListPolicyVersionsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPrincipalPoliciesError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListPrincipalPoliciesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPrincipalPoliciesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListPrincipalPoliciesError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListPrincipalPoliciesError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListPrincipalPoliciesError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListPrincipalPoliciesError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListPrincipalPoliciesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListPrincipalPoliciesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPrincipalPoliciesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPrincipalPoliciesError {
fn description(&self) -> &str {
match *self {
ListPrincipalPoliciesError::InternalFailure(ref cause) => cause,
ListPrincipalPoliciesError::InvalidRequest(ref cause) => cause,
ListPrincipalPoliciesError::ResourceNotFound(ref cause) => cause,
ListPrincipalPoliciesError::ServiceUnavailable(ref cause) => cause,
ListPrincipalPoliciesError::Throttling(ref cause) => cause,
ListPrincipalPoliciesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPrincipalThingsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListPrincipalThingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPrincipalThingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListPrincipalThingsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListPrincipalThingsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListPrincipalThingsError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListPrincipalThingsError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListPrincipalThingsError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListPrincipalThingsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPrincipalThingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPrincipalThingsError {
fn description(&self) -> &str {
match *self {
ListPrincipalThingsError::InternalFailure(ref cause) => cause,
ListPrincipalThingsError::InvalidRequest(ref cause) => cause,
ListPrincipalThingsError::ResourceNotFound(ref cause) => cause,
ListPrincipalThingsError::ServiceUnavailable(ref cause) => cause,
ListPrincipalThingsError::Throttling(ref cause) => cause,
ListPrincipalThingsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListRoleAliasesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListRoleAliasesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRoleAliasesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListRoleAliasesError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListRoleAliasesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListRoleAliasesError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListRoleAliasesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListRoleAliasesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListRoleAliasesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListRoleAliasesError {
fn description(&self) -> &str {
match *self {
ListRoleAliasesError::InternalFailure(ref cause) => cause,
ListRoleAliasesError::InvalidRequest(ref cause) => cause,
ListRoleAliasesError::ServiceUnavailable(ref cause) => cause,
ListRoleAliasesError::Throttling(ref cause) => cause,
ListRoleAliasesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListScheduledAuditsError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
}
impl ListScheduledAuditsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListScheduledAuditsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListScheduledAuditsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListScheduledAuditsError::InvalidRequest(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListScheduledAuditsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListScheduledAuditsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListScheduledAuditsError {
fn description(&self) -> &str {
match *self {
ListScheduledAuditsError::InternalFailure(ref cause) => cause,
ListScheduledAuditsError::InvalidRequest(ref cause) => cause,
ListScheduledAuditsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSecurityProfilesError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
}
impl ListSecurityProfilesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSecurityProfilesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListSecurityProfilesError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListSecurityProfilesError::InvalidRequest(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListSecurityProfilesError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSecurityProfilesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSecurityProfilesError {
fn description(&self) -> &str {
match *self {
ListSecurityProfilesError::InternalFailure(ref cause) => cause,
ListSecurityProfilesError::InvalidRequest(ref cause) => cause,
ListSecurityProfilesError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSecurityProfilesForTargetError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl ListSecurityProfilesForTargetError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListSecurityProfilesForTargetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(
ListSecurityProfilesForTargetError::InternalFailure(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
ListSecurityProfilesForTargetError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
ListSecurityProfilesForTargetError::ResourceNotFound(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(ListSecurityProfilesForTargetError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSecurityProfilesForTargetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSecurityProfilesForTargetError {
fn description(&self) -> &str {
match *self {
ListSecurityProfilesForTargetError::InternalFailure(ref cause) => cause,
ListSecurityProfilesForTargetError::InvalidRequest(ref cause) => cause,
ListSecurityProfilesForTargetError::ResourceNotFound(ref cause) => cause,
ListSecurityProfilesForTargetError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListStreamsError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListStreamsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStreamsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListStreamsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListStreamsError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListStreamsError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListStreamsError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListStreamsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListStreamsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListStreamsError {
fn description(&self) -> &str {
match *self {
ListStreamsError::InternalFailure(ref cause) => cause,
ListStreamsError::InvalidRequest(ref cause) => cause,
ListStreamsError::ServiceUnavailable(ref cause) => cause,
ListStreamsError::Throttling(ref cause) => cause,
ListStreamsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListTagsForResourceError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListTagsForResourceError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::InternalFailure(ref cause) => cause,
ListTagsForResourceError::InvalidRequest(ref cause) => cause,
ListTagsForResourceError::ResourceNotFound(ref cause) => cause,
ListTagsForResourceError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTargetsForPolicyError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListTargetsForPolicyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTargetsForPolicyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListTargetsForPolicyError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListTargetsForPolicyError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListTargetsForPolicyError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListTargetsForPolicyError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListTargetsForPolicyError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListTargetsForPolicyError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListTargetsForPolicyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTargetsForPolicyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTargetsForPolicyError {
fn description(&self) -> &str {
match *self {
ListTargetsForPolicyError::InternalFailure(ref cause) => cause,
ListTargetsForPolicyError::InvalidRequest(ref cause) => cause,
ListTargetsForPolicyError::LimitExceeded(ref cause) => cause,
ListTargetsForPolicyError::ResourceNotFound(ref cause) => cause,
ListTargetsForPolicyError::ServiceUnavailable(ref cause) => cause,
ListTargetsForPolicyError::Throttling(ref cause) => cause,
ListTargetsForPolicyError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTargetsForSecurityProfileError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl ListTargetsForSecurityProfileError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListTargetsForSecurityProfileError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(
ListTargetsForSecurityProfileError::InternalFailure(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
ListTargetsForSecurityProfileError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
ListTargetsForSecurityProfileError::ResourceNotFound(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(ListTargetsForSecurityProfileError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTargetsForSecurityProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTargetsForSecurityProfileError {
fn description(&self) -> &str {
match *self {
ListTargetsForSecurityProfileError::InternalFailure(ref cause) => cause,
ListTargetsForSecurityProfileError::InvalidRequest(ref cause) => cause,
ListTargetsForSecurityProfileError::ResourceNotFound(ref cause) => cause,
ListTargetsForSecurityProfileError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingGroupsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
}
impl ListThingGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListThingGroupsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListThingGroupsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListThingGroupsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListThingGroupsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingGroupsError {
fn description(&self) -> &str {
match *self {
ListThingGroupsError::InternalFailure(ref cause) => cause,
ListThingGroupsError::InvalidRequest(ref cause) => cause,
ListThingGroupsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingGroupsForThingError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
}
impl ListThingGroupsForThingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListThingGroupsForThingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListThingGroupsForThingError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListThingGroupsForThingError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListThingGroupsForThingError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingGroupsForThingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingGroupsForThingError {
fn description(&self) -> &str {
match *self {
ListThingGroupsForThingError::InternalFailure(ref cause) => cause,
ListThingGroupsForThingError::InvalidRequest(ref cause) => cause,
ListThingGroupsForThingError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingPrincipalsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListThingPrincipalsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListThingPrincipalsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListThingPrincipalsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListThingPrincipalsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListThingPrincipalsError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListThingPrincipalsError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListThingPrincipalsError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListThingPrincipalsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingPrincipalsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingPrincipalsError {
fn description(&self) -> &str {
match *self {
ListThingPrincipalsError::InternalFailure(ref cause) => cause,
ListThingPrincipalsError::InvalidRequest(ref cause) => cause,
ListThingPrincipalsError::ResourceNotFound(ref cause) => cause,
ListThingPrincipalsError::ServiceUnavailable(ref cause) => cause,
ListThingPrincipalsError::Throttling(ref cause) => cause,
ListThingPrincipalsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingRegistrationTaskReportsError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
Unauthorized(String),
}
impl ListThingRegistrationTaskReportsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListThingRegistrationTaskReportsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(
ListThingRegistrationTaskReportsError::InternalFailure(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
ListThingRegistrationTaskReportsError::InvalidRequest(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(ListThingRegistrationTaskReportsError::Throttling(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(
ListThingRegistrationTaskReportsError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingRegistrationTaskReportsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingRegistrationTaskReportsError {
fn description(&self) -> &str {
match *self {
ListThingRegistrationTaskReportsError::InternalFailure(ref cause) => cause,
ListThingRegistrationTaskReportsError::InvalidRequest(ref cause) => cause,
ListThingRegistrationTaskReportsError::Throttling(ref cause) => cause,
ListThingRegistrationTaskReportsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingRegistrationTasksError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
Unauthorized(String),
}
impl ListThingRegistrationTasksError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListThingRegistrationTasksError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListThingRegistrationTasksError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListThingRegistrationTasksError::InvalidRequest(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListThingRegistrationTasksError::Throttling(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(ListThingRegistrationTasksError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingRegistrationTasksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingRegistrationTasksError {
fn description(&self) -> &str {
match *self {
ListThingRegistrationTasksError::InternalFailure(ref cause) => cause,
ListThingRegistrationTasksError::InvalidRequest(ref cause) => cause,
ListThingRegistrationTasksError::Throttling(ref cause) => cause,
ListThingRegistrationTasksError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingTypesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListThingTypesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListThingTypesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListThingTypesError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListThingTypesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListThingTypesError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListThingTypesError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListThingTypesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingTypesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingTypesError {
fn description(&self) -> &str {
match *self {
ListThingTypesError::InternalFailure(ref cause) => cause,
ListThingTypesError::InvalidRequest(ref cause) => cause,
ListThingTypesError::ServiceUnavailable(ref cause) => cause,
ListThingTypesError::Throttling(ref cause) => cause,
ListThingTypesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingsError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl ListThingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListThingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListThingsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListThingsError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListThingsError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListThingsError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListThingsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingsError {
fn description(&self) -> &str {
match *self {
ListThingsError::InternalFailure(ref cause) => cause,
ListThingsError::InvalidRequest(ref cause) => cause,
ListThingsError::ServiceUnavailable(ref cause) => cause,
ListThingsError::Throttling(ref cause) => cause,
ListThingsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingsInBillingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl ListThingsInBillingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListThingsInBillingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListThingsInBillingGroupError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListThingsInBillingGroupError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListThingsInBillingGroupError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListThingsInBillingGroupError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingsInBillingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingsInBillingGroupError {
fn description(&self) -> &str {
match *self {
ListThingsInBillingGroupError::InternalFailure(ref cause) => cause,
ListThingsInBillingGroupError::InvalidRequest(ref cause) => cause,
ListThingsInBillingGroupError::ResourceNotFound(ref cause) => cause,
ListThingsInBillingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListThingsInThingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
}
impl ListThingsInThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListThingsInThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListThingsInThingGroupError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(ListThingsInThingGroupError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListThingsInThingGroupError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListThingsInThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListThingsInThingGroupError {
fn description(&self) -> &str {
match *self {
ListThingsInThingGroupError::InternalFailure(ref cause) => cause,
ListThingsInThingGroupError::InvalidRequest(ref cause) => cause,
ListThingsInThingGroupError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTopicRulesError {
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
}
impl ListTopicRulesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTopicRulesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(ListTopicRulesError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListTopicRulesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListTopicRulesError::ServiceUnavailable(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTopicRulesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTopicRulesError {
fn description(&self) -> &str {
match *self {
ListTopicRulesError::Internal(ref cause) => cause,
ListTopicRulesError::InvalidRequest(ref cause) => cause,
ListTopicRulesError::ServiceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListV2LoggingLevelsError {
Internal(String),
InvalidRequest(String),
NotConfigured(String),
ServiceUnavailable(String),
}
impl ListV2LoggingLevelsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListV2LoggingLevelsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(ListV2LoggingLevelsError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListV2LoggingLevelsError::InvalidRequest(err.msg))
}
"NotConfiguredException" => {
return RusotoError::Service(ListV2LoggingLevelsError::NotConfigured(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListV2LoggingLevelsError::ServiceUnavailable(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListV2LoggingLevelsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListV2LoggingLevelsError {
fn description(&self) -> &str {
match *self {
ListV2LoggingLevelsError::Internal(ref cause) => cause,
ListV2LoggingLevelsError::InvalidRequest(ref cause) => cause,
ListV2LoggingLevelsError::NotConfigured(ref cause) => cause,
ListV2LoggingLevelsError::ServiceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListViolationEventsError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
}
impl ListViolationEventsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListViolationEventsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListViolationEventsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListViolationEventsError::InvalidRequest(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListViolationEventsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListViolationEventsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListViolationEventsError {
fn description(&self) -> &str {
match *self {
ListViolationEventsError::InternalFailure(ref cause) => cause,
ListViolationEventsError::InvalidRequest(ref cause) => cause,
ListViolationEventsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterCACertificateError {
CertificateValidation(String),
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
RegistrationCodeValidation(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl RegisterCACertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterCACertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"CertificateValidationException" => {
return RusotoError::Service(RegisterCACertificateError::CertificateValidation(
err.msg,
))
}
"InternalFailureException" => {
return RusotoError::Service(RegisterCACertificateError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(RegisterCACertificateError::InvalidRequest(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(RegisterCACertificateError::LimitExceeded(err.msg))
}
"RegistrationCodeValidationException" => {
return RusotoError::Service(
RegisterCACertificateError::RegistrationCodeValidation(err.msg),
)
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(RegisterCACertificateError::ResourceAlreadyExists(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(RegisterCACertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(RegisterCACertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(RegisterCACertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RegisterCACertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterCACertificateError {
fn description(&self) -> &str {
match *self {
RegisterCACertificateError::CertificateValidation(ref cause) => cause,
RegisterCACertificateError::InternalFailure(ref cause) => cause,
RegisterCACertificateError::InvalidRequest(ref cause) => cause,
RegisterCACertificateError::LimitExceeded(ref cause) => cause,
RegisterCACertificateError::RegistrationCodeValidation(ref cause) => cause,
RegisterCACertificateError::ResourceAlreadyExists(ref cause) => cause,
RegisterCACertificateError::ServiceUnavailable(ref cause) => cause,
RegisterCACertificateError::Throttling(ref cause) => cause,
RegisterCACertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterCertificateError {
CertificateConflict(String),
CertificateState(String),
CertificateValidation(String),
InternalFailure(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl RegisterCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"CertificateConflictException" => {
return RusotoError::Service(RegisterCertificateError::CertificateConflict(
err.msg,
))
}
"CertificateStateException" => {
return RusotoError::Service(RegisterCertificateError::CertificateState(
err.msg,
))
}
"CertificateValidationException" => {
return RusotoError::Service(RegisterCertificateError::CertificateValidation(
err.msg,
))
}
"InternalFailureException" => {
return RusotoError::Service(RegisterCertificateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(RegisterCertificateError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(RegisterCertificateError::ResourceAlreadyExists(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(RegisterCertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(RegisterCertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(RegisterCertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RegisterCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterCertificateError {
fn description(&self) -> &str {
match *self {
RegisterCertificateError::CertificateConflict(ref cause) => cause,
RegisterCertificateError::CertificateState(ref cause) => cause,
RegisterCertificateError::CertificateValidation(ref cause) => cause,
RegisterCertificateError::InternalFailure(ref cause) => cause,
RegisterCertificateError::InvalidRequest(ref cause) => cause,
RegisterCertificateError::ResourceAlreadyExists(ref cause) => cause,
RegisterCertificateError::ServiceUnavailable(ref cause) => cause,
RegisterCertificateError::Throttling(ref cause) => cause,
RegisterCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterThingError {
ConflictingResourceUpdate(String),
InternalFailure(String),
InvalidRequest(String),
ResourceRegistrationFailure(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl RegisterThingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterThingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ConflictingResourceUpdateException" => {
return RusotoError::Service(RegisterThingError::ConflictingResourceUpdate(
err.msg,
))
}
"InternalFailureException" => {
return RusotoError::Service(RegisterThingError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(RegisterThingError::InvalidRequest(err.msg))
}
"ResourceRegistrationFailureException" => {
return RusotoError::Service(RegisterThingError::ResourceRegistrationFailure(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(RegisterThingError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(RegisterThingError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(RegisterThingError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RegisterThingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterThingError {
fn description(&self) -> &str {
match *self {
RegisterThingError::ConflictingResourceUpdate(ref cause) => cause,
RegisterThingError::InternalFailure(ref cause) => cause,
RegisterThingError::InvalidRequest(ref cause) => cause,
RegisterThingError::ResourceRegistrationFailure(ref cause) => cause,
RegisterThingError::ServiceUnavailable(ref cause) => cause,
RegisterThingError::Throttling(ref cause) => cause,
RegisterThingError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RejectCertificateTransferError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
TransferAlreadyCompleted(String),
Unauthorized(String),
}
impl RejectCertificateTransferError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RejectCertificateTransferError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(RejectCertificateTransferError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(RejectCertificateTransferError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(RejectCertificateTransferError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
RejectCertificateTransferError::ServiceUnavailable(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(RejectCertificateTransferError::Throttling(
err.msg,
))
}
"TransferAlreadyCompletedException" => {
return RusotoError::Service(
RejectCertificateTransferError::TransferAlreadyCompleted(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(RejectCertificateTransferError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RejectCertificateTransferError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RejectCertificateTransferError {
fn description(&self) -> &str {
match *self {
RejectCertificateTransferError::InternalFailure(ref cause) => cause,
RejectCertificateTransferError::InvalidRequest(ref cause) => cause,
RejectCertificateTransferError::ResourceNotFound(ref cause) => cause,
RejectCertificateTransferError::ServiceUnavailable(ref cause) => cause,
RejectCertificateTransferError::Throttling(ref cause) => cause,
RejectCertificateTransferError::TransferAlreadyCompleted(ref cause) => cause,
RejectCertificateTransferError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveThingFromBillingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl RemoveThingFromBillingGroupError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<RemoveThingFromBillingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(RemoveThingFromBillingGroupError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(RemoveThingFromBillingGroupError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(
RemoveThingFromBillingGroupError::ResourceNotFound(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(RemoveThingFromBillingGroupError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RemoveThingFromBillingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveThingFromBillingGroupError {
fn description(&self) -> &str {
match *self {
RemoveThingFromBillingGroupError::InternalFailure(ref cause) => cause,
RemoveThingFromBillingGroupError::InvalidRequest(ref cause) => cause,
RemoveThingFromBillingGroupError::ResourceNotFound(ref cause) => cause,
RemoveThingFromBillingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveThingFromThingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl RemoveThingFromThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveThingFromThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(RemoveThingFromThingGroupError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(RemoveThingFromThingGroupError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(RemoveThingFromThingGroupError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(RemoveThingFromThingGroupError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RemoveThingFromThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveThingFromThingGroupError {
fn description(&self) -> &str {
match *self {
RemoveThingFromThingGroupError::InternalFailure(ref cause) => cause,
RemoveThingFromThingGroupError::InvalidRequest(ref cause) => cause,
RemoveThingFromThingGroupError::ResourceNotFound(ref cause) => cause,
RemoveThingFromThingGroupError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ReplaceTopicRuleError {
ConflictingResourceUpdate(String),
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
SqlParse(String),
Unauthorized(String),
}
impl ReplaceTopicRuleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReplaceTopicRuleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ConflictingResourceUpdateException" => {
return RusotoError::Service(ReplaceTopicRuleError::ConflictingResourceUpdate(
err.msg,
))
}
"InternalException" => {
return RusotoError::Service(ReplaceTopicRuleError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ReplaceTopicRuleError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ReplaceTopicRuleError::ServiceUnavailable(err.msg))
}
"SqlParseException" => {
return RusotoError::Service(ReplaceTopicRuleError::SqlParse(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ReplaceTopicRuleError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ReplaceTopicRuleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ReplaceTopicRuleError {
fn description(&self) -> &str {
match *self {
ReplaceTopicRuleError::ConflictingResourceUpdate(ref cause) => cause,
ReplaceTopicRuleError::Internal(ref cause) => cause,
ReplaceTopicRuleError::InvalidRequest(ref cause) => cause,
ReplaceTopicRuleError::ServiceUnavailable(ref cause) => cause,
ReplaceTopicRuleError::SqlParse(ref cause) => cause,
ReplaceTopicRuleError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SearchIndexError {
IndexNotReady(String),
InternalFailure(String),
InvalidQuery(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl SearchIndexError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchIndexError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"IndexNotReadyException" => {
return RusotoError::Service(SearchIndexError::IndexNotReady(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(SearchIndexError::InternalFailure(err.msg))
}
"InvalidQueryException" => {
return RusotoError::Service(SearchIndexError::InvalidQuery(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(SearchIndexError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SearchIndexError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(SearchIndexError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(SearchIndexError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(SearchIndexError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SearchIndexError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SearchIndexError {
fn description(&self) -> &str {
match *self {
SearchIndexError::IndexNotReady(ref cause) => cause,
SearchIndexError::InternalFailure(ref cause) => cause,
SearchIndexError::InvalidQuery(ref cause) => cause,
SearchIndexError::InvalidRequest(ref cause) => cause,
SearchIndexError::ResourceNotFound(ref cause) => cause,
SearchIndexError::ServiceUnavailable(ref cause) => cause,
SearchIndexError::Throttling(ref cause) => cause,
SearchIndexError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetDefaultAuthorizerError {
InternalFailure(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl SetDefaultAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetDefaultAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(SetDefaultAuthorizerError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(SetDefaultAuthorizerError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(SetDefaultAuthorizerError::ResourceAlreadyExists(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SetDefaultAuthorizerError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(SetDefaultAuthorizerError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(SetDefaultAuthorizerError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(SetDefaultAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetDefaultAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetDefaultAuthorizerError {
fn description(&self) -> &str {
match *self {
SetDefaultAuthorizerError::InternalFailure(ref cause) => cause,
SetDefaultAuthorizerError::InvalidRequest(ref cause) => cause,
SetDefaultAuthorizerError::ResourceAlreadyExists(ref cause) => cause,
SetDefaultAuthorizerError::ResourceNotFound(ref cause) => cause,
SetDefaultAuthorizerError::ServiceUnavailable(ref cause) => cause,
SetDefaultAuthorizerError::Throttling(ref cause) => cause,
SetDefaultAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetDefaultPolicyVersionError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl SetDefaultPolicyVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetDefaultPolicyVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(SetDefaultPolicyVersionError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(SetDefaultPolicyVersionError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SetDefaultPolicyVersionError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(SetDefaultPolicyVersionError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(SetDefaultPolicyVersionError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(SetDefaultPolicyVersionError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetDefaultPolicyVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetDefaultPolicyVersionError {
fn description(&self) -> &str {
match *self {
SetDefaultPolicyVersionError::InternalFailure(ref cause) => cause,
SetDefaultPolicyVersionError::InvalidRequest(ref cause) => cause,
SetDefaultPolicyVersionError::ResourceNotFound(ref cause) => cause,
SetDefaultPolicyVersionError::ServiceUnavailable(ref cause) => cause,
SetDefaultPolicyVersionError::Throttling(ref cause) => cause,
SetDefaultPolicyVersionError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetLoggingOptionsError {
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
}
impl SetLoggingOptionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetLoggingOptionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(SetLoggingOptionsError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(SetLoggingOptionsError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(SetLoggingOptionsError::ServiceUnavailable(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetLoggingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetLoggingOptionsError {
fn description(&self) -> &str {
match *self {
SetLoggingOptionsError::Internal(ref cause) => cause,
SetLoggingOptionsError::InvalidRequest(ref cause) => cause,
SetLoggingOptionsError::ServiceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetV2LoggingLevelError {
Internal(String),
InvalidRequest(String),
NotConfigured(String),
ServiceUnavailable(String),
}
impl SetV2LoggingLevelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetV2LoggingLevelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(SetV2LoggingLevelError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(SetV2LoggingLevelError::InvalidRequest(err.msg))
}
"NotConfiguredException" => {
return RusotoError::Service(SetV2LoggingLevelError::NotConfigured(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(SetV2LoggingLevelError::ServiceUnavailable(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetV2LoggingLevelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetV2LoggingLevelError {
fn description(&self) -> &str {
match *self {
SetV2LoggingLevelError::Internal(ref cause) => cause,
SetV2LoggingLevelError::InvalidRequest(ref cause) => cause,
SetV2LoggingLevelError::NotConfigured(ref cause) => cause,
SetV2LoggingLevelError::ServiceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetV2LoggingOptionsError {
Internal(String),
InvalidRequest(String),
ServiceUnavailable(String),
}
impl SetV2LoggingOptionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetV2LoggingOptionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalException" => {
return RusotoError::Service(SetV2LoggingOptionsError::Internal(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(SetV2LoggingOptionsError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(SetV2LoggingOptionsError::ServiceUnavailable(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetV2LoggingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetV2LoggingOptionsError {
fn description(&self) -> &str {
match *self {
SetV2LoggingOptionsError::Internal(ref cause) => cause,
SetV2LoggingOptionsError::InvalidRequest(ref cause) => cause,
SetV2LoggingOptionsError::ServiceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartOnDemandAuditTaskError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
Throttling(String),
}
impl StartOnDemandAuditTaskError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartOnDemandAuditTaskError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(StartOnDemandAuditTaskError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(StartOnDemandAuditTaskError::InvalidRequest(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(StartOnDemandAuditTaskError::LimitExceeded(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(StartOnDemandAuditTaskError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartOnDemandAuditTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartOnDemandAuditTaskError {
fn description(&self) -> &str {
match *self {
StartOnDemandAuditTaskError::InternalFailure(ref cause) => cause,
StartOnDemandAuditTaskError::InvalidRequest(ref cause) => cause,
StartOnDemandAuditTaskError::LimitExceeded(ref cause) => cause,
StartOnDemandAuditTaskError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartThingRegistrationTaskError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
Unauthorized(String),
}
impl StartThingRegistrationTaskError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<StartThingRegistrationTaskError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(StartThingRegistrationTaskError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(StartThingRegistrationTaskError::InvalidRequest(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(StartThingRegistrationTaskError::Throttling(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(StartThingRegistrationTaskError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartThingRegistrationTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartThingRegistrationTaskError {
fn description(&self) -> &str {
match *self {
StartThingRegistrationTaskError::InternalFailure(ref cause) => cause,
StartThingRegistrationTaskError::InvalidRequest(ref cause) => cause,
StartThingRegistrationTaskError::Throttling(ref cause) => cause,
StartThingRegistrationTaskError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopThingRegistrationTaskError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
Unauthorized(String),
}
impl StopThingRegistrationTaskError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopThingRegistrationTaskError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(StopThingRegistrationTaskError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(StopThingRegistrationTaskError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StopThingRegistrationTaskError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(StopThingRegistrationTaskError::Throttling(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(StopThingRegistrationTaskError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StopThingRegistrationTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopThingRegistrationTaskError {
fn description(&self) -> &str {
match *self {
StopThingRegistrationTaskError::InternalFailure(ref cause) => cause,
StopThingRegistrationTaskError::InvalidRequest(ref cause) => cause,
StopThingRegistrationTaskError::ResourceNotFound(ref cause) => cause,
StopThingRegistrationTaskError::Throttling(ref cause) => cause,
StopThingRegistrationTaskError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
Throttling(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(TagResourceError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(TagResourceError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(TagResourceError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::InternalFailure(ref cause) => cause,
TagResourceError::InvalidRequest(ref cause) => cause,
TagResourceError::LimitExceeded(ref cause) => cause,
TagResourceError::ResourceNotFound(ref cause) => cause,
TagResourceError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TestAuthorizationError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl TestAuthorizationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestAuthorizationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(TestAuthorizationError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(TestAuthorizationError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(TestAuthorizationError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TestAuthorizationError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(TestAuthorizationError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(TestAuthorizationError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(TestAuthorizationError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TestAuthorizationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TestAuthorizationError {
fn description(&self) -> &str {
match *self {
TestAuthorizationError::InternalFailure(ref cause) => cause,
TestAuthorizationError::InvalidRequest(ref cause) => cause,
TestAuthorizationError::LimitExceeded(ref cause) => cause,
TestAuthorizationError::ResourceNotFound(ref cause) => cause,
TestAuthorizationError::ServiceUnavailable(ref cause) => cause,
TestAuthorizationError::Throttling(ref cause) => cause,
TestAuthorizationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TestInvokeAuthorizerError {
InternalFailure(String),
InvalidRequest(String),
InvalidResponse(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl TestInvokeAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestInvokeAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(TestInvokeAuthorizerError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(TestInvokeAuthorizerError::InvalidRequest(err.msg))
}
"InvalidResponseException" => {
return RusotoError::Service(TestInvokeAuthorizerError::InvalidResponse(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TestInvokeAuthorizerError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(TestInvokeAuthorizerError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(TestInvokeAuthorizerError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(TestInvokeAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TestInvokeAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TestInvokeAuthorizerError {
fn description(&self) -> &str {
match *self {
TestInvokeAuthorizerError::InternalFailure(ref cause) => cause,
TestInvokeAuthorizerError::InvalidRequest(ref cause) => cause,
TestInvokeAuthorizerError::InvalidResponse(ref cause) => cause,
TestInvokeAuthorizerError::ResourceNotFound(ref cause) => cause,
TestInvokeAuthorizerError::ServiceUnavailable(ref cause) => cause,
TestInvokeAuthorizerError::Throttling(ref cause) => cause,
TestInvokeAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TransferCertificateError {
CertificateState(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
TransferConflict(String),
Unauthorized(String),
}
impl TransferCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TransferCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"CertificateStateException" => {
return RusotoError::Service(TransferCertificateError::CertificateState(
err.msg,
))
}
"InternalFailureException" => {
return RusotoError::Service(TransferCertificateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(TransferCertificateError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TransferCertificateError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(TransferCertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(TransferCertificateError::Throttling(err.msg))
}
"TransferConflictException" => {
return RusotoError::Service(TransferCertificateError::TransferConflict(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(TransferCertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TransferCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TransferCertificateError {
fn description(&self) -> &str {
match *self {
TransferCertificateError::CertificateState(ref cause) => cause,
TransferCertificateError::InternalFailure(ref cause) => cause,
TransferCertificateError::InvalidRequest(ref cause) => cause,
TransferCertificateError::ResourceNotFound(ref cause) => cause,
TransferCertificateError::ServiceUnavailable(ref cause) => cause,
TransferCertificateError::Throttling(ref cause) => cause,
TransferCertificateError::TransferConflict(ref cause) => cause,
TransferCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UntagResourceError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UntagResourceError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UntagResourceError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::InternalFailure(ref cause) => cause,
UntagResourceError::InvalidRequest(ref cause) => cause,
UntagResourceError::ResourceNotFound(ref cause) => cause,
UntagResourceError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAccountAuditConfigurationError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
}
impl UpdateAccountAuditConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateAccountAuditConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(
UpdateAccountAuditConfigurationError::InternalFailure(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
UpdateAccountAuditConfigurationError::InvalidRequest(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(UpdateAccountAuditConfigurationError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateAccountAuditConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAccountAuditConfigurationError {
fn description(&self) -> &str {
match *self {
UpdateAccountAuditConfigurationError::InternalFailure(ref cause) => cause,
UpdateAccountAuditConfigurationError::InvalidRequest(ref cause) => cause,
UpdateAccountAuditConfigurationError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAuthorizerError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl UpdateAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateAuthorizerError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateAuthorizerError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateAuthorizerError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateAuthorizerError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateAuthorizerError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateAuthorizerError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAuthorizerError {
fn description(&self) -> &str {
match *self {
UpdateAuthorizerError::InternalFailure(ref cause) => cause,
UpdateAuthorizerError::InvalidRequest(ref cause) => cause,
UpdateAuthorizerError::LimitExceeded(ref cause) => cause,
UpdateAuthorizerError::ResourceNotFound(ref cause) => cause,
UpdateAuthorizerError::ServiceUnavailable(ref cause) => cause,
UpdateAuthorizerError::Throttling(ref cause) => cause,
UpdateAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateBillingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
VersionConflict(String),
}
impl UpdateBillingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateBillingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateBillingGroupError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateBillingGroupError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateBillingGroupError::ResourceNotFound(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateBillingGroupError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(UpdateBillingGroupError::VersionConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateBillingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateBillingGroupError {
fn description(&self) -> &str {
match *self {
UpdateBillingGroupError::InternalFailure(ref cause) => cause,
UpdateBillingGroupError::InvalidRequest(ref cause) => cause,
UpdateBillingGroupError::ResourceNotFound(ref cause) => cause,
UpdateBillingGroupError::Throttling(ref cause) => cause,
UpdateBillingGroupError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateCACertificateError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl UpdateCACertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateCACertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateCACertificateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateCACertificateError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateCACertificateError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateCACertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateCACertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateCACertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateCACertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateCACertificateError {
fn description(&self) -> &str {
match *self {
UpdateCACertificateError::InternalFailure(ref cause) => cause,
UpdateCACertificateError::InvalidRequest(ref cause) => cause,
UpdateCACertificateError::ResourceNotFound(ref cause) => cause,
UpdateCACertificateError::ServiceUnavailable(ref cause) => cause,
UpdateCACertificateError::Throttling(ref cause) => cause,
UpdateCACertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateCertificateError {
CertificateState(String),
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl UpdateCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"CertificateStateException" => {
return RusotoError::Service(UpdateCertificateError::CertificateState(err.msg))
}
"InternalFailureException" => {
return RusotoError::Service(UpdateCertificateError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateCertificateError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateCertificateError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateCertificateError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateCertificateError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateCertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateCertificateError {
fn description(&self) -> &str {
match *self {
UpdateCertificateError::CertificateState(ref cause) => cause,
UpdateCertificateError::InternalFailure(ref cause) => cause,
UpdateCertificateError::InvalidRequest(ref cause) => cause,
UpdateCertificateError::ResourceNotFound(ref cause) => cause,
UpdateCertificateError::ServiceUnavailable(ref cause) => cause,
UpdateCertificateError::Throttling(ref cause) => cause,
UpdateCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDynamicThingGroupError {
InternalFailure(String),
InvalidQuery(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
VersionConflict(String),
}
impl UpdateDynamicThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDynamicThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateDynamicThingGroupError::InternalFailure(
err.msg,
))
}
"InvalidQueryException" => {
return RusotoError::Service(UpdateDynamicThingGroupError::InvalidQuery(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateDynamicThingGroupError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateDynamicThingGroupError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateDynamicThingGroupError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(UpdateDynamicThingGroupError::VersionConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDynamicThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDynamicThingGroupError {
fn description(&self) -> &str {
match *self {
UpdateDynamicThingGroupError::InternalFailure(ref cause) => cause,
UpdateDynamicThingGroupError::InvalidQuery(ref cause) => cause,
UpdateDynamicThingGroupError::InvalidRequest(ref cause) => cause,
UpdateDynamicThingGroupError::ResourceNotFound(ref cause) => cause,
UpdateDynamicThingGroupError::Throttling(ref cause) => cause,
UpdateDynamicThingGroupError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateEventConfigurationsError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
}
impl UpdateEventConfigurationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateEventConfigurationsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateEventConfigurationsError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateEventConfigurationsError::InvalidRequest(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateEventConfigurationsError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateEventConfigurationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateEventConfigurationsError {
fn description(&self) -> &str {
match *self {
UpdateEventConfigurationsError::InternalFailure(ref cause) => cause,
UpdateEventConfigurationsError::InvalidRequest(ref cause) => cause,
UpdateEventConfigurationsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateIndexingConfigurationError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl UpdateIndexingConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateIndexingConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateIndexingConfigurationError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateIndexingConfigurationError::InvalidRequest(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
UpdateIndexingConfigurationError::ServiceUnavailable(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(UpdateIndexingConfigurationError::Throttling(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateIndexingConfigurationError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateIndexingConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateIndexingConfigurationError {
fn description(&self) -> &str {
match *self {
UpdateIndexingConfigurationError::InternalFailure(ref cause) => cause,
UpdateIndexingConfigurationError::InvalidRequest(ref cause) => cause,
UpdateIndexingConfigurationError::ServiceUnavailable(ref cause) => cause,
UpdateIndexingConfigurationError::Throttling(ref cause) => cause,
UpdateIndexingConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateJobError {
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl UpdateJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateJobError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InvalidRequestException" => {
return RusotoError::Service(UpdateJobError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateJobError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateJobError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateJobError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateJobError {
fn description(&self) -> &str {
match *self {
UpdateJobError::InvalidRequest(ref cause) => cause,
UpdateJobError::ResourceNotFound(ref cause) => cause,
UpdateJobError::ServiceUnavailable(ref cause) => cause,
UpdateJobError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRoleAliasError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl UpdateRoleAliasError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRoleAliasError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateRoleAliasError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateRoleAliasError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateRoleAliasError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateRoleAliasError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateRoleAliasError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateRoleAliasError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRoleAliasError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRoleAliasError {
fn description(&self) -> &str {
match *self {
UpdateRoleAliasError::InternalFailure(ref cause) => cause,
UpdateRoleAliasError::InvalidRequest(ref cause) => cause,
UpdateRoleAliasError::ResourceNotFound(ref cause) => cause,
UpdateRoleAliasError::ServiceUnavailable(ref cause) => cause,
UpdateRoleAliasError::Throttling(ref cause) => cause,
UpdateRoleAliasError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateScheduledAuditError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl UpdateScheduledAuditError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateScheduledAuditError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateScheduledAuditError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateScheduledAuditError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateScheduledAuditError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateScheduledAuditError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateScheduledAuditError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateScheduledAuditError {
fn description(&self) -> &str {
match *self {
UpdateScheduledAuditError::InternalFailure(ref cause) => cause,
UpdateScheduledAuditError::InvalidRequest(ref cause) => cause,
UpdateScheduledAuditError::ResourceNotFound(ref cause) => cause,
UpdateScheduledAuditError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSecurityProfileError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
VersionConflict(String),
}
impl UpdateSecurityProfileError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSecurityProfileError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateSecurityProfileError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateSecurityProfileError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateSecurityProfileError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateSecurityProfileError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(UpdateSecurityProfileError::VersionConflict(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateSecurityProfileError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSecurityProfileError {
fn description(&self) -> &str {
match *self {
UpdateSecurityProfileError::InternalFailure(ref cause) => cause,
UpdateSecurityProfileError::InvalidRequest(ref cause) => cause,
UpdateSecurityProfileError::ResourceNotFound(ref cause) => cause,
UpdateSecurityProfileError::Throttling(ref cause) => cause,
UpdateSecurityProfileError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateStreamError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
}
impl UpdateStreamError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStreamError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateStreamError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateStreamError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateStreamError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateStreamError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateStreamError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateStreamError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateStreamError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateStreamError {
fn description(&self) -> &str {
match *self {
UpdateStreamError::InternalFailure(ref cause) => cause,
UpdateStreamError::InvalidRequest(ref cause) => cause,
UpdateStreamError::ResourceNotFound(ref cause) => cause,
UpdateStreamError::ServiceUnavailable(ref cause) => cause,
UpdateStreamError::Throttling(ref cause) => cause,
UpdateStreamError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateThingError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
Unauthorized(String),
VersionConflict(String),
}
impl UpdateThingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateThingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateThingError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateThingError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateThingError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateThingError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateThingError::Throttling(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateThingError::Unauthorized(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(UpdateThingError::VersionConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateThingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateThingError {
fn description(&self) -> &str {
match *self {
UpdateThingError::InternalFailure(ref cause) => cause,
UpdateThingError::InvalidRequest(ref cause) => cause,
UpdateThingError::ResourceNotFound(ref cause) => cause,
UpdateThingError::ServiceUnavailable(ref cause) => cause,
UpdateThingError::Throttling(ref cause) => cause,
UpdateThingError::Unauthorized(ref cause) => cause,
UpdateThingError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateThingGroupError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
VersionConflict(String),
}
impl UpdateThingGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateThingGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateThingGroupError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateThingGroupError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateThingGroupError::ResourceNotFound(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateThingGroupError::Throttling(err.msg))
}
"VersionConflictException" => {
return RusotoError::Service(UpdateThingGroupError::VersionConflict(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateThingGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateThingGroupError {
fn description(&self) -> &str {
match *self {
UpdateThingGroupError::InternalFailure(ref cause) => cause,
UpdateThingGroupError::InvalidRequest(ref cause) => cause,
UpdateThingGroupError::ResourceNotFound(ref cause) => cause,
UpdateThingGroupError::Throttling(ref cause) => cause,
UpdateThingGroupError::VersionConflict(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateThingGroupsForThingError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
Throttling(String),
}
impl UpdateThingGroupsForThingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateThingGroupsForThingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateThingGroupsForThingError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateThingGroupsForThingError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateThingGroupsForThingError::ResourceNotFound(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateThingGroupsForThingError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateThingGroupsForThingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateThingGroupsForThingError {
fn description(&self) -> &str {
match *self {
UpdateThingGroupsForThingError::InternalFailure(ref cause) => cause,
UpdateThingGroupsForThingError::InvalidRequest(ref cause) => cause,
UpdateThingGroupsForThingError::ResourceNotFound(ref cause) => cause,
UpdateThingGroupsForThingError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ValidateSecurityProfileBehaviorsError {
InternalFailure(String),
InvalidRequest(String),
Throttling(String),
}
impl ValidateSecurityProfileBehaviorsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ValidateSecurityProfileBehaviorsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(
ValidateSecurityProfileBehaviorsError::InternalFailure(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
ValidateSecurityProfileBehaviorsError::InvalidRequest(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(ValidateSecurityProfileBehaviorsError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ValidateSecurityProfileBehaviorsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ValidateSecurityProfileBehaviorsError {
fn description(&self) -> &str {
match *self {
ValidateSecurityProfileBehaviorsError::InternalFailure(ref cause) => cause,
ValidateSecurityProfileBehaviorsError::InvalidRequest(ref cause) => cause,
ValidateSecurityProfileBehaviorsError::Throttling(ref cause) => cause,
}
}
}
pub trait Iot {
fn accept_certificate_transfer(
&self,
input: AcceptCertificateTransferRequest,
) -> RusotoFuture<(), AcceptCertificateTransferError>;
fn add_thing_to_billing_group(
&self,
input: AddThingToBillingGroupRequest,
) -> RusotoFuture<AddThingToBillingGroupResponse, AddThingToBillingGroupError>;
fn add_thing_to_thing_group(
&self,
input: AddThingToThingGroupRequest,
) -> RusotoFuture<AddThingToThingGroupResponse, AddThingToThingGroupError>;
fn associate_targets_with_job(
&self,
input: AssociateTargetsWithJobRequest,
) -> RusotoFuture<AssociateTargetsWithJobResponse, AssociateTargetsWithJobError>;
fn attach_policy(&self, input: AttachPolicyRequest) -> RusotoFuture<(), AttachPolicyError>;
fn attach_principal_policy(
&self,
input: AttachPrincipalPolicyRequest,
) -> RusotoFuture<(), AttachPrincipalPolicyError>;
fn attach_security_profile(
&self,
input: AttachSecurityProfileRequest,
) -> RusotoFuture<AttachSecurityProfileResponse, AttachSecurityProfileError>;
fn attach_thing_principal(
&self,
input: AttachThingPrincipalRequest,
) -> RusotoFuture<AttachThingPrincipalResponse, AttachThingPrincipalError>;
fn cancel_audit_task(
&self,
input: CancelAuditTaskRequest,
) -> RusotoFuture<CancelAuditTaskResponse, CancelAuditTaskError>;
fn cancel_certificate_transfer(
&self,
input: CancelCertificateTransferRequest,
) -> RusotoFuture<(), CancelCertificateTransferError>;
fn cancel_job(
&self,
input: CancelJobRequest,
) -> RusotoFuture<CancelJobResponse, CancelJobError>;
fn cancel_job_execution(
&self,
input: CancelJobExecutionRequest,
) -> RusotoFuture<(), CancelJobExecutionError>;
fn clear_default_authorizer(
&self,
) -> RusotoFuture<ClearDefaultAuthorizerResponse, ClearDefaultAuthorizerError>;
fn create_authorizer(
&self,
input: CreateAuthorizerRequest,
) -> RusotoFuture<CreateAuthorizerResponse, CreateAuthorizerError>;
fn create_billing_group(
&self,
input: CreateBillingGroupRequest,
) -> RusotoFuture<CreateBillingGroupResponse, CreateBillingGroupError>;
fn create_certificate_from_csr(
&self,
input: CreateCertificateFromCsrRequest,
) -> RusotoFuture<CreateCertificateFromCsrResponse, CreateCertificateFromCsrError>;
fn create_dynamic_thing_group(
&self,
input: CreateDynamicThingGroupRequest,
) -> RusotoFuture<CreateDynamicThingGroupResponse, CreateDynamicThingGroupError>;
fn create_job(
&self,
input: CreateJobRequest,
) -> RusotoFuture<CreateJobResponse, CreateJobError>;
fn create_keys_and_certificate(
&self,
input: CreateKeysAndCertificateRequest,
) -> RusotoFuture<CreateKeysAndCertificateResponse, CreateKeysAndCertificateError>;
fn create_ota_update(
&self,
input: CreateOTAUpdateRequest,
) -> RusotoFuture<CreateOTAUpdateResponse, CreateOTAUpdateError>;
fn create_policy(
&self,
input: CreatePolicyRequest,
) -> RusotoFuture<CreatePolicyResponse, CreatePolicyError>;
fn create_policy_version(
&self,
input: CreatePolicyVersionRequest,
) -> RusotoFuture<CreatePolicyVersionResponse, CreatePolicyVersionError>;
fn create_role_alias(
&self,
input: CreateRoleAliasRequest,
) -> RusotoFuture<CreateRoleAliasResponse, CreateRoleAliasError>;
fn create_scheduled_audit(
&self,
input: CreateScheduledAuditRequest,
) -> RusotoFuture<CreateScheduledAuditResponse, CreateScheduledAuditError>;
fn create_security_profile(
&self,
input: CreateSecurityProfileRequest,
) -> RusotoFuture<CreateSecurityProfileResponse, CreateSecurityProfileError>;
fn create_stream(
&self,
input: CreateStreamRequest,
) -> RusotoFuture<CreateStreamResponse, CreateStreamError>;
fn create_thing(
&self,
input: CreateThingRequest,
) -> RusotoFuture<CreateThingResponse, CreateThingError>;
fn create_thing_group(
&self,
input: CreateThingGroupRequest,
) -> RusotoFuture<CreateThingGroupResponse, CreateThingGroupError>;
fn create_thing_type(
&self,
input: CreateThingTypeRequest,
) -> RusotoFuture<CreateThingTypeResponse, CreateThingTypeError>;
fn create_topic_rule(
&self,
input: CreateTopicRuleRequest,
) -> RusotoFuture<(), CreateTopicRuleError>;
fn delete_account_audit_configuration(
&self,
input: DeleteAccountAuditConfigurationRequest,
) -> RusotoFuture<DeleteAccountAuditConfigurationResponse, DeleteAccountAuditConfigurationError>;
fn delete_authorizer(
&self,
input: DeleteAuthorizerRequest,
) -> RusotoFuture<DeleteAuthorizerResponse, DeleteAuthorizerError>;
fn delete_billing_group(
&self,
input: DeleteBillingGroupRequest,
) -> RusotoFuture<DeleteBillingGroupResponse, DeleteBillingGroupError>;
fn delete_ca_certificate(
&self,
input: DeleteCACertificateRequest,
) -> RusotoFuture<DeleteCACertificateResponse, DeleteCACertificateError>;
fn delete_certificate(
&self,
input: DeleteCertificateRequest,
) -> RusotoFuture<(), DeleteCertificateError>;
fn delete_dynamic_thing_group(
&self,
input: DeleteDynamicThingGroupRequest,
) -> RusotoFuture<DeleteDynamicThingGroupResponse, DeleteDynamicThingGroupError>;
fn delete_job(&self, input: DeleteJobRequest) -> RusotoFuture<(), DeleteJobError>;
fn delete_job_execution(
&self,
input: DeleteJobExecutionRequest,
) -> RusotoFuture<(), DeleteJobExecutionError>;
fn delete_ota_update(
&self,
input: DeleteOTAUpdateRequest,
) -> RusotoFuture<DeleteOTAUpdateResponse, DeleteOTAUpdateError>;
fn delete_policy(&self, input: DeletePolicyRequest) -> RusotoFuture<(), DeletePolicyError>;
fn delete_policy_version(
&self,
input: DeletePolicyVersionRequest,
) -> RusotoFuture<(), DeletePolicyVersionError>;
fn delete_registration_code(
&self,
) -> RusotoFuture<DeleteRegistrationCodeResponse, DeleteRegistrationCodeError>;
fn delete_role_alias(
&self,
input: DeleteRoleAliasRequest,
) -> RusotoFuture<DeleteRoleAliasResponse, DeleteRoleAliasError>;
fn delete_scheduled_audit(
&self,
input: DeleteScheduledAuditRequest,
) -> RusotoFuture<DeleteScheduledAuditResponse, DeleteScheduledAuditError>;
fn delete_security_profile(
&self,
input: DeleteSecurityProfileRequest,
) -> RusotoFuture<DeleteSecurityProfileResponse, DeleteSecurityProfileError>;
fn delete_stream(
&self,
input: DeleteStreamRequest,
) -> RusotoFuture<DeleteStreamResponse, DeleteStreamError>;
fn delete_thing(
&self,
input: DeleteThingRequest,
) -> RusotoFuture<DeleteThingResponse, DeleteThingError>;
fn delete_thing_group(
&self,
input: DeleteThingGroupRequest,
) -> RusotoFuture<DeleteThingGroupResponse, DeleteThingGroupError>;
fn delete_thing_type(
&self,
input: DeleteThingTypeRequest,
) -> RusotoFuture<DeleteThingTypeResponse, DeleteThingTypeError>;
fn delete_topic_rule(
&self,
input: DeleteTopicRuleRequest,
) -> RusotoFuture<(), DeleteTopicRuleError>;
fn delete_v2_logging_level(
&self,
input: DeleteV2LoggingLevelRequest,
) -> RusotoFuture<(), DeleteV2LoggingLevelError>;
fn deprecate_thing_type(
&self,
input: DeprecateThingTypeRequest,
) -> RusotoFuture<DeprecateThingTypeResponse, DeprecateThingTypeError>;
fn describe_account_audit_configuration(
&self,
) -> RusotoFuture<
DescribeAccountAuditConfigurationResponse,
DescribeAccountAuditConfigurationError,
>;
fn describe_audit_task(
&self,
input: DescribeAuditTaskRequest,
) -> RusotoFuture<DescribeAuditTaskResponse, DescribeAuditTaskError>;
fn describe_authorizer(
&self,
input: DescribeAuthorizerRequest,
) -> RusotoFuture<DescribeAuthorizerResponse, DescribeAuthorizerError>;
fn describe_billing_group(
&self,
input: DescribeBillingGroupRequest,
) -> RusotoFuture<DescribeBillingGroupResponse, DescribeBillingGroupError>;
fn describe_ca_certificate(
&self,
input: DescribeCACertificateRequest,
) -> RusotoFuture<DescribeCACertificateResponse, DescribeCACertificateError>;
fn describe_certificate(
&self,
input: DescribeCertificateRequest,
) -> RusotoFuture<DescribeCertificateResponse, DescribeCertificateError>;
fn describe_default_authorizer(
&self,
) -> RusotoFuture<DescribeDefaultAuthorizerResponse, DescribeDefaultAuthorizerError>;
fn describe_endpoint(
&self,
input: DescribeEndpointRequest,
) -> RusotoFuture<DescribeEndpointResponse, DescribeEndpointError>;
fn describe_event_configurations(
&self,
) -> RusotoFuture<DescribeEventConfigurationsResponse, DescribeEventConfigurationsError>;
fn describe_index(
&self,
input: DescribeIndexRequest,
) -> RusotoFuture<DescribeIndexResponse, DescribeIndexError>;
fn describe_job(
&self,
input: DescribeJobRequest,
) -> RusotoFuture<DescribeJobResponse, DescribeJobError>;
fn describe_job_execution(
&self,
input: DescribeJobExecutionRequest,
) -> RusotoFuture<DescribeJobExecutionResponse, DescribeJobExecutionError>;
fn describe_role_alias(
&self,
input: DescribeRoleAliasRequest,
) -> RusotoFuture<DescribeRoleAliasResponse, DescribeRoleAliasError>;
fn describe_scheduled_audit(
&self,
input: DescribeScheduledAuditRequest,
) -> RusotoFuture<DescribeScheduledAuditResponse, DescribeScheduledAuditError>;
fn describe_security_profile(
&self,
input: DescribeSecurityProfileRequest,
) -> RusotoFuture<DescribeSecurityProfileResponse, DescribeSecurityProfileError>;
fn describe_stream(
&self,
input: DescribeStreamRequest,
) -> RusotoFuture<DescribeStreamResponse, DescribeStreamError>;
fn describe_thing(
&self,
input: DescribeThingRequest,
) -> RusotoFuture<DescribeThingResponse, DescribeThingError>;
fn describe_thing_group(
&self,
input: DescribeThingGroupRequest,
) -> RusotoFuture<DescribeThingGroupResponse, DescribeThingGroupError>;
fn describe_thing_registration_task(
&self,
input: DescribeThingRegistrationTaskRequest,
) -> RusotoFuture<DescribeThingRegistrationTaskResponse, DescribeThingRegistrationTaskError>;
fn describe_thing_type(
&self,
input: DescribeThingTypeRequest,
) -> RusotoFuture<DescribeThingTypeResponse, DescribeThingTypeError>;
fn detach_policy(&self, input: DetachPolicyRequest) -> RusotoFuture<(), DetachPolicyError>;
fn detach_principal_policy(
&self,
input: DetachPrincipalPolicyRequest,
) -> RusotoFuture<(), DetachPrincipalPolicyError>;
fn detach_security_profile(
&self,
input: DetachSecurityProfileRequest,
) -> RusotoFuture<DetachSecurityProfileResponse, DetachSecurityProfileError>;
fn detach_thing_principal(
&self,
input: DetachThingPrincipalRequest,
) -> RusotoFuture<DetachThingPrincipalResponse, DetachThingPrincipalError>;
fn disable_topic_rule(
&self,
input: DisableTopicRuleRequest,
) -> RusotoFuture<(), DisableTopicRuleError>;
fn enable_topic_rule(
&self,
input: EnableTopicRuleRequest,
) -> RusotoFuture<(), EnableTopicRuleError>;
fn get_effective_policies(
&self,
input: GetEffectivePoliciesRequest,
) -> RusotoFuture<GetEffectivePoliciesResponse, GetEffectivePoliciesError>;
fn get_indexing_configuration(
&self,
) -> RusotoFuture<GetIndexingConfigurationResponse, GetIndexingConfigurationError>;
fn get_job_document(
&self,
input: GetJobDocumentRequest,
) -> RusotoFuture<GetJobDocumentResponse, GetJobDocumentError>;
fn get_logging_options(
&self,
) -> RusotoFuture<GetLoggingOptionsResponse, GetLoggingOptionsError>;
fn get_ota_update(
&self,
input: GetOTAUpdateRequest,
) -> RusotoFuture<GetOTAUpdateResponse, GetOTAUpdateError>;
fn get_policy(
&self,
input: GetPolicyRequest,
) -> RusotoFuture<GetPolicyResponse, GetPolicyError>;
fn get_policy_version(
&self,
input: GetPolicyVersionRequest,
) -> RusotoFuture<GetPolicyVersionResponse, GetPolicyVersionError>;
fn get_registration_code(
&self,
) -> RusotoFuture<GetRegistrationCodeResponse, GetRegistrationCodeError>;
fn get_statistics(
&self,
input: GetStatisticsRequest,
) -> RusotoFuture<GetStatisticsResponse, GetStatisticsError>;
fn get_topic_rule(
&self,
input: GetTopicRuleRequest,
) -> RusotoFuture<GetTopicRuleResponse, GetTopicRuleError>;
fn get_v2_logging_options(
&self,
) -> RusotoFuture<GetV2LoggingOptionsResponse, GetV2LoggingOptionsError>;
fn list_active_violations(
&self,
input: ListActiveViolationsRequest,
) -> RusotoFuture<ListActiveViolationsResponse, ListActiveViolationsError>;
fn list_attached_policies(
&self,
input: ListAttachedPoliciesRequest,
) -> RusotoFuture<ListAttachedPoliciesResponse, ListAttachedPoliciesError>;
fn list_audit_findings(
&self,
input: ListAuditFindingsRequest,
) -> RusotoFuture<ListAuditFindingsResponse, ListAuditFindingsError>;
fn list_audit_tasks(
&self,
input: ListAuditTasksRequest,
) -> RusotoFuture<ListAuditTasksResponse, ListAuditTasksError>;
fn list_authorizers(
&self,
input: ListAuthorizersRequest,
) -> RusotoFuture<ListAuthorizersResponse, ListAuthorizersError>;
fn list_billing_groups(
&self,
input: ListBillingGroupsRequest,
) -> RusotoFuture<ListBillingGroupsResponse, ListBillingGroupsError>;
fn list_ca_certificates(
&self,
input: ListCACertificatesRequest,
) -> RusotoFuture<ListCACertificatesResponse, ListCACertificatesError>;
fn list_certificates(
&self,
input: ListCertificatesRequest,
) -> RusotoFuture<ListCertificatesResponse, ListCertificatesError>;
fn list_certificates_by_ca(
&self,
input: ListCertificatesByCARequest,
) -> RusotoFuture<ListCertificatesByCAResponse, ListCertificatesByCAError>;
fn list_indices(
&self,
input: ListIndicesRequest,
) -> RusotoFuture<ListIndicesResponse, ListIndicesError>;
fn list_job_executions_for_job(
&self,
input: ListJobExecutionsForJobRequest,
) -> RusotoFuture<ListJobExecutionsForJobResponse, ListJobExecutionsForJobError>;
fn list_job_executions_for_thing(
&self,
input: ListJobExecutionsForThingRequest,
) -> RusotoFuture<ListJobExecutionsForThingResponse, ListJobExecutionsForThingError>;
fn list_jobs(&self, input: ListJobsRequest) -> RusotoFuture<ListJobsResponse, ListJobsError>;
fn list_ota_updates(
&self,
input: ListOTAUpdatesRequest,
) -> RusotoFuture<ListOTAUpdatesResponse, ListOTAUpdatesError>;
fn list_outgoing_certificates(
&self,
input: ListOutgoingCertificatesRequest,
) -> RusotoFuture<ListOutgoingCertificatesResponse, ListOutgoingCertificatesError>;
fn list_policies(
&self,
input: ListPoliciesRequest,
) -> RusotoFuture<ListPoliciesResponse, ListPoliciesError>;
fn list_policy_principals(
&self,
input: ListPolicyPrincipalsRequest,
) -> RusotoFuture<ListPolicyPrincipalsResponse, ListPolicyPrincipalsError>;
fn list_policy_versions(
&self,
input: ListPolicyVersionsRequest,
) -> RusotoFuture<ListPolicyVersionsResponse, ListPolicyVersionsError>;
fn list_principal_policies(
&self,
input: ListPrincipalPoliciesRequest,
) -> RusotoFuture<ListPrincipalPoliciesResponse, ListPrincipalPoliciesError>;
fn list_principal_things(
&self,
input: ListPrincipalThingsRequest,
) -> RusotoFuture<ListPrincipalThingsResponse, ListPrincipalThingsError>;
fn list_role_aliases(
&self,
input: ListRoleAliasesRequest,
) -> RusotoFuture<ListRoleAliasesResponse, ListRoleAliasesError>;
fn list_scheduled_audits(
&self,
input: ListScheduledAuditsRequest,
) -> RusotoFuture<ListScheduledAuditsResponse, ListScheduledAuditsError>;
fn list_security_profiles(
&self,
input: ListSecurityProfilesRequest,
) -> RusotoFuture<ListSecurityProfilesResponse, ListSecurityProfilesError>;
fn list_security_profiles_for_target(
&self,
input: ListSecurityProfilesForTargetRequest,
) -> RusotoFuture<ListSecurityProfilesForTargetResponse, ListSecurityProfilesForTargetError>;
fn list_streams(
&self,
input: ListStreamsRequest,
) -> RusotoFuture<ListStreamsResponse, ListStreamsError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>;
fn list_targets_for_policy(
&self,
input: ListTargetsForPolicyRequest,
) -> RusotoFuture<ListTargetsForPolicyResponse, ListTargetsForPolicyError>;
fn list_targets_for_security_profile(
&self,
input: ListTargetsForSecurityProfileRequest,
) -> RusotoFuture<ListTargetsForSecurityProfileResponse, ListTargetsForSecurityProfileError>;
fn list_thing_groups(
&self,
input: ListThingGroupsRequest,
) -> RusotoFuture<ListThingGroupsResponse, ListThingGroupsError>;
fn list_thing_groups_for_thing(
&self,
input: ListThingGroupsForThingRequest,
) -> RusotoFuture<ListThingGroupsForThingResponse, ListThingGroupsForThingError>;
fn list_thing_principals(
&self,
input: ListThingPrincipalsRequest,
) -> RusotoFuture<ListThingPrincipalsResponse, ListThingPrincipalsError>;
fn list_thing_registration_task_reports(
&self,
input: ListThingRegistrationTaskReportsRequest,
) -> RusotoFuture<ListThingRegistrationTaskReportsResponse, ListThingRegistrationTaskReportsError>;
fn list_thing_registration_tasks(
&self,
input: ListThingRegistrationTasksRequest,
) -> RusotoFuture<ListThingRegistrationTasksResponse, ListThingRegistrationTasksError>;
fn list_thing_types(
&self,
input: ListThingTypesRequest,
) -> RusotoFuture<ListThingTypesResponse, ListThingTypesError>;
fn list_things(
&self,
input: ListThingsRequest,
) -> RusotoFuture<ListThingsResponse, ListThingsError>;
fn list_things_in_billing_group(
&self,
input: ListThingsInBillingGroupRequest,
) -> RusotoFuture<ListThingsInBillingGroupResponse, ListThingsInBillingGroupError>;
fn list_things_in_thing_group(
&self,
input: ListThingsInThingGroupRequest,
) -> RusotoFuture<ListThingsInThingGroupResponse, ListThingsInThingGroupError>;
fn list_topic_rules(
&self,
input: ListTopicRulesRequest,
) -> RusotoFuture<ListTopicRulesResponse, ListTopicRulesError>;
fn list_v2_logging_levels(
&self,
input: ListV2LoggingLevelsRequest,
) -> RusotoFuture<ListV2LoggingLevelsResponse, ListV2LoggingLevelsError>;
fn list_violation_events(
&self,
input: ListViolationEventsRequest,
) -> RusotoFuture<ListViolationEventsResponse, ListViolationEventsError>;
fn register_ca_certificate(
&self,
input: RegisterCACertificateRequest,
) -> RusotoFuture<RegisterCACertificateResponse, RegisterCACertificateError>;
fn register_certificate(
&self,
input: RegisterCertificateRequest,
) -> RusotoFuture<RegisterCertificateResponse, RegisterCertificateError>;
fn register_thing(
&self,
input: RegisterThingRequest,
) -> RusotoFuture<RegisterThingResponse, RegisterThingError>;
fn reject_certificate_transfer(
&self,
input: RejectCertificateTransferRequest,
) -> RusotoFuture<(), RejectCertificateTransferError>;
fn remove_thing_from_billing_group(
&self,
input: RemoveThingFromBillingGroupRequest,
) -> RusotoFuture<RemoveThingFromBillingGroupResponse, RemoveThingFromBillingGroupError>;
fn remove_thing_from_thing_group(
&self,
input: RemoveThingFromThingGroupRequest,
) -> RusotoFuture<RemoveThingFromThingGroupResponse, RemoveThingFromThingGroupError>;
fn replace_topic_rule(
&self,
input: ReplaceTopicRuleRequest,
) -> RusotoFuture<(), ReplaceTopicRuleError>;
fn search_index(
&self,
input: SearchIndexRequest,
) -> RusotoFuture<SearchIndexResponse, SearchIndexError>;
fn set_default_authorizer(
&self,
input: SetDefaultAuthorizerRequest,
) -> RusotoFuture<SetDefaultAuthorizerResponse, SetDefaultAuthorizerError>;
fn set_default_policy_version(
&self,
input: SetDefaultPolicyVersionRequest,
) -> RusotoFuture<(), SetDefaultPolicyVersionError>;
fn set_logging_options(
&self,
input: SetLoggingOptionsRequest,
) -> RusotoFuture<(), SetLoggingOptionsError>;
fn set_v2_logging_level(
&self,
input: SetV2LoggingLevelRequest,
) -> RusotoFuture<(), SetV2LoggingLevelError>;
fn set_v2_logging_options(
&self,
input: SetV2LoggingOptionsRequest,
) -> RusotoFuture<(), SetV2LoggingOptionsError>;
fn start_on_demand_audit_task(
&self,
input: StartOnDemandAuditTaskRequest,
) -> RusotoFuture<StartOnDemandAuditTaskResponse, StartOnDemandAuditTaskError>;
fn start_thing_registration_task(
&self,
input: StartThingRegistrationTaskRequest,
) -> RusotoFuture<StartThingRegistrationTaskResponse, StartThingRegistrationTaskError>;
fn stop_thing_registration_task(
&self,
input: StopThingRegistrationTaskRequest,
) -> RusotoFuture<StopThingRegistrationTaskResponse, StopThingRegistrationTaskError>;
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError>;
fn test_authorization(
&self,
input: TestAuthorizationRequest,
) -> RusotoFuture<TestAuthorizationResponse, TestAuthorizationError>;
fn test_invoke_authorizer(
&self,
input: TestInvokeAuthorizerRequest,
) -> RusotoFuture<TestInvokeAuthorizerResponse, TestInvokeAuthorizerError>;
fn transfer_certificate(
&self,
input: TransferCertificateRequest,
) -> RusotoFuture<TransferCertificateResponse, TransferCertificateError>;
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError>;
fn update_account_audit_configuration(
&self,
input: UpdateAccountAuditConfigurationRequest,
) -> RusotoFuture<UpdateAccountAuditConfigurationResponse, UpdateAccountAuditConfigurationError>;
fn update_authorizer(
&self,
input: UpdateAuthorizerRequest,
) -> RusotoFuture<UpdateAuthorizerResponse, UpdateAuthorizerError>;
fn update_billing_group(
&self,
input: UpdateBillingGroupRequest,
) -> RusotoFuture<UpdateBillingGroupResponse, UpdateBillingGroupError>;
fn update_ca_certificate(
&self,
input: UpdateCACertificateRequest,
) -> RusotoFuture<(), UpdateCACertificateError>;
fn update_certificate(
&self,
input: UpdateCertificateRequest,
) -> RusotoFuture<(), UpdateCertificateError>;
fn update_dynamic_thing_group(
&self,
input: UpdateDynamicThingGroupRequest,
) -> RusotoFuture<UpdateDynamicThingGroupResponse, UpdateDynamicThingGroupError>;
fn update_event_configurations(
&self,
input: UpdateEventConfigurationsRequest,
) -> RusotoFuture<UpdateEventConfigurationsResponse, UpdateEventConfigurationsError>;
fn update_indexing_configuration(
&self,
input: UpdateIndexingConfigurationRequest,
) -> RusotoFuture<UpdateIndexingConfigurationResponse, UpdateIndexingConfigurationError>;
fn update_job(&self, input: UpdateJobRequest) -> RusotoFuture<(), UpdateJobError>;
fn update_role_alias(
&self,
input: UpdateRoleAliasRequest,
) -> RusotoFuture<UpdateRoleAliasResponse, UpdateRoleAliasError>;
fn update_scheduled_audit(
&self,
input: UpdateScheduledAuditRequest,
) -> RusotoFuture<UpdateScheduledAuditResponse, UpdateScheduledAuditError>;
fn update_security_profile(
&self,
input: UpdateSecurityProfileRequest,
) -> RusotoFuture<UpdateSecurityProfileResponse, UpdateSecurityProfileError>;
fn update_stream(
&self,
input: UpdateStreamRequest,
) -> RusotoFuture<UpdateStreamResponse, UpdateStreamError>;
fn update_thing(
&self,
input: UpdateThingRequest,
) -> RusotoFuture<UpdateThingResponse, UpdateThingError>;
fn update_thing_group(
&self,
input: UpdateThingGroupRequest,
) -> RusotoFuture<UpdateThingGroupResponse, UpdateThingGroupError>;
fn update_thing_groups_for_thing(
&self,
input: UpdateThingGroupsForThingRequest,
) -> RusotoFuture<UpdateThingGroupsForThingResponse, UpdateThingGroupsForThingError>;
fn validate_security_profile_behaviors(
&self,
input: ValidateSecurityProfileBehaviorsRequest,
) -> RusotoFuture<ValidateSecurityProfileBehaviorsResponse, ValidateSecurityProfileBehaviorsError>;
}
#[derive(Clone)]
pub struct IotClient {
client: Client,
region: region::Region,
}
impl IotClient {
pub fn new(region: region::Region) -> IotClient {
IotClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> IotClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
IotClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Iot for IotClient {
fn accept_certificate_transfer(
&self,
input: AcceptCertificateTransferRequest,
) -> RusotoFuture<(), AcceptCertificateTransferError> {
let request_uri = format!(
"/accept-certificate-transfer/{certificate_id}",
certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.set_as_active {
params.put("setAsActive", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AcceptCertificateTransferError::from_response(response))
}))
}
})
}
fn add_thing_to_billing_group(
&self,
input: AddThingToBillingGroupRequest,
) -> RusotoFuture<AddThingToBillingGroupResponse, AddThingToBillingGroupError> {
let request_uri = "/billing-groups/addThingToBillingGroup";
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AddThingToBillingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AddThingToBillingGroupError::from_response(response))
}),
)
}
})
}
fn add_thing_to_thing_group(
&self,
input: AddThingToThingGroupRequest,
) -> RusotoFuture<AddThingToThingGroupResponse, AddThingToThingGroupError> {
let request_uri = "/thing-groups/addThingToThingGroup";
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AddThingToThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AddThingToThingGroupError::from_response(response))
}),
)
}
})
}
fn associate_targets_with_job(
&self,
input: AssociateTargetsWithJobRequest,
) -> RusotoFuture<AssociateTargetsWithJobResponse, AssociateTargetsWithJobError> {
let request_uri = format!("/jobs/{job_id}/targets", job_id = input.job_id);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociateTargetsWithJobResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateTargetsWithJobError::from_response(response))
}))
}
})
}
fn attach_policy(&self, input: AttachPolicyRequest) -> RusotoFuture<(), AttachPolicyError> {
let request_uri = format!(
"/target-policies/{policy_name}",
policy_name = input.policy_name
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AttachPolicyError::from_response(response))),
)
}
})
}
fn attach_principal_policy(
&self,
input: AttachPrincipalPolicyRequest,
) -> RusotoFuture<(), AttachPrincipalPolicyError> {
let request_uri = format!(
"/principal-policies/{policy_name}",
policy_name = input.policy_name
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
request.add_header("x-amzn-iot-principal", &input.principal);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AttachPrincipalPolicyError::from_response(response))
}),
)
}
})
}
fn attach_security_profile(
&self,
input: AttachSecurityProfileRequest,
) -> RusotoFuture<AttachSecurityProfileResponse, AttachSecurityProfileError> {
let request_uri = format!(
"/security-profiles/{security_profile_name}/targets",
security_profile_name = input.security_profile_name
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
params.put(
"securityProfileTargetArn",
&input.security_profile_target_arn,
);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AttachSecurityProfileResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AttachSecurityProfileError::from_response(response))
}),
)
}
})
}
fn attach_thing_principal(
&self,
input: AttachThingPrincipalRequest,
) -> RusotoFuture<AttachThingPrincipalResponse, AttachThingPrincipalError> {
let request_uri = format!(
"/things/{thing_name}/principals",
thing_name = input.thing_name
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
request.add_header("x-amzn-principal", &input.principal);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AttachThingPrincipalResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AttachThingPrincipalError::from_response(response))
}),
)
}
})
}
fn cancel_audit_task(
&self,
input: CancelAuditTaskRequest,
) -> RusotoFuture<CancelAuditTaskResponse, CancelAuditTaskError> {
let request_uri = format!("/audit/tasks/{task_id}/cancel", task_id = input.task_id);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CancelAuditTaskResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CancelAuditTaskError::from_response(response))),
)
}
})
}
fn cancel_certificate_transfer(
&self,
input: CancelCertificateTransferRequest,
) -> RusotoFuture<(), CancelCertificateTransferError> {
let request_uri = format!(
"/cancel-certificate-transfer/{certificate_id}",
certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CancelCertificateTransferError::from_response(response))
}))
}
})
}
fn cancel_job(
&self,
input: CancelJobRequest,
) -> RusotoFuture<CancelJobResponse, CancelJobError> {
let request_uri = format!("/jobs/{job_id}/cancel", job_id = input.job_id);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.force {
params.put("force", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CancelJobResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CancelJobError::from_response(response))),
)
}
})
}
fn cancel_job_execution(
&self,
input: CancelJobExecutionRequest,
) -> RusotoFuture<(), CancelJobExecutionError> {
let request_uri = format!(
"/things/{thing_name}/jobs/{job_id}/cancel",
job_id = input.job_id,
thing_name = input.thing_name
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.force {
params.put("force", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CancelJobExecutionError::from_response(response))),
)
}
})
}
fn clear_default_authorizer(
&self,
) -> RusotoFuture<ClearDefaultAuthorizerResponse, ClearDefaultAuthorizerError> {
let request_uri = "/default-authorizer";
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClearDefaultAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ClearDefaultAuthorizerError::from_response(response))
}),
)
}
})
}
fn create_authorizer(
&self,
input: CreateAuthorizerRequest,
) -> RusotoFuture<CreateAuthorizerResponse, CreateAuthorizerError> {
let request_uri = format!(
"/authorizer/{authorizer_name}",
authorizer_name = input.authorizer_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateAuthorizerError::from_response(response))),
)
}
})
}
fn create_billing_group(
&self,
input: CreateBillingGroupRequest,
) -> RusotoFuture<CreateBillingGroupResponse, CreateBillingGroupError> {
let request_uri = format!(
"/billing-groups/{billing_group_name}",
billing_group_name = input.billing_group_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateBillingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateBillingGroupError::from_response(response))),
)
}
})
}
fn create_certificate_from_csr(
&self,
input: CreateCertificateFromCsrRequest,
) -> RusotoFuture<CreateCertificateFromCsrResponse, CreateCertificateFromCsrError> {
let request_uri = "/certificates";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.set_as_active {
params.put("setAsActive", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateCertificateFromCsrResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateCertificateFromCsrError::from_response(response))
}))
}
})
}
fn create_dynamic_thing_group(
&self,
input: CreateDynamicThingGroupRequest,
) -> RusotoFuture<CreateDynamicThingGroupResponse, CreateDynamicThingGroupError> {
let request_uri = format!(
"/dynamic-thing-groups/{thing_group_name}",
thing_group_name = input.thing_group_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDynamicThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDynamicThingGroupError::from_response(response))
}))
}
})
}
fn create_job(
&self,
input: CreateJobRequest,
) -> RusotoFuture<CreateJobResponse, CreateJobError> {
let request_uri = format!("/jobs/{job_id}", job_id = input.job_id);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateJobResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateJobError::from_response(response))),
)
}
})
}
fn create_keys_and_certificate(
&self,
input: CreateKeysAndCertificateRequest,
) -> RusotoFuture<CreateKeysAndCertificateResponse, CreateKeysAndCertificateError> {
let request_uri = "/keys-and-certificate";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.set_as_active {
params.put("setAsActive", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateKeysAndCertificateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateKeysAndCertificateError::from_response(response))
}))
}
})
}
fn create_ota_update(
&self,
input: CreateOTAUpdateRequest,
) -> RusotoFuture<CreateOTAUpdateResponse, CreateOTAUpdateError> {
let request_uri = format!(
"/otaUpdates/{ota_update_id}",
ota_update_id = input.ota_update_id
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateOTAUpdateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateOTAUpdateError::from_response(response))),
)
}
})
}
fn create_policy(
&self,
input: CreatePolicyRequest,
) -> RusotoFuture<CreatePolicyResponse, CreatePolicyError> {
let request_uri = format!("/policies/{policy_name}", policy_name = input.policy_name);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreatePolicyResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreatePolicyError::from_response(response))),
)
}
})
}
fn create_policy_version(
&self,
input: CreatePolicyVersionRequest,
) -> RusotoFuture<CreatePolicyVersionResponse, CreatePolicyVersionError> {
let request_uri = format!(
"/policies/{policy_name}/version",
policy_name = input.policy_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.set_as_default {
params.put("setAsDefault", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreatePolicyVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreatePolicyVersionError::from_response(response))
}),
)
}
})
}
fn create_role_alias(
&self,
input: CreateRoleAliasRequest,
) -> RusotoFuture<CreateRoleAliasResponse, CreateRoleAliasError> {
let request_uri = format!("/role-aliases/{role_alias}", role_alias = input.role_alias);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateRoleAliasResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateRoleAliasError::from_response(response))),
)
}
})
}
fn create_scheduled_audit(
&self,
input: CreateScheduledAuditRequest,
) -> RusotoFuture<CreateScheduledAuditResponse, CreateScheduledAuditError> {
let request_uri = format!(
"/audit/scheduledaudits/{scheduled_audit_name}",
scheduled_audit_name = input.scheduled_audit_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateScheduledAuditResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateScheduledAuditError::from_response(response))
}),
)
}
})
}
fn create_security_profile(
&self,
input: CreateSecurityProfileRequest,
) -> RusotoFuture<CreateSecurityProfileResponse, CreateSecurityProfileError> {
let request_uri = format!(
"/security-profiles/{security_profile_name}",
security_profile_name = input.security_profile_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSecurityProfileResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateSecurityProfileError::from_response(response))
}),
)
}
})
}
fn create_stream(
&self,
input: CreateStreamRequest,
) -> RusotoFuture<CreateStreamResponse, CreateStreamError> {
let request_uri = format!("/streams/{stream_id}", stream_id = input.stream_id);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateStreamResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateStreamError::from_response(response))),
)
}
})
}
fn create_thing(
&self,
input: CreateThingRequest,
) -> RusotoFuture<CreateThingResponse, CreateThingError> {
let request_uri = format!("/things/{thing_name}", thing_name = input.thing_name);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateThingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateThingError::from_response(response))),
)
}
})
}
fn create_thing_group(
&self,
input: CreateThingGroupRequest,
) -> RusotoFuture<CreateThingGroupResponse, CreateThingGroupError> {
let request_uri = format!(
"/thing-groups/{thing_group_name}",
thing_group_name = input.thing_group_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateThingGroupError::from_response(response))),
)
}
})
}
fn create_thing_type(
&self,
input: CreateThingTypeRequest,
) -> RusotoFuture<CreateThingTypeResponse, CreateThingTypeError> {
let request_uri = format!(
"/thing-types/{thing_type_name}",
thing_type_name = input.thing_type_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateThingTypeResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateThingTypeError::from_response(response))),
)
}
})
}
fn create_topic_rule(
&self,
input: CreateTopicRuleRequest,
) -> RusotoFuture<(), CreateTopicRuleError> {
let request_uri = format!("/rules/{rule_name}", rule_name = input.rule_name);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input.topic_rule_payload).unwrap());
request.set_payload(encoded);
if let Some(ref tags) = input.tags {
request.add_header("x-amz-tagging", &tags.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateTopicRuleError::from_response(response))),
)
}
})
}
fn delete_account_audit_configuration(
&self,
input: DeleteAccountAuditConfigurationRequest,
) -> RusotoFuture<DeleteAccountAuditConfigurationResponse, DeleteAccountAuditConfigurationError>
{
let request_uri = "/audit/configuration";
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.delete_scheduled_audits {
params.put("deleteScheduledAudits", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteAccountAuditConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteAccountAuditConfigurationError::from_response(
response,
))
}))
}
})
}
fn delete_authorizer(
&self,
input: DeleteAuthorizerRequest,
) -> RusotoFuture<DeleteAuthorizerResponse, DeleteAuthorizerError> {
let request_uri = format!(
"/authorizer/{authorizer_name}",
authorizer_name = input.authorizer_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteAuthorizerError::from_response(response))),
)
}
})
}
fn delete_billing_group(
&self,
input: DeleteBillingGroupRequest,
) -> RusotoFuture<DeleteBillingGroupResponse, DeleteBillingGroupError> {
let request_uri = format!(
"/billing-groups/{billing_group_name}",
billing_group_name = input.billing_group_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.expected_version {
params.put("expectedVersion", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteBillingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteBillingGroupError::from_response(response))),
)
}
})
}
fn delete_ca_certificate(
&self,
input: DeleteCACertificateRequest,
) -> RusotoFuture<DeleteCACertificateResponse, DeleteCACertificateError> {
let request_uri = format!(
"/cacertificate/{ca_certificate_id}",
ca_certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteCACertificateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteCACertificateError::from_response(response))
}),
)
}
})
}
fn delete_certificate(
&self,
input: DeleteCertificateRequest,
) -> RusotoFuture<(), DeleteCertificateError> {
let request_uri = format!(
"/certificates/{certificate_id}",
certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.force_delete {
params.put("forceDelete", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteCertificateError::from_response(response))),
)
}
})
}
fn delete_dynamic_thing_group(
&self,
input: DeleteDynamicThingGroupRequest,
) -> RusotoFuture<DeleteDynamicThingGroupResponse, DeleteDynamicThingGroupError> {
let request_uri = format!(
"/dynamic-thing-groups/{thing_group_name}",
thing_group_name = input.thing_group_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.expected_version {
params.put("expectedVersion", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteDynamicThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDynamicThingGroupError::from_response(response))
}))
}
})
}
fn delete_job(&self, input: DeleteJobRequest) -> RusotoFuture<(), DeleteJobError> {
let request_uri = format!("/jobs/{job_id}", job_id = input.job_id);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.force {
params.put("force", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteJobError::from_response(response))),
)
}
})
}
fn delete_job_execution(
&self,
input: DeleteJobExecutionRequest,
) -> RusotoFuture<(), DeleteJobExecutionError> {
let request_uri = format!(
"/things/{thing_name}/jobs/{job_id}/executionNumber/{execution_number}",
execution_number = input.execution_number,
job_id = input.job_id,
thing_name = input.thing_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.force {
params.put("force", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteJobExecutionError::from_response(response))),
)
}
})
}
fn delete_ota_update(
&self,
input: DeleteOTAUpdateRequest,
) -> RusotoFuture<DeleteOTAUpdateResponse, DeleteOTAUpdateError> {
let request_uri = format!(
"/otaUpdates/{ota_update_id}",
ota_update_id = input.ota_update_id
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.delete_stream {
params.put("deleteStream", x);
}
if let Some(ref x) = input.force_delete_aws_job {
params.put("forceDeleteAWSJob", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteOTAUpdateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteOTAUpdateError::from_response(response))),
)
}
})
}
fn delete_policy(&self, input: DeletePolicyRequest) -> RusotoFuture<(), DeletePolicyError> {
let request_uri = format!("/policies/{policy_name}", policy_name = input.policy_name);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeletePolicyError::from_response(response))),
)
}
})
}
fn delete_policy_version(
&self,
input: DeletePolicyVersionRequest,
) -> RusotoFuture<(), DeletePolicyVersionError> {
let request_uri = format!(
"/policies/{policy_name}/version/{policy_version_id}",
policy_name = input.policy_name,
policy_version_id = input.policy_version_id
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeletePolicyVersionError::from_response(response))
}),
)
}
})
}
fn delete_registration_code(
&self,
) -> RusotoFuture<DeleteRegistrationCodeResponse, DeleteRegistrationCodeError> {
let request_uri = "/registrationcode";
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteRegistrationCodeResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteRegistrationCodeError::from_response(response))
}),
)
}
})
}
fn delete_role_alias(
&self,
input: DeleteRoleAliasRequest,
) -> RusotoFuture<DeleteRoleAliasResponse, DeleteRoleAliasError> {
let request_uri = format!("/role-aliases/{role_alias}", role_alias = input.role_alias);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteRoleAliasResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteRoleAliasError::from_response(response))),
)
}
})
}
fn delete_scheduled_audit(
&self,
input: DeleteScheduledAuditRequest,
) -> RusotoFuture<DeleteScheduledAuditResponse, DeleteScheduledAuditError> {
let request_uri = format!(
"/audit/scheduledaudits/{scheduled_audit_name}",
scheduled_audit_name = input.scheduled_audit_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteScheduledAuditResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteScheduledAuditError::from_response(response))
}),
)
}
})
}
fn delete_security_profile(
&self,
input: DeleteSecurityProfileRequest,
) -> RusotoFuture<DeleteSecurityProfileResponse, DeleteSecurityProfileError> {
let request_uri = format!(
"/security-profiles/{security_profile_name}",
security_profile_name = input.security_profile_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.expected_version {
params.put("expectedVersion", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteSecurityProfileResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteSecurityProfileError::from_response(response))
}),
)
}
})
}
fn delete_stream(
&self,
input: DeleteStreamRequest,
) -> RusotoFuture<DeleteStreamResponse, DeleteStreamError> {
let request_uri = format!("/streams/{stream_id}", stream_id = input.stream_id);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteStreamResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteStreamError::from_response(response))),
)
}
})
}
fn delete_thing(
&self,
input: DeleteThingRequest,
) -> RusotoFuture<DeleteThingResponse, DeleteThingError> {
let request_uri = format!("/things/{thing_name}", thing_name = input.thing_name);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.expected_version {
params.put("expectedVersion", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteThingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteThingError::from_response(response))),
)
}
})
}
fn delete_thing_group(
&self,
input: DeleteThingGroupRequest,
) -> RusotoFuture<DeleteThingGroupResponse, DeleteThingGroupError> {
let request_uri = format!(
"/thing-groups/{thing_group_name}",
thing_group_name = input.thing_group_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.expected_version {
params.put("expectedVersion", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteThingGroupError::from_response(response))),
)
}
})
}
fn delete_thing_type(
&self,
input: DeleteThingTypeRequest,
) -> RusotoFuture<DeleteThingTypeResponse, DeleteThingTypeError> {
let request_uri = format!(
"/thing-types/{thing_type_name}",
thing_type_name = input.thing_type_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteThingTypeResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteThingTypeError::from_response(response))),
)
}
})
}
fn delete_topic_rule(
&self,
input: DeleteTopicRuleRequest,
) -> RusotoFuture<(), DeleteTopicRuleError> {
let request_uri = format!("/rules/{rule_name}", rule_name = input.rule_name);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteTopicRuleError::from_response(response))),
)
}
})
}
fn delete_v2_logging_level(
&self,
input: DeleteV2LoggingLevelRequest,
) -> RusotoFuture<(), DeleteV2LoggingLevelError> {
let request_uri = "/v2LoggingLevel";
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
params.put("targetName", &input.target_name);
params.put("targetType", &input.target_type);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteV2LoggingLevelError::from_response(response))
}),
)
}
})
}
fn deprecate_thing_type(
&self,
input: DeprecateThingTypeRequest,
) -> RusotoFuture<DeprecateThingTypeResponse, DeprecateThingTypeError> {
let request_uri = format!(
"/thing-types/{thing_type_name}/deprecate",
thing_type_name = input.thing_type_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeprecateThingTypeResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeprecateThingTypeError::from_response(response))),
)
}
})
}
fn describe_account_audit_configuration(
&self,
) -> RusotoFuture<
DescribeAccountAuditConfigurationResponse,
DescribeAccountAuditConfigurationError,
> {
let request_uri = "/audit/configuration";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeAccountAuditConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAccountAuditConfigurationError::from_response(
response,
))
}))
}
})
}
fn describe_audit_task(
&self,
input: DescribeAuditTaskRequest,
) -> RusotoFuture<DescribeAuditTaskResponse, DescribeAuditTaskError> {
let request_uri = format!("/audit/tasks/{task_id}", task_id = input.task_id);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeAuditTaskResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeAuditTaskError::from_response(response))),
)
}
})
}
fn describe_authorizer(
&self,
input: DescribeAuthorizerRequest,
) -> RusotoFuture<DescribeAuthorizerResponse, DescribeAuthorizerError> {
let request_uri = format!(
"/authorizer/{authorizer_name}",
authorizer_name = input.authorizer_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeAuthorizerError::from_response(response))),
)
}
})
}
fn describe_billing_group(
&self,
input: DescribeBillingGroupRequest,
) -> RusotoFuture<DescribeBillingGroupResponse, DescribeBillingGroupError> {
let request_uri = format!(
"/billing-groups/{billing_group_name}",
billing_group_name = input.billing_group_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeBillingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeBillingGroupError::from_response(response))
}),
)
}
})
}
fn describe_ca_certificate(
&self,
input: DescribeCACertificateRequest,
) -> RusotoFuture<DescribeCACertificateResponse, DescribeCACertificateError> {
let request_uri = format!(
"/cacertificate/{ca_certificate_id}",
ca_certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeCACertificateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeCACertificateError::from_response(response))
}),
)
}
})
}
fn describe_certificate(
&self,
input: DescribeCertificateRequest,
) -> RusotoFuture<DescribeCertificateResponse, DescribeCertificateError> {
let request_uri = format!(
"/certificates/{certificate_id}",
certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeCertificateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeCertificateError::from_response(response))
}),
)
}
})
}
fn describe_default_authorizer(
&self,
) -> RusotoFuture<DescribeDefaultAuthorizerResponse, DescribeDefaultAuthorizerError> {
let request_uri = "/default-authorizer";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDefaultAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDefaultAuthorizerError::from_response(response))
}))
}
})
}
fn describe_endpoint(
&self,
input: DescribeEndpointRequest,
) -> RusotoFuture<DescribeEndpointResponse, DescribeEndpointError> {
let request_uri = "/endpoint";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.endpoint_type {
params.put("endpointType", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeEndpointResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeEndpointError::from_response(response))),
)
}
})
}
fn describe_event_configurations(
&self,
) -> RusotoFuture<DescribeEventConfigurationsResponse, DescribeEventConfigurationsError> {
let request_uri = "/event-configurations";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeEventConfigurationsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeEventConfigurationsError::from_response(response))
}))
}
})
}
fn describe_index(
&self,
input: DescribeIndexRequest,
) -> RusotoFuture<DescribeIndexResponse, DescribeIndexError> {
let request_uri = format!("/indices/{index_name}", index_name = input.index_name);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeIndexResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeIndexError::from_response(response))),
)
}
})
}
fn describe_job(
&self,
input: DescribeJobRequest,
) -> RusotoFuture<DescribeJobResponse, DescribeJobError> {
let request_uri = format!("/jobs/{job_id}", job_id = input.job_id);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeJobResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeJobError::from_response(response))),
)
}
})
}
fn describe_job_execution(
&self,
input: DescribeJobExecutionRequest,
) -> RusotoFuture<DescribeJobExecutionResponse, DescribeJobExecutionError> {
let request_uri = format!(
"/things/{thing_name}/jobs/{job_id}",
job_id = input.job_id,
thing_name = input.thing_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.execution_number {
params.put("executionNumber", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeJobExecutionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeJobExecutionError::from_response(response))
}),
)
}
})
}
fn describe_role_alias(
&self,
input: DescribeRoleAliasRequest,
) -> RusotoFuture<DescribeRoleAliasResponse, DescribeRoleAliasError> {
let request_uri = format!("/role-aliases/{role_alias}", role_alias = input.role_alias);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeRoleAliasResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeRoleAliasError::from_response(response))),
)
}
})
}
fn describe_scheduled_audit(
&self,
input: DescribeScheduledAuditRequest,
) -> RusotoFuture<DescribeScheduledAuditResponse, DescribeScheduledAuditError> {
let request_uri = format!(
"/audit/scheduledaudits/{scheduled_audit_name}",
scheduled_audit_name = input.scheduled_audit_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeScheduledAuditResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeScheduledAuditError::from_response(response))
}),
)
}
})
}
fn describe_security_profile(
&self,
input: DescribeSecurityProfileRequest,
) -> RusotoFuture<DescribeSecurityProfileResponse, DescribeSecurityProfileError> {
let request_uri = format!(
"/security-profiles/{security_profile_name}",
security_profile_name = input.security_profile_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeSecurityProfileResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeSecurityProfileError::from_response(response))
}))
}
})
}
fn describe_stream(
&self,
input: DescribeStreamRequest,
) -> RusotoFuture<DescribeStreamResponse, DescribeStreamError> {
let request_uri = format!("/streams/{stream_id}", stream_id = input.stream_id);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeStreamResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeStreamError::from_response(response))),
)
}
})
}
fn describe_thing(
&self,
input: DescribeThingRequest,
) -> RusotoFuture<DescribeThingResponse, DescribeThingError> {
let request_uri = format!("/things/{thing_name}", thing_name = input.thing_name);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeThingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeThingError::from_response(response))),
)
}
})
}
fn describe_thing_group(
&self,
input: DescribeThingGroupRequest,
) -> RusotoFuture<DescribeThingGroupResponse, DescribeThingGroupError> {
let request_uri = format!(
"/thing-groups/{thing_group_name}",
thing_group_name = input.thing_group_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeThingGroupError::from_response(response))),
)
}
})
}
fn describe_thing_registration_task(
&self,
input: DescribeThingRegistrationTaskRequest,
) -> RusotoFuture<DescribeThingRegistrationTaskResponse, DescribeThingRegistrationTaskError>
{
let request_uri = format!(
"/thing-registration-tasks/{task_id}",
task_id = input.task_id
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeThingRegistrationTaskResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeThingRegistrationTaskError::from_response(response))
}))
}
})
}
fn describe_thing_type(
&self,
input: DescribeThingTypeRequest,
) -> RusotoFuture<DescribeThingTypeResponse, DescribeThingTypeError> {
let request_uri = format!(
"/thing-types/{thing_type_name}",
thing_type_name = input.thing_type_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeThingTypeResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeThingTypeError::from_response(response))),
)
}
})
}
fn detach_policy(&self, input: DetachPolicyRequest) -> RusotoFuture<(), DetachPolicyError> {
let request_uri = format!(
"/target-policies/{policy_name}",
policy_name = input.policy_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DetachPolicyError::from_response(response))),
)
}
})
}
fn detach_principal_policy(
&self,
input: DetachPrincipalPolicyRequest,
) -> RusotoFuture<(), DetachPrincipalPolicyError> {
let request_uri = format!(
"/principal-policies/{policy_name}",
policy_name = input.policy_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
request.add_header("x-amzn-iot-principal", &input.principal);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DetachPrincipalPolicyError::from_response(response))
}),
)
}
})
}
fn detach_security_profile(
&self,
input: DetachSecurityProfileRequest,
) -> RusotoFuture<DetachSecurityProfileResponse, DetachSecurityProfileError> {
let request_uri = format!(
"/security-profiles/{security_profile_name}/targets",
security_profile_name = input.security_profile_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
params.put(
"securityProfileTargetArn",
&input.security_profile_target_arn,
);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DetachSecurityProfileResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DetachSecurityProfileError::from_response(response))
}),
)
}
})
}
fn detach_thing_principal(
&self,
input: DetachThingPrincipalRequest,
) -> RusotoFuture<DetachThingPrincipalResponse, DetachThingPrincipalError> {
let request_uri = format!(
"/things/{thing_name}/principals",
thing_name = input.thing_name
);
let mut request = SignedRequest::new("DELETE", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
request.add_header("x-amzn-principal", &input.principal);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DetachThingPrincipalResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DetachThingPrincipalError::from_response(response))
}),
)
}
})
}
fn disable_topic_rule(
&self,
input: DisableTopicRuleRequest,
) -> RusotoFuture<(), DisableTopicRuleError> {
let request_uri = format!("/rules/{rule_name}/disable", rule_name = input.rule_name);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DisableTopicRuleError::from_response(response))),
)
}
})
}
fn enable_topic_rule(
&self,
input: EnableTopicRuleRequest,
) -> RusotoFuture<(), EnableTopicRuleError> {
let request_uri = format!("/rules/{rule_name}/enable", rule_name = input.rule_name);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(EnableTopicRuleError::from_response(response))),
)
}
})
}
fn get_effective_policies(
&self,
input: GetEffectivePoliciesRequest,
) -> RusotoFuture<GetEffectivePoliciesResponse, GetEffectivePoliciesError> {
let request_uri = "/effective-policies";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.thing_name {
params.put("thingName", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetEffectivePoliciesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetEffectivePoliciesError::from_response(response))
}),
)
}
})
}
fn get_indexing_configuration(
&self,
) -> RusotoFuture<GetIndexingConfigurationResponse, GetIndexingConfigurationError> {
let request_uri = "/indexing/config";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetIndexingConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetIndexingConfigurationError::from_response(response))
}))
}
})
}
fn get_job_document(
&self,
input: GetJobDocumentRequest,
) -> RusotoFuture<GetJobDocumentResponse, GetJobDocumentError> {
let request_uri = format!("/jobs/{job_id}/job-document", job_id = input.job_id);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetJobDocumentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetJobDocumentError::from_response(response))),
)
}
})
}
fn get_logging_options(
&self,
) -> RusotoFuture<GetLoggingOptionsResponse, GetLoggingOptionsError> {
let request_uri = "/loggingOptions";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetLoggingOptionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetLoggingOptionsError::from_response(response))),
)
}
})
}
fn get_ota_update(
&self,
input: GetOTAUpdateRequest,
) -> RusotoFuture<GetOTAUpdateResponse, GetOTAUpdateError> {
let request_uri = format!(
"/otaUpdates/{ota_update_id}",
ota_update_id = input.ota_update_id
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetOTAUpdateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetOTAUpdateError::from_response(response))),
)
}
})
}
fn get_policy(
&self,
input: GetPolicyRequest,
) -> RusotoFuture<GetPolicyResponse, GetPolicyError> {
let request_uri = format!("/policies/{policy_name}", policy_name = input.policy_name);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetPolicyResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetPolicyError::from_response(response))),
)
}
})
}
fn get_policy_version(
&self,
input: GetPolicyVersionRequest,
) -> RusotoFuture<GetPolicyVersionResponse, GetPolicyVersionError> {
let request_uri = format!(
"/policies/{policy_name}/version/{policy_version_id}",
policy_name = input.policy_name,
policy_version_id = input.policy_version_id
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetPolicyVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetPolicyVersionError::from_response(response))),
)
}
})
}
fn get_registration_code(
&self,
) -> RusotoFuture<GetRegistrationCodeResponse, GetRegistrationCodeError> {
let request_uri = "/registrationcode";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetRegistrationCodeResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetRegistrationCodeError::from_response(response))
}),
)
}
})
}
fn get_statistics(
&self,
input: GetStatisticsRequest,
) -> RusotoFuture<GetStatisticsResponse, GetStatisticsError> {
let request_uri = "/indices/statistics";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetStatisticsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetStatisticsError::from_response(response))),
)
}
})
}
fn get_topic_rule(
&self,
input: GetTopicRuleRequest,
) -> RusotoFuture<GetTopicRuleResponse, GetTopicRuleError> {
let request_uri = format!("/rules/{rule_name}", rule_name = input.rule_name);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetTopicRuleResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetTopicRuleError::from_response(response))),
)
}
})
}
fn get_v2_logging_options(
&self,
) -> RusotoFuture<GetV2LoggingOptionsResponse, GetV2LoggingOptionsError> {
let request_uri = "/v2LoggingOptions";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetV2LoggingOptionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetV2LoggingOptionsError::from_response(response))
}),
)
}
})
}
fn list_active_violations(
&self,
input: ListActiveViolationsRequest,
) -> RusotoFuture<ListActiveViolationsResponse, ListActiveViolationsError> {
let request_uri = "/active-violations";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.security_profile_name {
params.put("securityProfileName", x);
}
if let Some(ref x) = input.thing_name {
params.put("thingName", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListActiveViolationsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListActiveViolationsError::from_response(response))
}),
)
}
})
}
fn list_attached_policies(
&self,
input: ListAttachedPoliciesRequest,
) -> RusotoFuture<ListAttachedPoliciesResponse, ListAttachedPoliciesError> {
let request_uri = format!("/attached-policies/{target}", target = input.target);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
if let Some(ref x) = input.recursive {
params.put("recursive", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAttachedPoliciesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListAttachedPoliciesError::from_response(response))
}),
)
}
})
}
fn list_audit_findings(
&self,
input: ListAuditFindingsRequest,
) -> RusotoFuture<ListAuditFindingsResponse, ListAuditFindingsError> {
let request_uri = "/audit/findings";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAuditFindingsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListAuditFindingsError::from_response(response))),
)
}
})
}
fn list_audit_tasks(
&self,
input: ListAuditTasksRequest,
) -> RusotoFuture<ListAuditTasksResponse, ListAuditTasksError> {
let request_uri = "/audit/tasks";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
params.put("endTime", &input.end_time);
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
params.put("startTime", &input.start_time);
if let Some(ref x) = input.task_status {
params.put("taskStatus", x);
}
if let Some(ref x) = input.task_type {
params.put("taskType", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAuditTasksResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListAuditTasksError::from_response(response))),
)
}
})
}
fn list_authorizers(
&self,
input: ListAuthorizersRequest,
) -> RusotoFuture<ListAuthorizersResponse, ListAuthorizersError> {
let request_uri = "/authorizers/";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
if let Some(ref x) = input.status {
params.put("status", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListAuthorizersResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListAuthorizersError::from_response(response))),
)
}
})
}
fn list_billing_groups(
&self,
input: ListBillingGroupsRequest,
) -> RusotoFuture<ListBillingGroupsResponse, ListBillingGroupsError> {
let request_uri = "/billing-groups";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.name_prefix_filter {
params.put("namePrefixFilter", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListBillingGroupsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListBillingGroupsError::from_response(response))),
)
}
})
}
fn list_ca_certificates(
&self,
input: ListCACertificatesRequest,
) -> RusotoFuture<ListCACertificatesResponse, ListCACertificatesError> {
let request_uri = "/cacertificates";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListCACertificatesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListCACertificatesError::from_response(response))),
)
}
})
}
fn list_certificates(
&self,
input: ListCertificatesRequest,
) -> RusotoFuture<ListCertificatesResponse, ListCertificatesError> {
let request_uri = "/certificates";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListCertificatesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListCertificatesError::from_response(response))),
)
}
})
}
fn list_certificates_by_ca(
&self,
input: ListCertificatesByCARequest,
) -> RusotoFuture<ListCertificatesByCAResponse, ListCertificatesByCAError> {
let request_uri = format!(
"/certificates-by-ca/{ca_certificate_id}",
ca_certificate_id = input.ca_certificate_id
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListCertificatesByCAResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListCertificatesByCAError::from_response(response))
}),
)
}
})
}
fn list_indices(
&self,
input: ListIndicesRequest,
) -> RusotoFuture<ListIndicesResponse, ListIndicesError> {
let request_uri = "/indices";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListIndicesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListIndicesError::from_response(response))),
)
}
})
}
fn list_job_executions_for_job(
&self,
input: ListJobExecutionsForJobRequest,
) -> RusotoFuture<ListJobExecutionsForJobResponse, ListJobExecutionsForJobError> {
let request_uri = format!("/jobs/{job_id}/things", job_id = input.job_id);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.status {
params.put("status", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListJobExecutionsForJobResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListJobExecutionsForJobError::from_response(response))
}))
}
})
}
fn list_job_executions_for_thing(
&self,
input: ListJobExecutionsForThingRequest,
) -> RusotoFuture<ListJobExecutionsForThingResponse, ListJobExecutionsForThingError> {
let request_uri = format!("/things/{thing_name}/jobs", thing_name = input.thing_name);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.status {
params.put("status", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListJobExecutionsForThingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListJobExecutionsForThingError::from_response(response))
}))
}
})
}
fn list_jobs(&self, input: ListJobsRequest) -> RusotoFuture<ListJobsResponse, ListJobsError> {
let request_uri = "/jobs";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.status {
params.put("status", x);
}
if let Some(ref x) = input.target_selection {
params.put("targetSelection", x);
}
if let Some(ref x) = input.thing_group_id {
params.put("thingGroupId", x);
}
if let Some(ref x) = input.thing_group_name {
params.put("thingGroupName", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListJobsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListJobsError::from_response(response))),
)
}
})
}
fn list_ota_updates(
&self,
input: ListOTAUpdatesRequest,
) -> RusotoFuture<ListOTAUpdatesResponse, ListOTAUpdatesError> {
let request_uri = "/otaUpdates";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.ota_update_status {
params.put("otaUpdateStatus", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListOTAUpdatesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListOTAUpdatesError::from_response(response))),
)
}
})
}
fn list_outgoing_certificates(
&self,
input: ListOutgoingCertificatesRequest,
) -> RusotoFuture<ListOutgoingCertificatesResponse, ListOutgoingCertificatesError> {
let request_uri = "/certificates-out-going";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListOutgoingCertificatesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListOutgoingCertificatesError::from_response(response))
}))
}
})
}
fn list_policies(
&self,
input: ListPoliciesRequest,
) -> RusotoFuture<ListPoliciesResponse, ListPoliciesError> {
let request_uri = "/policies";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPoliciesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListPoliciesError::from_response(response))),
)
}
})
}
fn list_policy_principals(
&self,
input: ListPolicyPrincipalsRequest,
) -> RusotoFuture<ListPolicyPrincipalsResponse, ListPolicyPrincipalsError> {
let request_uri = "/policy-principals";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
request.add_header("x-amzn-iot-policy", &input.policy_name);
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPolicyPrincipalsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListPolicyPrincipalsError::from_response(response))
}),
)
}
})
}
fn list_policy_versions(
&self,
input: ListPolicyVersionsRequest,
) -> RusotoFuture<ListPolicyVersionsResponse, ListPolicyVersionsError> {
let request_uri = format!(
"/policies/{policy_name}/version",
policy_name = input.policy_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPolicyVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListPolicyVersionsError::from_response(response))),
)
}
})
}
fn list_principal_policies(
&self,
input: ListPrincipalPoliciesRequest,
) -> RusotoFuture<ListPrincipalPoliciesResponse, ListPrincipalPoliciesError> {
let request_uri = "/principal-policies";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
request.add_header("x-amzn-iot-principal", &input.principal);
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPrincipalPoliciesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListPrincipalPoliciesError::from_response(response))
}),
)
}
})
}
fn list_principal_things(
&self,
input: ListPrincipalThingsRequest,
) -> RusotoFuture<ListPrincipalThingsResponse, ListPrincipalThingsError> {
let request_uri = "/principals/things";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
request.add_header("x-amzn-principal", &input.principal);
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPrincipalThingsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListPrincipalThingsError::from_response(response))
}),
)
}
})
}
fn list_role_aliases(
&self,
input: ListRoleAliasesRequest,
) -> RusotoFuture<ListRoleAliasesResponse, ListRoleAliasesError> {
let request_uri = "/role-aliases";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListRoleAliasesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListRoleAliasesError::from_response(response))),
)
}
})
}
fn list_scheduled_audits(
&self,
input: ListScheduledAuditsRequest,
) -> RusotoFuture<ListScheduledAuditsResponse, ListScheduledAuditsError> {
let request_uri = "/audit/scheduledaudits";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListScheduledAuditsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListScheduledAuditsError::from_response(response))
}),
)
}
})
}
fn list_security_profiles(
&self,
input: ListSecurityProfilesRequest,
) -> RusotoFuture<ListSecurityProfilesResponse, ListSecurityProfilesError> {
let request_uri = "/security-profiles";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListSecurityProfilesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListSecurityProfilesError::from_response(response))
}),
)
}
})
}
fn list_security_profiles_for_target(
&self,
input: ListSecurityProfilesForTargetRequest,
) -> RusotoFuture<ListSecurityProfilesForTargetResponse, ListSecurityProfilesForTargetError>
{
let request_uri = "/security-profiles-for-target";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.recursive {
params.put("recursive", x);
}
params.put(
"securityProfileTargetArn",
&input.security_profile_target_arn,
);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListSecurityProfilesForTargetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListSecurityProfilesForTargetError::from_response(response))
}))
}
})
}
fn list_streams(
&self,
input: ListStreamsRequest,
) -> RusotoFuture<ListStreamsResponse, ListStreamsError> {
let request_uri = "/streams";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.ascending_order {
params.put("isAscendingOrder", x);
}
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListStreamsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListStreamsError::from_response(response))),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> {
let request_uri = "/tags";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
params.put("resourceArn", &input.resource_arn);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn list_targets_for_policy(
&self,
input: ListTargetsForPolicyRequest,
) -> RusotoFuture<ListTargetsForPolicyResponse, ListTargetsForPolicyError> {
let request_uri = format!(
"/policy-targets/{policy_name}",
policy_name = input.policy_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.marker {
params.put("marker", x);
}
if let Some(ref x) = input.page_size {
params.put("pageSize", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTargetsForPolicyResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTargetsForPolicyError::from_response(response))
}),
)
}
})
}
fn list_targets_for_security_profile(
&self,
input: ListTargetsForSecurityProfileRequest,
) -> RusotoFuture<ListTargetsForSecurityProfileResponse, ListTargetsForSecurityProfileError>
{
let request_uri = format!(
"/security-profiles/{security_profile_name}/targets",
security_profile_name = input.security_profile_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTargetsForSecurityProfileResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListTargetsForSecurityProfileError::from_response(response))
}))
}
})
}
fn list_thing_groups(
&self,
input: ListThingGroupsRequest,
) -> RusotoFuture<ListThingGroupsResponse, ListThingGroupsError> {
let request_uri = "/thing-groups";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.name_prefix_filter {
params.put("namePrefixFilter", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.parent_group {
params.put("parentGroup", x);
}
if let Some(ref x) = input.recursive {
params.put("recursive", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingGroupsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListThingGroupsError::from_response(response))),
)
}
})
}
fn list_thing_groups_for_thing(
&self,
input: ListThingGroupsForThingRequest,
) -> RusotoFuture<ListThingGroupsForThingResponse, ListThingGroupsForThingError> {
let request_uri = format!(
"/things/{thing_name}/thing-groups",
thing_name = input.thing_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingGroupsForThingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListThingGroupsForThingError::from_response(response))
}))
}
})
}
fn list_thing_principals(
&self,
input: ListThingPrincipalsRequest,
) -> RusotoFuture<ListThingPrincipalsResponse, ListThingPrincipalsError> {
let request_uri = format!(
"/things/{thing_name}/principals",
thing_name = input.thing_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingPrincipalsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListThingPrincipalsError::from_response(response))
}),
)
}
})
}
fn list_thing_registration_task_reports(
&self,
input: ListThingRegistrationTaskReportsRequest,
) -> RusotoFuture<ListThingRegistrationTaskReportsResponse, ListThingRegistrationTaskReportsError>
{
let request_uri = format!(
"/thing-registration-tasks/{task_id}/reports",
task_id = input.task_id
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
params.put("reportType", &input.report_type);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingRegistrationTaskReportsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListThingRegistrationTaskReportsError::from_response(
response,
))
}))
}
})
}
fn list_thing_registration_tasks(
&self,
input: ListThingRegistrationTasksRequest,
) -> RusotoFuture<ListThingRegistrationTasksResponse, ListThingRegistrationTasksError> {
let request_uri = "/thing-registration-tasks";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.status {
params.put("status", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingRegistrationTasksResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListThingRegistrationTasksError::from_response(response))
}))
}
})
}
fn list_thing_types(
&self,
input: ListThingTypesRequest,
) -> RusotoFuture<ListThingTypesResponse, ListThingTypesError> {
let request_uri = "/thing-types";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.thing_type_name {
params.put("thingTypeName", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingTypesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListThingTypesError::from_response(response))),
)
}
})
}
fn list_things(
&self,
input: ListThingsRequest,
) -> RusotoFuture<ListThingsResponse, ListThingsError> {
let request_uri = "/things";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.attribute_name {
params.put("attributeName", x);
}
if let Some(ref x) = input.attribute_value {
params.put("attributeValue", x);
}
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.thing_type_name {
params.put("thingTypeName", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListThingsError::from_response(response))),
)
}
})
}
fn list_things_in_billing_group(
&self,
input: ListThingsInBillingGroupRequest,
) -> RusotoFuture<ListThingsInBillingGroupResponse, ListThingsInBillingGroupError> {
let request_uri = format!(
"/billing-groups/{billing_group_name}/things",
billing_group_name = input.billing_group_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingsInBillingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListThingsInBillingGroupError::from_response(response))
}))
}
})
}
fn list_things_in_thing_group(
&self,
input: ListThingsInThingGroupRequest,
) -> RusotoFuture<ListThingsInThingGroupResponse, ListThingsInThingGroupError> {
let request_uri = format!(
"/thing-groups/{thing_group_name}/things",
thing_group_name = input.thing_group_name
);
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.recursive {
params.put("recursive", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListThingsInThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListThingsInThingGroupError::from_response(response))
}),
)
}
})
}
fn list_topic_rules(
&self,
input: ListTopicRulesRequest,
) -> RusotoFuture<ListTopicRulesResponse, ListTopicRulesError> {
let request_uri = "/rules";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.rule_disabled {
params.put("ruleDisabled", x);
}
if let Some(ref x) = input.topic {
params.put("topic", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTopicRulesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListTopicRulesError::from_response(response))),
)
}
})
}
fn list_v2_logging_levels(
&self,
input: ListV2LoggingLevelsRequest,
) -> RusotoFuture<ListV2LoggingLevelsResponse, ListV2LoggingLevelsError> {
let request_uri = "/v2LoggingLevel";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.target_type {
params.put("targetType", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListV2LoggingLevelsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListV2LoggingLevelsError::from_response(response))
}),
)
}
})
}
fn list_violation_events(
&self,
input: ListViolationEventsRequest,
) -> RusotoFuture<ListViolationEventsResponse, ListViolationEventsError> {
let request_uri = "/violation-events";
let mut request = SignedRequest::new("GET", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
params.put("endTime", &input.end_time);
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.security_profile_name {
params.put("securityProfileName", x);
}
params.put("startTime", &input.start_time);
if let Some(ref x) = input.thing_name {
params.put("thingName", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListViolationEventsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListViolationEventsError::from_response(response))
}),
)
}
})
}
fn register_ca_certificate(
&self,
input: RegisterCACertificateRequest,
) -> RusotoFuture<RegisterCACertificateResponse, RegisterCACertificateError> {
let request_uri = "/cacertificate";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.allow_auto_registration {
params.put("allowAutoRegistration", x);
}
if let Some(ref x) = input.set_as_active {
params.put("setAsActive", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RegisterCACertificateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RegisterCACertificateError::from_response(response))
}),
)
}
})
}
fn register_certificate(
&self,
input: RegisterCertificateRequest,
) -> RusotoFuture<RegisterCertificateResponse, RegisterCertificateError> {
let request_uri = "/certificate/register";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RegisterCertificateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RegisterCertificateError::from_response(response))
}),
)
}
})
}
fn register_thing(
&self,
input: RegisterThingRequest,
) -> RusotoFuture<RegisterThingResponse, RegisterThingError> {
let request_uri = "/things";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RegisterThingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RegisterThingError::from_response(response))),
)
}
})
}
fn reject_certificate_transfer(
&self,
input: RejectCertificateTransferRequest,
) -> RusotoFuture<(), RejectCertificateTransferError> {
let request_uri = format!(
"/reject-certificate-transfer/{certificate_id}",
certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(RejectCertificateTransferError::from_response(response))
}))
}
})
}
fn remove_thing_from_billing_group(
&self,
input: RemoveThingFromBillingGroupRequest,
) -> RusotoFuture<RemoveThingFromBillingGroupResponse, RemoveThingFromBillingGroupError> {
let request_uri = "/billing-groups/removeThingFromBillingGroup";
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RemoveThingFromBillingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(RemoveThingFromBillingGroupError::from_response(response))
}))
}
})
}
fn remove_thing_from_thing_group(
&self,
input: RemoveThingFromThingGroupRequest,
) -> RusotoFuture<RemoveThingFromThingGroupResponse, RemoveThingFromThingGroupError> {
let request_uri = "/thing-groups/removeThingFromThingGroup";
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RemoveThingFromThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(RemoveThingFromThingGroupError::from_response(response))
}))
}
})
}
fn replace_topic_rule(
&self,
input: ReplaceTopicRuleRequest,
) -> RusotoFuture<(), ReplaceTopicRuleError> {
let request_uri = format!("/rules/{rule_name}", rule_name = input.rule_name);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input.topic_rule_payload).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ReplaceTopicRuleError::from_response(response))),
)
}
})
}
fn search_index(
&self,
input: SearchIndexRequest,
) -> RusotoFuture<SearchIndexResponse, SearchIndexError> {
let request_uri = "/indices/search";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<SearchIndexResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SearchIndexError::from_response(response))),
)
}
})
}
fn set_default_authorizer(
&self,
input: SetDefaultAuthorizerRequest,
) -> RusotoFuture<SetDefaultAuthorizerResponse, SetDefaultAuthorizerError> {
let request_uri = "/default-authorizer";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<SetDefaultAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(SetDefaultAuthorizerError::from_response(response))
}),
)
}
})
}
fn set_default_policy_version(
&self,
input: SetDefaultPolicyVersionRequest,
) -> RusotoFuture<(), SetDefaultPolicyVersionError> {
let request_uri = format!(
"/policies/{policy_name}/version/{policy_version_id}",
policy_name = input.policy_name,
policy_version_id = input.policy_version_id
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(SetDefaultPolicyVersionError::from_response(response))
}))
}
})
}
fn set_logging_options(
&self,
input: SetLoggingOptionsRequest,
) -> RusotoFuture<(), SetLoggingOptionsError> {
let request_uri = "/loggingOptions";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input.logging_options_payload).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SetLoggingOptionsError::from_response(response))),
)
}
})
}
fn set_v2_logging_level(
&self,
input: SetV2LoggingLevelRequest,
) -> RusotoFuture<(), SetV2LoggingLevelError> {
let request_uri = "/v2LoggingLevel";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SetV2LoggingLevelError::from_response(response))),
)
}
})
}
fn set_v2_logging_options(
&self,
input: SetV2LoggingOptionsRequest,
) -> RusotoFuture<(), SetV2LoggingOptionsError> {
let request_uri = "/v2LoggingOptions";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(SetV2LoggingOptionsError::from_response(response))
}),
)
}
})
}
fn start_on_demand_audit_task(
&self,
input: StartOnDemandAuditTaskRequest,
) -> RusotoFuture<StartOnDemandAuditTaskResponse, StartOnDemandAuditTaskError> {
let request_uri = "/audit/tasks";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<StartOnDemandAuditTaskResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(StartOnDemandAuditTaskError::from_response(response))
}),
)
}
})
}
fn start_thing_registration_task(
&self,
input: StartThingRegistrationTaskRequest,
) -> RusotoFuture<StartThingRegistrationTaskResponse, StartThingRegistrationTaskError> {
let request_uri = "/thing-registration-tasks";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<StartThingRegistrationTaskResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StartThingRegistrationTaskError::from_response(response))
}))
}
})
}
fn stop_thing_registration_task(
&self,
input: StopThingRegistrationTaskRequest,
) -> RusotoFuture<StopThingRegistrationTaskResponse, StopThingRegistrationTaskError> {
let request_uri = format!(
"/thing-registration-tasks/{task_id}/cancel",
task_id = input.task_id
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<StopThingRegistrationTaskResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StopThingRegistrationTaskError::from_response(response))
}))
}
})
}
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError> {
let request_uri = "/tags";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TagResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn test_authorization(
&self,
input: TestAuthorizationRequest,
) -> RusotoFuture<TestAuthorizationResponse, TestAuthorizationError> {
let request_uri = "/test-authorization";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.client_id {
params.put("clientId", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TestAuthorizationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TestAuthorizationError::from_response(response))),
)
}
})
}
fn test_invoke_authorizer(
&self,
input: TestInvokeAuthorizerRequest,
) -> RusotoFuture<TestInvokeAuthorizerResponse, TestInvokeAuthorizerError> {
let request_uri = format!(
"/authorizer/{authorizer_name}/test",
authorizer_name = input.authorizer_name
);
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TestInvokeAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(TestInvokeAuthorizerError::from_response(response))
}),
)
}
})
}
fn transfer_certificate(
&self,
input: TransferCertificateRequest,
) -> RusotoFuture<TransferCertificateResponse, TransferCertificateError> {
let request_uri = format!(
"/transfer-certificate/{certificate_id}",
certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("targetAwsAccount", &input.target_aws_account);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TransferCertificateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(TransferCertificateError::from_response(response))
}),
)
}
})
}
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError> {
let request_uri = "/untag";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UntagResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_account_audit_configuration(
&self,
input: UpdateAccountAuditConfigurationRequest,
) -> RusotoFuture<UpdateAccountAuditConfigurationResponse, UpdateAccountAuditConfigurationError>
{
let request_uri = "/audit/configuration";
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateAccountAuditConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateAccountAuditConfigurationError::from_response(
response,
))
}))
}
})
}
fn update_authorizer(
&self,
input: UpdateAuthorizerRequest,
) -> RusotoFuture<UpdateAuthorizerResponse, UpdateAuthorizerError> {
let request_uri = format!(
"/authorizer/{authorizer_name}",
authorizer_name = input.authorizer_name
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateAuthorizerError::from_response(response))),
)
}
})
}
fn update_billing_group(
&self,
input: UpdateBillingGroupRequest,
) -> RusotoFuture<UpdateBillingGroupResponse, UpdateBillingGroupError> {
let request_uri = format!(
"/billing-groups/{billing_group_name}",
billing_group_name = input.billing_group_name
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateBillingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateBillingGroupError::from_response(response))),
)
}
})
}
fn update_ca_certificate(
&self,
input: UpdateCACertificateRequest,
) -> RusotoFuture<(), UpdateCACertificateError> {
let request_uri = format!(
"/cacertificate/{ca_certificate_id}",
ca_certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.new_auto_registration_status {
params.put("newAutoRegistrationStatus", x);
}
if let Some(ref x) = input.new_status {
params.put("newStatus", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateCACertificateError::from_response(response))
}),
)
}
})
}
fn update_certificate(
&self,
input: UpdateCertificateRequest,
) -> RusotoFuture<(), UpdateCertificateError> {
let request_uri = format!(
"/certificates/{certificate_id}",
certificate_id = input.certificate_id
);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let mut params = Params::new();
params.put("newStatus", &input.new_status);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateCertificateError::from_response(response))),
)
}
})
}
fn update_dynamic_thing_group(
&self,
input: UpdateDynamicThingGroupRequest,
) -> RusotoFuture<UpdateDynamicThingGroupResponse, UpdateDynamicThingGroupError> {
let request_uri = format!(
"/dynamic-thing-groups/{thing_group_name}",
thing_group_name = input.thing_group_name
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDynamicThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateDynamicThingGroupError::from_response(response))
}))
}
})
}
fn update_event_configurations(
&self,
input: UpdateEventConfigurationsRequest,
) -> RusotoFuture<UpdateEventConfigurationsResponse, UpdateEventConfigurationsError> {
let request_uri = "/event-configurations";
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateEventConfigurationsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateEventConfigurationsError::from_response(response))
}))
}
})
}
fn update_indexing_configuration(
&self,
input: UpdateIndexingConfigurationRequest,
) -> RusotoFuture<UpdateIndexingConfigurationResponse, UpdateIndexingConfigurationError> {
let request_uri = "/indexing/config";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateIndexingConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateIndexingConfigurationError::from_response(response))
}))
}
})
}
fn update_job(&self, input: UpdateJobRequest) -> RusotoFuture<(), UpdateJobError> {
let request_uri = format!("/jobs/{job_id}", job_id = input.job_id);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateJobError::from_response(response))),
)
}
})
}
fn update_role_alias(
&self,
input: UpdateRoleAliasRequest,
) -> RusotoFuture<UpdateRoleAliasResponse, UpdateRoleAliasError> {
let request_uri = format!("/role-aliases/{role_alias}", role_alias = input.role_alias);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateRoleAliasResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateRoleAliasError::from_response(response))),
)
}
})
}
fn update_scheduled_audit(
&self,
input: UpdateScheduledAuditRequest,
) -> RusotoFuture<UpdateScheduledAuditResponse, UpdateScheduledAuditError> {
let request_uri = format!(
"/audit/scheduledaudits/{scheduled_audit_name}",
scheduled_audit_name = input.scheduled_audit_name
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateScheduledAuditResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateScheduledAuditError::from_response(response))
}),
)
}
})
}
fn update_security_profile(
&self,
input: UpdateSecurityProfileRequest,
) -> RusotoFuture<UpdateSecurityProfileResponse, UpdateSecurityProfileError> {
let request_uri = format!(
"/security-profiles/{security_profile_name}",
security_profile_name = input.security_profile_name
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.expected_version {
params.put("expectedVersion", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateSecurityProfileResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateSecurityProfileError::from_response(response))
}),
)
}
})
}
fn update_stream(
&self,
input: UpdateStreamRequest,
) -> RusotoFuture<UpdateStreamResponse, UpdateStreamError> {
let request_uri = format!("/streams/{stream_id}", stream_id = input.stream_id);
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateStreamResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateStreamError::from_response(response))),
)
}
})
}
fn update_thing(
&self,
input: UpdateThingRequest,
) -> RusotoFuture<UpdateThingResponse, UpdateThingError> {
let request_uri = format!("/things/{thing_name}", thing_name = input.thing_name);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateThingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateThingError::from_response(response))),
)
}
})
}
fn update_thing_group(
&self,
input: UpdateThingGroupRequest,
) -> RusotoFuture<UpdateThingGroupResponse, UpdateThingGroupError> {
let request_uri = format!(
"/thing-groups/{thing_group_name}",
thing_group_name = input.thing_group_name
);
let mut request = SignedRequest::new("PATCH", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateThingGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateThingGroupError::from_response(response))),
)
}
})
}
fn update_thing_groups_for_thing(
&self,
input: UpdateThingGroupsForThingRequest,
) -> RusotoFuture<UpdateThingGroupsForThingResponse, UpdateThingGroupsForThingError> {
let request_uri = "/thing-groups/updateThingGroupsForThing";
let mut request = SignedRequest::new("PUT", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateThingGroupsForThingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateThingGroupsForThingError::from_response(response))
}))
}
})
}
fn validate_security_profile_behaviors(
&self,
input: ValidateSecurityProfileBehaviorsRequest,
) -> RusotoFuture<ValidateSecurityProfileBehaviorsResponse, ValidateSecurityProfileBehaviorsError>
{
let request_uri = "/security-profile-behaviors/validate";
let mut request = SignedRequest::new("POST", "execute-api", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.set_endpoint_prefix("iot".to_string());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ValidateSecurityProfileBehaviorsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ValidateSecurityProfileBehaviorsError::from_response(
response,
))
}))
}
})
}
}