use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct AddAttributesActivity {
#[serde(rename = "attributes")]
pub attributes: ::std::collections::HashMap<String, String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchPutMessageErrorEntry {
#[serde(rename = "errorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "errorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "messageId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchPutMessageRequest {
#[serde(rename = "channelName")]
pub channel_name: String,
#[serde(rename = "messages")]
pub messages: Vec<Message>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchPutMessageResponse {
#[serde(rename = "batchPutMessageErrorEntries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub batch_put_message_error_entries: Option<Vec<BatchPutMessageErrorEntry>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelPipelineReprocessingRequest {
#[serde(rename = "pipelineName")]
pub pipeline_name: String,
#[serde(rename = "reprocessingId")]
pub reprocessing_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CancelPipelineReprocessingResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Channel {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "lastUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_time: Option<f64>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "storage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub storage: Option<ChannelStorage>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ChannelActivity {
#[serde(rename = "channelName")]
pub channel_name: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ChannelStatistics {
#[serde(rename = "size")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<EstimatedResourceSize>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ChannelStorage {
#[serde(rename = "customerManagedS3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_managed_s3: Option<CustomerManagedChannelS3Storage>,
#[serde(rename = "serviceManagedS3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_managed_s3: Option<ServiceManagedChannelS3Storage>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ChannelStorageSummary {
#[serde(rename = "customerManagedS3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_managed_s3: Option<CustomerManagedChannelS3StorageSummary>,
#[serde(rename = "serviceManagedS3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_managed_s3: Option<ServiceManagedChannelS3StorageSummary>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ChannelSummary {
#[serde(rename = "channelName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_name: Option<String>,
#[serde(rename = "channelStorage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_storage: Option<ChannelStorageSummary>,
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "lastUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_time: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ContainerDatasetAction {
#[serde(rename = "executionRoleArn")]
pub execution_role_arn: String,
#[serde(rename = "image")]
pub image: String,
#[serde(rename = "resourceConfiguration")]
pub resource_configuration: ResourceConfiguration,
#[serde(rename = "variables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub variables: Option<Vec<Variable>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateChannelRequest {
#[serde(rename = "channelName")]
pub channel_name: String,
#[serde(rename = "channelStorage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_storage: Option<ChannelStorage>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
#[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 CreateChannelResponse {
#[serde(rename = "channelArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_arn: Option<String>,
#[serde(rename = "channelName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_name: Option<String>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDatasetContentRequest {
#[serde(rename = "datasetName")]
pub dataset_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDatasetContentResponse {
#[serde(rename = "versionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDatasetRequest {
#[serde(rename = "actions")]
pub actions: Vec<DatasetAction>,
#[serde(rename = "contentDeliveryRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_delivery_rules: Option<Vec<DatasetContentDeliveryRule>>,
#[serde(rename = "datasetName")]
pub dataset_name: String,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "triggers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub triggers: Option<Vec<DatasetTrigger>>,
#[serde(rename = "versioningConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versioning_configuration: Option<VersioningConfiguration>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDatasetResponse {
#[serde(rename = "datasetArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dataset_arn: Option<String>,
#[serde(rename = "datasetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dataset_name: Option<String>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDatastoreRequest {
#[serde(rename = "datastoreName")]
pub datastore_name: String,
#[serde(rename = "datastoreStorage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore_storage: Option<DatastoreStorage>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
#[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 CreateDatastoreResponse {
#[serde(rename = "datastoreArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore_arn: Option<String>,
#[serde(rename = "datastoreName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore_name: Option<String>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreatePipelineRequest {
#[serde(rename = "pipelineActivities")]
pub pipeline_activities: Vec<PipelineActivity>,
#[serde(rename = "pipelineName")]
pub pipeline_name: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreatePipelineResponse {
#[serde(rename = "pipelineArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipeline_arn: Option<String>,
#[serde(rename = "pipelineName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipeline_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CustomerManagedChannelS3Storage {
#[serde(rename = "bucket")]
pub bucket: String,
#[serde(rename = "keyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_prefix: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CustomerManagedChannelS3StorageSummary {
#[serde(rename = "bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(rename = "keyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_prefix: Option<String>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CustomerManagedDatastoreS3Storage {
#[serde(rename = "bucket")]
pub bucket: String,
#[serde(rename = "keyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_prefix: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CustomerManagedDatastoreS3StorageSummary {
#[serde(rename = "bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(rename = "keyPrefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_prefix: Option<String>,
#[serde(rename = "roleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Dataset {
#[serde(rename = "actions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub actions: Option<Vec<DatasetAction>>,
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "contentDeliveryRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_delivery_rules: Option<Vec<DatasetContentDeliveryRule>>,
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "lastUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_time: Option<f64>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "triggers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub triggers: Option<Vec<DatasetTrigger>>,
#[serde(rename = "versioningConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versioning_configuration: Option<VersioningConfiguration>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DatasetAction {
#[serde(rename = "actionName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub action_name: Option<String>,
#[serde(rename = "containerAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub container_action: Option<ContainerDatasetAction>,
#[serde(rename = "queryAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub query_action: Option<SqlQueryDatasetAction>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DatasetActionSummary {
#[serde(rename = "actionName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub action_name: Option<String>,
#[serde(rename = "actionType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub action_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DatasetContentDeliveryDestination {
#[serde(rename = "iotEventsDestinationConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iot_events_destination_configuration: Option<IotEventsDestinationConfiguration>,
#[serde(rename = "s3DestinationConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_destination_configuration: Option<S3DestinationConfiguration>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DatasetContentDeliveryRule {
#[serde(rename = "destination")]
pub destination: DatasetContentDeliveryDestination,
#[serde(rename = "entryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entry_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DatasetContentStatus {
#[serde(rename = "reason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
#[serde(rename = "state")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DatasetContentSummary {
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "scheduleTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule_time: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<DatasetContentStatus>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DatasetContentVersionValue {
#[serde(rename = "datasetName")]
pub dataset_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DatasetEntry {
#[serde(rename = "dataURI")]
#[serde(skip_serializing_if = "Option::is_none")]
pub data_uri: Option<String>,
#[serde(rename = "entryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entry_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DatasetSummary {
#[serde(rename = "actions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub actions: Option<Vec<DatasetActionSummary>>,
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "datasetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dataset_name: Option<String>,
#[serde(rename = "lastUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_time: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "triggers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub triggers: Option<Vec<DatasetTrigger>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DatasetTrigger {
#[serde(rename = "dataset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dataset: Option<TriggeringDataset>,
#[serde(rename = "schedule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule: Option<Schedule>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Datastore {
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "lastUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_time: Option<f64>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "storage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub storage: Option<DatastoreStorage>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DatastoreActivity {
#[serde(rename = "datastoreName")]
pub datastore_name: String,
#[serde(rename = "name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DatastoreStatistics {
#[serde(rename = "size")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<EstimatedResourceSize>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DatastoreStorage {
#[serde(rename = "customerManagedS3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_managed_s3: Option<CustomerManagedDatastoreS3Storage>,
#[serde(rename = "serviceManagedS3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_managed_s3: Option<ServiceManagedDatastoreS3Storage>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DatastoreStorageSummary {
#[serde(rename = "customerManagedS3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_managed_s3: Option<CustomerManagedDatastoreS3StorageSummary>,
#[serde(rename = "serviceManagedS3")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_managed_s3: Option<ServiceManagedDatastoreS3StorageSummary>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DatastoreSummary {
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "datastoreName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore_name: Option<String>,
#[serde(rename = "datastoreStorage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore_storage: Option<DatastoreStorageSummary>,
#[serde(rename = "lastUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_time: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteChannelRequest {
#[serde(rename = "channelName")]
pub channel_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDatasetContentRequest {
#[serde(rename = "datasetName")]
pub dataset_name: String,
#[serde(rename = "versionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDatasetRequest {
#[serde(rename = "datasetName")]
pub dataset_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDatastoreRequest {
#[serde(rename = "datastoreName")]
pub datastore_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeletePipelineRequest {
#[serde(rename = "pipelineName")]
pub pipeline_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeltaTime {
#[serde(rename = "offsetSeconds")]
pub offset_seconds: i64,
#[serde(rename = "timeExpression")]
pub time_expression: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeChannelRequest {
#[serde(rename = "channelName")]
pub channel_name: String,
#[serde(rename = "includeStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub include_statistics: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeChannelResponse {
#[serde(rename = "channel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel: Option<Channel>,
#[serde(rename = "statistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub statistics: Option<ChannelStatistics>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDatasetRequest {
#[serde(rename = "datasetName")]
pub dataset_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDatasetResponse {
#[serde(rename = "dataset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dataset: Option<Dataset>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDatastoreRequest {
#[serde(rename = "datastoreName")]
pub datastore_name: String,
#[serde(rename = "includeStatistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub include_statistics: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDatastoreResponse {
#[serde(rename = "datastore")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore: Option<Datastore>,
#[serde(rename = "statistics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub statistics: Option<DatastoreStatistics>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeLoggingOptionsRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeLoggingOptionsResponse {
#[serde(rename = "loggingOptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_options: Option<LoggingOptions>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribePipelineRequest {
#[serde(rename = "pipelineName")]
pub pipeline_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribePipelineResponse {
#[serde(rename = "pipeline")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipeline: Option<Pipeline>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceRegistryEnrichActivity {
#[serde(rename = "attribute")]
pub attribute: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DeviceShadowEnrichActivity {
#[serde(rename = "attribute")]
pub attribute: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
#[serde(rename = "roleArn")]
pub role_arn: String,
#[serde(rename = "thingName")]
pub thing_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EstimatedResourceSize {
#[serde(rename = "estimatedOn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_on: Option<f64>,
#[serde(rename = "estimatedSizeInBytes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub estimated_size_in_bytes: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct FilterActivity {
#[serde(rename = "filter")]
pub filter: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDatasetContentRequest {
#[serde(rename = "datasetName")]
pub dataset_name: String,
#[serde(rename = "versionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDatasetContentResponse {
#[serde(rename = "entries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub entries: Option<Vec<DatasetEntry>>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<DatasetContentStatus>,
#[serde(rename = "timestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timestamp: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct GlueConfiguration {
#[serde(rename = "databaseName")]
pub database_name: String,
#[serde(rename = "tableName")]
pub table_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct IotEventsDestinationConfiguration {
#[serde(rename = "inputName")]
pub input_name: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LambdaActivity {
#[serde(rename = "batchSize")]
pub batch_size: i64,
#[serde(rename = "lambdaName")]
pub lambda_name: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListChannelsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListChannelsResponse {
#[serde(rename = "channelSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_summaries: Option<Vec<ChannelSummary>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDatasetContentsRequest {
#[serde(rename = "datasetName")]
pub dataset_name: String,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "scheduledBefore")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_before: Option<f64>,
#[serde(rename = "scheduledOnOrAfter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_on_or_after: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDatasetContentsResponse {
#[serde(rename = "datasetContentSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dataset_content_summaries: Option<Vec<DatasetContentSummary>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDatasetsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDatasetsResponse {
#[serde(rename = "datasetSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dataset_summaries: Option<Vec<DatasetSummary>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDatastoresRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListDatastoresResponse {
#[serde(rename = "datastoreSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore_summaries: Option<Vec<DatastoreSummary>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListPipelinesRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListPipelinesResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "pipelineSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipeline_summaries: Option<Vec<PipelineSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct LoggingOptions {
#[serde(rename = "enabled")]
pub enabled: bool,
#[serde(rename = "level")]
pub level: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct MathActivity {
#[serde(rename = "attribute")]
pub attribute: String,
#[serde(rename = "math")]
pub math: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct Message {
#[serde(rename = "messageId")]
pub message_id: String,
#[serde(rename = "payload")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
pub payload: bytes::Bytes,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct OutputFileUriValue {
#[serde(rename = "fileName")]
pub file_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Pipeline {
#[serde(rename = "activities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub activities: Option<Vec<PipelineActivity>>,
#[serde(rename = "arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "lastUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_time: Option<f64>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "reprocessingSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reprocessing_summaries: Option<Vec<ReprocessingSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PipelineActivity {
#[serde(rename = "addAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub add_attributes: Option<AddAttributesActivity>,
#[serde(rename = "channel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel: Option<ChannelActivity>,
#[serde(rename = "datastore")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore: Option<DatastoreActivity>,
#[serde(rename = "deviceRegistryEnrich")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_registry_enrich: Option<DeviceRegistryEnrichActivity>,
#[serde(rename = "deviceShadowEnrich")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_shadow_enrich: Option<DeviceShadowEnrichActivity>,
#[serde(rename = "filter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filter: Option<FilterActivity>,
#[serde(rename = "lambda")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lambda: Option<LambdaActivity>,
#[serde(rename = "math")]
#[serde(skip_serializing_if = "Option::is_none")]
pub math: Option<MathActivity>,
#[serde(rename = "removeAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remove_attributes: Option<RemoveAttributesActivity>,
#[serde(rename = "selectAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub select_attributes: Option<SelectAttributesActivity>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PipelineSummary {
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "lastUpdateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_update_time: Option<f64>,
#[serde(rename = "pipelineName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pipeline_name: Option<String>,
#[serde(rename = "reprocessingSummaries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reprocessing_summaries: Option<Vec<ReprocessingSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutLoggingOptionsRequest {
#[serde(rename = "loggingOptions")]
pub logging_options: LoggingOptions,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct QueryFilter {
#[serde(rename = "deltaTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delta_time: Option<DeltaTime>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RemoveAttributesActivity {
#[serde(rename = "attributes")]
pub attributes: Vec<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ReprocessingSummary {
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ResourceConfiguration {
#[serde(rename = "computeType")]
pub compute_type: String,
#[serde(rename = "volumeSizeInGB")]
pub volume_size_in_gb: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RetentionPeriod {
#[serde(rename = "numberOfDays")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_days: Option<i64>,
#[serde(rename = "unlimited")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unlimited: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RunPipelineActivityRequest {
#[serde(rename = "payloads")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlobList::deserialize_blob_list",
serialize_with = "::rusoto_core::serialization::SerdeBlobList::serialize_blob_list",
default
)]
pub payloads: Vec<bytes::Bytes>,
#[serde(rename = "pipelineActivity")]
pub pipeline_activity: PipelineActivity,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RunPipelineActivityResponse {
#[serde(rename = "logResult")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_result: Option<String>,
#[serde(rename = "payloads")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlobList::deserialize_blob_list",
serialize_with = "::rusoto_core::serialization::SerdeBlobList::serialize_blob_list",
default
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub payloads: Option<Vec<bytes::Bytes>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3DestinationConfiguration {
#[serde(rename = "bucket")]
pub bucket: String,
#[serde(rename = "glueConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub glue_configuration: Option<GlueConfiguration>,
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "roleArn")]
pub role_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SampleChannelDataRequest {
#[serde(rename = "channelName")]
pub channel_name: String,
#[serde(rename = "endTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "maxMessages")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_messages: Option<i64>,
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SampleChannelDataResponse {
#[serde(rename = "payloads")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlobList::deserialize_blob_list",
serialize_with = "::rusoto_core::serialization::SerdeBlobList::serialize_blob_list",
default
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub payloads: Option<Vec<bytes::Bytes>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Schedule {
#[serde(rename = "expression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expression: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SelectAttributesActivity {
#[serde(rename = "attributes")]
pub attributes: Vec<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "next")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServiceManagedChannelS3Storage {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ServiceManagedChannelS3StorageSummary {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServiceManagedDatastoreS3Storage {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ServiceManagedDatastoreS3StorageSummary {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SqlQueryDatasetAction {
#[serde(rename = "filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<QueryFilter>>,
#[serde(rename = "sqlQuery")]
pub sql_query: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartPipelineReprocessingRequest {
#[serde(rename = "endTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "pipelineName")]
pub pipeline_name: String,
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartPipelineReprocessingResponse {
#[serde(rename = "reprocessingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reprocessing_id: Option<String>,
}
#[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, Serialize)]
pub struct TagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct TriggeringDataset {
#[serde(rename = "name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UntagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UntagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateChannelRequest {
#[serde(rename = "channelName")]
pub channel_name: String,
#[serde(rename = "channelStorage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_storage: Option<ChannelStorage>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDatasetRequest {
#[serde(rename = "actions")]
pub actions: Vec<DatasetAction>,
#[serde(rename = "contentDeliveryRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_delivery_rules: Option<Vec<DatasetContentDeliveryRule>>,
#[serde(rename = "datasetName")]
pub dataset_name: String,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
#[serde(rename = "triggers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub triggers: Option<Vec<DatasetTrigger>>,
#[serde(rename = "versioningConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub versioning_configuration: Option<VersioningConfiguration>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDatastoreRequest {
#[serde(rename = "datastoreName")]
pub datastore_name: String,
#[serde(rename = "datastoreStorage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub datastore_storage: Option<DatastoreStorage>,
#[serde(rename = "retentionPeriod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retention_period: Option<RetentionPeriod>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdatePipelineRequest {
#[serde(rename = "pipelineActivities")]
pub pipeline_activities: Vec<PipelineActivity>,
#[serde(rename = "pipelineName")]
pub pipeline_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Variable {
#[serde(rename = "datasetContentVersionValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dataset_content_version_value: Option<DatasetContentVersionValue>,
#[serde(rename = "doubleValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub double_value: Option<f64>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "outputFileUriValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub output_file_uri_value: Option<OutputFileUriValue>,
#[serde(rename = "stringValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub string_value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VersioningConfiguration {
#[serde(rename = "maxVersions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_versions: Option<i64>,
#[serde(rename = "unlimited")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unlimited: Option<bool>,
}
#[derive(Debug, PartialEq)]
pub enum BatchPutMessageError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl BatchPutMessageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchPutMessageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(BatchPutMessageError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(BatchPutMessageError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(BatchPutMessageError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(BatchPutMessageError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(BatchPutMessageError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for BatchPutMessageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchPutMessageError {
fn description(&self) -> &str {
match *self {
BatchPutMessageError::InternalFailure(ref cause) => cause,
BatchPutMessageError::InvalidRequest(ref cause) => cause,
BatchPutMessageError::ResourceNotFound(ref cause) => cause,
BatchPutMessageError::ServiceUnavailable(ref cause) => cause,
BatchPutMessageError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelPipelineReprocessingError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl CancelPipelineReprocessingError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CancelPipelineReprocessingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CancelPipelineReprocessingError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(CancelPipelineReprocessingError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CancelPipelineReprocessingError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
CancelPipelineReprocessingError::ServiceUnavailable(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(CancelPipelineReprocessingError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CancelPipelineReprocessingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelPipelineReprocessingError {
fn description(&self) -> &str {
match *self {
CancelPipelineReprocessingError::InternalFailure(ref cause) => cause,
CancelPipelineReprocessingError::InvalidRequest(ref cause) => cause,
CancelPipelineReprocessingError::ResourceNotFound(ref cause) => cause,
CancelPipelineReprocessingError::ServiceUnavailable(ref cause) => cause,
CancelPipelineReprocessingError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateChannelError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
}
impl CreateChannelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateChannelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateChannelError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateChannelError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateChannelError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateChannelError::ResourceAlreadyExists(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateChannelError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateChannelError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateChannelError {
fn description(&self) -> &str {
match *self {
CreateChannelError::InternalFailure(ref cause) => cause,
CreateChannelError::InvalidRequest(ref cause) => cause,
CreateChannelError::LimitExceeded(ref cause) => cause,
CreateChannelError::ResourceAlreadyExists(ref cause) => cause,
CreateChannelError::ServiceUnavailable(ref cause) => cause,
CreateChannelError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDatasetError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
}
impl CreateDatasetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDatasetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateDatasetError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateDatasetError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateDatasetError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateDatasetError::ResourceAlreadyExists(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateDatasetError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateDatasetError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDatasetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDatasetError {
fn description(&self) -> &str {
match *self {
CreateDatasetError::InternalFailure(ref cause) => cause,
CreateDatasetError::InvalidRequest(ref cause) => cause,
CreateDatasetError::LimitExceeded(ref cause) => cause,
CreateDatasetError::ResourceAlreadyExists(ref cause) => cause,
CreateDatasetError::ServiceUnavailable(ref cause) => cause,
CreateDatasetError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDatasetContentError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl CreateDatasetContentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDatasetContentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateDatasetContentError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateDatasetContentError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateDatasetContentError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateDatasetContentError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(CreateDatasetContentError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDatasetContentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDatasetContentError {
fn description(&self) -> &str {
match *self {
CreateDatasetContentError::InternalFailure(ref cause) => cause,
CreateDatasetContentError::InvalidRequest(ref cause) => cause,
CreateDatasetContentError::ResourceNotFound(ref cause) => cause,
CreateDatasetContentError::ServiceUnavailable(ref cause) => cause,
CreateDatasetContentError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDatastoreError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
}
impl CreateDatastoreError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDatastoreError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreateDatastoreError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateDatastoreError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateDatastoreError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateDatastoreError::ResourceAlreadyExists(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateDatastoreError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreateDatastoreError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDatastoreError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDatastoreError {
fn description(&self) -> &str {
match *self {
CreateDatastoreError::InternalFailure(ref cause) => cause,
CreateDatastoreError::InvalidRequest(ref cause) => cause,
CreateDatastoreError::LimitExceeded(ref cause) => cause,
CreateDatastoreError::ResourceAlreadyExists(ref cause) => cause,
CreateDatastoreError::ServiceUnavailable(ref cause) => cause,
CreateDatastoreError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePipelineError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ServiceUnavailable(String),
Throttling(String),
}
impl CreatePipelineError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePipelineError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(CreatePipelineError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreatePipelineError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreatePipelineError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreatePipelineError::ResourceAlreadyExists(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreatePipelineError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(CreatePipelineError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreatePipelineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePipelineError {
fn description(&self) -> &str {
match *self {
CreatePipelineError::InternalFailure(ref cause) => cause,
CreatePipelineError::InvalidRequest(ref cause) => cause,
CreatePipelineError::LimitExceeded(ref cause) => cause,
CreatePipelineError::ResourceAlreadyExists(ref cause) => cause,
CreatePipelineError::ServiceUnavailable(ref cause) => cause,
CreatePipelineError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteChannelError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DeleteChannelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteChannelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteChannelError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteChannelError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteChannelError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteChannelError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteChannelError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteChannelError {
fn description(&self) -> &str {
match *self {
DeleteChannelError::InternalFailure(ref cause) => cause,
DeleteChannelError::InvalidRequest(ref cause) => cause,
DeleteChannelError::ResourceNotFound(ref cause) => cause,
DeleteChannelError::ServiceUnavailable(ref cause) => cause,
DeleteChannelError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDatasetError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DeleteDatasetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDatasetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteDatasetError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteDatasetError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteDatasetError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteDatasetError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteDatasetError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDatasetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDatasetError {
fn description(&self) -> &str {
match *self {
DeleteDatasetError::InternalFailure(ref cause) => cause,
DeleteDatasetError::InvalidRequest(ref cause) => cause,
DeleteDatasetError::ResourceNotFound(ref cause) => cause,
DeleteDatasetError::ServiceUnavailable(ref cause) => cause,
DeleteDatasetError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDatasetContentError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DeleteDatasetContentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDatasetContentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteDatasetContentError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteDatasetContentError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteDatasetContentError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteDatasetContentError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteDatasetContentError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDatasetContentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDatasetContentError {
fn description(&self) -> &str {
match *self {
DeleteDatasetContentError::InternalFailure(ref cause) => cause,
DeleteDatasetContentError::InvalidRequest(ref cause) => cause,
DeleteDatasetContentError::ResourceNotFound(ref cause) => cause,
DeleteDatasetContentError::ServiceUnavailable(ref cause) => cause,
DeleteDatasetContentError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDatastoreError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DeleteDatastoreError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDatastoreError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeleteDatastoreError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteDatastoreError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteDatastoreError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteDatastoreError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeleteDatastoreError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDatastoreError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDatastoreError {
fn description(&self) -> &str {
match *self {
DeleteDatastoreError::InternalFailure(ref cause) => cause,
DeleteDatastoreError::InvalidRequest(ref cause) => cause,
DeleteDatastoreError::ResourceNotFound(ref cause) => cause,
DeleteDatastoreError::ServiceUnavailable(ref cause) => cause,
DeleteDatastoreError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeletePipelineError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DeletePipelineError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePipelineError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DeletePipelineError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeletePipelineError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeletePipelineError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeletePipelineError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DeletePipelineError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeletePipelineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeletePipelineError {
fn description(&self) -> &str {
match *self {
DeletePipelineError::InternalFailure(ref cause) => cause,
DeletePipelineError::InvalidRequest(ref cause) => cause,
DeletePipelineError::ResourceNotFound(ref cause) => cause,
DeletePipelineError::ServiceUnavailable(ref cause) => cause,
DeletePipelineError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeChannelError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DescribeChannelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeChannelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeChannelError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeChannelError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeChannelError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeChannelError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeChannelError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeChannelError {
fn description(&self) -> &str {
match *self {
DescribeChannelError::InternalFailure(ref cause) => cause,
DescribeChannelError::InvalidRequest(ref cause) => cause,
DescribeChannelError::ResourceNotFound(ref cause) => cause,
DescribeChannelError::ServiceUnavailable(ref cause) => cause,
DescribeChannelError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDatasetError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DescribeDatasetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDatasetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeDatasetError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeDatasetError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeDatasetError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeDatasetError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeDatasetError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDatasetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDatasetError {
fn description(&self) -> &str {
match *self {
DescribeDatasetError::InternalFailure(ref cause) => cause,
DescribeDatasetError::InvalidRequest(ref cause) => cause,
DescribeDatasetError::ResourceNotFound(ref cause) => cause,
DescribeDatasetError::ServiceUnavailable(ref cause) => cause,
DescribeDatasetError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDatastoreError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DescribeDatastoreError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDatastoreError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeDatastoreError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeDatastoreError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeDatastoreError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeDatastoreError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeDatastoreError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDatastoreError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDatastoreError {
fn description(&self) -> &str {
match *self {
DescribeDatastoreError::InternalFailure(ref cause) => cause,
DescribeDatastoreError::InvalidRequest(ref cause) => cause,
DescribeDatastoreError::ResourceNotFound(ref cause) => cause,
DescribeDatastoreError::ServiceUnavailable(ref cause) => cause,
DescribeDatastoreError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoggingOptionsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DescribeLoggingOptionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLoggingOptionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribeLoggingOptionsError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeLoggingOptionsError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeLoggingOptionsError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeLoggingOptionsError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(DescribeLoggingOptionsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeLoggingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLoggingOptionsError {
fn description(&self) -> &str {
match *self {
DescribeLoggingOptionsError::InternalFailure(ref cause) => cause,
DescribeLoggingOptionsError::InvalidRequest(ref cause) => cause,
DescribeLoggingOptionsError::ResourceNotFound(ref cause) => cause,
DescribeLoggingOptionsError::ServiceUnavailable(ref cause) => cause,
DescribeLoggingOptionsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribePipelineError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl DescribePipelineError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribePipelineError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(DescribePipelineError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribePipelineError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribePipelineError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribePipelineError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(DescribePipelineError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribePipelineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribePipelineError {
fn description(&self) -> &str {
match *self {
DescribePipelineError::InternalFailure(ref cause) => cause,
DescribePipelineError::InvalidRequest(ref cause) => cause,
DescribePipelineError::ResourceNotFound(ref cause) => cause,
DescribePipelineError::ServiceUnavailable(ref cause) => cause,
DescribePipelineError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDatasetContentError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl GetDatasetContentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDatasetContentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(GetDatasetContentError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(GetDatasetContentError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(GetDatasetContentError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetDatasetContentError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(GetDatasetContentError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDatasetContentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDatasetContentError {
fn description(&self) -> &str {
match *self {
GetDatasetContentError::InternalFailure(ref cause) => cause,
GetDatasetContentError::InvalidRequest(ref cause) => cause,
GetDatasetContentError::ResourceNotFound(ref cause) => cause,
GetDatasetContentError::ServiceUnavailable(ref cause) => cause,
GetDatasetContentError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListChannelsError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListChannelsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListChannelsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListChannelsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListChannelsError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListChannelsError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListChannelsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListChannelsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListChannelsError {
fn description(&self) -> &str {
match *self {
ListChannelsError::InternalFailure(ref cause) => cause,
ListChannelsError::InvalidRequest(ref cause) => cause,
ListChannelsError::ServiceUnavailable(ref cause) => cause,
ListChannelsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDatasetContentsError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListDatasetContentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDatasetContentsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListDatasetContentsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListDatasetContentsError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListDatasetContentsError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListDatasetContentsError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListDatasetContentsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDatasetContentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDatasetContentsError {
fn description(&self) -> &str {
match *self {
ListDatasetContentsError::InternalFailure(ref cause) => cause,
ListDatasetContentsError::InvalidRequest(ref cause) => cause,
ListDatasetContentsError::ResourceNotFound(ref cause) => cause,
ListDatasetContentsError::ServiceUnavailable(ref cause) => cause,
ListDatasetContentsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDatasetsError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListDatasetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDatasetsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListDatasetsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListDatasetsError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListDatasetsError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListDatasetsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDatasetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDatasetsError {
fn description(&self) -> &str {
match *self {
ListDatasetsError::InternalFailure(ref cause) => cause,
ListDatasetsError::InvalidRequest(ref cause) => cause,
ListDatasetsError::ServiceUnavailable(ref cause) => cause,
ListDatasetsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDatastoresError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListDatastoresError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDatastoresError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListDatastoresError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListDatastoresError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListDatastoresError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListDatastoresError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDatastoresError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDatastoresError {
fn description(&self) -> &str {
match *self {
ListDatastoresError::InternalFailure(ref cause) => cause,
ListDatastoresError::InvalidRequest(ref cause) => cause,
ListDatastoresError::ServiceUnavailable(ref cause) => cause,
ListDatastoresError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListPipelinesError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListPipelinesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPipelinesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListPipelinesError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListPipelinesError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListPipelinesError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(ListPipelinesError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListPipelinesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListPipelinesError {
fn description(&self) -> &str {
match *self {
ListPipelinesError::InternalFailure(ref cause) => cause,
ListPipelinesError::InvalidRequest(ref cause) => cause,
ListPipelinesError::ServiceUnavailable(ref cause) => cause,
ListPipelinesError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(ListTagsForResourceError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ListTagsForResourceError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListTagsForResourceError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(ListTagsForResourceError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::InternalFailure(ref cause) => cause,
ListTagsForResourceError::InvalidRequest(ref cause) => cause,
ListTagsForResourceError::LimitExceeded(ref cause) => cause,
ListTagsForResourceError::ResourceNotFound(ref cause) => cause,
ListTagsForResourceError::ServiceUnavailable(ref cause) => cause,
ListTagsForResourceError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutLoggingOptionsError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
}
impl PutLoggingOptionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutLoggingOptionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(PutLoggingOptionsError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(PutLoggingOptionsError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(PutLoggingOptionsError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(PutLoggingOptionsError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutLoggingOptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutLoggingOptionsError {
fn description(&self) -> &str {
match *self {
PutLoggingOptionsError::InternalFailure(ref cause) => cause,
PutLoggingOptionsError::InvalidRequest(ref cause) => cause,
PutLoggingOptionsError::ServiceUnavailable(ref cause) => cause,
PutLoggingOptionsError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RunPipelineActivityError {
InternalFailure(String),
InvalidRequest(String),
ServiceUnavailable(String),
Throttling(String),
}
impl RunPipelineActivityError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RunPipelineActivityError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(RunPipelineActivityError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(RunPipelineActivityError::InvalidRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(RunPipelineActivityError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(RunPipelineActivityError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RunPipelineActivityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RunPipelineActivityError {
fn description(&self) -> &str {
match *self {
RunPipelineActivityError::InternalFailure(ref cause) => cause,
RunPipelineActivityError::InvalidRequest(ref cause) => cause,
RunPipelineActivityError::ServiceUnavailable(ref cause) => cause,
RunPipelineActivityError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SampleChannelDataError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl SampleChannelDataError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SampleChannelDataError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(SampleChannelDataError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(SampleChannelDataError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SampleChannelDataError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(SampleChannelDataError::ServiceUnavailable(
err.msg,
))
}
"ThrottlingException" => {
return RusotoError::Service(SampleChannelDataError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SampleChannelDataError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SampleChannelDataError {
fn description(&self) -> &str {
match *self {
SampleChannelDataError::InternalFailure(ref cause) => cause,
SampleChannelDataError::InvalidRequest(ref cause) => cause,
SampleChannelDataError::ResourceNotFound(ref cause) => cause,
SampleChannelDataError::ServiceUnavailable(ref cause) => cause,
SampleChannelDataError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartPipelineReprocessingError {
InternalFailure(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl StartPipelineReprocessingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartPipelineReprocessingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(StartPipelineReprocessingError::InternalFailure(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(StartPipelineReprocessingError::InvalidRequest(
err.msg,
))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(
StartPipelineReprocessingError::ResourceAlreadyExists(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(StartPipelineReprocessingError::ResourceNotFound(
err.msg,
))
}
"ServiceUnavailableException" => {
return RusotoError::Service(
StartPipelineReprocessingError::ServiceUnavailable(err.msg),
)
}
"ThrottlingException" => {
return RusotoError::Service(StartPipelineReprocessingError::Throttling(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartPipelineReprocessingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartPipelineReprocessingError {
fn description(&self) -> &str {
match *self {
StartPipelineReprocessingError::InternalFailure(ref cause) => cause,
StartPipelineReprocessingError::InvalidRequest(ref cause) => cause,
StartPipelineReprocessingError::ResourceAlreadyExists(ref cause) => cause,
StartPipelineReprocessingError::ResourceNotFound(ref cause) => cause,
StartPipelineReprocessingError::ServiceUnavailable(ref cause) => cause,
StartPipelineReprocessingError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(TagResourceError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(TagResourceError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(TagResourceError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(TagResourceError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::InternalFailure(ref cause) => cause,
TagResourceError::InvalidRequest(ref cause) => cause,
TagResourceError::LimitExceeded(ref cause) => cause,
TagResourceError::ResourceNotFound(ref cause) => cause,
TagResourceError::ServiceUnavailable(ref cause) => cause,
TagResourceError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UntagResourceError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UntagResourceError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UntagResourceError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UntagResourceError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UntagResourceError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::InternalFailure(ref cause) => cause,
UntagResourceError::InvalidRequest(ref cause) => cause,
UntagResourceError::LimitExceeded(ref cause) => cause,
UntagResourceError::ResourceNotFound(ref cause) => cause,
UntagResourceError::ServiceUnavailable(ref cause) => cause,
UntagResourceError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateChannelError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl UpdateChannelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateChannelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateChannelError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateChannelError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateChannelError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateChannelError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateChannelError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateChannelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateChannelError {
fn description(&self) -> &str {
match *self {
UpdateChannelError::InternalFailure(ref cause) => cause,
UpdateChannelError::InvalidRequest(ref cause) => cause,
UpdateChannelError::ResourceNotFound(ref cause) => cause,
UpdateChannelError::ServiceUnavailable(ref cause) => cause,
UpdateChannelError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDatasetError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl UpdateDatasetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDatasetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateDatasetError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateDatasetError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateDatasetError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateDatasetError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateDatasetError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDatasetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDatasetError {
fn description(&self) -> &str {
match *self {
UpdateDatasetError::InternalFailure(ref cause) => cause,
UpdateDatasetError::InvalidRequest(ref cause) => cause,
UpdateDatasetError::ResourceNotFound(ref cause) => cause,
UpdateDatasetError::ServiceUnavailable(ref cause) => cause,
UpdateDatasetError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDatastoreError {
InternalFailure(String),
InvalidRequest(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl UpdateDatastoreError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDatastoreError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdateDatastoreError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateDatastoreError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateDatastoreError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateDatastoreError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdateDatastoreError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDatastoreError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDatastoreError {
fn description(&self) -> &str {
match *self {
UpdateDatastoreError::InternalFailure(ref cause) => cause,
UpdateDatastoreError::InvalidRequest(ref cause) => cause,
UpdateDatastoreError::ResourceNotFound(ref cause) => cause,
UpdateDatastoreError::ServiceUnavailable(ref cause) => cause,
UpdateDatastoreError::Throttling(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdatePipelineError {
InternalFailure(String),
InvalidRequest(String),
LimitExceeded(String),
ResourceNotFound(String),
ServiceUnavailable(String),
Throttling(String),
}
impl UpdatePipelineError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdatePipelineError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalFailureException" => {
return RusotoError::Service(UpdatePipelineError::InternalFailure(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdatePipelineError::InvalidRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdatePipelineError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdatePipelineError::ResourceNotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdatePipelineError::ServiceUnavailable(err.msg))
}
"ThrottlingException" => {
return RusotoError::Service(UpdatePipelineError::Throttling(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdatePipelineError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdatePipelineError {
fn description(&self) -> &str {
match *self {
UpdatePipelineError::InternalFailure(ref cause) => cause,
UpdatePipelineError::InvalidRequest(ref cause) => cause,
UpdatePipelineError::LimitExceeded(ref cause) => cause,
UpdatePipelineError::ResourceNotFound(ref cause) => cause,
UpdatePipelineError::ServiceUnavailable(ref cause) => cause,
UpdatePipelineError::Throttling(ref cause) => cause,
}
}
}
pub trait IotAnalytics {
fn batch_put_message(
&self,
input: BatchPutMessageRequest,
) -> RusotoFuture<BatchPutMessageResponse, BatchPutMessageError>;
fn cancel_pipeline_reprocessing(
&self,
input: CancelPipelineReprocessingRequest,
) -> RusotoFuture<CancelPipelineReprocessingResponse, CancelPipelineReprocessingError>;
fn create_channel(
&self,
input: CreateChannelRequest,
) -> RusotoFuture<CreateChannelResponse, CreateChannelError>;
fn create_dataset(
&self,
input: CreateDatasetRequest,
) -> RusotoFuture<CreateDatasetResponse, CreateDatasetError>;
fn create_dataset_content(
&self,
input: CreateDatasetContentRequest,
) -> RusotoFuture<CreateDatasetContentResponse, CreateDatasetContentError>;
fn create_datastore(
&self,
input: CreateDatastoreRequest,
) -> RusotoFuture<CreateDatastoreResponse, CreateDatastoreError>;
fn create_pipeline(
&self,
input: CreatePipelineRequest,
) -> RusotoFuture<CreatePipelineResponse, CreatePipelineError>;
fn delete_channel(&self, input: DeleteChannelRequest) -> RusotoFuture<(), DeleteChannelError>;
fn delete_dataset(&self, input: DeleteDatasetRequest) -> RusotoFuture<(), DeleteDatasetError>;
fn delete_dataset_content(
&self,
input: DeleteDatasetContentRequest,
) -> RusotoFuture<(), DeleteDatasetContentError>;
fn delete_datastore(
&self,
input: DeleteDatastoreRequest,
) -> RusotoFuture<(), DeleteDatastoreError>;
fn delete_pipeline(
&self,
input: DeletePipelineRequest,
) -> RusotoFuture<(), DeletePipelineError>;
fn describe_channel(
&self,
input: DescribeChannelRequest,
) -> RusotoFuture<DescribeChannelResponse, DescribeChannelError>;
fn describe_dataset(
&self,
input: DescribeDatasetRequest,
) -> RusotoFuture<DescribeDatasetResponse, DescribeDatasetError>;
fn describe_datastore(
&self,
input: DescribeDatastoreRequest,
) -> RusotoFuture<DescribeDatastoreResponse, DescribeDatastoreError>;
fn describe_logging_options(
&self,
) -> RusotoFuture<DescribeLoggingOptionsResponse, DescribeLoggingOptionsError>;
fn describe_pipeline(
&self,
input: DescribePipelineRequest,
) -> RusotoFuture<DescribePipelineResponse, DescribePipelineError>;
fn get_dataset_content(
&self,
input: GetDatasetContentRequest,
) -> RusotoFuture<GetDatasetContentResponse, GetDatasetContentError>;
fn list_channels(
&self,
input: ListChannelsRequest,
) -> RusotoFuture<ListChannelsResponse, ListChannelsError>;
fn list_dataset_contents(
&self,
input: ListDatasetContentsRequest,
) -> RusotoFuture<ListDatasetContentsResponse, ListDatasetContentsError>;
fn list_datasets(
&self,
input: ListDatasetsRequest,
) -> RusotoFuture<ListDatasetsResponse, ListDatasetsError>;
fn list_datastores(
&self,
input: ListDatastoresRequest,
) -> RusotoFuture<ListDatastoresResponse, ListDatastoresError>;
fn list_pipelines(
&self,
input: ListPipelinesRequest,
) -> RusotoFuture<ListPipelinesResponse, ListPipelinesError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>;
fn put_logging_options(
&self,
input: PutLoggingOptionsRequest,
) -> RusotoFuture<(), PutLoggingOptionsError>;
fn run_pipeline_activity(
&self,
input: RunPipelineActivityRequest,
) -> RusotoFuture<RunPipelineActivityResponse, RunPipelineActivityError>;
fn sample_channel_data(
&self,
input: SampleChannelDataRequest,
) -> RusotoFuture<SampleChannelDataResponse, SampleChannelDataError>;
fn start_pipeline_reprocessing(
&self,
input: StartPipelineReprocessingRequest,
) -> RusotoFuture<StartPipelineReprocessingResponse, StartPipelineReprocessingError>;
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError>;
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError>;
fn update_channel(&self, input: UpdateChannelRequest) -> RusotoFuture<(), UpdateChannelError>;
fn update_dataset(&self, input: UpdateDatasetRequest) -> RusotoFuture<(), UpdateDatasetError>;
fn update_datastore(
&self,
input: UpdateDatastoreRequest,
) -> RusotoFuture<(), UpdateDatastoreError>;
fn update_pipeline(
&self,
input: UpdatePipelineRequest,
) -> RusotoFuture<(), UpdatePipelineError>;
}
#[derive(Clone)]
pub struct IotAnalyticsClient {
client: Client,
region: region::Region,
}
impl IotAnalyticsClient {
pub fn new(region: region::Region) -> IotAnalyticsClient {
IotAnalyticsClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> IotAnalyticsClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
IotAnalyticsClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl IotAnalytics for IotAnalyticsClient {
fn batch_put_message(
&self,
input: BatchPutMessageRequest,
) -> RusotoFuture<BatchPutMessageResponse, BatchPutMessageError> {
let request_uri = "/messages/batch";
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BatchPutMessageResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(BatchPutMessageError::from_response(response))),
)
}
})
}
fn cancel_pipeline_reprocessing(
&self,
input: CancelPipelineReprocessingRequest,
) -> RusotoFuture<CancelPipelineReprocessingResponse, CancelPipelineReprocessingError> {
let request_uri = format!(
"/pipelines/{pipeline_name}/reprocessing/{reprocessing_id}",
pipeline_name = input.pipeline_name,
reprocessing_id = input.reprocessing_id
);
let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CancelPipelineReprocessingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CancelPipelineReprocessingError::from_response(response))
}))
}
})
}
fn create_channel(
&self,
input: CreateChannelRequest,
) -> RusotoFuture<CreateChannelResponse, CreateChannelError> {
let request_uri = "/channels";
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateChannelResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateChannelError::from_response(response))),
)
}
})
}
fn create_dataset(
&self,
input: CreateDatasetRequest,
) -> RusotoFuture<CreateDatasetResponse, CreateDatasetError> {
let request_uri = "/datasets";
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDatasetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDatasetError::from_response(response))),
)
}
})
}
fn create_dataset_content(
&self,
input: CreateDatasetContentRequest,
) -> RusotoFuture<CreateDatasetContentResponse, CreateDatasetContentError> {
let request_uri = format!(
"/datasets/{dataset_name}/content",
dataset_name = input.dataset_name
);
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDatasetContentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateDatasetContentError::from_response(response))
}),
)
}
})
}
fn create_datastore(
&self,
input: CreateDatastoreRequest,
) -> RusotoFuture<CreateDatastoreResponse, CreateDatastoreError> {
let request_uri = "/datastores";
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDatastoreResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDatastoreError::from_response(response))),
)
}
})
}
fn create_pipeline(
&self,
input: CreatePipelineRequest,
) -> RusotoFuture<CreatePipelineResponse, CreatePipelineError> {
let request_uri = "/pipelines";
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreatePipelineResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreatePipelineError::from_response(response))),
)
}
})
}
fn delete_channel(&self, input: DeleteChannelRequest) -> RusotoFuture<(), DeleteChannelError> {
let request_uri = format!(
"/channels/{channel_name}",
channel_name = input.channel_name
);
let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteChannelError::from_response(response))),
)
}
})
}
fn delete_dataset(&self, input: DeleteDatasetRequest) -> RusotoFuture<(), DeleteDatasetError> {
let request_uri = format!(
"/datasets/{dataset_name}",
dataset_name = input.dataset_name
);
let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDatasetError::from_response(response))),
)
}
})
}
fn delete_dataset_content(
&self,
input: DeleteDatasetContentRequest,
) -> RusotoFuture<(), DeleteDatasetContentError> {
let request_uri = format!(
"/datasets/{dataset_name}/content",
dataset_name = input.dataset_name
);
let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.version_id {
params.put("versionId", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteDatasetContentError::from_response(response))
}),
)
}
})
}
fn delete_datastore(
&self,
input: DeleteDatastoreRequest,
) -> RusotoFuture<(), DeleteDatastoreError> {
let request_uri = format!(
"/datastores/{datastore_name}",
datastore_name = input.datastore_name
);
let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDatastoreError::from_response(response))),
)
}
})
}
fn delete_pipeline(
&self,
input: DeletePipelineRequest,
) -> RusotoFuture<(), DeletePipelineError> {
let request_uri = format!(
"/pipelines/{pipeline_name}",
pipeline_name = input.pipeline_name
);
let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeletePipelineError::from_response(response))),
)
}
})
}
fn describe_channel(
&self,
input: DescribeChannelRequest,
) -> RusotoFuture<DescribeChannelResponse, DescribeChannelError> {
let request_uri = format!(
"/channels/{channel_name}",
channel_name = input.channel_name
);
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.include_statistics {
params.put("includeStatistics", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeChannelResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeChannelError::from_response(response))),
)
}
})
}
fn describe_dataset(
&self,
input: DescribeDatasetRequest,
) -> RusotoFuture<DescribeDatasetResponse, DescribeDatasetError> {
let request_uri = format!(
"/datasets/{dataset_name}",
dataset_name = input.dataset_name
);
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDatasetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeDatasetError::from_response(response))),
)
}
})
}
fn describe_datastore(
&self,
input: DescribeDatastoreRequest,
) -> RusotoFuture<DescribeDatastoreResponse, DescribeDatastoreError> {
let request_uri = format!(
"/datastores/{datastore_name}",
datastore_name = input.datastore_name
);
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.include_statistics {
params.put("includeStatistics", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDatastoreResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeDatastoreError::from_response(response))),
)
}
})
}
fn describe_logging_options(
&self,
) -> RusotoFuture<DescribeLoggingOptionsResponse, DescribeLoggingOptionsError> {
let request_uri = "/logging";
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeLoggingOptionsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeLoggingOptionsError::from_response(response))
}),
)
}
})
}
fn describe_pipeline(
&self,
input: DescribePipelineRequest,
) -> RusotoFuture<DescribePipelineResponse, DescribePipelineError> {
let request_uri = format!(
"/pipelines/{pipeline_name}",
pipeline_name = input.pipeline_name
);
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribePipelineResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribePipelineError::from_response(response))),
)
}
})
}
fn get_dataset_content(
&self,
input: GetDatasetContentRequest,
) -> RusotoFuture<GetDatasetContentResponse, GetDatasetContentError> {
let request_uri = format!(
"/datasets/{dataset_name}/content",
dataset_name = input.dataset_name
);
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.version_id {
params.put("versionId", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetDatasetContentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDatasetContentError::from_response(response))),
)
}
})
}
fn list_channels(
&self,
input: ListChannelsRequest,
) -> RusotoFuture<ListChannelsResponse, ListChannelsError> {
let request_uri = "/channels";
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListChannelsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListChannelsError::from_response(response))),
)
}
})
}
fn list_dataset_contents(
&self,
input: ListDatasetContentsRequest,
) -> RusotoFuture<ListDatasetContentsResponse, ListDatasetContentsError> {
let request_uri = format!(
"/datasets/{dataset_name}/contents",
dataset_name = input.dataset_name
);
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
if let Some(ref x) = input.scheduled_before {
params.put("scheduledBefore", x);
}
if let Some(ref x) = input.scheduled_on_or_after {
params.put("scheduledOnOrAfter", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDatasetContentsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListDatasetContentsError::from_response(response))
}),
)
}
})
}
fn list_datasets(
&self,
input: ListDatasetsRequest,
) -> RusotoFuture<ListDatasetsResponse, ListDatasetsError> {
let request_uri = "/datasets";
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDatasetsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDatasetsError::from_response(response))),
)
}
})
}
fn list_datastores(
&self,
input: ListDatastoresRequest,
) -> RusotoFuture<ListDatastoresResponse, ListDatastoresError> {
let request_uri = "/datastores";
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDatastoresResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDatastoresError::from_response(response))),
)
}
})
}
fn list_pipelines(
&self,
input: ListPipelinesRequest,
) -> RusotoFuture<ListPipelinesResponse, ListPipelinesError> {
let request_uri = "/pipelines";
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListPipelinesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListPipelinesError::from_response(response))),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> {
let request_uri = "/tags";
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("resourceArn", &input.resource_arn);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn put_logging_options(
&self,
input: PutLoggingOptionsRequest,
) -> RusotoFuture<(), PutLoggingOptionsError> {
let request_uri = "/logging";
let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutLoggingOptionsError::from_response(response))),
)
}
})
}
fn run_pipeline_activity(
&self,
input: RunPipelineActivityRequest,
) -> RusotoFuture<RunPipelineActivityResponse, RunPipelineActivityError> {
let request_uri = "/pipelineactivities/run";
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RunPipelineActivityResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RunPipelineActivityError::from_response(response))
}),
)
}
})
}
fn sample_channel_data(
&self,
input: SampleChannelDataRequest,
) -> RusotoFuture<SampleChannelDataResponse, SampleChannelDataError> {
let request_uri = format!(
"/channels/{channel_name}/sample",
channel_name = input.channel_name
);
let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.end_time {
params.put("endTime", x);
}
if let Some(ref x) = input.max_messages {
params.put("maxMessages", x);
}
if let Some(ref x) = input.start_time {
params.put("startTime", x);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<SampleChannelDataResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SampleChannelDataError::from_response(response))),
)
}
})
}
fn start_pipeline_reprocessing(
&self,
input: StartPipelineReprocessingRequest,
) -> RusotoFuture<StartPipelineReprocessingResponse, StartPipelineReprocessingError> {
let request_uri = format!(
"/pipelines/{pipeline_name}/reprocessing",
pipeline_name = input.pipeline_name
);
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<StartPipelineReprocessingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StartPipelineReprocessingError::from_response(response))
}))
}
})
}
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError> {
let request_uri = "/tags";
let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("resourceArn", &input.resource_arn);
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TagResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError> {
let request_uri = "/tags";
let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("resourceArn", &input.resource_arn);
for item in input.tag_keys.iter() {
params.put("tagKeys", item);
}
request.set_params(params);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UntagResourceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_channel(&self, input: UpdateChannelRequest) -> RusotoFuture<(), UpdateChannelError> {
let request_uri = format!(
"/channels/{channel_name}",
channel_name = input.channel_name
);
let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateChannelError::from_response(response))),
)
}
})
}
fn update_dataset(&self, input: UpdateDatasetRequest) -> RusotoFuture<(), UpdateDatasetError> {
let request_uri = format!(
"/datasets/{dataset_name}",
dataset_name = input.dataset_name
);
let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDatasetError::from_response(response))),
)
}
})
}
fn update_datastore(
&self,
input: UpdateDatastoreRequest,
) -> RusotoFuture<(), UpdateDatastoreError> {
let request_uri = format!(
"/datastores/{datastore_name}",
datastore_name = input.datastore_name
);
let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDatastoreError::from_response(response))),
)
}
})
}
fn update_pipeline(
&self,
input: UpdatePipelineRequest,
) -> RusotoFuture<(), UpdatePipelineError> {
let request_uri = format!(
"/pipelines/{pipeline_name}",
pipeline_name = input.pipeline_name
);
let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdatePipelineError::from_response(response))),
)
}
})
}
}