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::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ActivateGatewayInput {
#[serde(rename = "ActivationKey")]
pub activation_key: String,
#[serde(rename = "GatewayName")]
pub gateway_name: String,
#[serde(rename = "GatewayRegion")]
pub gateway_region: String,
#[serde(rename = "GatewayTimezone")]
pub gateway_timezone: String,
#[serde(rename = "GatewayType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_type: Option<String>,
#[serde(rename = "MediumChangerType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub medium_changer_type: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "TapeDriveType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_drive_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ActivateGatewayOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddCacheInput {
#[serde(rename = "DiskIds")]
pub disk_ids: Vec<String>,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddCacheOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddTagsToResourceInput {
#[serde(rename = "ResourceARN")]
pub resource_arn: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddTagsToResourceOutput {
#[serde(rename = "ResourceARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddUploadBufferInput {
#[serde(rename = "DiskIds")]
pub disk_ids: Vec<String>,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddUploadBufferOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddWorkingStorageInput {
#[serde(rename = "DiskIds")]
pub disk_ids: Vec<String>,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddWorkingStorageOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssignTapePoolInput {
#[serde(rename = "PoolId")]
pub pool_id: String,
#[serde(rename = "TapeARN")]
pub tape_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssignTapePoolOutput {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AttachVolumeInput {
#[serde(rename = "DiskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_id: Option<String>,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "NetworkInterfaceId")]
pub network_interface_id: String,
#[serde(rename = "TargetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_name: Option<String>,
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AttachVolumeOutput {
#[serde(rename = "TargetARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CachediSCSIVolume {
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "SourceSnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_snapshot_id: Option<String>,
#[serde(rename = "TargetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_name: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
#[serde(rename = "VolumeAttachmentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_attachment_status: Option<String>,
#[serde(rename = "VolumeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_id: Option<String>,
#[serde(rename = "VolumeProgress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_progress: Option<f64>,
#[serde(rename = "VolumeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_size_in_bytes: Option<i64>,
#[serde(rename = "VolumeStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_status: Option<String>,
#[serde(rename = "VolumeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
#[serde(rename = "VolumeUsedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_used_in_bytes: Option<i64>,
#[serde(rename = "VolumeiSCSIAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volumei_scsi_attributes: Option<VolumeiSCSIAttributes>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelArchivalInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "TapeARN")]
pub tape_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CancelArchivalOutput {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelRetrievalInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "TapeARN")]
pub tape_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CancelRetrievalOutput {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ChapInfo {
#[serde(rename = "InitiatorName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initiator_name: Option<String>,
#[serde(rename = "SecretToAuthenticateInitiator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_to_authenticate_initiator: Option<String>,
#[serde(rename = "SecretToAuthenticateTarget")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_to_authenticate_target: Option<String>,
#[serde(rename = "TargetARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateCachediSCSIVolumeInput {
#[serde(rename = "ClientToken")]
pub client_token: String,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "NetworkInterfaceId")]
pub network_interface_id: String,
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename = "SourceVolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_volume_arn: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "TargetName")]
pub target_name: String,
#[serde(rename = "VolumeSizeInBytes")]
pub volume_size_in_bytes: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateCachediSCSIVolumeOutput {
#[serde(rename = "TargetARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateNFSFileShareInput {
#[serde(rename = "ClientList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_list: Option<Vec<String>>,
#[serde(rename = "ClientToken")]
pub client_token: String,
#[serde(rename = "DefaultStorageClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_storage_class: Option<String>,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "GuessMIMETypeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub guess_mime_type_enabled: Option<bool>,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "LocationARN")]
pub location_arn: String,
#[serde(rename = "NFSFileShareDefaults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub nfs_file_share_defaults: Option<NFSFileShareDefaults>,
#[serde(rename = "ObjectACL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_acl: Option<String>,
#[serde(rename = "ReadOnly")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
#[serde(rename = "RequesterPays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requester_pays: Option<bool>,
#[serde(rename = "Role")]
pub role: String,
#[serde(rename = "Squash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub squash: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateNFSFileShareOutput {
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSMBFileShareInput {
#[serde(rename = "AdminUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_user_list: Option<Vec<String>>,
#[serde(rename = "Authentication")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication: Option<String>,
#[serde(rename = "ClientToken")]
pub client_token: String,
#[serde(rename = "DefaultStorageClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_storage_class: Option<String>,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "GuessMIMETypeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub guess_mime_type_enabled: Option<bool>,
#[serde(rename = "InvalidUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invalid_user_list: Option<Vec<String>>,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "LocationARN")]
pub location_arn: String,
#[serde(rename = "ObjectACL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_acl: Option<String>,
#[serde(rename = "ReadOnly")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
#[serde(rename = "RequesterPays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requester_pays: Option<bool>,
#[serde(rename = "Role")]
pub role: String,
#[serde(rename = "SMBACLEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub smbacl_enabled: Option<bool>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "ValidUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub valid_user_list: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSMBFileShareOutput {
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSnapshotFromVolumeRecoveryPointInput {
#[serde(rename = "SnapshotDescription")]
pub snapshot_description: String,
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSnapshotFromVolumeRecoveryPointOutput {
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
#[serde(rename = "VolumeRecoveryPointTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_recovery_point_time: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSnapshotInput {
#[serde(rename = "SnapshotDescription")]
pub snapshot_description: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateSnapshotOutput {
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateStorediSCSIVolumeInput {
#[serde(rename = "DiskId")]
pub disk_id: String,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "NetworkInterfaceId")]
pub network_interface_id: String,
#[serde(rename = "PreserveExistingData")]
pub preserve_existing_data: bool,
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "TargetName")]
pub target_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateStorediSCSIVolumeOutput {
#[serde(rename = "TargetARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
#[serde(rename = "VolumeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_size_in_bytes: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTapeWithBarcodeInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "PoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pool_id: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "TapeBarcode")]
pub tape_barcode: String,
#[serde(rename = "TapeSizeInBytes")]
pub tape_size_in_bytes: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateTapeWithBarcodeOutput {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTapesInput {
#[serde(rename = "ClientToken")]
pub client_token: String,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "NumTapesToCreate")]
pub num_tapes_to_create: i64,
#[serde(rename = "PoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pool_id: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "TapeBarcodePrefix")]
pub tape_barcode_prefix: String,
#[serde(rename = "TapeSizeInBytes")]
pub tape_size_in_bytes: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateTapesOutput {
#[serde(rename = "TapeARNs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_ar_ns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteBandwidthRateLimitInput {
#[serde(rename = "BandwidthType")]
pub bandwidth_type: String,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteBandwidthRateLimitOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteChapCredentialsInput {
#[serde(rename = "InitiatorName")]
pub initiator_name: String,
#[serde(rename = "TargetARN")]
pub target_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteChapCredentialsOutput {
#[serde(rename = "InitiatorName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initiator_name: Option<String>,
#[serde(rename = "TargetARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteFileShareInput {
#[serde(rename = "FileShareARN")]
pub file_share_arn: String,
#[serde(rename = "ForceDelete")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_delete: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteFileShareOutput {
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteGatewayInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteGatewayOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteSnapshotScheduleInput {
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteSnapshotScheduleOutput {
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTapeArchiveInput {
#[serde(rename = "TapeARN")]
pub tape_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteTapeArchiveOutput {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTapeInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "TapeARN")]
pub tape_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteTapeOutput {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteVolumeInput {
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteVolumeOutput {
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeBandwidthRateLimitInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeBandwidthRateLimitOutput {
#[serde(rename = "AverageDownloadRateLimitInBitsPerSec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub average_download_rate_limit_in_bits_per_sec: Option<i64>,
#[serde(rename = "AverageUploadRateLimitInBitsPerSec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub average_upload_rate_limit_in_bits_per_sec: Option<i64>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeCacheInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeCacheOutput {
#[serde(rename = "CacheAllocatedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_allocated_in_bytes: Option<i64>,
#[serde(rename = "CacheDirtyPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_dirty_percentage: Option<f64>,
#[serde(rename = "CacheHitPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_hit_percentage: Option<f64>,
#[serde(rename = "CacheMissPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_miss_percentage: Option<f64>,
#[serde(rename = "CacheUsedPercentage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_used_percentage: Option<f64>,
#[serde(rename = "DiskIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_ids: Option<Vec<String>>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeCachediSCSIVolumesInput {
#[serde(rename = "VolumeARNs")]
pub volume_ar_ns: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeCachediSCSIVolumesOutput {
#[serde(rename = "CachediSCSIVolumes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cachedi_scsi_volumes: Option<Vec<CachediSCSIVolume>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeChapCredentialsInput {
#[serde(rename = "TargetARN")]
pub target_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeChapCredentialsOutput {
#[serde(rename = "ChapCredentials")]
#[serde(skip_serializing_if = "Option::is_none")]
pub chap_credentials: Option<Vec<ChapInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeGatewayInformationInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeGatewayInformationOutput {
#[serde(rename = "Ec2InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec_2_instance_id: Option<String>,
#[serde(rename = "Ec2InstanceRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec_2_instance_region: Option<String>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "GatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_id: Option<String>,
#[serde(rename = "GatewayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_name: Option<String>,
#[serde(rename = "GatewayNetworkInterfaces")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_network_interfaces: Option<Vec<NetworkInterface>>,
#[serde(rename = "GatewayState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_state: Option<String>,
#[serde(rename = "GatewayTimezone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_timezone: Option<String>,
#[serde(rename = "GatewayType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_type: Option<String>,
#[serde(rename = "LastSoftwareUpdate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_software_update: Option<String>,
#[serde(rename = "NextUpdateAvailabilityDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_update_availability_date: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "VPCEndpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_endpoint: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeMaintenanceStartTimeInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeMaintenanceStartTimeOutput {
#[serde(rename = "DayOfMonth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_month: Option<i64>,
#[serde(rename = "DayOfWeek")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_week: Option<i64>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "HourOfDay")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hour_of_day: Option<i64>,
#[serde(rename = "MinuteOfHour")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minute_of_hour: Option<i64>,
#[serde(rename = "Timezone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeNFSFileSharesInput {
#[serde(rename = "FileShareARNList")]
pub file_share_arn_list: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeNFSFileSharesOutput {
#[serde(rename = "NFSFileShareInfoList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub nfs_file_share_info_list: Option<Vec<NFSFileShareInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeSMBFileSharesInput {
#[serde(rename = "FileShareARNList")]
pub file_share_arn_list: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeSMBFileSharesOutput {
#[serde(rename = "SMBFileShareInfoList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub smb_file_share_info_list: Option<Vec<SMBFileShareInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeSMBSettingsInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeSMBSettingsOutput {
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "SMBGuestPasswordSet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub smb_guest_password_set: Option<bool>,
#[serde(rename = "SMBSecurityStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub smb_security_strategy: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeSnapshotScheduleInput {
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeSnapshotScheduleOutput {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "RecurrenceInHours")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recurrence_in_hours: Option<i64>,
#[serde(rename = "StartAt")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_at: Option<i64>,
#[serde(rename = "Timezone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timezone: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeStorediSCSIVolumesInput {
#[serde(rename = "VolumeARNs")]
pub volume_ar_ns: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeStorediSCSIVolumesOutput {
#[serde(rename = "StorediSCSIVolumes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub storedi_scsi_volumes: Option<Vec<StorediSCSIVolume>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeTapeArchivesInput {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "TapeARNs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_ar_ns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeTapeArchivesOutput {
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "TapeArchives")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_archives: Option<Vec<TapeArchive>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeTapeRecoveryPointsInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeTapeRecoveryPointsOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "TapeRecoveryPointInfos")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_recovery_point_infos: Option<Vec<TapeRecoveryPointInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeTapesInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "TapeARNs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_ar_ns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeTapesOutput {
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "Tapes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tapes: Option<Vec<Tape>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeUploadBufferInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeUploadBufferOutput {
#[serde(rename = "DiskIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_ids: Option<Vec<String>>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "UploadBufferAllocatedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub upload_buffer_allocated_in_bytes: Option<i64>,
#[serde(rename = "UploadBufferUsedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub upload_buffer_used_in_bytes: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeVTLDevicesInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "VTLDeviceARNs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vtl_device_ar_ns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeVTLDevicesOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "VTLDevices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vtl_devices: Option<Vec<VTLDevice>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeWorkingStorageInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeWorkingStorageOutput {
#[serde(rename = "DiskIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_ids: Option<Vec<String>>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "WorkingStorageAllocatedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub working_storage_allocated_in_bytes: Option<i64>,
#[serde(rename = "WorkingStorageUsedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub working_storage_used_in_bytes: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DetachVolumeInput {
#[serde(rename = "ForceDetach")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_detach: Option<bool>,
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DetachVolumeOutput {
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeviceiSCSIAttributes {
#[serde(rename = "ChapEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub chap_enabled: Option<bool>,
#[serde(rename = "NetworkInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_id: Option<String>,
#[serde(rename = "NetworkInterfacePort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_port: Option<i64>,
#[serde(rename = "TargetARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisableGatewayInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisableGatewayOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Disk {
#[serde(rename = "DiskAllocationResource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_allocation_resource: Option<String>,
#[serde(rename = "DiskAllocationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_allocation_type: Option<String>,
#[serde(rename = "DiskAttributeList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_attribute_list: Option<Vec<String>>,
#[serde(rename = "DiskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_id: Option<String>,
#[serde(rename = "DiskNode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_node: Option<String>,
#[serde(rename = "DiskPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_path: Option<String>,
#[serde(rename = "DiskSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_size_in_bytes: Option<i64>,
#[serde(rename = "DiskStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disk_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FileShareInfo {
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
#[serde(rename = "FileShareId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_id: Option<String>,
#[serde(rename = "FileShareStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_status: Option<String>,
#[serde(rename = "FileShareType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_type: Option<String>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GatewayInfo {
#[serde(rename = "Ec2InstanceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec_2_instance_id: Option<String>,
#[serde(rename = "Ec2InstanceRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec_2_instance_region: Option<String>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "GatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_id: Option<String>,
#[serde(rename = "GatewayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_name: Option<String>,
#[serde(rename = "GatewayOperationalState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_operational_state: Option<String>,
#[serde(rename = "GatewayType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct JoinDomainInput {
#[serde(rename = "DomainControllers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_controllers: Option<Vec<String>>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "OrganizationalUnit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub organizational_unit: Option<String>,
#[serde(rename = "Password")]
pub password: String,
#[serde(rename = "UserName")]
pub user_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct JoinDomainOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListFileSharesInput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListFileSharesOutput {
#[serde(rename = "FileShareInfoList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_info_list: Option<Vec<FileShareInfo>>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "NextMarker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListGatewaysInput {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListGatewaysOutput {
#[serde(rename = "Gateways")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateways: Option<Vec<GatewayInfo>>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListLocalDisksInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListLocalDisksOutput {
#[serde(rename = "Disks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disks: Option<Vec<Disk>>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceInput {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "ResourceARN")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceOutput {
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "ResourceARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_arn: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTapesInput {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "TapeARNs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_ar_ns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTapesOutput {
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "TapeInfos")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_infos: Option<Vec<TapeInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListVolumeInitiatorsInput {
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListVolumeInitiatorsOutput {
#[serde(rename = "Initiators")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initiators: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListVolumeRecoveryPointsInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListVolumeRecoveryPointsOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "VolumeRecoveryPointInfos")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_recovery_point_infos: Option<Vec<VolumeRecoveryPointInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListVolumesInput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListVolumesOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "Marker")]
#[serde(skip_serializing_if = "Option::is_none")]
pub marker: Option<String>,
#[serde(rename = "VolumeInfos")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_infos: Option<Vec<VolumeInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct NFSFileShareDefaults {
#[serde(rename = "DirectoryMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_mode: Option<String>,
#[serde(rename = "FileMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_mode: Option<String>,
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<i64>,
#[serde(rename = "OwnerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_id: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct NFSFileShareInfo {
#[serde(rename = "ClientList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_list: Option<Vec<String>>,
#[serde(rename = "DefaultStorageClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_storage_class: Option<String>,
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
#[serde(rename = "FileShareId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_id: Option<String>,
#[serde(rename = "FileShareStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_status: Option<String>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "GuessMIMETypeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub guess_mime_type_enabled: Option<bool>,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "LocationARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location_arn: Option<String>,
#[serde(rename = "NFSFileShareDefaults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub nfs_file_share_defaults: Option<NFSFileShareDefaults>,
#[serde(rename = "ObjectACL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_acl: Option<String>,
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "ReadOnly")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
#[serde(rename = "RequesterPays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requester_pays: Option<bool>,
#[serde(rename = "Role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
#[serde(rename = "Squash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub squash: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct NetworkInterface {
#[serde(rename = "Ipv4Address")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ipv_4_address: Option<String>,
#[serde(rename = "Ipv6Address")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ipv_6_address: Option<String>,
#[serde(rename = "MacAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mac_address: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct NotifyWhenUploadedInput {
#[serde(rename = "FileShareARN")]
pub file_share_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct NotifyWhenUploadedOutput {
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
#[serde(rename = "NotificationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RefreshCacheInput {
#[serde(rename = "FileShareARN")]
pub file_share_arn: String,
#[serde(rename = "FolderList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub folder_list: Option<Vec<String>>,
#[serde(rename = "Recursive")]
#[serde(skip_serializing_if = "Option::is_none")]
pub recursive: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RefreshCacheOutput {
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
#[serde(rename = "NotificationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub notification_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RemoveTagsFromResourceInput {
#[serde(rename = "ResourceARN")]
pub resource_arn: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RemoveTagsFromResourceOutput {
#[serde(rename = "ResourceARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ResetCacheInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResetCacheOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RetrieveTapeArchiveInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "TapeARN")]
pub tape_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RetrieveTapeArchiveOutput {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RetrieveTapeRecoveryPointInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "TapeARN")]
pub tape_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RetrieveTapeRecoveryPointOutput {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SMBFileShareInfo {
#[serde(rename = "AdminUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_user_list: Option<Vec<String>>,
#[serde(rename = "Authentication")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication: Option<String>,
#[serde(rename = "DefaultStorageClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_storage_class: Option<String>,
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
#[serde(rename = "FileShareId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_id: Option<String>,
#[serde(rename = "FileShareStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_status: Option<String>,
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "GuessMIMETypeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub guess_mime_type_enabled: Option<bool>,
#[serde(rename = "InvalidUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invalid_user_list: Option<Vec<String>>,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "LocationARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location_arn: Option<String>,
#[serde(rename = "ObjectACL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_acl: Option<String>,
#[serde(rename = "Path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "ReadOnly")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
#[serde(rename = "RequesterPays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requester_pays: Option<bool>,
#[serde(rename = "Role")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
#[serde(rename = "SMBACLEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub smbacl_enabled: Option<bool>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "ValidUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub valid_user_list: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetLocalConsolePasswordInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "LocalConsolePassword")]
pub local_console_password: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SetLocalConsolePasswordOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SetSMBGuestPasswordInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "Password")]
pub password: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SetSMBGuestPasswordOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ShutdownGatewayInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ShutdownGatewayOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartGatewayInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartGatewayOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct StorageGatewayError {
pub error_code: Option<String>,
pub error_details: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StorediSCSIVolume {
#[serde(rename = "CreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "PreservedExistingData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub preserved_existing_data: Option<bool>,
#[serde(rename = "SourceSnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub source_snapshot_id: Option<String>,
#[serde(rename = "TargetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_name: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
#[serde(rename = "VolumeAttachmentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_attachment_status: Option<String>,
#[serde(rename = "VolumeDiskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_disk_id: Option<String>,
#[serde(rename = "VolumeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_id: Option<String>,
#[serde(rename = "VolumeProgress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_progress: Option<f64>,
#[serde(rename = "VolumeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_size_in_bytes: Option<i64>,
#[serde(rename = "VolumeStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_status: Option<String>,
#[serde(rename = "VolumeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
#[serde(rename = "VolumeUsedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_used_in_bytes: Option<i64>,
#[serde(rename = "VolumeiSCSIAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volumei_scsi_attributes: Option<VolumeiSCSIAttributes>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Tape {
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "PoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pool_id: Option<String>,
#[serde(rename = "Progress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub progress: Option<f64>,
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
#[serde(rename = "TapeBarcode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_barcode: Option<String>,
#[serde(rename = "TapeCreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_created_date: Option<f64>,
#[serde(rename = "TapeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_size_in_bytes: Option<i64>,
#[serde(rename = "TapeStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_status: Option<String>,
#[serde(rename = "TapeUsedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_used_in_bytes: Option<i64>,
#[serde(rename = "VTLDevice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vtl_device: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TapeArchive {
#[serde(rename = "CompletionTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub completion_time: Option<f64>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "PoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pool_id: Option<String>,
#[serde(rename = "RetrievedTo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retrieved_to: Option<String>,
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
#[serde(rename = "TapeBarcode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_barcode: Option<String>,
#[serde(rename = "TapeCreatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_created_date: Option<f64>,
#[serde(rename = "TapeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_size_in_bytes: Option<i64>,
#[serde(rename = "TapeStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_status: Option<String>,
#[serde(rename = "TapeUsedInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_used_in_bytes: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TapeInfo {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "PoolId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pool_id: Option<String>,
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
#[serde(rename = "TapeBarcode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_barcode: Option<String>,
#[serde(rename = "TapeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_size_in_bytes: Option<i64>,
#[serde(rename = "TapeStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TapeRecoveryPointInfo {
#[serde(rename = "TapeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_arn: Option<String>,
#[serde(rename = "TapeRecoveryPointTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_recovery_point_time: Option<f64>,
#[serde(rename = "TapeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_size_in_bytes: Option<i64>,
#[serde(rename = "TapeStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tape_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateBandwidthRateLimitInput {
#[serde(rename = "AverageDownloadRateLimitInBitsPerSec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub average_download_rate_limit_in_bits_per_sec: Option<i64>,
#[serde(rename = "AverageUploadRateLimitInBitsPerSec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub average_upload_rate_limit_in_bits_per_sec: Option<i64>,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateBandwidthRateLimitOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateChapCredentialsInput {
#[serde(rename = "InitiatorName")]
pub initiator_name: String,
#[serde(rename = "SecretToAuthenticateInitiator")]
pub secret_to_authenticate_initiator: String,
#[serde(rename = "SecretToAuthenticateTarget")]
#[serde(skip_serializing_if = "Option::is_none")]
pub secret_to_authenticate_target: Option<String>,
#[serde(rename = "TargetARN")]
pub target_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateChapCredentialsOutput {
#[serde(rename = "InitiatorName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub initiator_name: Option<String>,
#[serde(rename = "TargetARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateGatewayInformationInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "GatewayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_name: Option<String>,
#[serde(rename = "GatewayTimezone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_timezone: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateGatewayInformationOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "GatewayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateGatewaySoftwareNowInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateGatewaySoftwareNowOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateMaintenanceStartTimeInput {
#[serde(rename = "DayOfMonth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_month: Option<i64>,
#[serde(rename = "DayOfWeek")]
#[serde(skip_serializing_if = "Option::is_none")]
pub day_of_week: Option<i64>,
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "HourOfDay")]
pub hour_of_day: i64,
#[serde(rename = "MinuteOfHour")]
pub minute_of_hour: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateMaintenanceStartTimeOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateNFSFileShareInput {
#[serde(rename = "ClientList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_list: Option<Vec<String>>,
#[serde(rename = "DefaultStorageClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_storage_class: Option<String>,
#[serde(rename = "FileShareARN")]
pub file_share_arn: String,
#[serde(rename = "GuessMIMETypeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub guess_mime_type_enabled: Option<bool>,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "NFSFileShareDefaults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub nfs_file_share_defaults: Option<NFSFileShareDefaults>,
#[serde(rename = "ObjectACL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_acl: Option<String>,
#[serde(rename = "ReadOnly")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
#[serde(rename = "RequesterPays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requester_pays: Option<bool>,
#[serde(rename = "Squash")]
#[serde(skip_serializing_if = "Option::is_none")]
pub squash: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateNFSFileShareOutput {
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateSMBFileShareInput {
#[serde(rename = "AdminUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub admin_user_list: Option<Vec<String>>,
#[serde(rename = "DefaultStorageClass")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_storage_class: Option<String>,
#[serde(rename = "FileShareARN")]
pub file_share_arn: String,
#[serde(rename = "GuessMIMETypeEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub guess_mime_type_enabled: Option<bool>,
#[serde(rename = "InvalidUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invalid_user_list: Option<Vec<String>>,
#[serde(rename = "KMSEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_encrypted: Option<bool>,
#[serde(rename = "KMSKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key: Option<String>,
#[serde(rename = "ObjectACL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub object_acl: Option<String>,
#[serde(rename = "ReadOnly")]
#[serde(skip_serializing_if = "Option::is_none")]
pub read_only: Option<bool>,
#[serde(rename = "RequesterPays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requester_pays: Option<bool>,
#[serde(rename = "SMBACLEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub smbacl_enabled: Option<bool>,
#[serde(rename = "ValidUserList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub valid_user_list: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateSMBFileShareOutput {
#[serde(rename = "FileShareARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file_share_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateSMBSecurityStrategyInput {
#[serde(rename = "GatewayARN")]
pub gateway_arn: String,
#[serde(rename = "SMBSecurityStrategy")]
pub smb_security_strategy: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateSMBSecurityStrategyOutput {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateSnapshotScheduleInput {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "RecurrenceInHours")]
pub recurrence_in_hours: i64,
#[serde(rename = "StartAt")]
pub start_at: i64,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "VolumeARN")]
pub volume_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateSnapshotScheduleOutput {
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateVTLDeviceTypeInput {
#[serde(rename = "DeviceType")]
pub device_type: String,
#[serde(rename = "VTLDeviceARN")]
pub vtl_device_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateVTLDeviceTypeOutput {
#[serde(rename = "VTLDeviceARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vtl_device_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VTLDevice {
#[serde(rename = "DeviceiSCSIAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub devicei_scsi_attributes: Option<DeviceiSCSIAttributes>,
#[serde(rename = "VTLDeviceARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vtl_device_arn: Option<String>,
#[serde(rename = "VTLDeviceProductIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vtl_device_product_identifier: Option<String>,
#[serde(rename = "VTLDeviceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vtl_device_type: Option<String>,
#[serde(rename = "VTLDeviceVendor")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vtl_device_vendor: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VolumeInfo {
#[serde(rename = "GatewayARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_arn: Option<String>,
#[serde(rename = "GatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_id: Option<String>,
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
#[serde(rename = "VolumeAttachmentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_attachment_status: Option<String>,
#[serde(rename = "VolumeId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_id: Option<String>,
#[serde(rename = "VolumeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_size_in_bytes: Option<i64>,
#[serde(rename = "VolumeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VolumeRecoveryPointInfo {
#[serde(rename = "VolumeARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_arn: Option<String>,
#[serde(rename = "VolumeRecoveryPointTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_recovery_point_time: Option<String>,
#[serde(rename = "VolumeSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_size_in_bytes: Option<i64>,
#[serde(rename = "VolumeUsageInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_usage_in_bytes: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VolumeiSCSIAttributes {
#[serde(rename = "ChapEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub chap_enabled: Option<bool>,
#[serde(rename = "LunNumber")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lun_number: Option<i64>,
#[serde(rename = "NetworkInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_id: Option<String>,
#[serde(rename = "NetworkInterfacePort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_interface_port: Option<i64>,
#[serde(rename = "TargetARN")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arn: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum ActivateGatewayError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ActivateGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ActivateGatewayError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ActivateGatewayError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ActivateGatewayError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ActivateGatewayError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ActivateGatewayError {
fn description(&self) -> &str {
match *self {
ActivateGatewayError::InternalServerError(ref cause) => cause,
ActivateGatewayError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddCacheError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl AddCacheError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddCacheError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(AddCacheError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(AddCacheError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddCacheError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddCacheError {
fn description(&self) -> &str {
match *self {
AddCacheError::InternalServerError(ref cause) => cause,
AddCacheError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddTagsToResourceError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl AddTagsToResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsToResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(AddTagsToResourceError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(AddTagsToResourceError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddTagsToResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddTagsToResourceError {
fn description(&self) -> &str {
match *self {
AddTagsToResourceError::InternalServerError(ref cause) => cause,
AddTagsToResourceError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddUploadBufferError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl AddUploadBufferError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddUploadBufferError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(AddUploadBufferError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(AddUploadBufferError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddUploadBufferError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddUploadBufferError {
fn description(&self) -> &str {
match *self {
AddUploadBufferError::InternalServerError(ref cause) => cause,
AddUploadBufferError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddWorkingStorageError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl AddWorkingStorageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddWorkingStorageError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(AddWorkingStorageError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(AddWorkingStorageError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddWorkingStorageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddWorkingStorageError {
fn description(&self) -> &str {
match *self {
AddWorkingStorageError::InternalServerError(ref cause) => cause,
AddWorkingStorageError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssignTapePoolError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl AssignTapePoolError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssignTapePoolError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(AssignTapePoolError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(AssignTapePoolError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssignTapePoolError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssignTapePoolError {
fn description(&self) -> &str {
match *self {
AssignTapePoolError::InternalServerError(ref cause) => cause,
AssignTapePoolError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AttachVolumeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl AttachVolumeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AttachVolumeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(AttachVolumeError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(AttachVolumeError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AttachVolumeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AttachVolumeError {
fn description(&self) -> &str {
match *self {
AttachVolumeError::InternalServerError(ref cause) => cause,
AttachVolumeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelArchivalError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl CancelArchivalError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelArchivalError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CancelArchivalError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(CancelArchivalError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CancelArchivalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelArchivalError {
fn description(&self) -> &str {
match *self {
CancelArchivalError::InternalServerError(ref cause) => cause,
CancelArchivalError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelRetrievalError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl CancelRetrievalError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelRetrievalError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CancelRetrievalError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(CancelRetrievalError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CancelRetrievalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelRetrievalError {
fn description(&self) -> &str {
match *self {
CancelRetrievalError::InternalServerError(ref cause) => cause,
CancelRetrievalError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateCachediSCSIVolumeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl CreateCachediSCSIVolumeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCachediSCSIVolumeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CreateCachediSCSIVolumeError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
CreateCachediSCSIVolumeError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateCachediSCSIVolumeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateCachediSCSIVolumeError {
fn description(&self) -> &str {
match *self {
CreateCachediSCSIVolumeError::InternalServerError(ref cause) => cause,
CreateCachediSCSIVolumeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateNFSFileShareError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl CreateNFSFileShareError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateNFSFileShareError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CreateNFSFileShareError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(CreateNFSFileShareError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateNFSFileShareError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateNFSFileShareError {
fn description(&self) -> &str {
match *self {
CreateNFSFileShareError::InternalServerError(ref cause) => cause,
CreateNFSFileShareError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSMBFileShareError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl CreateSMBFileShareError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSMBFileShareError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CreateSMBFileShareError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(CreateSMBFileShareError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSMBFileShareError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSMBFileShareError {
fn description(&self) -> &str {
match *self {
CreateSMBFileShareError::InternalServerError(ref cause) => cause,
CreateSMBFileShareError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSnapshotError {
InternalServerError(String),
InvalidGatewayRequest(String),
ServiceUnavailableError(String),
}
impl CreateSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSnapshotError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CreateSnapshotError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(CreateSnapshotError::InvalidGatewayRequest(
err.msg,
))
}
"ServiceUnavailableError" => {
return RusotoError::Service(CreateSnapshotError::ServiceUnavailableError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSnapshotError {
fn description(&self) -> &str {
match *self {
CreateSnapshotError::InternalServerError(ref cause) => cause,
CreateSnapshotError::InvalidGatewayRequest(ref cause) => cause,
CreateSnapshotError::ServiceUnavailableError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSnapshotFromVolumeRecoveryPointError {
InternalServerError(String),
InvalidGatewayRequest(String),
ServiceUnavailableError(String),
}
impl CreateSnapshotFromVolumeRecoveryPointError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateSnapshotFromVolumeRecoveryPointError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
CreateSnapshotFromVolumeRecoveryPointError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
CreateSnapshotFromVolumeRecoveryPointError::InvalidGatewayRequest(err.msg),
)
}
"ServiceUnavailableError" => {
return RusotoError::Service(
CreateSnapshotFromVolumeRecoveryPointError::ServiceUnavailableError(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSnapshotFromVolumeRecoveryPointError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSnapshotFromVolumeRecoveryPointError {
fn description(&self) -> &str {
match *self {
CreateSnapshotFromVolumeRecoveryPointError::InternalServerError(ref cause) => cause,
CreateSnapshotFromVolumeRecoveryPointError::InvalidGatewayRequest(ref cause) => cause,
CreateSnapshotFromVolumeRecoveryPointError::ServiceUnavailableError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStorediSCSIVolumeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl CreateStorediSCSIVolumeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStorediSCSIVolumeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CreateStorediSCSIVolumeError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
CreateStorediSCSIVolumeError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateStorediSCSIVolumeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStorediSCSIVolumeError {
fn description(&self) -> &str {
match *self {
CreateStorediSCSIVolumeError::InternalServerError(ref cause) => cause,
CreateStorediSCSIVolumeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTapeWithBarcodeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl CreateTapeWithBarcodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTapeWithBarcodeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CreateTapeWithBarcodeError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(CreateTapeWithBarcodeError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateTapeWithBarcodeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTapeWithBarcodeError {
fn description(&self) -> &str {
match *self {
CreateTapeWithBarcodeError::InternalServerError(ref cause) => cause,
CreateTapeWithBarcodeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTapesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl CreateTapesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTapesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(CreateTapesError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(CreateTapesError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateTapesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTapesError {
fn description(&self) -> &str {
match *self {
CreateTapesError::InternalServerError(ref cause) => cause,
CreateTapesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteBandwidthRateLimitError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DeleteBandwidthRateLimitError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBandwidthRateLimitError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DeleteBandwidthRateLimitError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DeleteBandwidthRateLimitError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteBandwidthRateLimitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteBandwidthRateLimitError {
fn description(&self) -> &str {
match *self {
DeleteBandwidthRateLimitError::InternalServerError(ref cause) => cause,
DeleteBandwidthRateLimitError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteChapCredentialsError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DeleteChapCredentialsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteChapCredentialsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DeleteChapCredentialsError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DeleteChapCredentialsError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteChapCredentialsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteChapCredentialsError {
fn description(&self) -> &str {
match *self {
DeleteChapCredentialsError::InternalServerError(ref cause) => cause,
DeleteChapCredentialsError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteFileShareError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DeleteFileShareError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFileShareError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DeleteFileShareError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DeleteFileShareError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteFileShareError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteFileShareError {
fn description(&self) -> &str {
match *self {
DeleteFileShareError::InternalServerError(ref cause) => cause,
DeleteFileShareError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteGatewayError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DeleteGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGatewayError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DeleteGatewayError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DeleteGatewayError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteGatewayError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteGatewayError {
fn description(&self) -> &str {
match *self {
DeleteGatewayError::InternalServerError(ref cause) => cause,
DeleteGatewayError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSnapshotScheduleError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DeleteSnapshotScheduleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSnapshotScheduleError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DeleteSnapshotScheduleError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DeleteSnapshotScheduleError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteSnapshotScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSnapshotScheduleError {
fn description(&self) -> &str {
match *self {
DeleteSnapshotScheduleError::InternalServerError(ref cause) => cause,
DeleteSnapshotScheduleError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTapeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DeleteTapeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTapeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DeleteTapeError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DeleteTapeError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteTapeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTapeError {
fn description(&self) -> &str {
match *self {
DeleteTapeError::InternalServerError(ref cause) => cause,
DeleteTapeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTapeArchiveError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DeleteTapeArchiveError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTapeArchiveError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DeleteTapeArchiveError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DeleteTapeArchiveError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteTapeArchiveError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTapeArchiveError {
fn description(&self) -> &str {
match *self {
DeleteTapeArchiveError::InternalServerError(ref cause) => cause,
DeleteTapeArchiveError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteVolumeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DeleteVolumeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVolumeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DeleteVolumeError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DeleteVolumeError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteVolumeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteVolumeError {
fn description(&self) -> &str {
match *self {
DeleteVolumeError::InternalServerError(ref cause) => cause,
DeleteVolumeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeBandwidthRateLimitError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeBandwidthRateLimitError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeBandwidthRateLimitError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DescribeBandwidthRateLimitError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeBandwidthRateLimitError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeBandwidthRateLimitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeBandwidthRateLimitError {
fn description(&self) -> &str {
match *self {
DescribeBandwidthRateLimitError::InternalServerError(ref cause) => cause,
DescribeBandwidthRateLimitError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeCacheError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeCacheError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCacheError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeCacheError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DescribeCacheError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeCacheError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeCacheError {
fn description(&self) -> &str {
match *self {
DescribeCacheError::InternalServerError(ref cause) => cause,
DescribeCacheError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeCachediSCSIVolumesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeCachediSCSIVolumesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeCachediSCSIVolumesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DescribeCachediSCSIVolumesError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeCachediSCSIVolumesError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeCachediSCSIVolumesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeCachediSCSIVolumesError {
fn description(&self) -> &str {
match *self {
DescribeCachediSCSIVolumesError::InternalServerError(ref cause) => cause,
DescribeCachediSCSIVolumesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeChapCredentialsError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeChapCredentialsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeChapCredentialsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeChapCredentialsError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeChapCredentialsError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeChapCredentialsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeChapCredentialsError {
fn description(&self) -> &str {
match *self {
DescribeChapCredentialsError::InternalServerError(ref cause) => cause,
DescribeChapCredentialsError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeGatewayInformationError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeGatewayInformationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeGatewayInformationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DescribeGatewayInformationError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeGatewayInformationError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeGatewayInformationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeGatewayInformationError {
fn description(&self) -> &str {
match *self {
DescribeGatewayInformationError::InternalServerError(ref cause) => cause,
DescribeGatewayInformationError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeMaintenanceStartTimeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeMaintenanceStartTimeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeMaintenanceStartTimeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DescribeMaintenanceStartTimeError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeMaintenanceStartTimeError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeMaintenanceStartTimeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeMaintenanceStartTimeError {
fn description(&self) -> &str {
match *self {
DescribeMaintenanceStartTimeError::InternalServerError(ref cause) => cause,
DescribeMaintenanceStartTimeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeNFSFileSharesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeNFSFileSharesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeNFSFileSharesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeNFSFileSharesError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DescribeNFSFileSharesError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeNFSFileSharesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeNFSFileSharesError {
fn description(&self) -> &str {
match *self {
DescribeNFSFileSharesError::InternalServerError(ref cause) => cause,
DescribeNFSFileSharesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSMBFileSharesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeSMBFileSharesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSMBFileSharesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeSMBFileSharesError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DescribeSMBFileSharesError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeSMBFileSharesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSMBFileSharesError {
fn description(&self) -> &str {
match *self {
DescribeSMBFileSharesError::InternalServerError(ref cause) => cause,
DescribeSMBFileSharesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSMBSettingsError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeSMBSettingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSMBSettingsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeSMBSettingsError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DescribeSMBSettingsError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeSMBSettingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSMBSettingsError {
fn description(&self) -> &str {
match *self {
DescribeSMBSettingsError::InternalServerError(ref cause) => cause,
DescribeSMBSettingsError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSnapshotScheduleError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeSnapshotScheduleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSnapshotScheduleError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DescribeSnapshotScheduleError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeSnapshotScheduleError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeSnapshotScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSnapshotScheduleError {
fn description(&self) -> &str {
match *self {
DescribeSnapshotScheduleError::InternalServerError(ref cause) => cause,
DescribeSnapshotScheduleError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStorediSCSIVolumesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeStorediSCSIVolumesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeStorediSCSIVolumesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DescribeStorediSCSIVolumesError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeStorediSCSIVolumesError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeStorediSCSIVolumesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStorediSCSIVolumesError {
fn description(&self) -> &str {
match *self {
DescribeStorediSCSIVolumesError::InternalServerError(ref cause) => cause,
DescribeStorediSCSIVolumesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTapeArchivesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeTapeArchivesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTapeArchivesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeTapeArchivesError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DescribeTapeArchivesError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeTapeArchivesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTapeArchivesError {
fn description(&self) -> &str {
match *self {
DescribeTapeArchivesError::InternalServerError(ref cause) => cause,
DescribeTapeArchivesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTapeRecoveryPointsError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeTapeRecoveryPointsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeTapeRecoveryPointsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
DescribeTapeRecoveryPointsError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeTapeRecoveryPointsError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeTapeRecoveryPointsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTapeRecoveryPointsError {
fn description(&self) -> &str {
match *self {
DescribeTapeRecoveryPointsError::InternalServerError(ref cause) => cause,
DescribeTapeRecoveryPointsError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTapesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeTapesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTapesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeTapesError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DescribeTapesError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeTapesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTapesError {
fn description(&self) -> &str {
match *self {
DescribeTapesError::InternalServerError(ref cause) => cause,
DescribeTapesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeUploadBufferError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeUploadBufferError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUploadBufferError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeUploadBufferError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DescribeUploadBufferError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeUploadBufferError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeUploadBufferError {
fn description(&self) -> &str {
match *self {
DescribeUploadBufferError::InternalServerError(ref cause) => cause,
DescribeUploadBufferError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeVTLDevicesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeVTLDevicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVTLDevicesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeVTLDevicesError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DescribeVTLDevicesError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeVTLDevicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeVTLDevicesError {
fn description(&self) -> &str {
match *self {
DescribeVTLDevicesError::InternalServerError(ref cause) => cause,
DescribeVTLDevicesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeWorkingStorageError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DescribeWorkingStorageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeWorkingStorageError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DescribeWorkingStorageError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
DescribeWorkingStorageError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeWorkingStorageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeWorkingStorageError {
fn description(&self) -> &str {
match *self {
DescribeWorkingStorageError::InternalServerError(ref cause) => cause,
DescribeWorkingStorageError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DetachVolumeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DetachVolumeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DetachVolumeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DetachVolumeError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DetachVolumeError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DetachVolumeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DetachVolumeError {
fn description(&self) -> &str {
match *self {
DetachVolumeError::InternalServerError(ref cause) => cause,
DetachVolumeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableGatewayError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl DisableGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableGatewayError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(DisableGatewayError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(DisableGatewayError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisableGatewayError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableGatewayError {
fn description(&self) -> &str {
match *self {
DisableGatewayError::InternalServerError(ref cause) => cause,
DisableGatewayError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum JoinDomainError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl JoinDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<JoinDomainError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(JoinDomainError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(JoinDomainError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for JoinDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for JoinDomainError {
fn description(&self) -> &str {
match *self {
JoinDomainError::InternalServerError(ref cause) => cause,
JoinDomainError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListFileSharesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ListFileSharesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFileSharesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ListFileSharesError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ListFileSharesError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListFileSharesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListFileSharesError {
fn description(&self) -> &str {
match *self {
ListFileSharesError::InternalServerError(ref cause) => cause,
ListFileSharesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListGatewaysError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ListGatewaysError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGatewaysError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ListGatewaysError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ListGatewaysError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListGatewaysError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListGatewaysError {
fn description(&self) -> &str {
match *self {
ListGatewaysError::InternalServerError(ref cause) => cause,
ListGatewaysError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListLocalDisksError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ListLocalDisksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLocalDisksError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ListLocalDisksError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ListLocalDisksError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListLocalDisksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListLocalDisksError {
fn description(&self) -> &str {
match *self {
ListLocalDisksError::InternalServerError(ref cause) => cause,
ListLocalDisksError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ListTagsForResourceError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidGatewayRequest(
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::InternalServerError(ref cause) => cause,
ListTagsForResourceError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTapesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ListTapesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTapesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ListTapesError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ListTapesError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTapesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTapesError {
fn description(&self) -> &str {
match *self {
ListTapesError::InternalServerError(ref cause) => cause,
ListTapesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListVolumeInitiatorsError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ListVolumeInitiatorsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVolumeInitiatorsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ListVolumeInitiatorsError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ListVolumeInitiatorsError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListVolumeInitiatorsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListVolumeInitiatorsError {
fn description(&self) -> &str {
match *self {
ListVolumeInitiatorsError::InternalServerError(ref cause) => cause,
ListVolumeInitiatorsError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListVolumeRecoveryPointsError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ListVolumeRecoveryPointsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVolumeRecoveryPointsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
ListVolumeRecoveryPointsError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
ListVolumeRecoveryPointsError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListVolumeRecoveryPointsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListVolumeRecoveryPointsError {
fn description(&self) -> &str {
match *self {
ListVolumeRecoveryPointsError::InternalServerError(ref cause) => cause,
ListVolumeRecoveryPointsError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListVolumesError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ListVolumesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVolumesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ListVolumesError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ListVolumesError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListVolumesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListVolumesError {
fn description(&self) -> &str {
match *self {
ListVolumesError::InternalServerError(ref cause) => cause,
ListVolumesError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum NotifyWhenUploadedError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl NotifyWhenUploadedError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<NotifyWhenUploadedError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(NotifyWhenUploadedError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(NotifyWhenUploadedError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for NotifyWhenUploadedError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for NotifyWhenUploadedError {
fn description(&self) -> &str {
match *self {
NotifyWhenUploadedError::InternalServerError(ref cause) => cause,
NotifyWhenUploadedError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RefreshCacheError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl RefreshCacheError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RefreshCacheError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(RefreshCacheError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(RefreshCacheError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RefreshCacheError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RefreshCacheError {
fn description(&self) -> &str {
match *self {
RefreshCacheError::InternalServerError(ref cause) => cause,
RefreshCacheError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveTagsFromResourceError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl RemoveTagsFromResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsFromResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(RemoveTagsFromResourceError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
RemoveTagsFromResourceError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RemoveTagsFromResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveTagsFromResourceError {
fn description(&self) -> &str {
match *self {
RemoveTagsFromResourceError::InternalServerError(ref cause) => cause,
RemoveTagsFromResourceError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetCacheError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ResetCacheError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResetCacheError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ResetCacheError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ResetCacheError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ResetCacheError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetCacheError {
fn description(&self) -> &str {
match *self {
ResetCacheError::InternalServerError(ref cause) => cause,
ResetCacheError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RetrieveTapeArchiveError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl RetrieveTapeArchiveError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RetrieveTapeArchiveError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(RetrieveTapeArchiveError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(RetrieveTapeArchiveError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RetrieveTapeArchiveError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RetrieveTapeArchiveError {
fn description(&self) -> &str {
match *self {
RetrieveTapeArchiveError::InternalServerError(ref cause) => cause,
RetrieveTapeArchiveError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RetrieveTapeRecoveryPointError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl RetrieveTapeRecoveryPointError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RetrieveTapeRecoveryPointError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
RetrieveTapeRecoveryPointError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
RetrieveTapeRecoveryPointError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RetrieveTapeRecoveryPointError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RetrieveTapeRecoveryPointError {
fn description(&self) -> &str {
match *self {
RetrieveTapeRecoveryPointError::InternalServerError(ref cause) => cause,
RetrieveTapeRecoveryPointError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetLocalConsolePasswordError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl SetLocalConsolePasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetLocalConsolePasswordError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(SetLocalConsolePasswordError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
SetLocalConsolePasswordError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetLocalConsolePasswordError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetLocalConsolePasswordError {
fn description(&self) -> &str {
match *self {
SetLocalConsolePasswordError::InternalServerError(ref cause) => cause,
SetLocalConsolePasswordError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SetSMBGuestPasswordError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl SetSMBGuestPasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetSMBGuestPasswordError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(SetSMBGuestPasswordError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(SetSMBGuestPasswordError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SetSMBGuestPasswordError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SetSMBGuestPasswordError {
fn description(&self) -> &str {
match *self {
SetSMBGuestPasswordError::InternalServerError(ref cause) => cause,
SetSMBGuestPasswordError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ShutdownGatewayError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl ShutdownGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ShutdownGatewayError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(ShutdownGatewayError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(ShutdownGatewayError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ShutdownGatewayError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ShutdownGatewayError {
fn description(&self) -> &str {
match *self {
ShutdownGatewayError::InternalServerError(ref cause) => cause,
ShutdownGatewayError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartGatewayError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl StartGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartGatewayError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(StartGatewayError::InternalServerError(err.msg))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(StartGatewayError::InvalidGatewayRequest(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartGatewayError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartGatewayError {
fn description(&self) -> &str {
match *self {
StartGatewayError::InternalServerError(ref cause) => cause,
StartGatewayError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateBandwidthRateLimitError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateBandwidthRateLimitError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateBandwidthRateLimitError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
UpdateBandwidthRateLimitError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
UpdateBandwidthRateLimitError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateBandwidthRateLimitError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateBandwidthRateLimitError {
fn description(&self) -> &str {
match *self {
UpdateBandwidthRateLimitError::InternalServerError(ref cause) => cause,
UpdateBandwidthRateLimitError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateChapCredentialsError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateChapCredentialsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateChapCredentialsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(UpdateChapCredentialsError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(UpdateChapCredentialsError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateChapCredentialsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateChapCredentialsError {
fn description(&self) -> &str {
match *self {
UpdateChapCredentialsError::InternalServerError(ref cause) => cause,
UpdateChapCredentialsError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateGatewayInformationError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateGatewayInformationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGatewayInformationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
UpdateGatewayInformationError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
UpdateGatewayInformationError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateGatewayInformationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateGatewayInformationError {
fn description(&self) -> &str {
match *self {
UpdateGatewayInformationError::InternalServerError(ref cause) => cause,
UpdateGatewayInformationError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateGatewaySoftwareNowError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateGatewaySoftwareNowError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGatewaySoftwareNowError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
UpdateGatewaySoftwareNowError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
UpdateGatewaySoftwareNowError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateGatewaySoftwareNowError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateGatewaySoftwareNowError {
fn description(&self) -> &str {
match *self {
UpdateGatewaySoftwareNowError::InternalServerError(ref cause) => cause,
UpdateGatewaySoftwareNowError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateMaintenanceStartTimeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateMaintenanceStartTimeError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateMaintenanceStartTimeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
UpdateMaintenanceStartTimeError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
UpdateMaintenanceStartTimeError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateMaintenanceStartTimeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateMaintenanceStartTimeError {
fn description(&self) -> &str {
match *self {
UpdateMaintenanceStartTimeError::InternalServerError(ref cause) => cause,
UpdateMaintenanceStartTimeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateNFSFileShareError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateNFSFileShareError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateNFSFileShareError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(UpdateNFSFileShareError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(UpdateNFSFileShareError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateNFSFileShareError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateNFSFileShareError {
fn description(&self) -> &str {
match *self {
UpdateNFSFileShareError::InternalServerError(ref cause) => cause,
UpdateNFSFileShareError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSMBFileShareError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateSMBFileShareError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSMBFileShareError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(UpdateSMBFileShareError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(UpdateSMBFileShareError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateSMBFileShareError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSMBFileShareError {
fn description(&self) -> &str {
match *self {
UpdateSMBFileShareError::InternalServerError(ref cause) => cause,
UpdateSMBFileShareError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSMBSecurityStrategyError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateSMBSecurityStrategyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSMBSecurityStrategyError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(
UpdateSMBSecurityStrategyError::InternalServerError(err.msg),
)
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
UpdateSMBSecurityStrategyError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateSMBSecurityStrategyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSMBSecurityStrategyError {
fn description(&self) -> &str {
match *self {
UpdateSMBSecurityStrategyError::InternalServerError(ref cause) => cause,
UpdateSMBSecurityStrategyError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateSnapshotScheduleError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateSnapshotScheduleError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSnapshotScheduleError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(UpdateSnapshotScheduleError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(
UpdateSnapshotScheduleError::InvalidGatewayRequest(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateSnapshotScheduleError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateSnapshotScheduleError {
fn description(&self) -> &str {
match *self {
UpdateSnapshotScheduleError::InternalServerError(ref cause) => cause,
UpdateSnapshotScheduleError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateVTLDeviceTypeError {
InternalServerError(String),
InvalidGatewayRequest(String),
}
impl UpdateVTLDeviceTypeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVTLDeviceTypeError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalServerError" => {
return RusotoError::Service(UpdateVTLDeviceTypeError::InternalServerError(
err.msg,
))
}
"InvalidGatewayRequestException" => {
return RusotoError::Service(UpdateVTLDeviceTypeError::InvalidGatewayRequest(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateVTLDeviceTypeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateVTLDeviceTypeError {
fn description(&self) -> &str {
match *self {
UpdateVTLDeviceTypeError::InternalServerError(ref cause) => cause,
UpdateVTLDeviceTypeError::InvalidGatewayRequest(ref cause) => cause,
}
}
}
pub trait StorageGateway {
fn activate_gateway(
&self,
input: ActivateGatewayInput,
) -> RusotoFuture<ActivateGatewayOutput, ActivateGatewayError>;
fn add_cache(&self, input: AddCacheInput) -> RusotoFuture<AddCacheOutput, AddCacheError>;
fn add_tags_to_resource(
&self,
input: AddTagsToResourceInput,
) -> RusotoFuture<AddTagsToResourceOutput, AddTagsToResourceError>;
fn add_upload_buffer(
&self,
input: AddUploadBufferInput,
) -> RusotoFuture<AddUploadBufferOutput, AddUploadBufferError>;
fn add_working_storage(
&self,
input: AddWorkingStorageInput,
) -> RusotoFuture<AddWorkingStorageOutput, AddWorkingStorageError>;
fn assign_tape_pool(
&self,
input: AssignTapePoolInput,
) -> RusotoFuture<AssignTapePoolOutput, AssignTapePoolError>;
fn attach_volume(
&self,
input: AttachVolumeInput,
) -> RusotoFuture<AttachVolumeOutput, AttachVolumeError>;
fn cancel_archival(
&self,
input: CancelArchivalInput,
) -> RusotoFuture<CancelArchivalOutput, CancelArchivalError>;
fn cancel_retrieval(
&self,
input: CancelRetrievalInput,
) -> RusotoFuture<CancelRetrievalOutput, CancelRetrievalError>;
fn create_cachedi_scsi_volume(
&self,
input: CreateCachediSCSIVolumeInput,
) -> RusotoFuture<CreateCachediSCSIVolumeOutput, CreateCachediSCSIVolumeError>;
fn create_nfs_file_share(
&self,
input: CreateNFSFileShareInput,
) -> RusotoFuture<CreateNFSFileShareOutput, CreateNFSFileShareError>;
fn create_smb_file_share(
&self,
input: CreateSMBFileShareInput,
) -> RusotoFuture<CreateSMBFileShareOutput, CreateSMBFileShareError>;
fn create_snapshot(
&self,
input: CreateSnapshotInput,
) -> RusotoFuture<CreateSnapshotOutput, CreateSnapshotError>;
fn create_snapshot_from_volume_recovery_point(
&self,
input: CreateSnapshotFromVolumeRecoveryPointInput,
) -> RusotoFuture<
CreateSnapshotFromVolumeRecoveryPointOutput,
CreateSnapshotFromVolumeRecoveryPointError,
>;
fn create_storedi_scsi_volume(
&self,
input: CreateStorediSCSIVolumeInput,
) -> RusotoFuture<CreateStorediSCSIVolumeOutput, CreateStorediSCSIVolumeError>;
fn create_tape_with_barcode(
&self,
input: CreateTapeWithBarcodeInput,
) -> RusotoFuture<CreateTapeWithBarcodeOutput, CreateTapeWithBarcodeError>;
fn create_tapes(
&self,
input: CreateTapesInput,
) -> RusotoFuture<CreateTapesOutput, CreateTapesError>;
fn delete_bandwidth_rate_limit(
&self,
input: DeleteBandwidthRateLimitInput,
) -> RusotoFuture<DeleteBandwidthRateLimitOutput, DeleteBandwidthRateLimitError>;
fn delete_chap_credentials(
&self,
input: DeleteChapCredentialsInput,
) -> RusotoFuture<DeleteChapCredentialsOutput, DeleteChapCredentialsError>;
fn delete_file_share(
&self,
input: DeleteFileShareInput,
) -> RusotoFuture<DeleteFileShareOutput, DeleteFileShareError>;
fn delete_gateway(
&self,
input: DeleteGatewayInput,
) -> RusotoFuture<DeleteGatewayOutput, DeleteGatewayError>;
fn delete_snapshot_schedule(
&self,
input: DeleteSnapshotScheduleInput,
) -> RusotoFuture<DeleteSnapshotScheduleOutput, DeleteSnapshotScheduleError>;
fn delete_tape(
&self,
input: DeleteTapeInput,
) -> RusotoFuture<DeleteTapeOutput, DeleteTapeError>;
fn delete_tape_archive(
&self,
input: DeleteTapeArchiveInput,
) -> RusotoFuture<DeleteTapeArchiveOutput, DeleteTapeArchiveError>;
fn delete_volume(
&self,
input: DeleteVolumeInput,
) -> RusotoFuture<DeleteVolumeOutput, DeleteVolumeError>;
fn describe_bandwidth_rate_limit(
&self,
input: DescribeBandwidthRateLimitInput,
) -> RusotoFuture<DescribeBandwidthRateLimitOutput, DescribeBandwidthRateLimitError>;
fn describe_cache(
&self,
input: DescribeCacheInput,
) -> RusotoFuture<DescribeCacheOutput, DescribeCacheError>;
fn describe_cachedi_scsi_volumes(
&self,
input: DescribeCachediSCSIVolumesInput,
) -> RusotoFuture<DescribeCachediSCSIVolumesOutput, DescribeCachediSCSIVolumesError>;
fn describe_chap_credentials(
&self,
input: DescribeChapCredentialsInput,
) -> RusotoFuture<DescribeChapCredentialsOutput, DescribeChapCredentialsError>;
fn describe_gateway_information(
&self,
input: DescribeGatewayInformationInput,
) -> RusotoFuture<DescribeGatewayInformationOutput, DescribeGatewayInformationError>;
fn describe_maintenance_start_time(
&self,
input: DescribeMaintenanceStartTimeInput,
) -> RusotoFuture<DescribeMaintenanceStartTimeOutput, DescribeMaintenanceStartTimeError>;
fn describe_nfs_file_shares(
&self,
input: DescribeNFSFileSharesInput,
) -> RusotoFuture<DescribeNFSFileSharesOutput, DescribeNFSFileSharesError>;
fn describe_smb_file_shares(
&self,
input: DescribeSMBFileSharesInput,
) -> RusotoFuture<DescribeSMBFileSharesOutput, DescribeSMBFileSharesError>;
fn describe_smb_settings(
&self,
input: DescribeSMBSettingsInput,
) -> RusotoFuture<DescribeSMBSettingsOutput, DescribeSMBSettingsError>;
fn describe_snapshot_schedule(
&self,
input: DescribeSnapshotScheduleInput,
) -> RusotoFuture<DescribeSnapshotScheduleOutput, DescribeSnapshotScheduleError>;
fn describe_storedi_scsi_volumes(
&self,
input: DescribeStorediSCSIVolumesInput,
) -> RusotoFuture<DescribeStorediSCSIVolumesOutput, DescribeStorediSCSIVolumesError>;
fn describe_tape_archives(
&self,
input: DescribeTapeArchivesInput,
) -> RusotoFuture<DescribeTapeArchivesOutput, DescribeTapeArchivesError>;
fn describe_tape_recovery_points(
&self,
input: DescribeTapeRecoveryPointsInput,
) -> RusotoFuture<DescribeTapeRecoveryPointsOutput, DescribeTapeRecoveryPointsError>;
fn describe_tapes(
&self,
input: DescribeTapesInput,
) -> RusotoFuture<DescribeTapesOutput, DescribeTapesError>;
fn describe_upload_buffer(
&self,
input: DescribeUploadBufferInput,
) -> RusotoFuture<DescribeUploadBufferOutput, DescribeUploadBufferError>;
fn describe_vtl_devices(
&self,
input: DescribeVTLDevicesInput,
) -> RusotoFuture<DescribeVTLDevicesOutput, DescribeVTLDevicesError>;
fn describe_working_storage(
&self,
input: DescribeWorkingStorageInput,
) -> RusotoFuture<DescribeWorkingStorageOutput, DescribeWorkingStorageError>;
fn detach_volume(
&self,
input: DetachVolumeInput,
) -> RusotoFuture<DetachVolumeOutput, DetachVolumeError>;
fn disable_gateway(
&self,
input: DisableGatewayInput,
) -> RusotoFuture<DisableGatewayOutput, DisableGatewayError>;
fn join_domain(
&self,
input: JoinDomainInput,
) -> RusotoFuture<JoinDomainOutput, JoinDomainError>;
fn list_file_shares(
&self,
input: ListFileSharesInput,
) -> RusotoFuture<ListFileSharesOutput, ListFileSharesError>;
fn list_gateways(
&self,
input: ListGatewaysInput,
) -> RusotoFuture<ListGatewaysOutput, ListGatewaysError>;
fn list_local_disks(
&self,
input: ListLocalDisksInput,
) -> RusotoFuture<ListLocalDisksOutput, ListLocalDisksError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceInput,
) -> RusotoFuture<ListTagsForResourceOutput, ListTagsForResourceError>;
fn list_tapes(&self, input: ListTapesInput) -> RusotoFuture<ListTapesOutput, ListTapesError>;
fn list_volume_initiators(
&self,
input: ListVolumeInitiatorsInput,
) -> RusotoFuture<ListVolumeInitiatorsOutput, ListVolumeInitiatorsError>;
fn list_volume_recovery_points(
&self,
input: ListVolumeRecoveryPointsInput,
) -> RusotoFuture<ListVolumeRecoveryPointsOutput, ListVolumeRecoveryPointsError>;
fn list_volumes(
&self,
input: ListVolumesInput,
) -> RusotoFuture<ListVolumesOutput, ListVolumesError>;
fn notify_when_uploaded(
&self,
input: NotifyWhenUploadedInput,
) -> RusotoFuture<NotifyWhenUploadedOutput, NotifyWhenUploadedError>;
fn refresh_cache(
&self,
input: RefreshCacheInput,
) -> RusotoFuture<RefreshCacheOutput, RefreshCacheError>;
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceInput,
) -> RusotoFuture<RemoveTagsFromResourceOutput, RemoveTagsFromResourceError>;
fn reset_cache(
&self,
input: ResetCacheInput,
) -> RusotoFuture<ResetCacheOutput, ResetCacheError>;
fn retrieve_tape_archive(
&self,
input: RetrieveTapeArchiveInput,
) -> RusotoFuture<RetrieveTapeArchiveOutput, RetrieveTapeArchiveError>;
fn retrieve_tape_recovery_point(
&self,
input: RetrieveTapeRecoveryPointInput,
) -> RusotoFuture<RetrieveTapeRecoveryPointOutput, RetrieveTapeRecoveryPointError>;
fn set_local_console_password(
&self,
input: SetLocalConsolePasswordInput,
) -> RusotoFuture<SetLocalConsolePasswordOutput, SetLocalConsolePasswordError>;
fn set_smb_guest_password(
&self,
input: SetSMBGuestPasswordInput,
) -> RusotoFuture<SetSMBGuestPasswordOutput, SetSMBGuestPasswordError>;
fn shutdown_gateway(
&self,
input: ShutdownGatewayInput,
) -> RusotoFuture<ShutdownGatewayOutput, ShutdownGatewayError>;
fn start_gateway(
&self,
input: StartGatewayInput,
) -> RusotoFuture<StartGatewayOutput, StartGatewayError>;
fn update_bandwidth_rate_limit(
&self,
input: UpdateBandwidthRateLimitInput,
) -> RusotoFuture<UpdateBandwidthRateLimitOutput, UpdateBandwidthRateLimitError>;
fn update_chap_credentials(
&self,
input: UpdateChapCredentialsInput,
) -> RusotoFuture<UpdateChapCredentialsOutput, UpdateChapCredentialsError>;
fn update_gateway_information(
&self,
input: UpdateGatewayInformationInput,
) -> RusotoFuture<UpdateGatewayInformationOutput, UpdateGatewayInformationError>;
fn update_gateway_software_now(
&self,
input: UpdateGatewaySoftwareNowInput,
) -> RusotoFuture<UpdateGatewaySoftwareNowOutput, UpdateGatewaySoftwareNowError>;
fn update_maintenance_start_time(
&self,
input: UpdateMaintenanceStartTimeInput,
) -> RusotoFuture<UpdateMaintenanceStartTimeOutput, UpdateMaintenanceStartTimeError>;
fn update_nfs_file_share(
&self,
input: UpdateNFSFileShareInput,
) -> RusotoFuture<UpdateNFSFileShareOutput, UpdateNFSFileShareError>;
fn update_smb_file_share(
&self,
input: UpdateSMBFileShareInput,
) -> RusotoFuture<UpdateSMBFileShareOutput, UpdateSMBFileShareError>;
fn update_smb_security_strategy(
&self,
input: UpdateSMBSecurityStrategyInput,
) -> RusotoFuture<UpdateSMBSecurityStrategyOutput, UpdateSMBSecurityStrategyError>;
fn update_snapshot_schedule(
&self,
input: UpdateSnapshotScheduleInput,
) -> RusotoFuture<UpdateSnapshotScheduleOutput, UpdateSnapshotScheduleError>;
fn update_vtl_device_type(
&self,
input: UpdateVTLDeviceTypeInput,
) -> RusotoFuture<UpdateVTLDeviceTypeOutput, UpdateVTLDeviceTypeError>;
}
#[derive(Clone)]
pub struct StorageGatewayClient {
client: Client,
region: region::Region,
}
impl StorageGatewayClient {
pub fn new(region: region::Region) -> StorageGatewayClient {
StorageGatewayClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> StorageGatewayClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
StorageGatewayClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl StorageGateway for StorageGatewayClient {
fn activate_gateway(
&self,
input: ActivateGatewayInput,
) -> RusotoFuture<ActivateGatewayOutput, ActivateGatewayError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.ActivateGateway");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ActivateGatewayOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ActivateGatewayError::from_response(response))),
)
}
})
}
fn add_cache(&self, input: AddCacheInput) -> RusotoFuture<AddCacheOutput, AddCacheError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.AddCache");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<AddCacheOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddCacheError::from_response(response))),
)
}
})
}
fn add_tags_to_resource(
&self,
input: AddTagsToResourceInput,
) -> RusotoFuture<AddTagsToResourceOutput, AddTagsToResourceError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.AddTagsToResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AddTagsToResourceOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddTagsToResourceError::from_response(response))),
)
}
})
}
fn add_upload_buffer(
&self,
input: AddUploadBufferInput,
) -> RusotoFuture<AddUploadBufferOutput, AddUploadBufferError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.AddUploadBuffer");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AddUploadBufferOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddUploadBufferError::from_response(response))),
)
}
})
}
fn add_working_storage(
&self,
input: AddWorkingStorageInput,
) -> RusotoFuture<AddWorkingStorageOutput, AddWorkingStorageError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.AddWorkingStorage");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AddWorkingStorageOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddWorkingStorageError::from_response(response))),
)
}
})
}
fn assign_tape_pool(
&self,
input: AssignTapePoolInput,
) -> RusotoFuture<AssignTapePoolOutput, AssignTapePoolError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.AssignTapePool");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AssignTapePoolOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AssignTapePoolError::from_response(response))),
)
}
})
}
fn attach_volume(
&self,
input: AttachVolumeInput,
) -> RusotoFuture<AttachVolumeOutput, AttachVolumeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.AttachVolume");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AttachVolumeOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AttachVolumeError::from_response(response))),
)
}
})
}
fn cancel_archival(
&self,
input: CancelArchivalInput,
) -> RusotoFuture<CancelArchivalOutput, CancelArchivalError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.CancelArchival");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CancelArchivalOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CancelArchivalError::from_response(response))),
)
}
})
}
fn cancel_retrieval(
&self,
input: CancelRetrievalInput,
) -> RusotoFuture<CancelRetrievalOutput, CancelRetrievalError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.CancelRetrieval");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CancelRetrievalOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CancelRetrievalError::from_response(response))),
)
}
})
}
fn create_cachedi_scsi_volume(
&self,
input: CreateCachediSCSIVolumeInput,
) -> RusotoFuture<CreateCachediSCSIVolumeOutput, CreateCachediSCSIVolumeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.CreateCachediSCSIVolume",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateCachediSCSIVolumeOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateCachediSCSIVolumeError::from_response(response))
}))
}
})
}
fn create_nfs_file_share(
&self,
input: CreateNFSFileShareInput,
) -> RusotoFuture<CreateNFSFileShareOutput, CreateNFSFileShareError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.CreateNFSFileShare");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateNFSFileShareOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateNFSFileShareError::from_response(response))),
)
}
})
}
fn create_smb_file_share(
&self,
input: CreateSMBFileShareInput,
) -> RusotoFuture<CreateSMBFileShareOutput, CreateSMBFileShareError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.CreateSMBFileShare");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSMBFileShareOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateSMBFileShareError::from_response(response))),
)
}
})
}
fn create_snapshot(
&self,
input: CreateSnapshotInput,
) -> RusotoFuture<CreateSnapshotOutput, CreateSnapshotError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.CreateSnapshot");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSnapshotOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateSnapshotError::from_response(response))),
)
}
})
}
fn create_snapshot_from_volume_recovery_point(
&self,
input: CreateSnapshotFromVolumeRecoveryPointInput,
) -> RusotoFuture<
CreateSnapshotFromVolumeRecoveryPointOutput,
CreateSnapshotFromVolumeRecoveryPointError,
> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.CreateSnapshotFromVolumeRecoveryPoint",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateSnapshotFromVolumeRecoveryPointOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateSnapshotFromVolumeRecoveryPointError::from_response(
response,
))
}))
}
})
}
fn create_storedi_scsi_volume(
&self,
input: CreateStorediSCSIVolumeInput,
) -> RusotoFuture<CreateStorediSCSIVolumeOutput, CreateStorediSCSIVolumeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.CreateStorediSCSIVolume",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateStorediSCSIVolumeOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateStorediSCSIVolumeError::from_response(response))
}))
}
})
}
fn create_tape_with_barcode(
&self,
input: CreateTapeWithBarcodeInput,
) -> RusotoFuture<CreateTapeWithBarcodeOutput, CreateTapeWithBarcodeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.CreateTapeWithBarcode",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateTapeWithBarcodeOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateTapeWithBarcodeError::from_response(response))
}),
)
}
})
}
fn create_tapes(
&self,
input: CreateTapesInput,
) -> RusotoFuture<CreateTapesOutput, CreateTapesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.CreateTapes");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateTapesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateTapesError::from_response(response))),
)
}
})
}
fn delete_bandwidth_rate_limit(
&self,
input: DeleteBandwidthRateLimitInput,
) -> RusotoFuture<DeleteBandwidthRateLimitOutput, DeleteBandwidthRateLimitError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DeleteBandwidthRateLimit",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteBandwidthRateLimitOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteBandwidthRateLimitError::from_response(response))
}))
}
})
}
fn delete_chap_credentials(
&self,
input: DeleteChapCredentialsInput,
) -> RusotoFuture<DeleteChapCredentialsOutput, DeleteChapCredentialsError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DeleteChapCredentials",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteChapCredentialsOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteChapCredentialsError::from_response(response))
}),
)
}
})
}
fn delete_file_share(
&self,
input: DeleteFileShareInput,
) -> RusotoFuture<DeleteFileShareOutput, DeleteFileShareError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DeleteFileShare");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteFileShareOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteFileShareError::from_response(response))),
)
}
})
}
fn delete_gateway(
&self,
input: DeleteGatewayInput,
) -> RusotoFuture<DeleteGatewayOutput, DeleteGatewayError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DeleteGateway");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteGatewayOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteGatewayError::from_response(response))),
)
}
})
}
fn delete_snapshot_schedule(
&self,
input: DeleteSnapshotScheduleInput,
) -> RusotoFuture<DeleteSnapshotScheduleOutput, DeleteSnapshotScheduleError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DeleteSnapshotSchedule",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteSnapshotScheduleOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteSnapshotScheduleError::from_response(response))
}),
)
}
})
}
fn delete_tape(
&self,
input: DeleteTapeInput,
) -> RusotoFuture<DeleteTapeOutput, DeleteTapeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DeleteTape");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteTapeOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteTapeError::from_response(response))),
)
}
})
}
fn delete_tape_archive(
&self,
input: DeleteTapeArchiveInput,
) -> RusotoFuture<DeleteTapeArchiveOutput, DeleteTapeArchiveError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DeleteTapeArchive");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteTapeArchiveOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteTapeArchiveError::from_response(response))),
)
}
})
}
fn delete_volume(
&self,
input: DeleteVolumeInput,
) -> RusotoFuture<DeleteVolumeOutput, DeleteVolumeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DeleteVolume");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteVolumeOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteVolumeError::from_response(response))),
)
}
})
}
fn describe_bandwidth_rate_limit(
&self,
input: DescribeBandwidthRateLimitInput,
) -> RusotoFuture<DescribeBandwidthRateLimitOutput, DescribeBandwidthRateLimitError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeBandwidthRateLimit",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeBandwidthRateLimitOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeBandwidthRateLimitError::from_response(response))
}))
}
})
}
fn describe_cache(
&self,
input: DescribeCacheInput,
) -> RusotoFuture<DescribeCacheOutput, DescribeCacheError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DescribeCache");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeCacheOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeCacheError::from_response(response))),
)
}
})
}
fn describe_cachedi_scsi_volumes(
&self,
input: DescribeCachediSCSIVolumesInput,
) -> RusotoFuture<DescribeCachediSCSIVolumesOutput, DescribeCachediSCSIVolumesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeCachediSCSIVolumes",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeCachediSCSIVolumesOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeCachediSCSIVolumesError::from_response(response))
}))
}
})
}
fn describe_chap_credentials(
&self,
input: DescribeChapCredentialsInput,
) -> RusotoFuture<DescribeChapCredentialsOutput, DescribeChapCredentialsError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeChapCredentials",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeChapCredentialsOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeChapCredentialsError::from_response(response))
}))
}
})
}
fn describe_gateway_information(
&self,
input: DescribeGatewayInformationInput,
) -> RusotoFuture<DescribeGatewayInformationOutput, DescribeGatewayInformationError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeGatewayInformation",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeGatewayInformationOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeGatewayInformationError::from_response(response))
}))
}
})
}
fn describe_maintenance_start_time(
&self,
input: DescribeMaintenanceStartTimeInput,
) -> RusotoFuture<DescribeMaintenanceStartTimeOutput, DescribeMaintenanceStartTimeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeMaintenanceStartTime",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeMaintenanceStartTimeOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeMaintenanceStartTimeError::from_response(response))
}))
}
})
}
fn describe_nfs_file_shares(
&self,
input: DescribeNFSFileSharesInput,
) -> RusotoFuture<DescribeNFSFileSharesOutput, DescribeNFSFileSharesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeNFSFileShares",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeNFSFileSharesOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeNFSFileSharesError::from_response(response))
}),
)
}
})
}
fn describe_smb_file_shares(
&self,
input: DescribeSMBFileSharesInput,
) -> RusotoFuture<DescribeSMBFileSharesOutput, DescribeSMBFileSharesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeSMBFileShares",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeSMBFileSharesOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeSMBFileSharesError::from_response(response))
}),
)
}
})
}
fn describe_smb_settings(
&self,
input: DescribeSMBSettingsInput,
) -> RusotoFuture<DescribeSMBSettingsOutput, DescribeSMBSettingsError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeSMBSettings",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeSMBSettingsOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeSMBSettingsError::from_response(response))
}),
)
}
})
}
fn describe_snapshot_schedule(
&self,
input: DescribeSnapshotScheduleInput,
) -> RusotoFuture<DescribeSnapshotScheduleOutput, DescribeSnapshotScheduleError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeSnapshotSchedule",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeSnapshotScheduleOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeSnapshotScheduleError::from_response(response))
}))
}
})
}
fn describe_storedi_scsi_volumes(
&self,
input: DescribeStorediSCSIVolumesInput,
) -> RusotoFuture<DescribeStorediSCSIVolumesOutput, DescribeStorediSCSIVolumesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeStorediSCSIVolumes",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeStorediSCSIVolumesOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeStorediSCSIVolumesError::from_response(response))
}))
}
})
}
fn describe_tape_archives(
&self,
input: DescribeTapeArchivesInput,
) -> RusotoFuture<DescribeTapeArchivesOutput, DescribeTapeArchivesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeTapeArchives",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeTapeArchivesOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeTapeArchivesError::from_response(response))
}),
)
}
})
}
fn describe_tape_recovery_points(
&self,
input: DescribeTapeRecoveryPointsInput,
) -> RusotoFuture<DescribeTapeRecoveryPointsOutput, DescribeTapeRecoveryPointsError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeTapeRecoveryPoints",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeTapeRecoveryPointsOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeTapeRecoveryPointsError::from_response(response))
}))
}
})
}
fn describe_tapes(
&self,
input: DescribeTapesInput,
) -> RusotoFuture<DescribeTapesOutput, DescribeTapesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DescribeTapes");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeTapesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeTapesError::from_response(response))),
)
}
})
}
fn describe_upload_buffer(
&self,
input: DescribeUploadBufferInput,
) -> RusotoFuture<DescribeUploadBufferOutput, DescribeUploadBufferError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeUploadBuffer",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeUploadBufferOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeUploadBufferError::from_response(response))
}),
)
}
})
}
fn describe_vtl_devices(
&self,
input: DescribeVTLDevicesInput,
) -> RusotoFuture<DescribeVTLDevicesOutput, DescribeVTLDevicesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DescribeVTLDevices");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeVTLDevicesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeVTLDevicesError::from_response(response))),
)
}
})
}
fn describe_working_storage(
&self,
input: DescribeWorkingStorageInput,
) -> RusotoFuture<DescribeWorkingStorageOutput, DescribeWorkingStorageError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.DescribeWorkingStorage",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeWorkingStorageOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeWorkingStorageError::from_response(response))
}),
)
}
})
}
fn detach_volume(
&self,
input: DetachVolumeInput,
) -> RusotoFuture<DetachVolumeOutput, DetachVolumeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DetachVolume");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DetachVolumeOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DetachVolumeError::from_response(response))),
)
}
})
}
fn disable_gateway(
&self,
input: DisableGatewayInput,
) -> RusotoFuture<DisableGatewayOutput, DisableGatewayError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.DisableGateway");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DisableGatewayOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DisableGatewayError::from_response(response))),
)
}
})
}
fn join_domain(
&self,
input: JoinDomainInput,
) -> RusotoFuture<JoinDomainOutput, JoinDomainError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.JoinDomain");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<JoinDomainOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(JoinDomainError::from_response(response))),
)
}
})
}
fn list_file_shares(
&self,
input: ListFileSharesInput,
) -> RusotoFuture<ListFileSharesOutput, ListFileSharesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.ListFileShares");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListFileSharesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListFileSharesError::from_response(response))),
)
}
})
}
fn list_gateways(
&self,
input: ListGatewaysInput,
) -> RusotoFuture<ListGatewaysOutput, ListGatewaysError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.ListGateways");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListGatewaysOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListGatewaysError::from_response(response))),
)
}
})
}
fn list_local_disks(
&self,
input: ListLocalDisksInput,
) -> RusotoFuture<ListLocalDisksOutput, ListLocalDisksError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.ListLocalDisks");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListLocalDisksOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListLocalDisksError::from_response(response))),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceInput,
) -> RusotoFuture<ListTagsForResourceOutput, ListTagsForResourceError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.ListTagsForResource",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn list_tapes(&self, input: ListTapesInput) -> RusotoFuture<ListTapesOutput, ListTapesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.ListTapes");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<ListTapesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListTapesError::from_response(response))),
)
}
})
}
fn list_volume_initiators(
&self,
input: ListVolumeInitiatorsInput,
) -> RusotoFuture<ListVolumeInitiatorsOutput, ListVolumeInitiatorsError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.ListVolumeInitiators",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListVolumeInitiatorsOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListVolumeInitiatorsError::from_response(response))
}),
)
}
})
}
fn list_volume_recovery_points(
&self,
input: ListVolumeRecoveryPointsInput,
) -> RusotoFuture<ListVolumeRecoveryPointsOutput, ListVolumeRecoveryPointsError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.ListVolumeRecoveryPoints",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListVolumeRecoveryPointsOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListVolumeRecoveryPointsError::from_response(response))
}))
}
})
}
fn list_volumes(
&self,
input: ListVolumesInput,
) -> RusotoFuture<ListVolumesOutput, ListVolumesError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.ListVolumes");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListVolumesOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListVolumesError::from_response(response))),
)
}
})
}
fn notify_when_uploaded(
&self,
input: NotifyWhenUploadedInput,
) -> RusotoFuture<NotifyWhenUploadedOutput, NotifyWhenUploadedError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.NotifyWhenUploaded");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<NotifyWhenUploadedOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(NotifyWhenUploadedError::from_response(response))),
)
}
})
}
fn refresh_cache(
&self,
input: RefreshCacheInput,
) -> RusotoFuture<RefreshCacheOutput, RefreshCacheError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.RefreshCache");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<RefreshCacheOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RefreshCacheError::from_response(response))),
)
}
})
}
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceInput,
) -> RusotoFuture<RemoveTagsFromResourceOutput, RemoveTagsFromResourceError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.RemoveTagsFromResource",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<RemoveTagsFromResourceOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RemoveTagsFromResourceError::from_response(response))
}),
)
}
})
}
fn reset_cache(
&self,
input: ResetCacheInput,
) -> RusotoFuture<ResetCacheOutput, ResetCacheError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.ResetCache");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ResetCacheOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ResetCacheError::from_response(response))),
)
}
})
}
fn retrieve_tape_archive(
&self,
input: RetrieveTapeArchiveInput,
) -> RusotoFuture<RetrieveTapeArchiveOutput, RetrieveTapeArchiveError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.RetrieveTapeArchive",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<RetrieveTapeArchiveOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RetrieveTapeArchiveError::from_response(response))
}),
)
}
})
}
fn retrieve_tape_recovery_point(
&self,
input: RetrieveTapeRecoveryPointInput,
) -> RusotoFuture<RetrieveTapeRecoveryPointOutput, RetrieveTapeRecoveryPointError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.RetrieveTapeRecoveryPoint",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<RetrieveTapeRecoveryPointOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(RetrieveTapeRecoveryPointError::from_response(response))
}))
}
})
}
fn set_local_console_password(
&self,
input: SetLocalConsolePasswordInput,
) -> RusotoFuture<SetLocalConsolePasswordOutput, SetLocalConsolePasswordError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.SetLocalConsolePassword",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<SetLocalConsolePasswordOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(SetLocalConsolePasswordError::from_response(response))
}))
}
})
}
fn set_smb_guest_password(
&self,
input: SetSMBGuestPasswordInput,
) -> RusotoFuture<SetSMBGuestPasswordOutput, SetSMBGuestPasswordError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.SetSMBGuestPassword",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<SetSMBGuestPasswordOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(SetSMBGuestPasswordError::from_response(response))
}),
)
}
})
}
fn shutdown_gateway(
&self,
input: ShutdownGatewayInput,
) -> RusotoFuture<ShutdownGatewayOutput, ShutdownGatewayError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.ShutdownGateway");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ShutdownGatewayOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ShutdownGatewayError::from_response(response))),
)
}
})
}
fn start_gateway(
&self,
input: StartGatewayInput,
) -> RusotoFuture<StartGatewayOutput, StartGatewayError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.StartGateway");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<StartGatewayOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartGatewayError::from_response(response))),
)
}
})
}
fn update_bandwidth_rate_limit(
&self,
input: UpdateBandwidthRateLimitInput,
) -> RusotoFuture<UpdateBandwidthRateLimitOutput, UpdateBandwidthRateLimitError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.UpdateBandwidthRateLimit",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateBandwidthRateLimitOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateBandwidthRateLimitError::from_response(response))
}))
}
})
}
fn update_chap_credentials(
&self,
input: UpdateChapCredentialsInput,
) -> RusotoFuture<UpdateChapCredentialsOutput, UpdateChapCredentialsError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.UpdateChapCredentials",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateChapCredentialsOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateChapCredentialsError::from_response(response))
}),
)
}
})
}
fn update_gateway_information(
&self,
input: UpdateGatewayInformationInput,
) -> RusotoFuture<UpdateGatewayInformationOutput, UpdateGatewayInformationError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.UpdateGatewayInformation",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateGatewayInformationOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateGatewayInformationError::from_response(response))
}))
}
})
}
fn update_gateway_software_now(
&self,
input: UpdateGatewaySoftwareNowInput,
) -> RusotoFuture<UpdateGatewaySoftwareNowOutput, UpdateGatewaySoftwareNowError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.UpdateGatewaySoftwareNow",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateGatewaySoftwareNowOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateGatewaySoftwareNowError::from_response(response))
}))
}
})
}
fn update_maintenance_start_time(
&self,
input: UpdateMaintenanceStartTimeInput,
) -> RusotoFuture<UpdateMaintenanceStartTimeOutput, UpdateMaintenanceStartTimeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.UpdateMaintenanceStartTime",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateMaintenanceStartTimeOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateMaintenanceStartTimeError::from_response(response))
}))
}
})
}
fn update_nfs_file_share(
&self,
input: UpdateNFSFileShareInput,
) -> RusotoFuture<UpdateNFSFileShareOutput, UpdateNFSFileShareError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.UpdateNFSFileShare");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateNFSFileShareOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateNFSFileShareError::from_response(response))),
)
}
})
}
fn update_smb_file_share(
&self,
input: UpdateSMBFileShareInput,
) -> RusotoFuture<UpdateSMBFileShareOutput, UpdateSMBFileShareError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "StorageGateway_20130630.UpdateSMBFileShare");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateSMBFileShareOutput, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateSMBFileShareError::from_response(response))),
)
}
})
}
fn update_smb_security_strategy(
&self,
input: UpdateSMBSecurityStrategyInput,
) -> RusotoFuture<UpdateSMBSecurityStrategyOutput, UpdateSMBSecurityStrategyError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.UpdateSMBSecurityStrategy",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateSMBSecurityStrategyOutput, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateSMBSecurityStrategyError::from_response(response))
}))
}
})
}
fn update_snapshot_schedule(
&self,
input: UpdateSnapshotScheduleInput,
) -> RusotoFuture<UpdateSnapshotScheduleOutput, UpdateSnapshotScheduleError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.UpdateSnapshotSchedule",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateSnapshotScheduleOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateSnapshotScheduleError::from_response(response))
}),
)
}
})
}
fn update_vtl_device_type(
&self,
input: UpdateVTLDeviceTypeInput,
) -> RusotoFuture<UpdateVTLDeviceTypeOutput, UpdateVTLDeviceTypeError> {
let mut request = SignedRequest::new("POST", "storagegateway", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"StorageGateway_20130630.UpdateVTLDeviceType",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateVTLDeviceTypeOutput, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateVTLDeviceTypeError::from_response(response))
}),
)
}
})
}
}