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)]
pub struct AssociateRoleToGroupRequest {
#[serde(rename = "GroupId")]
pub group_id: 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 AssociateRoleToGroupResponse {
#[serde(rename = "AssociatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_at: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateServiceRoleToAccountRequest {
#[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 AssociateServiceRoleToAccountResponse {
#[serde(rename = "AssociatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_at: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BulkDeployment {
#[serde(rename = "BulkDeploymentArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bulk_deployment_arn: Option<String>,
#[serde(rename = "BulkDeploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bulk_deployment_id: Option<String>,
#[serde(rename = "CreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BulkDeploymentMetrics {
#[serde(rename = "InvalidInputRecords")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invalid_input_records: Option<i64>,
#[serde(rename = "RecordsProcessed")]
#[serde(skip_serializing_if = "Option::is_none")]
pub records_processed: Option<i64>,
#[serde(rename = "RetryAttempts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retry_attempts: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BulkDeploymentResult {
#[serde(rename = "CreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "DeploymentArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_arn: Option<String>,
#[serde(rename = "DeploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_id: Option<String>,
#[serde(rename = "DeploymentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status: Option<String>,
#[serde(rename = "DeploymentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_type: Option<String>,
#[serde(rename = "ErrorDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_details: Option<Vec<ErrorDetail>>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "GroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ConnectivityInfo {
#[serde(rename = "HostAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub host_address: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Metadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<String>,
#[serde(rename = "PortNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub port_number: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Connector {
#[serde(rename = "ConnectorArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connector_arn: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ConnectorDefinitionVersion {
#[serde(rename = "Connectors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connectors: Option<Vec<Connector>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Core {
#[serde(rename = "CertificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "SyncShadow")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sync_shadow: Option<bool>,
#[serde(rename = "ThingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CoreDefinitionVersion {
#[serde(rename = "Cores")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cores: Option<Vec<Core>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateConnectorDefinitionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "InitialVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_version: Option<ConnectorDefinitionVersion>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateConnectorDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateConnectorDefinitionVersionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "ConnectorDefinitionId")]
pub connector_definition_id: String,
#[serde(rename = "Connectors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connectors: Option<Vec<Connector>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateConnectorDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateCoreDefinitionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "InitialVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_version: Option<CoreDefinitionVersion>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateCoreDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateCoreDefinitionVersionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "CoreDefinitionId")]
pub core_definition_id: String,
#[serde(rename = "Cores")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cores: Option<Vec<Core>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateCoreDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDeploymentRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "DeploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_id: Option<String>,
#[serde(rename = "DeploymentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_type: Option<String>,
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "GroupVersionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDeploymentResponse {
#[serde(rename = "DeploymentArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_arn: Option<String>,
#[serde(rename = "DeploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDeviceDefinitionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "InitialVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_version: Option<DeviceDefinitionVersion>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDeviceDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDeviceDefinitionVersionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "DeviceDefinitionId")]
pub device_definition_id: String,
#[serde(rename = "Devices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub devices: Option<Vec<Device>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDeviceDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateFunctionDefinitionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "InitialVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_version: Option<FunctionDefinitionVersion>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateFunctionDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateFunctionDefinitionVersionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "DefaultConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_config: Option<FunctionDefaultConfig>,
#[serde(rename = "FunctionDefinitionId")]
pub function_definition_id: String,
#[serde(rename = "Functions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub functions: Option<Vec<Function>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateFunctionDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateGroupCertificateAuthorityRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateGroupCertificateAuthorityResponse {
#[serde(rename = "GroupCertificateAuthorityArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_certificate_authority_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateGroupRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "InitialVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_version: Option<GroupVersion>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateGroupResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateGroupVersionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "ConnectorDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connector_definition_version_arn: Option<String>,
#[serde(rename = "CoreDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub core_definition_version_arn: Option<String>,
#[serde(rename = "DeviceDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_definition_version_arn: Option<String>,
#[serde(rename = "FunctionDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub function_definition_version_arn: Option<String>,
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "LoggerDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logger_definition_version_arn: Option<String>,
#[serde(rename = "ResourceDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_definition_version_arn: Option<String>,
#[serde(rename = "SubscriptionDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subscription_definition_version_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateGroupVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateLoggerDefinitionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "InitialVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_version: Option<LoggerDefinitionVersion>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateLoggerDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateLoggerDefinitionVersionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "LoggerDefinitionId")]
pub logger_definition_id: String,
#[serde(rename = "Loggers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loggers: Option<Vec<Logger>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateLoggerDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateResourceDefinitionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "InitialVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_version: Option<ResourceDefinitionVersion>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateResourceDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateResourceDefinitionVersionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "ResourceDefinitionId")]
pub resource_definition_id: String,
#[serde(rename = "Resources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resources: Option<Vec<Resource>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateResourceDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSoftwareUpdateJobRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "S3UrlSignerRole")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_url_signer_role: Option<String>,
#[serde(rename = "SoftwareToUpdate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub software_to_update: Option<String>,
#[serde(rename = "UpdateAgentLogLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_agent_log_level: Option<String>,
#[serde(rename = "UpdateTargets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_targets: Option<Vec<String>>,
#[serde(rename = "UpdateTargetsArchitecture")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_targets_architecture: Option<String>,
#[serde(rename = "UpdateTargetsOperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_targets_operating_system: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSoftwareUpdateJobResponse {
#[serde(rename = "IotJobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iot_job_arn: Option<String>,
#[serde(rename = "IotJobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iot_job_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSubscriptionDefinitionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "InitialVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initial_version: Option<SubscriptionDefinitionVersion>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSubscriptionDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSubscriptionDefinitionVersionRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "SubscriptionDefinitionId")]
pub subscription_definition_id: String,
#[serde(rename = "Subscriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subscriptions: Option<Vec<Subscription>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSubscriptionDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DefinitionInformation {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteConnectorDefinitionRequest {
#[serde(rename = "ConnectorDefinitionId")]
pub connector_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteConnectorDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteCoreDefinitionRequest {
#[serde(rename = "CoreDefinitionId")]
pub core_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteCoreDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDeviceDefinitionRequest {
#[serde(rename = "DeviceDefinitionId")]
pub device_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDeviceDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteFunctionDefinitionRequest {
#[serde(rename = "FunctionDefinitionId")]
pub function_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteFunctionDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteGroupRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteLoggerDefinitionRequest {
#[serde(rename = "LoggerDefinitionId")]
pub logger_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteLoggerDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteResourceDefinitionRequest {
#[serde(rename = "ResourceDefinitionId")]
pub resource_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteResourceDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteSubscriptionDefinitionRequest {
#[serde(rename = "SubscriptionDefinitionId")]
pub subscription_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteSubscriptionDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Deployment {
#[serde(rename = "CreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "DeploymentArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_arn: Option<String>,
#[serde(rename = "DeploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_id: Option<String>,
#[serde(rename = "DeploymentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_type: Option<String>,
#[serde(rename = "GroupArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Device {
#[serde(rename = "CertificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "SyncShadow")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sync_shadow: Option<bool>,
#[serde(rename = "ThingArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub thing_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceDefinitionVersion {
#[serde(rename = "Devices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub devices: Option<Vec<Device>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateRoleFromGroupRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateRoleFromGroupResponse {
#[serde(rename = "DisassociatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disassociated_at: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateServiceRoleFromAccountRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateServiceRoleFromAccountResponse {
#[serde(rename = "DisassociatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disassociated_at: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ErrorDetail {
#[serde(rename = "DetailedErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_error_code: Option<String>,
#[serde(rename = "DetailedErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_error_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Function {
#[serde(rename = "FunctionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub function_arn: Option<String>,
#[serde(rename = "FunctionConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub function_configuration: Option<FunctionConfiguration>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FunctionConfiguration {
#[serde(rename = "EncodingType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encoding_type: Option<String>,
#[serde(rename = "Environment")]
#[serde(skip_serializing_if = "Option::is_none")]
pub environment: Option<FunctionConfigurationEnvironment>,
#[serde(rename = "ExecArgs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exec_args: Option<String>,
#[serde(rename = "Executable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub executable: Option<String>,
#[serde(rename = "MemorySize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub memory_size: Option<i64>,
#[serde(rename = "Pinned")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pinned: Option<bool>,
#[serde(rename = "Timeout")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FunctionConfigurationEnvironment {
#[serde(rename = "AccessSysfs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_sysfs: Option<bool>,
#[serde(rename = "Execution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution: Option<FunctionExecutionConfig>,
#[serde(rename = "ResourceAccessPolicies")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_access_policies: Option<Vec<ResourceAccessPolicy>>,
#[serde(rename = "Variables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub variables: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FunctionDefaultConfig {
#[serde(rename = "Execution")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution: Option<FunctionDefaultExecutionConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FunctionDefaultExecutionConfig {
#[serde(rename = "IsolationMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub isolation_mode: Option<String>,
#[serde(rename = "RunAs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub run_as: Option<FunctionRunAsConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FunctionDefinitionVersion {
#[serde(rename = "DefaultConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_config: Option<FunctionDefaultConfig>,
#[serde(rename = "Functions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub functions: Option<Vec<Function>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FunctionExecutionConfig {
#[serde(rename = "IsolationMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub isolation_mode: Option<String>,
#[serde(rename = "RunAs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub run_as: Option<FunctionRunAsConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FunctionRunAsConfig {
#[serde(rename = "Gid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gid: Option<i64>,
#[serde(rename = "Uid")]
#[serde(skip_serializing_if = "Option::is_none")]
pub uid: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAssociatedRoleRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAssociatedRoleResponse {
#[serde(rename = "AssociatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_at: 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 GetBulkDeploymentStatusRequest {
#[serde(rename = "BulkDeploymentId")]
pub bulk_deployment_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetBulkDeploymentStatusResponse {
#[serde(rename = "BulkDeploymentMetrics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bulk_deployment_metrics: Option<BulkDeploymentMetrics>,
#[serde(rename = "BulkDeploymentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bulk_deployment_status: Option<String>,
#[serde(rename = "CreatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
#[serde(rename = "ErrorDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_details: Option<Vec<ErrorDetail>>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetConnectivityInfoRequest {
#[serde(rename = "ThingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetConnectivityInfoResponse {
#[serde(rename = "ConnectivityInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connectivity_info: Option<Vec<ConnectivityInfo>>,
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetConnectorDefinitionRequest {
#[serde(rename = "ConnectorDefinitionId")]
pub connector_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetConnectorDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetConnectorDefinitionVersionRequest {
#[serde(rename = "ConnectorDefinitionId")]
pub connector_definition_id: String,
#[serde(rename = "ConnectorDefinitionVersionId")]
pub connector_definition_version_id: 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 GetConnectorDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Definition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definition: Option<ConnectorDefinitionVersion>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetCoreDefinitionRequest {
#[serde(rename = "CoreDefinitionId")]
pub core_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetCoreDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetCoreDefinitionVersionRequest {
#[serde(rename = "CoreDefinitionId")]
pub core_definition_id: String,
#[serde(rename = "CoreDefinitionVersionId")]
pub core_definition_version_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetCoreDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Definition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definition: Option<CoreDefinitionVersion>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDeploymentStatusRequest {
#[serde(rename = "DeploymentId")]
pub deployment_id: String,
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDeploymentStatusResponse {
#[serde(rename = "DeploymentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status: Option<String>,
#[serde(rename = "DeploymentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_type: Option<String>,
#[serde(rename = "ErrorDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_details: Option<Vec<ErrorDetail>>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "UpdatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDeviceDefinitionRequest {
#[serde(rename = "DeviceDefinitionId")]
pub device_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDeviceDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDeviceDefinitionVersionRequest {
#[serde(rename = "DeviceDefinitionId")]
pub device_definition_id: String,
#[serde(rename = "DeviceDefinitionVersionId")]
pub device_definition_version_id: 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 GetDeviceDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Definition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definition: Option<DeviceDefinitionVersion>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetFunctionDefinitionRequest {
#[serde(rename = "FunctionDefinitionId")]
pub function_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetFunctionDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetFunctionDefinitionVersionRequest {
#[serde(rename = "FunctionDefinitionId")]
pub function_definition_id: String,
#[serde(rename = "FunctionDefinitionVersionId")]
pub function_definition_version_id: 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 GetFunctionDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Definition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definition: Option<FunctionDefinitionVersion>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetGroupCertificateAuthorityRequest {
#[serde(rename = "CertificateAuthorityId")]
pub certificate_authority_id: String,
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetGroupCertificateAuthorityResponse {
#[serde(rename = "GroupCertificateAuthorityArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_certificate_authority_arn: Option<String>,
#[serde(rename = "GroupCertificateAuthorityId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_certificate_authority_id: Option<String>,
#[serde(rename = "PemEncodedCertificate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pem_encoded_certificate: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetGroupCertificateConfigurationRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetGroupCertificateConfigurationResponse {
#[serde(rename = "CertificateAuthorityExpiryInMilliseconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_authority_expiry_in_milliseconds: Option<String>,
#[serde(rename = "CertificateExpiryInMilliseconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_expiry_in_milliseconds: Option<String>,
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetGroupRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetGroupResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetGroupVersionRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "GroupVersionId")]
pub group_version_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetGroupVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Definition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definition: Option<GroupVersion>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetLoggerDefinitionRequest {
#[serde(rename = "LoggerDefinitionId")]
pub logger_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetLoggerDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetLoggerDefinitionVersionRequest {
#[serde(rename = "LoggerDefinitionId")]
pub logger_definition_id: String,
#[serde(rename = "LoggerDefinitionVersionId")]
pub logger_definition_version_id: 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 GetLoggerDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Definition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definition: Option<LoggerDefinitionVersion>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetResourceDefinitionRequest {
#[serde(rename = "ResourceDefinitionId")]
pub resource_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetResourceDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetResourceDefinitionVersionRequest {
#[serde(rename = "ResourceDefinitionId")]
pub resource_definition_id: String,
#[serde(rename = "ResourceDefinitionVersionId")]
pub resource_definition_version_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetResourceDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Definition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definition: Option<ResourceDefinitionVersion>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetServiceRoleForAccountRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetServiceRoleForAccountResponse {
#[serde(rename = "AssociatedAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_at: 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 GetSubscriptionDefinitionRequest {
#[serde(rename = "SubscriptionDefinitionId")]
pub subscription_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSubscriptionDefinitionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetSubscriptionDefinitionVersionRequest {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SubscriptionDefinitionId")]
pub subscription_definition_id: String,
#[serde(rename = "SubscriptionDefinitionVersionId")]
pub subscription_definition_version_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSubscriptionDefinitionVersionResponse {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Definition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definition: Option<SubscriptionDefinitionVersion>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GroupCertificateAuthorityProperties {
#[serde(rename = "GroupCertificateAuthorityArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_certificate_authority_arn: Option<String>,
#[serde(rename = "GroupCertificateAuthorityId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_certificate_authority_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GroupInformation {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "LastUpdatedTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_timestamp: Option<String>,
#[serde(rename = "LatestVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version: Option<String>,
#[serde(rename = "LatestVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_version_arn: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GroupOwnerSetting {
#[serde(rename = "AutoAddGroupOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auto_add_group_owner: Option<bool>,
#[serde(rename = "GroupOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_owner: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GroupVersion {
#[serde(rename = "ConnectorDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connector_definition_version_arn: Option<String>,
#[serde(rename = "CoreDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub core_definition_version_arn: Option<String>,
#[serde(rename = "DeviceDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_definition_version_arn: Option<String>,
#[serde(rename = "FunctionDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub function_definition_version_arn: Option<String>,
#[serde(rename = "LoggerDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logger_definition_version_arn: Option<String>,
#[serde(rename = "ResourceDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_definition_version_arn: Option<String>,
#[serde(rename = "SubscriptionDefinitionVersionArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subscription_definition_version_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListBulkDeploymentDetailedReportsRequest {
#[serde(rename = "BulkDeploymentId")]
pub bulk_deployment_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListBulkDeploymentDetailedReportsResponse {
#[serde(rename = "Deployments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployments: Option<Vec<BulkDeploymentResult>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListBulkDeploymentsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListBulkDeploymentsResponse {
#[serde(rename = "BulkDeployments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bulk_deployments: Option<Vec<BulkDeployment>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListConnectorDefinitionVersionsRequest {
#[serde(rename = "ConnectorDefinitionId")]
pub connector_definition_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListConnectorDefinitionVersionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<VersionInformation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListConnectorDefinitionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListConnectorDefinitionsResponse {
#[serde(rename = "Definitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definitions: Option<Vec<DefinitionInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListCoreDefinitionVersionsRequest {
#[serde(rename = "CoreDefinitionId")]
pub core_definition_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListCoreDefinitionVersionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<VersionInformation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListCoreDefinitionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListCoreDefinitionsResponse {
#[serde(rename = "Definitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definitions: Option<Vec<DefinitionInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDeploymentsRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListDeploymentsResponse {
#[serde(rename = "Deployments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployments: Option<Vec<Deployment>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDeviceDefinitionVersionsRequest {
#[serde(rename = "DeviceDefinitionId")]
pub device_definition_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListDeviceDefinitionVersionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<VersionInformation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDeviceDefinitionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListDeviceDefinitionsResponse {
#[serde(rename = "Definitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definitions: Option<Vec<DefinitionInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListFunctionDefinitionVersionsRequest {
#[serde(rename = "FunctionDefinitionId")]
pub function_definition_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListFunctionDefinitionVersionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<VersionInformation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListFunctionDefinitionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListFunctionDefinitionsResponse {
#[serde(rename = "Definitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definitions: Option<Vec<DefinitionInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListGroupCertificateAuthoritiesRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListGroupCertificateAuthoritiesResponse {
#[serde(rename = "GroupCertificateAuthorities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_certificate_authorities: Option<Vec<GroupCertificateAuthorityProperties>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListGroupVersionsRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListGroupVersionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<VersionInformation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListGroupsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListGroupsResponse {
#[serde(rename = "Groups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub groups: Option<Vec<GroupInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListLoggerDefinitionVersionsRequest {
#[serde(rename = "LoggerDefinitionId")]
pub logger_definition_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListLoggerDefinitionVersionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<VersionInformation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListLoggerDefinitionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListLoggerDefinitionsResponse {
#[serde(rename = "Definitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definitions: Option<Vec<DefinitionInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListResourceDefinitionVersionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResourceDefinitionId")]
pub resource_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListResourceDefinitionVersionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<VersionInformation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListResourceDefinitionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListResourceDefinitionsResponse {
#[serde(rename = "Definitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definitions: Option<Vec<DefinitionInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSubscriptionDefinitionVersionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SubscriptionDefinitionId")]
pub subscription_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListSubscriptionDefinitionVersionsResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Versions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versions: Option<Vec<VersionInformation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSubscriptionDefinitionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: 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 ListSubscriptionDefinitionsResponse {
#[serde(rename = "Definitions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub definitions: Option<Vec<DefinitionInformation>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LocalDeviceResourceData {
#[serde(rename = "GroupOwnerSetting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_owner_setting: Option<GroupOwnerSetting>,
#[serde(rename = "SourcePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LocalVolumeResourceData {
#[serde(rename = "DestinationPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_path: Option<String>,
#[serde(rename = "GroupOwnerSetting")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_owner_setting: Option<GroupOwnerSetting>,
#[serde(rename = "SourcePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_path: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Logger {
#[serde(rename = "Component")]
#[serde(skip_serializing_if = "Option::is_none")]
pub component: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Level")]
#[serde(skip_serializing_if = "Option::is_none")]
pub level: Option<String>,
#[serde(rename = "Space")]
#[serde(skip_serializing_if = "Option::is_none")]
pub space: Option<i64>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoggerDefinitionVersion {
#[serde(rename = "Loggers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loggers: Option<Vec<Logger>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ResetDeploymentsRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "Force")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force: Option<bool>,
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResetDeploymentsResponse {
#[serde(rename = "DeploymentArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_arn: Option<String>,
#[serde(rename = "DeploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Resource {
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ResourceDataContainer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_data_container: Option<ResourceDataContainer>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceAccessPolicy {
#[serde(rename = "Permission")]
#[serde(skip_serializing_if = "Option::is_none")]
pub permission: Option<String>,
#[serde(rename = "ResourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceDataContainer {
#[serde(rename = "LocalDeviceResourceData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub local_device_resource_data: Option<LocalDeviceResourceData>,
#[serde(rename = "LocalVolumeResourceData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub local_volume_resource_data: Option<LocalVolumeResourceData>,
#[serde(rename = "S3MachineLearningModelResourceData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_machine_learning_model_resource_data: Option<S3MachineLearningModelResourceData>,
#[serde(rename = "SageMakerMachineLearningModelResourceData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sage_maker_machine_learning_model_resource_data:
Option<SageMakerMachineLearningModelResourceData>,
#[serde(rename = "SecretsManagerSecretResourceData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secrets_manager_secret_resource_data: Option<SecretsManagerSecretResourceData>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceDefinitionVersion {
#[serde(rename = "Resources")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resources: Option<Vec<Resource>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3MachineLearningModelResourceData {
#[serde(rename = "DestinationPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_path: Option<String>,
#[serde(rename = "S3Uri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_uri: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SageMakerMachineLearningModelResourceData {
#[serde(rename = "DestinationPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_path: Option<String>,
#[serde(rename = "SageMakerJobArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sage_maker_job_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SecretsManagerSecretResourceData {
#[serde(rename = "ARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "AdditionalStagingLabelsToDownload")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_staging_labels_to_download: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartBulkDeploymentRequest {
#[serde(rename = "AmznClientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amzn_client_token: Option<String>,
#[serde(rename = "ExecutionRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub execution_role_arn: Option<String>,
#[serde(rename = "InputFileUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub input_file_uri: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartBulkDeploymentResponse {
#[serde(rename = "BulkDeploymentArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bulk_deployment_arn: Option<String>,
#[serde(rename = "BulkDeploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bulk_deployment_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopBulkDeploymentRequest {
#[serde(rename = "BulkDeploymentId")]
pub bulk_deployment_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopBulkDeploymentResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Subscription {
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Source")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
#[serde(rename = "Subject")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subject: Option<String>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SubscriptionDefinitionVersion {
#[serde(rename = "Subscriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subscriptions: Option<Vec<Subscription>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "tags")]
pub tags: ::std::collections::HashMap<String, 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, Serialize)]
pub struct UpdateConnectivityInfoRequest {
#[serde(rename = "ConnectivityInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connectivity_info: Option<Vec<ConnectivityInfo>>,
#[serde(rename = "ThingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateConnectivityInfoResponse {
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateConnectorDefinitionRequest {
#[serde(rename = "ConnectorDefinitionId")]
pub connector_definition_id: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateConnectorDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateCoreDefinitionRequest {
#[serde(rename = "CoreDefinitionId")]
pub core_definition_id: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateCoreDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDeviceDefinitionRequest {
#[serde(rename = "DeviceDefinitionId")]
pub device_definition_id: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDeviceDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateFunctionDefinitionRequest {
#[serde(rename = "FunctionDefinitionId")]
pub function_definition_id: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateFunctionDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateGroupCertificateConfigurationRequest {
#[serde(rename = "CertificateExpiryInMilliseconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_expiry_in_milliseconds: Option<String>,
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateGroupCertificateConfigurationResponse {
#[serde(rename = "CertificateAuthorityExpiryInMilliseconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_authority_expiry_in_milliseconds: Option<String>,
#[serde(rename = "CertificateExpiryInMilliseconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_expiry_in_milliseconds: Option<String>,
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateGroupRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateGroupResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateLoggerDefinitionRequest {
#[serde(rename = "LoggerDefinitionId")]
pub logger_definition_id: String,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateLoggerDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateResourceDefinitionRequest {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ResourceDefinitionId")]
pub resource_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateResourceDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateSubscriptionDefinitionRequest {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "SubscriptionDefinitionId")]
pub subscription_definition_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateSubscriptionDefinitionResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VersionInformation {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreationTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_timestamp: Option<String>,
#[serde(rename = "Id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "Version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum AssociateRoleToGroupError {
BadRequest(String),
InternalServerError(String),
}
impl AssociateRoleToGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateRoleToGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(AssociateRoleToGroupError::BadRequest(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(AssociateRoleToGroupError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateRoleToGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateRoleToGroupError {
fn description(&self) -> &str {
match *self {
AssociateRoleToGroupError::BadRequest(ref cause) => cause,
AssociateRoleToGroupError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateServiceRoleToAccountError {
BadRequest(String),
InternalServerError(String),
}
impl AssociateServiceRoleToAccountError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateServiceRoleToAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(AssociateServiceRoleToAccountError::BadRequest(
err.msg,
))
}
"InternalServerErrorException" => {
return RusotoError::Service(
AssociateServiceRoleToAccountError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateServiceRoleToAccountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateServiceRoleToAccountError {
fn description(&self) -> &str {
match *self {
AssociateServiceRoleToAccountError::BadRequest(ref cause) => cause,
AssociateServiceRoleToAccountError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConnectorDefinitionError {
BadRequest(String),
}
impl CreateConnectorDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateConnectorDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateConnectorDefinitionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateConnectorDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConnectorDefinitionError {
fn description(&self) -> &str {
match *self {
CreateConnectorDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConnectorDefinitionVersionError {
BadRequest(String),
}
impl CreateConnectorDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateConnectorDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateConnectorDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateConnectorDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConnectorDefinitionVersionError {
fn description(&self) -> &str {
match *self {
CreateConnectorDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateCoreDefinitionError {
BadRequest(String),
}
impl CreateCoreDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCoreDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateCoreDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateCoreDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateCoreDefinitionError {
fn description(&self) -> &str {
match *self {
CreateCoreDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateCoreDefinitionVersionError {
BadRequest(String),
}
impl CreateCoreDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateCoreDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateCoreDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateCoreDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateCoreDefinitionVersionError {
fn description(&self) -> &str {
match *self {
CreateCoreDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDeploymentError {
BadRequest(String),
}
impl CreateDeploymentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDeploymentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateDeploymentError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDeploymentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDeploymentError {
fn description(&self) -> &str {
match *self {
CreateDeploymentError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDeviceDefinitionError {
BadRequest(String),
}
impl CreateDeviceDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDeviceDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateDeviceDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDeviceDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDeviceDefinitionError {
fn description(&self) -> &str {
match *self {
CreateDeviceDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDeviceDefinitionVersionError {
BadRequest(String),
}
impl CreateDeviceDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateDeviceDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateDeviceDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDeviceDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDeviceDefinitionVersionError {
fn description(&self) -> &str {
match *self {
CreateDeviceDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateFunctionDefinitionError {
BadRequest(String),
}
impl CreateFunctionDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFunctionDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateFunctionDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateFunctionDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateFunctionDefinitionError {
fn description(&self) -> &str {
match *self {
CreateFunctionDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateFunctionDefinitionVersionError {
BadRequest(String),
}
impl CreateFunctionDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateFunctionDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateFunctionDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateFunctionDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateFunctionDefinitionVersionError {
fn description(&self) -> &str {
match *self {
CreateFunctionDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateGroupError {
BadRequest(String),
}
impl CreateGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateGroupError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateGroupError {
fn description(&self) -> &str {
match *self {
CreateGroupError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateGroupCertificateAuthorityError {
BadRequest(String),
InternalServerError(String),
}
impl CreateGroupCertificateAuthorityError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateGroupCertificateAuthorityError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateGroupCertificateAuthorityError::BadRequest(
err.msg,
))
}
"InternalServerErrorException" => {
return RusotoError::Service(
CreateGroupCertificateAuthorityError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateGroupCertificateAuthorityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateGroupCertificateAuthorityError {
fn description(&self) -> &str {
match *self {
CreateGroupCertificateAuthorityError::BadRequest(ref cause) => cause,
CreateGroupCertificateAuthorityError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateGroupVersionError {
BadRequest(String),
}
impl CreateGroupVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGroupVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateGroupVersionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateGroupVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateGroupVersionError {
fn description(&self) -> &str {
match *self {
CreateGroupVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLoggerDefinitionError {
BadRequest(String),
}
impl CreateLoggerDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLoggerDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateLoggerDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateLoggerDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLoggerDefinitionError {
fn description(&self) -> &str {
match *self {
CreateLoggerDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLoggerDefinitionVersionError {
BadRequest(String),
}
impl CreateLoggerDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateLoggerDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateLoggerDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateLoggerDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLoggerDefinitionVersionError {
fn description(&self) -> &str {
match *self {
CreateLoggerDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateResourceDefinitionError {
BadRequest(String),
}
impl CreateResourceDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateResourceDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateResourceDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateResourceDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateResourceDefinitionError {
fn description(&self) -> &str {
match *self {
CreateResourceDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateResourceDefinitionVersionError {
BadRequest(String),
}
impl CreateResourceDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateResourceDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateResourceDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateResourceDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateResourceDefinitionVersionError {
fn description(&self) -> &str {
match *self {
CreateResourceDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSoftwareUpdateJobError {
BadRequest(String),
InternalServerError(String),
}
impl CreateSoftwareUpdateJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSoftwareUpdateJobError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateSoftwareUpdateJobError::BadRequest(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(CreateSoftwareUpdateJobError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSoftwareUpdateJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSoftwareUpdateJobError {
fn description(&self) -> &str {
match *self {
CreateSoftwareUpdateJobError::BadRequest(ref cause) => cause,
CreateSoftwareUpdateJobError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSubscriptionDefinitionError {
BadRequest(String),
}
impl CreateSubscriptionDefinitionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateSubscriptionDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateSubscriptionDefinitionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSubscriptionDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSubscriptionDefinitionError {
fn description(&self) -> &str {
match *self {
CreateSubscriptionDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSubscriptionDefinitionVersionError {
BadRequest(String),
}
impl CreateSubscriptionDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateSubscriptionDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
CreateSubscriptionDefinitionVersionError::BadRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSubscriptionDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSubscriptionDefinitionVersionError {
fn description(&self) -> &str {
match *self {
CreateSubscriptionDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConnectorDefinitionError {
BadRequest(String),
}
impl DeleteConnectorDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteConnectorDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteConnectorDefinitionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteConnectorDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteConnectorDefinitionError {
fn description(&self) -> &str {
match *self {
DeleteConnectorDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteCoreDefinitionError {
BadRequest(String),
}
impl DeleteCoreDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCoreDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteCoreDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteCoreDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteCoreDefinitionError {
fn description(&self) -> &str {
match *self {
DeleteCoreDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDeviceDefinitionError {
BadRequest(String),
}
impl DeleteDeviceDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDeviceDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteDeviceDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDeviceDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDeviceDefinitionError {
fn description(&self) -> &str {
match *self {
DeleteDeviceDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteFunctionDefinitionError {
BadRequest(String),
}
impl DeleteFunctionDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFunctionDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteFunctionDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteFunctionDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteFunctionDefinitionError {
fn description(&self) -> &str {
match *self {
DeleteFunctionDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteGroupError {
BadRequest(String),
}
impl DeleteGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteGroupError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteGroupError {
fn description(&self) -> &str {
match *self {
DeleteGroupError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteLoggerDefinitionError {
BadRequest(String),
}
impl DeleteLoggerDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLoggerDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteLoggerDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteLoggerDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteLoggerDefinitionError {
fn description(&self) -> &str {
match *self {
DeleteLoggerDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteResourceDefinitionError {
BadRequest(String),
}
impl DeleteResourceDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteResourceDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteResourceDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteResourceDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteResourceDefinitionError {
fn description(&self) -> &str {
match *self {
DeleteResourceDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSubscriptionDefinitionError {
BadRequest(String),
}
impl DeleteSubscriptionDefinitionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteSubscriptionDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteSubscriptionDefinitionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteSubscriptionDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSubscriptionDefinitionError {
fn description(&self) -> &str {
match *self {
DeleteSubscriptionDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateRoleFromGroupError {
BadRequest(String),
InternalServerError(String),
}
impl DisassociateRoleFromGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisassociateRoleFromGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DisassociateRoleFromGroupError::BadRequest(
err.msg,
))
}
"InternalServerErrorException" => {
return RusotoError::Service(
DisassociateRoleFromGroupError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateRoleFromGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateRoleFromGroupError {
fn description(&self) -> &str {
match *self {
DisassociateRoleFromGroupError::BadRequest(ref cause) => cause,
DisassociateRoleFromGroupError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateServiceRoleFromAccountError {
InternalServerError(String),
}
impl DisassociateServiceRoleFromAccountError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateServiceRoleFromAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
DisassociateServiceRoleFromAccountError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateServiceRoleFromAccountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateServiceRoleFromAccountError {
fn description(&self) -> &str {
match *self {
DisassociateServiceRoleFromAccountError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAssociatedRoleError {
BadRequest(String),
InternalServerError(String),
}
impl GetAssociatedRoleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAssociatedRoleError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetAssociatedRoleError::BadRequest(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(GetAssociatedRoleError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAssociatedRoleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAssociatedRoleError {
fn description(&self) -> &str {
match *self {
GetAssociatedRoleError::BadRequest(ref cause) => cause,
GetAssociatedRoleError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetBulkDeploymentStatusError {
BadRequest(String),
}
impl GetBulkDeploymentStatusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBulkDeploymentStatusError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetBulkDeploymentStatusError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetBulkDeploymentStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetBulkDeploymentStatusError {
fn description(&self) -> &str {
match *self {
GetBulkDeploymentStatusError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetConnectivityInfoError {
BadRequest(String),
InternalServerError(String),
}
impl GetConnectivityInfoError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetConnectivityInfoError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetConnectivityInfoError::BadRequest(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(GetConnectivityInfoError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetConnectivityInfoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetConnectivityInfoError {
fn description(&self) -> &str {
match *self {
GetConnectivityInfoError::BadRequest(ref cause) => cause,
GetConnectivityInfoError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetConnectorDefinitionError {
BadRequest(String),
}
impl GetConnectorDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetConnectorDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetConnectorDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetConnectorDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetConnectorDefinitionError {
fn description(&self) -> &str {
match *self {
GetConnectorDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetConnectorDefinitionVersionError {
BadRequest(String),
}
impl GetConnectorDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetConnectorDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetConnectorDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetConnectorDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetConnectorDefinitionVersionError {
fn description(&self) -> &str {
match *self {
GetConnectorDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCoreDefinitionError {
BadRequest(String),
}
impl GetCoreDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCoreDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetCoreDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetCoreDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCoreDefinitionError {
fn description(&self) -> &str {
match *self {
GetCoreDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetCoreDefinitionVersionError {
BadRequest(String),
}
impl GetCoreDefinitionVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCoreDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetCoreDefinitionVersionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetCoreDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetCoreDefinitionVersionError {
fn description(&self) -> &str {
match *self {
GetCoreDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDeploymentStatusError {
BadRequest(String),
}
impl GetDeploymentStatusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDeploymentStatusError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetDeploymentStatusError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDeploymentStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDeploymentStatusError {
fn description(&self) -> &str {
match *self {
GetDeploymentStatusError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDeviceDefinitionError {
BadRequest(String),
}
impl GetDeviceDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDeviceDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetDeviceDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDeviceDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDeviceDefinitionError {
fn description(&self) -> &str {
match *self {
GetDeviceDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDeviceDefinitionVersionError {
BadRequest(String),
}
impl GetDeviceDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetDeviceDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetDeviceDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDeviceDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDeviceDefinitionVersionError {
fn description(&self) -> &str {
match *self {
GetDeviceDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetFunctionDefinitionError {
BadRequest(String),
}
impl GetFunctionDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFunctionDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetFunctionDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetFunctionDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetFunctionDefinitionError {
fn description(&self) -> &str {
match *self {
GetFunctionDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetFunctionDefinitionVersionError {
BadRequest(String),
}
impl GetFunctionDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetFunctionDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetFunctionDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetFunctionDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetFunctionDefinitionVersionError {
fn description(&self) -> &str {
match *self {
GetFunctionDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupError {
BadRequest(String),
}
impl GetGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetGroupError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGroupError {
fn description(&self) -> &str {
match *self {
GetGroupError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupCertificateAuthorityError {
BadRequest(String),
InternalServerError(String),
}
impl GetGroupCertificateAuthorityError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetGroupCertificateAuthorityError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetGroupCertificateAuthorityError::BadRequest(
err.msg,
))
}
"InternalServerErrorException" => {
return RusotoError::Service(
GetGroupCertificateAuthorityError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetGroupCertificateAuthorityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGroupCertificateAuthorityError {
fn description(&self) -> &str {
match *self {
GetGroupCertificateAuthorityError::BadRequest(ref cause) => cause,
GetGroupCertificateAuthorityError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupCertificateConfigurationError {
BadRequest(String),
InternalServerError(String),
}
impl GetGroupCertificateConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetGroupCertificateConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetGroupCertificateConfigurationError::BadRequest(
err.msg,
))
}
"InternalServerErrorException" => {
return RusotoError::Service(
GetGroupCertificateConfigurationError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetGroupCertificateConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGroupCertificateConfigurationError {
fn description(&self) -> &str {
match *self {
GetGroupCertificateConfigurationError::BadRequest(ref cause) => cause,
GetGroupCertificateConfigurationError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetGroupVersionError {
BadRequest(String),
}
impl GetGroupVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGroupVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetGroupVersionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetGroupVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGroupVersionError {
fn description(&self) -> &str {
match *self {
GetGroupVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetLoggerDefinitionError {
BadRequest(String),
}
impl GetLoggerDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetLoggerDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetLoggerDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetLoggerDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetLoggerDefinitionError {
fn description(&self) -> &str {
match *self {
GetLoggerDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetLoggerDefinitionVersionError {
BadRequest(String),
}
impl GetLoggerDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetLoggerDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetLoggerDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetLoggerDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetLoggerDefinitionVersionError {
fn description(&self) -> &str {
match *self {
GetLoggerDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetResourceDefinitionError {
BadRequest(String),
}
impl GetResourceDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetResourceDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetResourceDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetResourceDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetResourceDefinitionError {
fn description(&self) -> &str {
match *self {
GetResourceDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetResourceDefinitionVersionError {
BadRequest(String),
}
impl GetResourceDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetResourceDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetResourceDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetResourceDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetResourceDefinitionVersionError {
fn description(&self) -> &str {
match *self {
GetResourceDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetServiceRoleForAccountError {
InternalServerError(String),
}
impl GetServiceRoleForAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetServiceRoleForAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
GetServiceRoleForAccountError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetServiceRoleForAccountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetServiceRoleForAccountError {
fn description(&self) -> &str {
match *self {
GetServiceRoleForAccountError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSubscriptionDefinitionError {
BadRequest(String),
}
impl GetSubscriptionDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSubscriptionDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetSubscriptionDefinitionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSubscriptionDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSubscriptionDefinitionError {
fn description(&self) -> &str {
match *self {
GetSubscriptionDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSubscriptionDefinitionVersionError {
BadRequest(String),
}
impl GetSubscriptionDefinitionVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetSubscriptionDefinitionVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetSubscriptionDefinitionVersionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSubscriptionDefinitionVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSubscriptionDefinitionVersionError {
fn description(&self) -> &str {
match *self {
GetSubscriptionDefinitionVersionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListBulkDeploymentDetailedReportsError {
BadRequest(String),
}
impl ListBulkDeploymentDetailedReportsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListBulkDeploymentDetailedReportsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
ListBulkDeploymentDetailedReportsError::BadRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListBulkDeploymentDetailedReportsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListBulkDeploymentDetailedReportsError {
fn description(&self) -> &str {
match *self {
ListBulkDeploymentDetailedReportsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListBulkDeploymentsError {
BadRequest(String),
}
impl ListBulkDeploymentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBulkDeploymentsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListBulkDeploymentsError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListBulkDeploymentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListBulkDeploymentsError {
fn description(&self) -> &str {
match *self {
ListBulkDeploymentsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListConnectorDefinitionVersionsError {
BadRequest(String),
}
impl ListConnectorDefinitionVersionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListConnectorDefinitionVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListConnectorDefinitionVersionsError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListConnectorDefinitionVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListConnectorDefinitionVersionsError {
fn description(&self) -> &str {
match *self {
ListConnectorDefinitionVersionsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListConnectorDefinitionsError {}
impl ListConnectorDefinitionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListConnectorDefinitionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListConnectorDefinitionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListConnectorDefinitionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListCoreDefinitionVersionsError {
BadRequest(String),
}
impl ListCoreDefinitionVersionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListCoreDefinitionVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListCoreDefinitionVersionsError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListCoreDefinitionVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListCoreDefinitionVersionsError {
fn description(&self) -> &str {
match *self {
ListCoreDefinitionVersionsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListCoreDefinitionsError {}
impl ListCoreDefinitionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListCoreDefinitionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListCoreDefinitionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListCoreDefinitionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDeploymentsError {
BadRequest(String),
}
impl ListDeploymentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDeploymentsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListDeploymentsError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDeploymentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDeploymentsError {
fn description(&self) -> &str {
match *self {
ListDeploymentsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDeviceDefinitionVersionsError {
BadRequest(String),
}
impl ListDeviceDefinitionVersionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListDeviceDefinitionVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListDeviceDefinitionVersionsError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDeviceDefinitionVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDeviceDefinitionVersionsError {
fn description(&self) -> &str {
match *self {
ListDeviceDefinitionVersionsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDeviceDefinitionsError {}
impl ListDeviceDefinitionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDeviceDefinitionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDeviceDefinitionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDeviceDefinitionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListFunctionDefinitionVersionsError {
BadRequest(String),
}
impl ListFunctionDefinitionVersionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListFunctionDefinitionVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListFunctionDefinitionVersionsError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListFunctionDefinitionVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListFunctionDefinitionVersionsError {
fn description(&self) -> &str {
match *self {
ListFunctionDefinitionVersionsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListFunctionDefinitionsError {}
impl ListFunctionDefinitionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFunctionDefinitionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListFunctionDefinitionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListFunctionDefinitionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGroupCertificateAuthoritiesError {
BadRequest(String),
InternalServerError(String),
}
impl ListGroupCertificateAuthoritiesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListGroupCertificateAuthoritiesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListGroupCertificateAuthoritiesError::BadRequest(
err.msg,
))
}
"InternalServerErrorException" => {
return RusotoError::Service(
ListGroupCertificateAuthoritiesError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListGroupCertificateAuthoritiesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListGroupCertificateAuthoritiesError {
fn description(&self) -> &str {
match *self {
ListGroupCertificateAuthoritiesError::BadRequest(ref cause) => cause,
ListGroupCertificateAuthoritiesError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGroupVersionsError {
BadRequest(String),
}
impl ListGroupVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGroupVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListGroupVersionsError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListGroupVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListGroupVersionsError {
fn description(&self) -> &str {
match *self {
ListGroupVersionsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGroupsError {}
impl ListGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGroupsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListGroupsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListLoggerDefinitionVersionsError {
BadRequest(String),
}
impl ListLoggerDefinitionVersionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListLoggerDefinitionVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListLoggerDefinitionVersionsError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListLoggerDefinitionVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListLoggerDefinitionVersionsError {
fn description(&self) -> &str {
match *self {
ListLoggerDefinitionVersionsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListLoggerDefinitionsError {}
impl ListLoggerDefinitionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLoggerDefinitionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListLoggerDefinitionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListLoggerDefinitionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListResourceDefinitionVersionsError {
BadRequest(String),
}
impl ListResourceDefinitionVersionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListResourceDefinitionVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListResourceDefinitionVersionsError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListResourceDefinitionVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListResourceDefinitionVersionsError {
fn description(&self) -> &str {
match *self {
ListResourceDefinitionVersionsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListResourceDefinitionsError {}
impl ListResourceDefinitionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListResourceDefinitionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListResourceDefinitionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListResourceDefinitionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSubscriptionDefinitionVersionsError {
BadRequest(String),
}
impl ListSubscriptionDefinitionVersionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListSubscriptionDefinitionVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
ListSubscriptionDefinitionVersionsError::BadRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSubscriptionDefinitionVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSubscriptionDefinitionVersionsError {
fn description(&self) -> &str {
match *self {
ListSubscriptionDefinitionVersionsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSubscriptionDefinitionsError {}
impl ListSubscriptionDefinitionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListSubscriptionDefinitionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSubscriptionDefinitionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSubscriptionDefinitionsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
BadRequest(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() {
"BadRequestException" => {
return RusotoError::Service(ListTagsForResourceError::BadRequest(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::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetDeploymentsError {
BadRequest(String),
}
impl ResetDeploymentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResetDeploymentsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ResetDeploymentsError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ResetDeploymentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetDeploymentsError {
fn description(&self) -> &str {
match *self {
ResetDeploymentsError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartBulkDeploymentError {
BadRequest(String),
}
impl StartBulkDeploymentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartBulkDeploymentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(StartBulkDeploymentError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartBulkDeploymentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartBulkDeploymentError {
fn description(&self) -> &str {
match *self {
StartBulkDeploymentError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopBulkDeploymentError {
BadRequest(String),
}
impl StopBulkDeploymentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopBulkDeploymentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(StopBulkDeploymentError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StopBulkDeploymentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopBulkDeploymentError {
fn description(&self) -> &str {
match *self {
StopBulkDeploymentError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
BadRequest(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() {
"BadRequestException" => {
return RusotoError::Service(TagResourceError::BadRequest(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::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
BadRequest(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() {
"BadRequestException" => {
return RusotoError::Service(UntagResourceError::BadRequest(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::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConnectivityInfoError {
BadRequest(String),
InternalServerError(String),
}
impl UpdateConnectivityInfoError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateConnectivityInfoError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateConnectivityInfoError::BadRequest(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UpdateConnectivityInfoError::InternalServerError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateConnectivityInfoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConnectivityInfoError {
fn description(&self) -> &str {
match *self {
UpdateConnectivityInfoError::BadRequest(ref cause) => cause,
UpdateConnectivityInfoError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConnectorDefinitionError {
BadRequest(String),
}
impl UpdateConnectorDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateConnectorDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateConnectorDefinitionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateConnectorDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConnectorDefinitionError {
fn description(&self) -> &str {
match *self {
UpdateConnectorDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateCoreDefinitionError {
BadRequest(String),
}
impl UpdateCoreDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateCoreDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateCoreDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateCoreDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateCoreDefinitionError {
fn description(&self) -> &str {
match *self {
UpdateCoreDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDeviceDefinitionError {
BadRequest(String),
}
impl UpdateDeviceDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDeviceDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateDeviceDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDeviceDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDeviceDefinitionError {
fn description(&self) -> &str {
match *self {
UpdateDeviceDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateFunctionDefinitionError {
BadRequest(String),
}
impl UpdateFunctionDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFunctionDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateFunctionDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateFunctionDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateFunctionDefinitionError {
fn description(&self) -> &str {
match *self {
UpdateFunctionDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateGroupError {
BadRequest(String),
}
impl UpdateGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGroupError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateGroupError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateGroupError {
fn description(&self) -> &str {
match *self {
UpdateGroupError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateGroupCertificateConfigurationError {
BadRequest(String),
InternalServerError(String),
}
impl UpdateGroupCertificateConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateGroupCertificateConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(
UpdateGroupCertificateConfigurationError::BadRequest(err.msg),
)
}
"InternalServerErrorException" => {
return RusotoError::Service(
UpdateGroupCertificateConfigurationError::InternalServerError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateGroupCertificateConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateGroupCertificateConfigurationError {
fn description(&self) -> &str {
match *self {
UpdateGroupCertificateConfigurationError::BadRequest(ref cause) => cause,
UpdateGroupCertificateConfigurationError::InternalServerError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateLoggerDefinitionError {
BadRequest(String),
}
impl UpdateLoggerDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateLoggerDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateLoggerDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateLoggerDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateLoggerDefinitionError {
fn description(&self) -> &str {
match *self {
UpdateLoggerDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateResourceDefinitionError {
BadRequest(String),
}
impl UpdateResourceDefinitionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateResourceDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateResourceDefinitionError::BadRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateResourceDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateResourceDefinitionError {
fn description(&self) -> &str {
match *self {
UpdateResourceDefinitionError::BadRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSubscriptionDefinitionError {
BadRequest(String),
}
impl UpdateSubscriptionDefinitionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateSubscriptionDefinitionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateSubscriptionDefinitionError::BadRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateSubscriptionDefinitionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSubscriptionDefinitionError {
fn description(&self) -> &str {
match *self {
UpdateSubscriptionDefinitionError::BadRequest(ref cause) => cause,
}
}
}
pub trait GreenGrass {
fn associate_role_to_group(
&self,
input: AssociateRoleToGroupRequest,
) -> RusotoFuture<AssociateRoleToGroupResponse, AssociateRoleToGroupError>;
fn associate_service_role_to_account(
&self,
input: AssociateServiceRoleToAccountRequest,
) -> RusotoFuture<AssociateServiceRoleToAccountResponse, AssociateServiceRoleToAccountError>;
fn create_connector_definition(
&self,
input: CreateConnectorDefinitionRequest,
) -> RusotoFuture<CreateConnectorDefinitionResponse, CreateConnectorDefinitionError>;
fn create_connector_definition_version(
&self,
input: CreateConnectorDefinitionVersionRequest,
) -> RusotoFuture<CreateConnectorDefinitionVersionResponse, CreateConnectorDefinitionVersionError>;
fn create_core_definition(
&self,
input: CreateCoreDefinitionRequest,
) -> RusotoFuture<CreateCoreDefinitionResponse, CreateCoreDefinitionError>;
fn create_core_definition_version(
&self,
input: CreateCoreDefinitionVersionRequest,
) -> RusotoFuture<CreateCoreDefinitionVersionResponse, CreateCoreDefinitionVersionError>;
fn create_deployment(
&self,
input: CreateDeploymentRequest,
) -> RusotoFuture<CreateDeploymentResponse, CreateDeploymentError>;
fn create_device_definition(
&self,
input: CreateDeviceDefinitionRequest,
) -> RusotoFuture<CreateDeviceDefinitionResponse, CreateDeviceDefinitionError>;
fn create_device_definition_version(
&self,
input: CreateDeviceDefinitionVersionRequest,
) -> RusotoFuture<CreateDeviceDefinitionVersionResponse, CreateDeviceDefinitionVersionError>;
fn create_function_definition(
&self,
input: CreateFunctionDefinitionRequest,
) -> RusotoFuture<CreateFunctionDefinitionResponse, CreateFunctionDefinitionError>;
fn create_function_definition_version(
&self,
input: CreateFunctionDefinitionVersionRequest,
) -> RusotoFuture<CreateFunctionDefinitionVersionResponse, CreateFunctionDefinitionVersionError>;
fn create_group(
&self,
input: CreateGroupRequest,
) -> RusotoFuture<CreateGroupResponse, CreateGroupError>;
fn create_group_certificate_authority(
&self,
input: CreateGroupCertificateAuthorityRequest,
) -> RusotoFuture<CreateGroupCertificateAuthorityResponse, CreateGroupCertificateAuthorityError>;
fn create_group_version(
&self,
input: CreateGroupVersionRequest,
) -> RusotoFuture<CreateGroupVersionResponse, CreateGroupVersionError>;
fn create_logger_definition(
&self,
input: CreateLoggerDefinitionRequest,
) -> RusotoFuture<CreateLoggerDefinitionResponse, CreateLoggerDefinitionError>;
fn create_logger_definition_version(
&self,
input: CreateLoggerDefinitionVersionRequest,
) -> RusotoFuture<CreateLoggerDefinitionVersionResponse, CreateLoggerDefinitionVersionError>;
fn create_resource_definition(
&self,
input: CreateResourceDefinitionRequest,
) -> RusotoFuture<CreateResourceDefinitionResponse, CreateResourceDefinitionError>;
fn create_resource_definition_version(
&self,
input: CreateResourceDefinitionVersionRequest,
) -> RusotoFuture<CreateResourceDefinitionVersionResponse, CreateResourceDefinitionVersionError>;
fn create_software_update_job(
&self,
input: CreateSoftwareUpdateJobRequest,
) -> RusotoFuture<CreateSoftwareUpdateJobResponse, CreateSoftwareUpdateJobError>;
fn create_subscription_definition(
&self,
input: CreateSubscriptionDefinitionRequest,
) -> RusotoFuture<CreateSubscriptionDefinitionResponse, CreateSubscriptionDefinitionError>;
fn create_subscription_definition_version(
&self,
input: CreateSubscriptionDefinitionVersionRequest,
) -> RusotoFuture<
CreateSubscriptionDefinitionVersionResponse,
CreateSubscriptionDefinitionVersionError,
>;
fn delete_connector_definition(
&self,
input: DeleteConnectorDefinitionRequest,
) -> RusotoFuture<DeleteConnectorDefinitionResponse, DeleteConnectorDefinitionError>;
fn delete_core_definition(
&self,
input: DeleteCoreDefinitionRequest,
) -> RusotoFuture<DeleteCoreDefinitionResponse, DeleteCoreDefinitionError>;
fn delete_device_definition(
&self,
input: DeleteDeviceDefinitionRequest,
) -> RusotoFuture<DeleteDeviceDefinitionResponse, DeleteDeviceDefinitionError>;
fn delete_function_definition(
&self,
input: DeleteFunctionDefinitionRequest,
) -> RusotoFuture<DeleteFunctionDefinitionResponse, DeleteFunctionDefinitionError>;
fn delete_group(
&self,
input: DeleteGroupRequest,
) -> RusotoFuture<DeleteGroupResponse, DeleteGroupError>;
fn delete_logger_definition(
&self,
input: DeleteLoggerDefinitionRequest,
) -> RusotoFuture<DeleteLoggerDefinitionResponse, DeleteLoggerDefinitionError>;
fn delete_resource_definition(
&self,
input: DeleteResourceDefinitionRequest,
) -> RusotoFuture<DeleteResourceDefinitionResponse, DeleteResourceDefinitionError>;
fn delete_subscription_definition(
&self,
input: DeleteSubscriptionDefinitionRequest,
) -> RusotoFuture<DeleteSubscriptionDefinitionResponse, DeleteSubscriptionDefinitionError>;
fn disassociate_role_from_group(
&self,
input: DisassociateRoleFromGroupRequest,
) -> RusotoFuture<DisassociateRoleFromGroupResponse, DisassociateRoleFromGroupError>;
fn disassociate_service_role_from_account(
&self,
) -> RusotoFuture<
DisassociateServiceRoleFromAccountResponse,
DisassociateServiceRoleFromAccountError,
>;
fn get_associated_role(
&self,
input: GetAssociatedRoleRequest,
) -> RusotoFuture<GetAssociatedRoleResponse, GetAssociatedRoleError>;
fn get_bulk_deployment_status(
&self,
input: GetBulkDeploymentStatusRequest,
) -> RusotoFuture<GetBulkDeploymentStatusResponse, GetBulkDeploymentStatusError>;
fn get_connectivity_info(
&self,
input: GetConnectivityInfoRequest,
) -> RusotoFuture<GetConnectivityInfoResponse, GetConnectivityInfoError>;
fn get_connector_definition(
&self,
input: GetConnectorDefinitionRequest,
) -> RusotoFuture<GetConnectorDefinitionResponse, GetConnectorDefinitionError>;
fn get_connector_definition_version(
&self,
input: GetConnectorDefinitionVersionRequest,
) -> RusotoFuture<GetConnectorDefinitionVersionResponse, GetConnectorDefinitionVersionError>;
fn get_core_definition(
&self,
input: GetCoreDefinitionRequest,
) -> RusotoFuture<GetCoreDefinitionResponse, GetCoreDefinitionError>;
fn get_core_definition_version(
&self,
input: GetCoreDefinitionVersionRequest,
) -> RusotoFuture<GetCoreDefinitionVersionResponse, GetCoreDefinitionVersionError>;
fn get_deployment_status(
&self,
input: GetDeploymentStatusRequest,
) -> RusotoFuture<GetDeploymentStatusResponse, GetDeploymentStatusError>;
fn get_device_definition(
&self,
input: GetDeviceDefinitionRequest,
) -> RusotoFuture<GetDeviceDefinitionResponse, GetDeviceDefinitionError>;
fn get_device_definition_version(
&self,
input: GetDeviceDefinitionVersionRequest,
) -> RusotoFuture<GetDeviceDefinitionVersionResponse, GetDeviceDefinitionVersionError>;
fn get_function_definition(
&self,
input: GetFunctionDefinitionRequest,
) -> RusotoFuture<GetFunctionDefinitionResponse, GetFunctionDefinitionError>;
fn get_function_definition_version(
&self,
input: GetFunctionDefinitionVersionRequest,
) -> RusotoFuture<GetFunctionDefinitionVersionResponse, GetFunctionDefinitionVersionError>;
fn get_group(&self, input: GetGroupRequest) -> RusotoFuture<GetGroupResponse, GetGroupError>;
fn get_group_certificate_authority(
&self,
input: GetGroupCertificateAuthorityRequest,
) -> RusotoFuture<GetGroupCertificateAuthorityResponse, GetGroupCertificateAuthorityError>;
fn get_group_certificate_configuration(
&self,
input: GetGroupCertificateConfigurationRequest,
) -> RusotoFuture<GetGroupCertificateConfigurationResponse, GetGroupCertificateConfigurationError>;
fn get_group_version(
&self,
input: GetGroupVersionRequest,
) -> RusotoFuture<GetGroupVersionResponse, GetGroupVersionError>;
fn get_logger_definition(
&self,
input: GetLoggerDefinitionRequest,
) -> RusotoFuture<GetLoggerDefinitionResponse, GetLoggerDefinitionError>;
fn get_logger_definition_version(
&self,
input: GetLoggerDefinitionVersionRequest,
) -> RusotoFuture<GetLoggerDefinitionVersionResponse, GetLoggerDefinitionVersionError>;
fn get_resource_definition(
&self,
input: GetResourceDefinitionRequest,
) -> RusotoFuture<GetResourceDefinitionResponse, GetResourceDefinitionError>;
fn get_resource_definition_version(
&self,
input: GetResourceDefinitionVersionRequest,
) -> RusotoFuture<GetResourceDefinitionVersionResponse, GetResourceDefinitionVersionError>;
fn get_service_role_for_account(
&self,
) -> RusotoFuture<GetServiceRoleForAccountResponse, GetServiceRoleForAccountError>;
fn get_subscription_definition(
&self,
input: GetSubscriptionDefinitionRequest,
) -> RusotoFuture<GetSubscriptionDefinitionResponse, GetSubscriptionDefinitionError>;
fn get_subscription_definition_version(
&self,
input: GetSubscriptionDefinitionVersionRequest,
) -> RusotoFuture<GetSubscriptionDefinitionVersionResponse, GetSubscriptionDefinitionVersionError>;
fn list_bulk_deployment_detailed_reports(
&self,
input: ListBulkDeploymentDetailedReportsRequest,
) -> RusotoFuture<
ListBulkDeploymentDetailedReportsResponse,
ListBulkDeploymentDetailedReportsError,
>;
fn list_bulk_deployments(
&self,
input: ListBulkDeploymentsRequest,
) -> RusotoFuture<ListBulkDeploymentsResponse, ListBulkDeploymentsError>;
fn list_connector_definition_versions(
&self,
input: ListConnectorDefinitionVersionsRequest,
) -> RusotoFuture<ListConnectorDefinitionVersionsResponse, ListConnectorDefinitionVersionsError>;
fn list_connector_definitions(
&self,
input: ListConnectorDefinitionsRequest,
) -> RusotoFuture<ListConnectorDefinitionsResponse, ListConnectorDefinitionsError>;
fn list_core_definition_versions(
&self,
input: ListCoreDefinitionVersionsRequest,
) -> RusotoFuture<ListCoreDefinitionVersionsResponse, ListCoreDefinitionVersionsError>;
fn list_core_definitions(
&self,
input: ListCoreDefinitionsRequest,
) -> RusotoFuture<ListCoreDefinitionsResponse, ListCoreDefinitionsError>;
fn list_deployments(
&self,
input: ListDeploymentsRequest,
) -> RusotoFuture<ListDeploymentsResponse, ListDeploymentsError>;
fn list_device_definition_versions(
&self,
input: ListDeviceDefinitionVersionsRequest,
) -> RusotoFuture<ListDeviceDefinitionVersionsResponse, ListDeviceDefinitionVersionsError>;
fn list_device_definitions(
&self,
input: ListDeviceDefinitionsRequest,
) -> RusotoFuture<ListDeviceDefinitionsResponse, ListDeviceDefinitionsError>;
fn list_function_definition_versions(
&self,
input: ListFunctionDefinitionVersionsRequest,
) -> RusotoFuture<ListFunctionDefinitionVersionsResponse, ListFunctionDefinitionVersionsError>;
fn list_function_definitions(
&self,
input: ListFunctionDefinitionsRequest,
) -> RusotoFuture<ListFunctionDefinitionsResponse, ListFunctionDefinitionsError>;
fn list_group_certificate_authorities(
&self,
input: ListGroupCertificateAuthoritiesRequest,
) -> RusotoFuture<ListGroupCertificateAuthoritiesResponse, ListGroupCertificateAuthoritiesError>;
fn list_group_versions(
&self,
input: ListGroupVersionsRequest,
) -> RusotoFuture<ListGroupVersionsResponse, ListGroupVersionsError>;
fn list_groups(
&self,
input: ListGroupsRequest,
) -> RusotoFuture<ListGroupsResponse, ListGroupsError>;
fn list_logger_definition_versions(
&self,
input: ListLoggerDefinitionVersionsRequest,
) -> RusotoFuture<ListLoggerDefinitionVersionsResponse, ListLoggerDefinitionVersionsError>;
fn list_logger_definitions(
&self,
input: ListLoggerDefinitionsRequest,
) -> RusotoFuture<ListLoggerDefinitionsResponse, ListLoggerDefinitionsError>;
fn list_resource_definition_versions(
&self,
input: ListResourceDefinitionVersionsRequest,
) -> RusotoFuture<ListResourceDefinitionVersionsResponse, ListResourceDefinitionVersionsError>;
fn list_resource_definitions(
&self,
input: ListResourceDefinitionsRequest,
) -> RusotoFuture<ListResourceDefinitionsResponse, ListResourceDefinitionsError>;
fn list_subscription_definition_versions(
&self,
input: ListSubscriptionDefinitionVersionsRequest,
) -> RusotoFuture<
ListSubscriptionDefinitionVersionsResponse,
ListSubscriptionDefinitionVersionsError,
>;
fn list_subscription_definitions(
&self,
input: ListSubscriptionDefinitionsRequest,
) -> RusotoFuture<ListSubscriptionDefinitionsResponse, ListSubscriptionDefinitionsError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>;
fn reset_deployments(
&self,
input: ResetDeploymentsRequest,
) -> RusotoFuture<ResetDeploymentsResponse, ResetDeploymentsError>;
fn start_bulk_deployment(
&self,
input: StartBulkDeploymentRequest,
) -> RusotoFuture<StartBulkDeploymentResponse, StartBulkDeploymentError>;
fn stop_bulk_deployment(
&self,
input: StopBulkDeploymentRequest,
) -> RusotoFuture<StopBulkDeploymentResponse, StopBulkDeploymentError>;
fn tag_resource(&self, input: TagResourceRequest) -> RusotoFuture<(), TagResourceError>;
fn untag_resource(&self, input: UntagResourceRequest) -> RusotoFuture<(), UntagResourceError>;
fn update_connectivity_info(
&self,
input: UpdateConnectivityInfoRequest,
) -> RusotoFuture<UpdateConnectivityInfoResponse, UpdateConnectivityInfoError>;
fn update_connector_definition(
&self,
input: UpdateConnectorDefinitionRequest,
) -> RusotoFuture<UpdateConnectorDefinitionResponse, UpdateConnectorDefinitionError>;
fn update_core_definition(
&self,
input: UpdateCoreDefinitionRequest,
) -> RusotoFuture<UpdateCoreDefinitionResponse, UpdateCoreDefinitionError>;
fn update_device_definition(
&self,
input: UpdateDeviceDefinitionRequest,
) -> RusotoFuture<UpdateDeviceDefinitionResponse, UpdateDeviceDefinitionError>;
fn update_function_definition(
&self,
input: UpdateFunctionDefinitionRequest,
) -> RusotoFuture<UpdateFunctionDefinitionResponse, UpdateFunctionDefinitionError>;
fn update_group(
&self,
input: UpdateGroupRequest,
) -> RusotoFuture<UpdateGroupResponse, UpdateGroupError>;
fn update_group_certificate_configuration(
&self,
input: UpdateGroupCertificateConfigurationRequest,
) -> RusotoFuture<
UpdateGroupCertificateConfigurationResponse,
UpdateGroupCertificateConfigurationError,
>;
fn update_logger_definition(
&self,
input: UpdateLoggerDefinitionRequest,
) -> RusotoFuture<UpdateLoggerDefinitionResponse, UpdateLoggerDefinitionError>;
fn update_resource_definition(
&self,
input: UpdateResourceDefinitionRequest,
) -> RusotoFuture<UpdateResourceDefinitionResponse, UpdateResourceDefinitionError>;
fn update_subscription_definition(
&self,
input: UpdateSubscriptionDefinitionRequest,
) -> RusotoFuture<UpdateSubscriptionDefinitionResponse, UpdateSubscriptionDefinitionError>;
}
#[derive(Clone)]
pub struct GreenGrassClient {
client: Client,
region: region::Region,
}
impl GreenGrassClient {
pub fn new(region: region::Region) -> GreenGrassClient {
GreenGrassClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> GreenGrassClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
GreenGrassClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl GreenGrass for GreenGrassClient {
fn associate_role_to_group(
&self,
input: AssociateRoleToGroupRequest,
) -> RusotoFuture<AssociateRoleToGroupResponse, AssociateRoleToGroupError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/role",
group_id = input.group_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociateRoleToGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AssociateRoleToGroupError::from_response(response))
}),
)
}
})
}
fn associate_service_role_to_account(
&self,
input: AssociateServiceRoleToAccountRequest,
) -> RusotoFuture<AssociateServiceRoleToAccountResponse, AssociateServiceRoleToAccountError>
{
let request_uri = "/greengrass/servicerole";
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociateServiceRoleToAccountResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateServiceRoleToAccountError::from_response(response))
}))
}
})
}
fn create_connector_definition(
&self,
input: CreateConnectorDefinitionRequest,
) -> RusotoFuture<CreateConnectorDefinitionResponse, CreateConnectorDefinitionError> {
let request_uri = "/greengrass/definition/connectors";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateConnectorDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateConnectorDefinitionError::from_response(response))
}))
}
})
}
fn create_connector_definition_version(
&self,
input: CreateConnectorDefinitionVersionRequest,
) -> RusotoFuture<CreateConnectorDefinitionVersionResponse, CreateConnectorDefinitionVersionError>
{
let request_uri = format!(
"/greengrass/definition/connectors/{connector_definition_id}/versions",
connector_definition_id = input.connector_definition_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateConnectorDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateConnectorDefinitionVersionError::from_response(
response,
))
}))
}
})
}
fn create_core_definition(
&self,
input: CreateCoreDefinitionRequest,
) -> RusotoFuture<CreateCoreDefinitionResponse, CreateCoreDefinitionError> {
let request_uri = "/greengrass/definition/cores";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateCoreDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateCoreDefinitionError::from_response(response))
}),
)
}
})
}
fn create_core_definition_version(
&self,
input: CreateCoreDefinitionVersionRequest,
) -> RusotoFuture<CreateCoreDefinitionVersionResponse, CreateCoreDefinitionVersionError> {
let request_uri = format!(
"/greengrass/definition/cores/{core_definition_id}/versions",
core_definition_id = input.core_definition_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateCoreDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateCoreDefinitionVersionError::from_response(response))
}))
}
})
}
fn create_deployment(
&self,
input: CreateDeploymentRequest,
) -> RusotoFuture<CreateDeploymentResponse, CreateDeploymentError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/deployments",
group_id = input.group_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDeploymentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDeploymentError::from_response(response))),
)
}
})
}
fn create_device_definition(
&self,
input: CreateDeviceDefinitionRequest,
) -> RusotoFuture<CreateDeviceDefinitionResponse, CreateDeviceDefinitionError> {
let request_uri = "/greengrass/definition/devices";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDeviceDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateDeviceDefinitionError::from_response(response))
}),
)
}
})
}
fn create_device_definition_version(
&self,
input: CreateDeviceDefinitionVersionRequest,
) -> RusotoFuture<CreateDeviceDefinitionVersionResponse, CreateDeviceDefinitionVersionError>
{
let request_uri = format!(
"/greengrass/definition/devices/{device_definition_id}/versions",
device_definition_id = input.device_definition_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDeviceDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDeviceDefinitionVersionError::from_response(response))
}))
}
})
}
fn create_function_definition(
&self,
input: CreateFunctionDefinitionRequest,
) -> RusotoFuture<CreateFunctionDefinitionResponse, CreateFunctionDefinitionError> {
let request_uri = "/greengrass/definition/functions";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateFunctionDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateFunctionDefinitionError::from_response(response))
}))
}
})
}
fn create_function_definition_version(
&self,
input: CreateFunctionDefinitionVersionRequest,
) -> RusotoFuture<CreateFunctionDefinitionVersionResponse, CreateFunctionDefinitionVersionError>
{
let request_uri = format!(
"/greengrass/definition/functions/{function_definition_id}/versions",
function_definition_id = input.function_definition_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateFunctionDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateFunctionDefinitionVersionError::from_response(
response,
))
}))
}
})
}
fn create_group(
&self,
input: CreateGroupRequest,
) -> RusotoFuture<CreateGroupResponse, CreateGroupError> {
let request_uri = "/greengrass/groups";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateGroupError::from_response(response))),
)
}
})
}
fn create_group_certificate_authority(
&self,
input: CreateGroupCertificateAuthorityRequest,
) -> RusotoFuture<CreateGroupCertificateAuthorityResponse, CreateGroupCertificateAuthorityError>
{
let request_uri = format!(
"/greengrass/groups/{group_id}/certificateauthorities",
group_id = input.group_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateGroupCertificateAuthorityResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateGroupCertificateAuthorityError::from_response(
response,
))
}))
}
})
}
fn create_group_version(
&self,
input: CreateGroupVersionRequest,
) -> RusotoFuture<CreateGroupVersionResponse, CreateGroupVersionError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/versions",
group_id = input.group_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateGroupVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateGroupVersionError::from_response(response))),
)
}
})
}
fn create_logger_definition(
&self,
input: CreateLoggerDefinitionRequest,
) -> RusotoFuture<CreateLoggerDefinitionResponse, CreateLoggerDefinitionError> {
let request_uri = "/greengrass/definition/loggers";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateLoggerDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateLoggerDefinitionError::from_response(response))
}),
)
}
})
}
fn create_logger_definition_version(
&self,
input: CreateLoggerDefinitionVersionRequest,
) -> RusotoFuture<CreateLoggerDefinitionVersionResponse, CreateLoggerDefinitionVersionError>
{
let request_uri = format!(
"/greengrass/definition/loggers/{logger_definition_id}/versions",
logger_definition_id = input.logger_definition_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateLoggerDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateLoggerDefinitionVersionError::from_response(response))
}))
}
})
}
fn create_resource_definition(
&self,
input: CreateResourceDefinitionRequest,
) -> RusotoFuture<CreateResourceDefinitionResponse, CreateResourceDefinitionError> {
let request_uri = "/greengrass/definition/resources";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateResourceDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateResourceDefinitionError::from_response(response))
}))
}
})
}
fn create_resource_definition_version(
&self,
input: CreateResourceDefinitionVersionRequest,
) -> RusotoFuture<CreateResourceDefinitionVersionResponse, CreateResourceDefinitionVersionError>
{
let request_uri = format!(
"/greengrass/definition/resources/{resource_definition_id}/versions",
resource_definition_id = input.resource_definition_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateResourceDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateResourceDefinitionVersionError::from_response(
response,
))
}))
}
})
}
fn create_software_update_job(
&self,
input: CreateSoftwareUpdateJobRequest,
) -> RusotoFuture<CreateSoftwareUpdateJobResponse, CreateSoftwareUpdateJobError> {
let request_uri = "/greengrass/updates";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSoftwareUpdateJobResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateSoftwareUpdateJobError::from_response(response))
}))
}
})
}
fn create_subscription_definition(
&self,
input: CreateSubscriptionDefinitionRequest,
) -> RusotoFuture<CreateSubscriptionDefinitionResponse, CreateSubscriptionDefinitionError> {
let request_uri = "/greengrass/definition/subscriptions";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSubscriptionDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateSubscriptionDefinitionError::from_response(response))
}))
}
})
}
fn create_subscription_definition_version(
&self,
input: CreateSubscriptionDefinitionVersionRequest,
) -> RusotoFuture<
CreateSubscriptionDefinitionVersionResponse,
CreateSubscriptionDefinitionVersionError,
> {
let request_uri = format!(
"/greengrass/definition/subscriptions/{subscription_definition_id}/versions",
subscription_definition_id = input.subscription_definition_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSubscriptionDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateSubscriptionDefinitionVersionError::from_response(
response,
))
}))
}
})
}
fn delete_connector_definition(
&self,
input: DeleteConnectorDefinitionRequest,
) -> RusotoFuture<DeleteConnectorDefinitionResponse, DeleteConnectorDefinitionError> {
let request_uri = format!(
"/greengrass/definition/connectors/{connector_definition_id}",
connector_definition_id = input.connector_definition_id
);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteConnectorDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteConnectorDefinitionError::from_response(response))
}))
}
})
}
fn delete_core_definition(
&self,
input: DeleteCoreDefinitionRequest,
) -> RusotoFuture<DeleteCoreDefinitionResponse, DeleteCoreDefinitionError> {
let request_uri = format!(
"/greengrass/definition/cores/{core_definition_id}",
core_definition_id = input.core_definition_id
);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteCoreDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteCoreDefinitionError::from_response(response))
}),
)
}
})
}
fn delete_device_definition(
&self,
input: DeleteDeviceDefinitionRequest,
) -> RusotoFuture<DeleteDeviceDefinitionResponse, DeleteDeviceDefinitionError> {
let request_uri = format!(
"/greengrass/definition/devices/{device_definition_id}",
device_definition_id = input.device_definition_id
);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteDeviceDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteDeviceDefinitionError::from_response(response))
}),
)
}
})
}
fn delete_function_definition(
&self,
input: DeleteFunctionDefinitionRequest,
) -> RusotoFuture<DeleteFunctionDefinitionResponse, DeleteFunctionDefinitionError> {
let request_uri = format!(
"/greengrass/definition/functions/{function_definition_id}",
function_definition_id = input.function_definition_id
);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteFunctionDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteFunctionDefinitionError::from_response(response))
}))
}
})
}
fn delete_group(
&self,
input: DeleteGroupRequest,
) -> RusotoFuture<DeleteGroupResponse, DeleteGroupError> {
let request_uri = format!("/greengrass/groups/{group_id}", group_id = input.group_id);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteGroupError::from_response(response))),
)
}
})
}
fn delete_logger_definition(
&self,
input: DeleteLoggerDefinitionRequest,
) -> RusotoFuture<DeleteLoggerDefinitionResponse, DeleteLoggerDefinitionError> {
let request_uri = format!(
"/greengrass/definition/loggers/{logger_definition_id}",
logger_definition_id = input.logger_definition_id
);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteLoggerDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteLoggerDefinitionError::from_response(response))
}),
)
}
})
}
fn delete_resource_definition(
&self,
input: DeleteResourceDefinitionRequest,
) -> RusotoFuture<DeleteResourceDefinitionResponse, DeleteResourceDefinitionError> {
let request_uri = format!(
"/greengrass/definition/resources/{resource_definition_id}",
resource_definition_id = input.resource_definition_id
);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteResourceDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteResourceDefinitionError::from_response(response))
}))
}
})
}
fn delete_subscription_definition(
&self,
input: DeleteSubscriptionDefinitionRequest,
) -> RusotoFuture<DeleteSubscriptionDefinitionResponse, DeleteSubscriptionDefinitionError> {
let request_uri = format!(
"/greengrass/definition/subscriptions/{subscription_definition_id}",
subscription_definition_id = input.subscription_definition_id
);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteSubscriptionDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteSubscriptionDefinitionError::from_response(response))
}))
}
})
}
fn disassociate_role_from_group(
&self,
input: DisassociateRoleFromGroupRequest,
) -> RusotoFuture<DisassociateRoleFromGroupResponse, DisassociateRoleFromGroupError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/role",
group_id = input.group_id
);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateRoleFromGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateRoleFromGroupError::from_response(response))
}))
}
})
}
fn disassociate_service_role_from_account(
&self,
) -> RusotoFuture<
DisassociateServiceRoleFromAccountResponse,
DisassociateServiceRoleFromAccountError,
> {
let request_uri = "/greengrass/servicerole";
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateServiceRoleFromAccountResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateServiceRoleFromAccountError::from_response(
response,
))
}))
}
})
}
fn get_associated_role(
&self,
input: GetAssociatedRoleRequest,
) -> RusotoFuture<GetAssociatedRoleResponse, GetAssociatedRoleError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/role",
group_id = input.group_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetAssociatedRoleResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAssociatedRoleError::from_response(response))),
)
}
})
}
fn get_bulk_deployment_status(
&self,
input: GetBulkDeploymentStatusRequest,
) -> RusotoFuture<GetBulkDeploymentStatusResponse, GetBulkDeploymentStatusError> {
let request_uri = format!(
"/greengrass/bulk/deployments/{bulk_deployment_id}/status",
bulk_deployment_id = input.bulk_deployment_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetBulkDeploymentStatusResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetBulkDeploymentStatusError::from_response(response))
}))
}
})
}
fn get_connectivity_info(
&self,
input: GetConnectivityInfoRequest,
) -> RusotoFuture<GetConnectivityInfoResponse, GetConnectivityInfoError> {
let request_uri = format!(
"/greengrass/things/{thing_name}/connectivityInfo",
thing_name = input.thing_name
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetConnectivityInfoResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetConnectivityInfoError::from_response(response))
}),
)
}
})
}
fn get_connector_definition(
&self,
input: GetConnectorDefinitionRequest,
) -> RusotoFuture<GetConnectorDefinitionResponse, GetConnectorDefinitionError> {
let request_uri = format!(
"/greengrass/definition/connectors/{connector_definition_id}",
connector_definition_id = input.connector_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetConnectorDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetConnectorDefinitionError::from_response(response))
}),
)
}
})
}
fn get_connector_definition_version(
&self,
input: GetConnectorDefinitionVersionRequest,
) -> RusotoFuture<GetConnectorDefinitionVersionResponse, GetConnectorDefinitionVersionError>
{
let request_uri = format!("/greengrass/definition/connectors/{connector_definition_id}/versions/{connector_definition_version_id}", connector_definition_id = input.connector_definition_id, connector_definition_version_id = input.connector_definition_version_id);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetConnectorDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetConnectorDefinitionVersionError::from_response(response))
}))
}
})
}
fn get_core_definition(
&self,
input: GetCoreDefinitionRequest,
) -> RusotoFuture<GetCoreDefinitionResponse, GetCoreDefinitionError> {
let request_uri = format!(
"/greengrass/definition/cores/{core_definition_id}",
core_definition_id = input.core_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetCoreDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetCoreDefinitionError::from_response(response))),
)
}
})
}
fn get_core_definition_version(
&self,
input: GetCoreDefinitionVersionRequest,
) -> RusotoFuture<GetCoreDefinitionVersionResponse, GetCoreDefinitionVersionError> {
let request_uri = format!("/greengrass/definition/cores/{core_definition_id}/versions/{core_definition_version_id}", core_definition_id = input.core_definition_id, core_definition_version_id = input.core_definition_version_id);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetCoreDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetCoreDefinitionVersionError::from_response(response))
}))
}
})
}
fn get_deployment_status(
&self,
input: GetDeploymentStatusRequest,
) -> RusotoFuture<GetDeploymentStatusResponse, GetDeploymentStatusError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/deployments/{deployment_id}/status",
deployment_id = input.deployment_id,
group_id = input.group_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetDeploymentStatusResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetDeploymentStatusError::from_response(response))
}),
)
}
})
}
fn get_device_definition(
&self,
input: GetDeviceDefinitionRequest,
) -> RusotoFuture<GetDeviceDefinitionResponse, GetDeviceDefinitionError> {
let request_uri = format!(
"/greengrass/definition/devices/{device_definition_id}",
device_definition_id = input.device_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetDeviceDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetDeviceDefinitionError::from_response(response))
}),
)
}
})
}
fn get_device_definition_version(
&self,
input: GetDeviceDefinitionVersionRequest,
) -> RusotoFuture<GetDeviceDefinitionVersionResponse, GetDeviceDefinitionVersionError> {
let request_uri = format!("/greengrass/definition/devices/{device_definition_id}/versions/{device_definition_version_id}", device_definition_id = input.device_definition_id, device_definition_version_id = input.device_definition_version_id);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetDeviceDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetDeviceDefinitionVersionError::from_response(response))
}))
}
})
}
fn get_function_definition(
&self,
input: GetFunctionDefinitionRequest,
) -> RusotoFuture<GetFunctionDefinitionResponse, GetFunctionDefinitionError> {
let request_uri = format!(
"/greengrass/definition/functions/{function_definition_id}",
function_definition_id = input.function_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetFunctionDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetFunctionDefinitionError::from_response(response))
}),
)
}
})
}
fn get_function_definition_version(
&self,
input: GetFunctionDefinitionVersionRequest,
) -> RusotoFuture<GetFunctionDefinitionVersionResponse, GetFunctionDefinitionVersionError> {
let request_uri = format!("/greengrass/definition/functions/{function_definition_id}/versions/{function_definition_version_id}", function_definition_id = input.function_definition_id, function_definition_version_id = input.function_definition_version_id);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetFunctionDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetFunctionDefinitionVersionError::from_response(response))
}))
}
})
}
fn get_group(&self, input: GetGroupRequest) -> RusotoFuture<GetGroupResponse, GetGroupError> {
let request_uri = format!("/greengrass/groups/{group_id}", group_id = input.group_id);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetGroupError::from_response(response))),
)
}
})
}
fn get_group_certificate_authority(
&self,
input: GetGroupCertificateAuthorityRequest,
) -> RusotoFuture<GetGroupCertificateAuthorityResponse, GetGroupCertificateAuthorityError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/certificateauthorities/{certificate_authority_id}",
certificate_authority_id = input.certificate_authority_id,
group_id = input.group_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetGroupCertificateAuthorityResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetGroupCertificateAuthorityError::from_response(response))
}))
}
})
}
fn get_group_certificate_configuration(
&self,
input: GetGroupCertificateConfigurationRequest,
) -> RusotoFuture<GetGroupCertificateConfigurationResponse, GetGroupCertificateConfigurationError>
{
let request_uri = format!(
"/greengrass/groups/{group_id}/certificateauthorities/configuration/expiry",
group_id = input.group_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetGroupCertificateConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetGroupCertificateConfigurationError::from_response(
response,
))
}))
}
})
}
fn get_group_version(
&self,
input: GetGroupVersionRequest,
) -> RusotoFuture<GetGroupVersionResponse, GetGroupVersionError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/versions/{group_version_id}",
group_id = input.group_id,
group_version_id = input.group_version_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetGroupVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetGroupVersionError::from_response(response))),
)
}
})
}
fn get_logger_definition(
&self,
input: GetLoggerDefinitionRequest,
) -> RusotoFuture<GetLoggerDefinitionResponse, GetLoggerDefinitionError> {
let request_uri = format!(
"/greengrass/definition/loggers/{logger_definition_id}",
logger_definition_id = input.logger_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetLoggerDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetLoggerDefinitionError::from_response(response))
}),
)
}
})
}
fn get_logger_definition_version(
&self,
input: GetLoggerDefinitionVersionRequest,
) -> RusotoFuture<GetLoggerDefinitionVersionResponse, GetLoggerDefinitionVersionError> {
let request_uri = format!("/greengrass/definition/loggers/{logger_definition_id}/versions/{logger_definition_version_id}", logger_definition_id = input.logger_definition_id, logger_definition_version_id = input.logger_definition_version_id);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetLoggerDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetLoggerDefinitionVersionError::from_response(response))
}))
}
})
}
fn get_resource_definition(
&self,
input: GetResourceDefinitionRequest,
) -> RusotoFuture<GetResourceDefinitionResponse, GetResourceDefinitionError> {
let request_uri = format!(
"/greengrass/definition/resources/{resource_definition_id}",
resource_definition_id = input.resource_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetResourceDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetResourceDefinitionError::from_response(response))
}),
)
}
})
}
fn get_resource_definition_version(
&self,
input: GetResourceDefinitionVersionRequest,
) -> RusotoFuture<GetResourceDefinitionVersionResponse, GetResourceDefinitionVersionError> {
let request_uri = format!("/greengrass/definition/resources/{resource_definition_id}/versions/{resource_definition_version_id}", resource_definition_id = input.resource_definition_id, resource_definition_version_id = input.resource_definition_version_id);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetResourceDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetResourceDefinitionVersionError::from_response(response))
}))
}
})
}
fn get_service_role_for_account(
&self,
) -> RusotoFuture<GetServiceRoleForAccountResponse, GetServiceRoleForAccountError> {
let request_uri = "/greengrass/servicerole";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetServiceRoleForAccountResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetServiceRoleForAccountError::from_response(response))
}))
}
})
}
fn get_subscription_definition(
&self,
input: GetSubscriptionDefinitionRequest,
) -> RusotoFuture<GetSubscriptionDefinitionResponse, GetSubscriptionDefinitionError> {
let request_uri = format!(
"/greengrass/definition/subscriptions/{subscription_definition_id}",
subscription_definition_id = input.subscription_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetSubscriptionDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetSubscriptionDefinitionError::from_response(response))
}))
}
})
}
fn get_subscription_definition_version(
&self,
input: GetSubscriptionDefinitionVersionRequest,
) -> RusotoFuture<GetSubscriptionDefinitionVersionResponse, GetSubscriptionDefinitionVersionError>
{
let request_uri = format!("/greengrass/definition/subscriptions/{subscription_definition_id}/versions/{subscription_definition_version_id}", subscription_definition_id = input.subscription_definition_id, subscription_definition_version_id = input.subscription_definition_version_id);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetSubscriptionDefinitionVersionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetSubscriptionDefinitionVersionError::from_response(
response,
))
}))
}
})
}
fn list_bulk_deployment_detailed_reports(
&self,
input: ListBulkDeploymentDetailedReportsRequest,
) -> RusotoFuture<
ListBulkDeploymentDetailedReportsResponse,
ListBulkDeploymentDetailedReportsError,
> {
let request_uri = format!(
"/greengrass/bulk/deployments/{bulk_deployment_id}/detailed-reports",
bulk_deployment_id = input.bulk_deployment_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListBulkDeploymentDetailedReportsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListBulkDeploymentDetailedReportsError::from_response(
response,
))
}))
}
})
}
fn list_bulk_deployments(
&self,
input: ListBulkDeploymentsRequest,
) -> RusotoFuture<ListBulkDeploymentsResponse, ListBulkDeploymentsError> {
let request_uri = "/greengrass/bulk/deployments";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListBulkDeploymentsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListBulkDeploymentsError::from_response(response))
}),
)
}
})
}
fn list_connector_definition_versions(
&self,
input: ListConnectorDefinitionVersionsRequest,
) -> RusotoFuture<ListConnectorDefinitionVersionsResponse, ListConnectorDefinitionVersionsError>
{
let request_uri = format!(
"/greengrass/definition/connectors/{connector_definition_id}/versions",
connector_definition_id = input.connector_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListConnectorDefinitionVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListConnectorDefinitionVersionsError::from_response(
response,
))
}))
}
})
}
fn list_connector_definitions(
&self,
input: ListConnectorDefinitionsRequest,
) -> RusotoFuture<ListConnectorDefinitionsResponse, ListConnectorDefinitionsError> {
let request_uri = "/greengrass/definition/connectors";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListConnectorDefinitionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListConnectorDefinitionsError::from_response(response))
}))
}
})
}
fn list_core_definition_versions(
&self,
input: ListCoreDefinitionVersionsRequest,
) -> RusotoFuture<ListCoreDefinitionVersionsResponse, ListCoreDefinitionVersionsError> {
let request_uri = format!(
"/greengrass/definition/cores/{core_definition_id}/versions",
core_definition_id = input.core_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListCoreDefinitionVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListCoreDefinitionVersionsError::from_response(response))
}))
}
})
}
fn list_core_definitions(
&self,
input: ListCoreDefinitionsRequest,
) -> RusotoFuture<ListCoreDefinitionsResponse, ListCoreDefinitionsError> {
let request_uri = "/greengrass/definition/cores";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListCoreDefinitionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListCoreDefinitionsError::from_response(response))
}),
)
}
})
}
fn list_deployments(
&self,
input: ListDeploymentsRequest,
) -> RusotoFuture<ListDeploymentsResponse, ListDeploymentsError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/deployments",
group_id = input.group_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDeploymentsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDeploymentsError::from_response(response))),
)
}
})
}
fn list_device_definition_versions(
&self,
input: ListDeviceDefinitionVersionsRequest,
) -> RusotoFuture<ListDeviceDefinitionVersionsResponse, ListDeviceDefinitionVersionsError> {
let request_uri = format!(
"/greengrass/definition/devices/{device_definition_id}/versions",
device_definition_id = input.device_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDeviceDefinitionVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListDeviceDefinitionVersionsError::from_response(response))
}))
}
})
}
fn list_device_definitions(
&self,
input: ListDeviceDefinitionsRequest,
) -> RusotoFuture<ListDeviceDefinitionsResponse, ListDeviceDefinitionsError> {
let request_uri = "/greengrass/definition/devices";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDeviceDefinitionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListDeviceDefinitionsError::from_response(response))
}),
)
}
})
}
fn list_function_definition_versions(
&self,
input: ListFunctionDefinitionVersionsRequest,
) -> RusotoFuture<ListFunctionDefinitionVersionsResponse, ListFunctionDefinitionVersionsError>
{
let request_uri = format!(
"/greengrass/definition/functions/{function_definition_id}/versions",
function_definition_id = input.function_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListFunctionDefinitionVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListFunctionDefinitionVersionsError::from_response(response))
}))
}
})
}
fn list_function_definitions(
&self,
input: ListFunctionDefinitionsRequest,
) -> RusotoFuture<ListFunctionDefinitionsResponse, ListFunctionDefinitionsError> {
let request_uri = "/greengrass/definition/functions";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListFunctionDefinitionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListFunctionDefinitionsError::from_response(response))
}))
}
})
}
fn list_group_certificate_authorities(
&self,
input: ListGroupCertificateAuthoritiesRequest,
) -> RusotoFuture<ListGroupCertificateAuthoritiesResponse, ListGroupCertificateAuthoritiesError>
{
let request_uri = format!(
"/greengrass/groups/{group_id}/certificateauthorities",
group_id = input.group_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListGroupCertificateAuthoritiesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListGroupCertificateAuthoritiesError::from_response(
response,
))
}))
}
})
}
fn list_group_versions(
&self,
input: ListGroupVersionsRequest,
) -> RusotoFuture<ListGroupVersionsResponse, ListGroupVersionsError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/versions",
group_id = input.group_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListGroupVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListGroupVersionsError::from_response(response))),
)
}
})
}
fn list_groups(
&self,
input: ListGroupsRequest,
) -> RusotoFuture<ListGroupsResponse, ListGroupsError> {
let request_uri = "/greengrass/groups";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListGroupsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListGroupsError::from_response(response))),
)
}
})
}
fn list_logger_definition_versions(
&self,
input: ListLoggerDefinitionVersionsRequest,
) -> RusotoFuture<ListLoggerDefinitionVersionsResponse, ListLoggerDefinitionVersionsError> {
let request_uri = format!(
"/greengrass/definition/loggers/{logger_definition_id}/versions",
logger_definition_id = input.logger_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListLoggerDefinitionVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListLoggerDefinitionVersionsError::from_response(response))
}))
}
})
}
fn list_logger_definitions(
&self,
input: ListLoggerDefinitionsRequest,
) -> RusotoFuture<ListLoggerDefinitionsResponse, ListLoggerDefinitionsError> {
let request_uri = "/greengrass/definition/loggers";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListLoggerDefinitionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListLoggerDefinitionsError::from_response(response))
}),
)
}
})
}
fn list_resource_definition_versions(
&self,
input: ListResourceDefinitionVersionsRequest,
) -> RusotoFuture<ListResourceDefinitionVersionsResponse, ListResourceDefinitionVersionsError>
{
let request_uri = format!(
"/greengrass/definition/resources/{resource_definition_id}/versions",
resource_definition_id = input.resource_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListResourceDefinitionVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListResourceDefinitionVersionsError::from_response(response))
}))
}
})
}
fn list_resource_definitions(
&self,
input: ListResourceDefinitionsRequest,
) -> RusotoFuture<ListResourceDefinitionsResponse, ListResourceDefinitionsError> {
let request_uri = "/greengrass/definition/resources";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListResourceDefinitionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListResourceDefinitionsError::from_response(response))
}))
}
})
}
fn list_subscription_definition_versions(
&self,
input: ListSubscriptionDefinitionVersionsRequest,
) -> RusotoFuture<
ListSubscriptionDefinitionVersionsResponse,
ListSubscriptionDefinitionVersionsError,
> {
let request_uri = format!(
"/greengrass/definition/subscriptions/{subscription_definition_id}/versions",
subscription_definition_id = input.subscription_definition_id
);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListSubscriptionDefinitionVersionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListSubscriptionDefinitionVersionsError::from_response(
response,
))
}))
}
})
}
fn list_subscription_definitions(
&self,
input: ListSubscriptionDefinitionsRequest,
) -> RusotoFuture<ListSubscriptionDefinitionsResponse, ListSubscriptionDefinitionsError> {
let request_uri = "/greengrass/definition/subscriptions";
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListSubscriptionDefinitionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListSubscriptionDefinitionsError::from_response(response))
}))
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("GET", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
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 reset_deployments(
&self,
input: ResetDeploymentsRequest,
) -> RusotoFuture<ResetDeploymentsResponse, ResetDeploymentsError> {
let request_uri = format!(
"/greengrass/groups/{group_id}/deployments/$reset",
group_id = input.group_id
);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ResetDeploymentsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ResetDeploymentsError::from_response(response))),
)
}
})
}
fn start_bulk_deployment(
&self,
input: StartBulkDeploymentRequest,
) -> RusotoFuture<StartBulkDeploymentResponse, StartBulkDeploymentError> {
let request_uri = "/greengrass/bulk/deployments";
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
if let Some(ref amzn_client_token) = input.amzn_client_token {
request.add_header("X-Amzn-Client-Token", &amzn_client_token.to_string());
}
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<StartBulkDeploymentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(StartBulkDeploymentError::from_response(response))
}),
)
}
})
}
fn stop_bulk_deployment(
&self,
input: StopBulkDeploymentRequest,
) -> RusotoFuture<StopBulkDeploymentResponse, StopBulkDeploymentError> {
let request_uri = format!(
"/greengrass/bulk/deployments/{bulk_deployment_id}/$stop",
bulk_deployment_id = input.bulk_deployment_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<StopBulkDeploymentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopBulkDeploymentError::from_response(response))),
)
}
})
}
fn tag_resource(&self, input: TagResourceRequest) -> RusotoFuture<(), TagResourceError> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("POST", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
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(TagResourceError::from_response(response))),
)
}
})
}
fn untag_resource(&self, input: UntagResourceRequest) -> RusotoFuture<(), UntagResourceError> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("DELETE", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
for item in input.tag_keys.iter() {
params.put("tagKeys", item);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
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(UntagResourceError::from_response(response))),
)
}
})
}
fn update_connectivity_info(
&self,
input: UpdateConnectivityInfoRequest,
) -> RusotoFuture<UpdateConnectivityInfoResponse, UpdateConnectivityInfoError> {
let request_uri = format!(
"/greengrass/things/{thing_name}/connectivityInfo",
thing_name = input.thing_name
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateConnectivityInfoResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateConnectivityInfoError::from_response(response))
}),
)
}
})
}
fn update_connector_definition(
&self,
input: UpdateConnectorDefinitionRequest,
) -> RusotoFuture<UpdateConnectorDefinitionResponse, UpdateConnectorDefinitionError> {
let request_uri = format!(
"/greengrass/definition/connectors/{connector_definition_id}",
connector_definition_id = input.connector_definition_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateConnectorDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateConnectorDefinitionError::from_response(response))
}))
}
})
}
fn update_core_definition(
&self,
input: UpdateCoreDefinitionRequest,
) -> RusotoFuture<UpdateCoreDefinitionResponse, UpdateCoreDefinitionError> {
let request_uri = format!(
"/greengrass/definition/cores/{core_definition_id}",
core_definition_id = input.core_definition_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateCoreDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateCoreDefinitionError::from_response(response))
}),
)
}
})
}
fn update_device_definition(
&self,
input: UpdateDeviceDefinitionRequest,
) -> RusotoFuture<UpdateDeviceDefinitionResponse, UpdateDeviceDefinitionError> {
let request_uri = format!(
"/greengrass/definition/devices/{device_definition_id}",
device_definition_id = input.device_definition_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDeviceDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateDeviceDefinitionError::from_response(response))
}),
)
}
})
}
fn update_function_definition(
&self,
input: UpdateFunctionDefinitionRequest,
) -> RusotoFuture<UpdateFunctionDefinitionResponse, UpdateFunctionDefinitionError> {
let request_uri = format!(
"/greengrass/definition/functions/{function_definition_id}",
function_definition_id = input.function_definition_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateFunctionDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateFunctionDefinitionError::from_response(response))
}))
}
})
}
fn update_group(
&self,
input: UpdateGroupRequest,
) -> RusotoFuture<UpdateGroupResponse, UpdateGroupError> {
let request_uri = format!("/greengrass/groups/{group_id}", group_id = input.group_id);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateGroupResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateGroupError::from_response(response))),
)
}
})
}
fn update_group_certificate_configuration(
&self,
input: UpdateGroupCertificateConfigurationRequest,
) -> RusotoFuture<
UpdateGroupCertificateConfigurationResponse,
UpdateGroupCertificateConfigurationError,
> {
let request_uri = format!(
"/greengrass/groups/{group_id}/certificateauthorities/configuration/expiry",
group_id = input.group_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateGroupCertificateConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateGroupCertificateConfigurationError::from_response(
response,
))
}))
}
})
}
fn update_logger_definition(
&self,
input: UpdateLoggerDefinitionRequest,
) -> RusotoFuture<UpdateLoggerDefinitionResponse, UpdateLoggerDefinitionError> {
let request_uri = format!(
"/greengrass/definition/loggers/{logger_definition_id}",
logger_definition_id = input.logger_definition_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateLoggerDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateLoggerDefinitionError::from_response(response))
}),
)
}
})
}
fn update_resource_definition(
&self,
input: UpdateResourceDefinitionRequest,
) -> RusotoFuture<UpdateResourceDefinitionResponse, UpdateResourceDefinitionError> {
let request_uri = format!(
"/greengrass/definition/resources/{resource_definition_id}",
resource_definition_id = input.resource_definition_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateResourceDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateResourceDefinitionError::from_response(response))
}))
}
})
}
fn update_subscription_definition(
&self,
input: UpdateSubscriptionDefinitionRequest,
) -> RusotoFuture<UpdateSubscriptionDefinitionResponse, UpdateSubscriptionDefinitionError> {
let request_uri = format!(
"/greengrass/definition/subscriptions/{subscription_definition_id}",
subscription_definition_id = input.subscription_definition_id
);
let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateSubscriptionDefinitionResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateSubscriptionDefinitionError::from_response(response))
}))
}
})
}
}