rusoto_iotanalytics/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28/// <p>An activity that adds other attributes based on existing attributes in the message.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
30pub struct AddAttributesActivity {
31    /// <p><p>A list of 1-50 &quot;AttributeNameMapping&quot; objects that map an existing attribute to a new attribute.</p> <note> <p>The existing attributes remain in the message, so if you want to remove the originals, use &quot;RemoveAttributeActivity&quot;.</p> </note></p>
32    #[serde(rename = "attributes")]
33    pub attributes: ::std::collections::HashMap<String, String>,
34    /// <p>The name of the 'addAttributes' activity.</p>
35    #[serde(rename = "name")]
36    pub name: String,
37    /// <p>The next activity in the pipeline.</p>
38    #[serde(rename = "next")]
39    #[serde(skip_serializing_if = "Option::is_none")]
40    pub next: Option<String>,
41}
42
43/// <p>Contains informations about errors.</p>
44#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
45#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
46pub struct BatchPutMessageErrorEntry {
47    /// <p>The code associated with the error.</p>
48    #[serde(rename = "errorCode")]
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub error_code: Option<String>,
51    /// <p>The message associated with the error.</p>
52    #[serde(rename = "errorMessage")]
53    #[serde(skip_serializing_if = "Option::is_none")]
54    pub error_message: Option<String>,
55    /// <p>The ID of the message that caused the error. (See the value corresponding to the "messageId" key in the message object.)</p>
56    #[serde(rename = "messageId")]
57    #[serde(skip_serializing_if = "Option::is_none")]
58    pub message_id: Option<String>,
59}
60
61#[derive(Clone, Debug, Default, PartialEq, Serialize)]
62#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
63pub struct BatchPutMessageRequest {
64    /// <p>The name of the channel where the messages are sent.</p>
65    #[serde(rename = "channelName")]
66    pub channel_name: String,
67    /// <p>The list of messages to be sent. Each message has format: '{ "messageId": "string", "payload": "string"}'.</p> <p>Note that the field names of message payloads (data) that you send to AWS IoT Analytics:</p> <ul> <li> <p>Must contain only alphanumeric characters and undescores (_); no other special characters are allowed.</p> </li> <li> <p>Must begin with an alphabetic character or single underscore (_).</p> </li> <li> <p>Cannot contain hyphens (-).</p> </li> <li> <p>In regular expression terms: "^[A-Za-z_]([A-Za-z0-9]*|[A-Za-z0-9][A-Za-z0-9_]*)$". </p> </li> <li> <p>Cannot be greater than 255 characters.</p> </li> <li> <p>Are case-insensitive. (Fields named "foo" and "FOO" in the same payload are considered duplicates.)</p> </li> </ul> <p>For example, {"temp_01": 29} or {"_temp_01": 29} are valid, but {"temp-01": 29}, {"01_temp": 29} or {"__temp_01": 29} are invalid in message payloads. </p>
68    #[serde(rename = "messages")]
69    pub messages: Vec<Message>,
70}
71
72#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
73#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
74pub struct BatchPutMessageResponse {
75    /// <p>A list of any errors encountered when sending the messages to the channel.</p>
76    #[serde(rename = "batchPutMessageErrorEntries")]
77    #[serde(skip_serializing_if = "Option::is_none")]
78    pub batch_put_message_error_entries: Option<Vec<BatchPutMessageErrorEntry>>,
79}
80
81#[derive(Clone, Debug, Default, PartialEq, Serialize)]
82#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
83pub struct CancelPipelineReprocessingRequest {
84    /// <p>The name of pipeline for which data reprocessing is canceled.</p>
85    #[serde(rename = "pipelineName")]
86    pub pipeline_name: String,
87    /// <p>The ID of the reprocessing task (returned by "StartPipelineReprocessing").</p>
88    #[serde(rename = "reprocessingId")]
89    pub reprocessing_id: String,
90}
91
92#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
93#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
94pub struct CancelPipelineReprocessingResponse {}
95
96/// <p>A collection of data from an MQTT topic. Channels archive the raw, unprocessed messages before publishing the data to a pipeline.</p>
97#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
98#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
99pub struct Channel {
100    /// <p>The ARN of the channel.</p>
101    #[serde(rename = "arn")]
102    #[serde(skip_serializing_if = "Option::is_none")]
103    pub arn: Option<String>,
104    /// <p>When the channel was created.</p>
105    #[serde(rename = "creationTime")]
106    #[serde(skip_serializing_if = "Option::is_none")]
107    pub creation_time: Option<f64>,
108    /// <p>When the channel was last updated.</p>
109    #[serde(rename = "lastUpdateTime")]
110    #[serde(skip_serializing_if = "Option::is_none")]
111    pub last_update_time: Option<f64>,
112    /// <p>The name of the channel.</p>
113    #[serde(rename = "name")]
114    #[serde(skip_serializing_if = "Option::is_none")]
115    pub name: Option<String>,
116    /// <p>How long, in days, message data is kept for the channel.</p>
117    #[serde(rename = "retentionPeriod")]
118    #[serde(skip_serializing_if = "Option::is_none")]
119    pub retention_period: Option<RetentionPeriod>,
120    /// <p>The status of the channel.</p>
121    #[serde(rename = "status")]
122    #[serde(skip_serializing_if = "Option::is_none")]
123    pub status: Option<String>,
124    /// <p>Where channel data is stored. You may choose one of "serviceManagedS3" or "customerManagedS3" storage. If not specified, the default is "serviceManagedS3". This cannot be changed after creation of the channel.</p>
125    #[serde(rename = "storage")]
126    #[serde(skip_serializing_if = "Option::is_none")]
127    pub storage: Option<ChannelStorage>,
128}
129
130/// <p>The activity that determines the source of the messages to be processed.</p>
131#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
132pub struct ChannelActivity {
133    /// <p>The name of the channel from which the messages are processed.</p>
134    #[serde(rename = "channelName")]
135    pub channel_name: String,
136    /// <p>The name of the 'channel' activity.</p>
137    #[serde(rename = "name")]
138    pub name: String,
139    /// <p>The next activity in the pipeline.</p>
140    #[serde(rename = "next")]
141    #[serde(skip_serializing_if = "Option::is_none")]
142    pub next: Option<String>,
143}
144
145/// <p>Statistics information about the channel.</p>
146#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
147#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
148pub struct ChannelStatistics {
149    /// <p>The estimated size of the channel.</p>
150    #[serde(rename = "size")]
151    #[serde(skip_serializing_if = "Option::is_none")]
152    pub size: Option<EstimatedResourceSize>,
153}
154
155/// <p>Where channel data is stored. You may choose one of "serviceManagedS3" or "customerManagedS3" storage. If not specified, the default is "serviceManagedS3". This cannot be changed after creation of the channel.</p>
156#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
157pub struct ChannelStorage {
158    /// <p>Use this to store channel data in an S3 bucket that you manage. If customer managed storage is selected, the "retentionPeriod" parameter is ignored. The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the channel.</p>
159    #[serde(rename = "customerManagedS3")]
160    #[serde(skip_serializing_if = "Option::is_none")]
161    pub customer_managed_s3: Option<CustomerManagedChannelS3Storage>,
162    /// <p>Use this to store channel data in an S3 bucket managed by the AWS IoT Analytics service. The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the channel.</p>
163    #[serde(rename = "serviceManagedS3")]
164    #[serde(skip_serializing_if = "Option::is_none")]
165    pub service_managed_s3: Option<ServiceManagedChannelS3Storage>,
166}
167
168/// <p>Where channel data is stored.</p>
169#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
170#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
171pub struct ChannelStorageSummary {
172    /// <p>Used to store channel data in an S3 bucket that you manage.</p>
173    #[serde(rename = "customerManagedS3")]
174    #[serde(skip_serializing_if = "Option::is_none")]
175    pub customer_managed_s3: Option<CustomerManagedChannelS3StorageSummary>,
176    /// <p>Used to store channel data in an S3 bucket managed by the AWS IoT Analytics service.</p>
177    #[serde(rename = "serviceManagedS3")]
178    #[serde(skip_serializing_if = "Option::is_none")]
179    pub service_managed_s3: Option<ServiceManagedChannelS3StorageSummary>,
180}
181
182/// <p>A summary of information about a channel.</p>
183#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
184#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
185pub struct ChannelSummary {
186    /// <p>The name of the channel.</p>
187    #[serde(rename = "channelName")]
188    #[serde(skip_serializing_if = "Option::is_none")]
189    pub channel_name: Option<String>,
190    /// <p>Where channel data is stored.</p>
191    #[serde(rename = "channelStorage")]
192    #[serde(skip_serializing_if = "Option::is_none")]
193    pub channel_storage: Option<ChannelStorageSummary>,
194    /// <p>When the channel was created.</p>
195    #[serde(rename = "creationTime")]
196    #[serde(skip_serializing_if = "Option::is_none")]
197    pub creation_time: Option<f64>,
198    /// <p>The last time the channel was updated.</p>
199    #[serde(rename = "lastUpdateTime")]
200    #[serde(skip_serializing_if = "Option::is_none")]
201    pub last_update_time: Option<f64>,
202    /// <p>The status of the channel.</p>
203    #[serde(rename = "status")]
204    #[serde(skip_serializing_if = "Option::is_none")]
205    pub status: Option<String>,
206}
207
208/// <p>Information needed to run the "containerAction" to produce data set contents.</p>
209#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
210pub struct ContainerDatasetAction {
211    /// <p>The ARN of the role which gives permission to the system to access needed resources in order to run the "containerAction". This includes, at minimum, permission to retrieve the data set contents which are the input to the containerized application.</p>
212    #[serde(rename = "executionRoleArn")]
213    pub execution_role_arn: String,
214    /// <p>The ARN of the Docker container stored in your account. The Docker container contains an application and needed support libraries and is used to generate data set contents.</p>
215    #[serde(rename = "image")]
216    pub image: String,
217    /// <p>Configuration of the resource which executes the "containerAction".</p>
218    #[serde(rename = "resourceConfiguration")]
219    pub resource_configuration: ResourceConfiguration,
220    /// <p>The values of variables used within the context of the execution of the containerized application (basically, parameters passed to the application). Each variable must have a name and a value given by one of "stringValue", "datasetContentVersionValue", or "outputFileUriValue".</p>
221    #[serde(rename = "variables")]
222    #[serde(skip_serializing_if = "Option::is_none")]
223    pub variables: Option<Vec<Variable>>,
224}
225
226#[derive(Clone, Debug, Default, PartialEq, Serialize)]
227#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
228pub struct CreateChannelRequest {
229    /// <p>The name of the channel.</p>
230    #[serde(rename = "channelName")]
231    pub channel_name: String,
232    /// <p>Where channel data is stored. You may choose one of "serviceManagedS3" or "customerManagedS3" storage. If not specified, the default is "serviceManagedS3". This cannot be changed after creation of the channel.</p>
233    #[serde(rename = "channelStorage")]
234    #[serde(skip_serializing_if = "Option::is_none")]
235    pub channel_storage: Option<ChannelStorage>,
236    /// <p>How long, in days, message data is kept for the channel. When "customerManagedS3" storage is selected, this parameter is ignored.</p>
237    #[serde(rename = "retentionPeriod")]
238    #[serde(skip_serializing_if = "Option::is_none")]
239    pub retention_period: Option<RetentionPeriod>,
240    /// <p>Metadata which can be used to manage the channel.</p>
241    #[serde(rename = "tags")]
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub tags: Option<Vec<Tag>>,
244}
245
246#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
247#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
248pub struct CreateChannelResponse {
249    /// <p>The ARN of the channel.</p>
250    #[serde(rename = "channelArn")]
251    #[serde(skip_serializing_if = "Option::is_none")]
252    pub channel_arn: Option<String>,
253    /// <p>The name of the channel.</p>
254    #[serde(rename = "channelName")]
255    #[serde(skip_serializing_if = "Option::is_none")]
256    pub channel_name: Option<String>,
257    /// <p>How long, in days, message data is kept for the channel.</p>
258    #[serde(rename = "retentionPeriod")]
259    #[serde(skip_serializing_if = "Option::is_none")]
260    pub retention_period: Option<RetentionPeriod>,
261}
262
263#[derive(Clone, Debug, Default, PartialEq, Serialize)]
264#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
265pub struct CreateDatasetContentRequest {
266    /// <p>The name of the data set.</p>
267    #[serde(rename = "datasetName")]
268    pub dataset_name: String,
269}
270
271#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
272#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
273pub struct CreateDatasetContentResponse {
274    /// <p>The version ID of the data set contents which are being created.</p>
275    #[serde(rename = "versionId")]
276    #[serde(skip_serializing_if = "Option::is_none")]
277    pub version_id: Option<String>,
278}
279
280#[derive(Clone, Debug, Default, PartialEq, Serialize)]
281#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
282pub struct CreateDatasetRequest {
283    /// <p>A list of actions that create the data set contents.</p>
284    #[serde(rename = "actions")]
285    pub actions: Vec<DatasetAction>,
286    /// <p>When data set contents are created they are delivered to destinations specified here.</p>
287    #[serde(rename = "contentDeliveryRules")]
288    #[serde(skip_serializing_if = "Option::is_none")]
289    pub content_delivery_rules: Option<Vec<DatasetContentDeliveryRule>>,
290    /// <p>The name of the data set.</p>
291    #[serde(rename = "datasetName")]
292    pub dataset_name: String,
293    /// <p>[Optional] How long, in days, versions of data set contents are kept for the data set. If not specified or set to null, versions of data set contents are retained for at most 90 days. The number of versions of data set contents retained is determined by the <code>versioningConfiguration</code> parameter. (For more information, see https://docs.aws.amazon.com/iotanalytics/latest/userguide/getting-started.html#aws-iot-analytics-dataset-versions)</p>
294    #[serde(rename = "retentionPeriod")]
295    #[serde(skip_serializing_if = "Option::is_none")]
296    pub retention_period: Option<RetentionPeriod>,
297    /// <p>Metadata which can be used to manage the data set.</p>
298    #[serde(rename = "tags")]
299    #[serde(skip_serializing_if = "Option::is_none")]
300    pub tags: Option<Vec<Tag>>,
301    /// <p>A list of triggers. A trigger causes data set contents to be populated at a specified time interval or when another data set's contents are created. The list of triggers can be empty or contain up to five <b>DataSetTrigger</b> objects.</p>
302    #[serde(rename = "triggers")]
303    #[serde(skip_serializing_if = "Option::is_none")]
304    pub triggers: Option<Vec<DatasetTrigger>>,
305    /// <p>[Optional] How many versions of data set contents are kept. If not specified or set to null, only the latest version plus the latest succeeded version (if they are different) are kept for the time period specified by the "retentionPeriod" parameter. (For more information, see https://docs.aws.amazon.com/iotanalytics/latest/userguide/getting-started.html#aws-iot-analytics-dataset-versions)</p>
306    #[serde(rename = "versioningConfiguration")]
307    #[serde(skip_serializing_if = "Option::is_none")]
308    pub versioning_configuration: Option<VersioningConfiguration>,
309}
310
311#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
312#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
313pub struct CreateDatasetResponse {
314    /// <p>The ARN of the data set.</p>
315    #[serde(rename = "datasetArn")]
316    #[serde(skip_serializing_if = "Option::is_none")]
317    pub dataset_arn: Option<String>,
318    /// <p>The name of the data set.</p>
319    #[serde(rename = "datasetName")]
320    #[serde(skip_serializing_if = "Option::is_none")]
321    pub dataset_name: Option<String>,
322    /// <p>How long, in days, data set contents are kept for the data set.</p>
323    #[serde(rename = "retentionPeriod")]
324    #[serde(skip_serializing_if = "Option::is_none")]
325    pub retention_period: Option<RetentionPeriod>,
326}
327
328#[derive(Clone, Debug, Default, PartialEq, Serialize)]
329#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
330pub struct CreateDatastoreRequest {
331    /// <p>The name of the data store.</p>
332    #[serde(rename = "datastoreName")]
333    pub datastore_name: String,
334    /// <p>Where data store data is stored. You may choose one of "serviceManagedS3" or "customerManagedS3" storage. If not specified, the default is "serviceManagedS3". This cannot be changed after the data store is created.</p>
335    #[serde(rename = "datastoreStorage")]
336    #[serde(skip_serializing_if = "Option::is_none")]
337    pub datastore_storage: Option<DatastoreStorage>,
338    /// <p>How long, in days, message data is kept for the data store. When "customerManagedS3" storage is selected, this parameter is ignored.</p>
339    #[serde(rename = "retentionPeriod")]
340    #[serde(skip_serializing_if = "Option::is_none")]
341    pub retention_period: Option<RetentionPeriod>,
342    /// <p>Metadata which can be used to manage the data store.</p>
343    #[serde(rename = "tags")]
344    #[serde(skip_serializing_if = "Option::is_none")]
345    pub tags: Option<Vec<Tag>>,
346}
347
348#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
349#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
350pub struct CreateDatastoreResponse {
351    /// <p>The ARN of the data store.</p>
352    #[serde(rename = "datastoreArn")]
353    #[serde(skip_serializing_if = "Option::is_none")]
354    pub datastore_arn: Option<String>,
355    /// <p>The name of the data store.</p>
356    #[serde(rename = "datastoreName")]
357    #[serde(skip_serializing_if = "Option::is_none")]
358    pub datastore_name: Option<String>,
359    /// <p>How long, in days, message data is kept for the data store.</p>
360    #[serde(rename = "retentionPeriod")]
361    #[serde(skip_serializing_if = "Option::is_none")]
362    pub retention_period: Option<RetentionPeriod>,
363}
364
365#[derive(Clone, Debug, Default, PartialEq, Serialize)]
366#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
367pub struct CreatePipelineRequest {
368    /// <p>A list of "PipelineActivity" objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.</p> <p>The list can be 2-25 <b>PipelineActivity</b> objects and must contain both a <code>channel</code> and a <code>datastore</code> activity. Each entry in the list must contain only one activity, for example:</p> <p> <code>pipelineActivities = [ { "channel": { ... } }, { "lambda": { ... } }, ... ]</code> </p>
369    #[serde(rename = "pipelineActivities")]
370    pub pipeline_activities: Vec<PipelineActivity>,
371    /// <p>The name of the pipeline.</p>
372    #[serde(rename = "pipelineName")]
373    pub pipeline_name: String,
374    /// <p>Metadata which can be used to manage the pipeline.</p>
375    #[serde(rename = "tags")]
376    #[serde(skip_serializing_if = "Option::is_none")]
377    pub tags: Option<Vec<Tag>>,
378}
379
380#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
381#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
382pub struct CreatePipelineResponse {
383    /// <p>The ARN of the pipeline.</p>
384    #[serde(rename = "pipelineArn")]
385    #[serde(skip_serializing_if = "Option::is_none")]
386    pub pipeline_arn: Option<String>,
387    /// <p>The name of the pipeline.</p>
388    #[serde(rename = "pipelineName")]
389    #[serde(skip_serializing_if = "Option::is_none")]
390    pub pipeline_name: Option<String>,
391}
392
393/// <p>Use this to store channel data in an S3 bucket that you manage. If customer managed storage is selected, the "retentionPeriod" parameter is ignored. The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the channel.</p>
394#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
395pub struct CustomerManagedChannelS3Storage {
396    /// <p>The name of the Amazon S3 bucket in which channel data is stored.</p>
397    #[serde(rename = "bucket")]
398    pub bucket: String,
399    /// <p>[Optional] The prefix used to create the keys of the channel data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier within the bucket (each object in a bucket has exactly one key). The prefix must end with a '/'.</p>
400    #[serde(rename = "keyPrefix")]
401    #[serde(skip_serializing_if = "Option::is_none")]
402    pub key_prefix: Option<String>,
403    /// <p>The ARN of the role which grants AWS IoT Analytics permission to interact with your Amazon S3 resources.</p>
404    #[serde(rename = "roleArn")]
405    pub role_arn: String,
406}
407
408/// <p>Used to store channel data in an S3 bucket that you manage.</p>
409#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
410#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
411pub struct CustomerManagedChannelS3StorageSummary {
412    /// <p>The name of the Amazon S3 bucket in which channel data is stored.</p>
413    #[serde(rename = "bucket")]
414    #[serde(skip_serializing_if = "Option::is_none")]
415    pub bucket: Option<String>,
416    /// <p>[Optional] The prefix used to create the keys of the channel data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier within the bucket (each object in a bucket has exactly one key). The prefix must end with a '/'.</p>
417    #[serde(rename = "keyPrefix")]
418    #[serde(skip_serializing_if = "Option::is_none")]
419    pub key_prefix: Option<String>,
420    /// <p>The ARN of the role which grants AWS IoT Analytics permission to interact with your Amazon S3 resources.</p>
421    #[serde(rename = "roleArn")]
422    #[serde(skip_serializing_if = "Option::is_none")]
423    pub role_arn: Option<String>,
424}
425
426/// <p>Use this to store data store data in an S3 bucket that you manage. When customer managed storage is selected, the "retentionPeriod" parameter is ignored. The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the data store.</p>
427#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
428pub struct CustomerManagedDatastoreS3Storage {
429    /// <p>The name of the Amazon S3 bucket in which data store data is stored.</p>
430    #[serde(rename = "bucket")]
431    pub bucket: String,
432    /// <p>[Optional] The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier within the bucket (each object in a bucket has exactly one key). The prefix must end with a '/'.</p>
433    #[serde(rename = "keyPrefix")]
434    #[serde(skip_serializing_if = "Option::is_none")]
435    pub key_prefix: Option<String>,
436    /// <p>The ARN of the role which grants AWS IoT Analytics permission to interact with your Amazon S3 resources.</p>
437    #[serde(rename = "roleArn")]
438    pub role_arn: String,
439}
440
441/// <p>Used to store data store data in an S3 bucket that you manage.</p>
442#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
443#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
444pub struct CustomerManagedDatastoreS3StorageSummary {
445    /// <p>The name of the Amazon S3 bucket in which data store data is stored.</p>
446    #[serde(rename = "bucket")]
447    #[serde(skip_serializing_if = "Option::is_none")]
448    pub bucket: Option<String>,
449    /// <p>[Optional] The prefix used to create the keys of the data store data objects. Each object in an Amazon S3 bucket has a key that is its unique identifier within the bucket (each object in a bucket has exactly one key). The prefix must end with a '/'.</p>
450    #[serde(rename = "keyPrefix")]
451    #[serde(skip_serializing_if = "Option::is_none")]
452    pub key_prefix: Option<String>,
453    /// <p>The ARN of the role which grants AWS IoT Analytics permission to interact with your Amazon S3 resources.</p>
454    #[serde(rename = "roleArn")]
455    #[serde(skip_serializing_if = "Option::is_none")]
456    pub role_arn: Option<String>,
457}
458
459/// <p>Information about a data set.</p>
460#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
461#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
462pub struct Dataset {
463    /// <p>The "DatasetAction" objects that automatically create the data set contents.</p>
464    #[serde(rename = "actions")]
465    #[serde(skip_serializing_if = "Option::is_none")]
466    pub actions: Option<Vec<DatasetAction>>,
467    /// <p>The ARN of the data set.</p>
468    #[serde(rename = "arn")]
469    #[serde(skip_serializing_if = "Option::is_none")]
470    pub arn: Option<String>,
471    /// <p>When data set contents are created they are delivered to destinations specified here.</p>
472    #[serde(rename = "contentDeliveryRules")]
473    #[serde(skip_serializing_if = "Option::is_none")]
474    pub content_delivery_rules: Option<Vec<DatasetContentDeliveryRule>>,
475    /// <p>When the data set was created.</p>
476    #[serde(rename = "creationTime")]
477    #[serde(skip_serializing_if = "Option::is_none")]
478    pub creation_time: Option<f64>,
479    /// <p>The last time the data set was updated.</p>
480    #[serde(rename = "lastUpdateTime")]
481    #[serde(skip_serializing_if = "Option::is_none")]
482    pub last_update_time: Option<f64>,
483    /// <p>The name of the data set.</p>
484    #[serde(rename = "name")]
485    #[serde(skip_serializing_if = "Option::is_none")]
486    pub name: Option<String>,
487    /// <p>[Optional] How long, in days, message data is kept for the data set.</p>
488    #[serde(rename = "retentionPeriod")]
489    #[serde(skip_serializing_if = "Option::is_none")]
490    pub retention_period: Option<RetentionPeriod>,
491    /// <p>The status of the data set.</p>
492    #[serde(rename = "status")]
493    #[serde(skip_serializing_if = "Option::is_none")]
494    pub status: Option<String>,
495    /// <p>The "DatasetTrigger" objects that specify when the data set is automatically updated.</p>
496    #[serde(rename = "triggers")]
497    #[serde(skip_serializing_if = "Option::is_none")]
498    pub triggers: Option<Vec<DatasetTrigger>>,
499    /// <p>[Optional] How many versions of data set contents are kept. If not specified or set to null, only the latest version plus the latest succeeded version (if they are different) are kept for the time period specified by the "retentionPeriod" parameter. (For more information, see https://docs.aws.amazon.com/iotanalytics/latest/userguide/getting-started.html#aws-iot-analytics-dataset-versions)</p>
500    #[serde(rename = "versioningConfiguration")]
501    #[serde(skip_serializing_if = "Option::is_none")]
502    pub versioning_configuration: Option<VersioningConfiguration>,
503}
504
505/// <p>A "DatasetAction" object that specifies how data set contents are automatically created.</p>
506#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
507pub struct DatasetAction {
508    /// <p>The name of the data set action by which data set contents are automatically created.</p>
509    #[serde(rename = "actionName")]
510    #[serde(skip_serializing_if = "Option::is_none")]
511    pub action_name: Option<String>,
512    /// <p>Information which allows the system to run a containerized application in order to create the data set contents. The application must be in a Docker container along with any needed support libraries.</p>
513    #[serde(rename = "containerAction")]
514    #[serde(skip_serializing_if = "Option::is_none")]
515    pub container_action: Option<ContainerDatasetAction>,
516    /// <p>An "SqlQueryDatasetAction" object that uses an SQL query to automatically create data set contents.</p>
517    #[serde(rename = "queryAction")]
518    #[serde(skip_serializing_if = "Option::is_none")]
519    pub query_action: Option<SqlQueryDatasetAction>,
520}
521
522/// <p>Information about the action which automatically creates the data set's contents.</p>
523#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
524#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
525pub struct DatasetActionSummary {
526    /// <p>The name of the action which automatically creates the data set's contents.</p>
527    #[serde(rename = "actionName")]
528    #[serde(skip_serializing_if = "Option::is_none")]
529    pub action_name: Option<String>,
530    /// <p>The type of action by which the data set's contents are automatically created.</p>
531    #[serde(rename = "actionType")]
532    #[serde(skip_serializing_if = "Option::is_none")]
533    pub action_type: Option<String>,
534}
535
536/// <p>The destination to which data set contents are delivered.</p>
537#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
538pub struct DatasetContentDeliveryDestination {
539    /// <p>Configuration information for delivery of data set contents to AWS IoT Events.</p>
540    #[serde(rename = "iotEventsDestinationConfiguration")]
541    #[serde(skip_serializing_if = "Option::is_none")]
542    pub iot_events_destination_configuration: Option<IotEventsDestinationConfiguration>,
543    /// <p>Configuration information for delivery of data set contents to Amazon S3.</p>
544    #[serde(rename = "s3DestinationConfiguration")]
545    #[serde(skip_serializing_if = "Option::is_none")]
546    pub s_3_destination_configuration: Option<S3DestinationConfiguration>,
547}
548
549/// <p>When data set contents are created they are delivered to destination specified here.</p>
550#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
551pub struct DatasetContentDeliveryRule {
552    /// <p>The destination to which data set contents are delivered.</p>
553    #[serde(rename = "destination")]
554    pub destination: DatasetContentDeliveryDestination,
555    /// <p>The name of the data set content delivery rules entry.</p>
556    #[serde(rename = "entryName")]
557    #[serde(skip_serializing_if = "Option::is_none")]
558    pub entry_name: Option<String>,
559}
560
561/// <p>The state of the data set contents and the reason they are in this state.</p>
562#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
563#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
564pub struct DatasetContentStatus {
565    /// <p>The reason the data set contents are in this state.</p>
566    #[serde(rename = "reason")]
567    #[serde(skip_serializing_if = "Option::is_none")]
568    pub reason: Option<String>,
569    /// <p>The state of the data set contents. Can be one of "READY", "CREATING", "SUCCEEDED" or "FAILED".</p>
570    #[serde(rename = "state")]
571    #[serde(skip_serializing_if = "Option::is_none")]
572    pub state: Option<String>,
573}
574
575/// <p>Summary information about data set contents.</p>
576#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
577#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
578pub struct DatasetContentSummary {
579    /// <p>The time the dataset content status was updated to SUCCEEDED or FAILED.</p>
580    #[serde(rename = "completionTime")]
581    #[serde(skip_serializing_if = "Option::is_none")]
582    pub completion_time: Option<f64>,
583    /// <p>The actual time the creation of the data set contents was started.</p>
584    #[serde(rename = "creationTime")]
585    #[serde(skip_serializing_if = "Option::is_none")]
586    pub creation_time: Option<f64>,
587    /// <p>The time the creation of the data set contents was scheduled to start.</p>
588    #[serde(rename = "scheduleTime")]
589    #[serde(skip_serializing_if = "Option::is_none")]
590    pub schedule_time: Option<f64>,
591    /// <p>The status of the data set contents.</p>
592    #[serde(rename = "status")]
593    #[serde(skip_serializing_if = "Option::is_none")]
594    pub status: Option<DatasetContentStatus>,
595    /// <p>The version of the data set contents.</p>
596    #[serde(rename = "version")]
597    #[serde(skip_serializing_if = "Option::is_none")]
598    pub version: Option<String>,
599}
600
601/// <p>The data set whose latest contents are used as input to the notebook or application.</p>
602#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
603pub struct DatasetContentVersionValue {
604    /// <p>The name of the data set whose latest contents are used as input to the notebook or application.</p>
605    #[serde(rename = "datasetName")]
606    pub dataset_name: String,
607}
608
609/// <p>The reference to a data set entry.</p>
610#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
611#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
612pub struct DatasetEntry {
613    /// <p>The pre-signed URI of the data set item.</p>
614    #[serde(rename = "dataURI")]
615    #[serde(skip_serializing_if = "Option::is_none")]
616    pub data_uri: Option<String>,
617    /// <p>The name of the data set item.</p>
618    #[serde(rename = "entryName")]
619    #[serde(skip_serializing_if = "Option::is_none")]
620    pub entry_name: Option<String>,
621}
622
623/// <p>A summary of information about a data set.</p>
624#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
625#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
626pub struct DatasetSummary {
627    /// <p>A list of "DataActionSummary" objects.</p>
628    #[serde(rename = "actions")]
629    #[serde(skip_serializing_if = "Option::is_none")]
630    pub actions: Option<Vec<DatasetActionSummary>>,
631    /// <p>The time the data set was created.</p>
632    #[serde(rename = "creationTime")]
633    #[serde(skip_serializing_if = "Option::is_none")]
634    pub creation_time: Option<f64>,
635    /// <p>The name of the data set.</p>
636    #[serde(rename = "datasetName")]
637    #[serde(skip_serializing_if = "Option::is_none")]
638    pub dataset_name: Option<String>,
639    /// <p>The last time the data set was updated.</p>
640    #[serde(rename = "lastUpdateTime")]
641    #[serde(skip_serializing_if = "Option::is_none")]
642    pub last_update_time: Option<f64>,
643    /// <p>The status of the data set.</p>
644    #[serde(rename = "status")]
645    #[serde(skip_serializing_if = "Option::is_none")]
646    pub status: Option<String>,
647    /// <p>A list of triggers. A trigger causes data set content to be populated at a specified time interval or when another data set is populated. The list of triggers can be empty or contain up to five DataSetTrigger objects</p>
648    #[serde(rename = "triggers")]
649    #[serde(skip_serializing_if = "Option::is_none")]
650    pub triggers: Option<Vec<DatasetTrigger>>,
651}
652
653/// <p>The "DatasetTrigger" that specifies when the data set is automatically updated.</p>
654#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
655pub struct DatasetTrigger {
656    /// <p>The data set whose content creation triggers the creation of this data set's contents.</p>
657    #[serde(rename = "dataset")]
658    #[serde(skip_serializing_if = "Option::is_none")]
659    pub dataset: Option<TriggeringDataset>,
660    /// <p>The "Schedule" when the trigger is initiated.</p>
661    #[serde(rename = "schedule")]
662    #[serde(skip_serializing_if = "Option::is_none")]
663    pub schedule: Option<Schedule>,
664}
665
666/// <p>Information about a data store.</p>
667#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
668#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
669pub struct Datastore {
670    /// <p>The ARN of the data store.</p>
671    #[serde(rename = "arn")]
672    #[serde(skip_serializing_if = "Option::is_none")]
673    pub arn: Option<String>,
674    /// <p>When the data store was created.</p>
675    #[serde(rename = "creationTime")]
676    #[serde(skip_serializing_if = "Option::is_none")]
677    pub creation_time: Option<f64>,
678    /// <p>The last time the data store was updated.</p>
679    #[serde(rename = "lastUpdateTime")]
680    #[serde(skip_serializing_if = "Option::is_none")]
681    pub last_update_time: Option<f64>,
682    /// <p>The name of the data store.</p>
683    #[serde(rename = "name")]
684    #[serde(skip_serializing_if = "Option::is_none")]
685    pub name: Option<String>,
686    /// <p>How long, in days, message data is kept for the data store. When "customerManagedS3" storage is selected, this parameter is ignored.</p>
687    #[serde(rename = "retentionPeriod")]
688    #[serde(skip_serializing_if = "Option::is_none")]
689    pub retention_period: Option<RetentionPeriod>,
690    /// <p><p>The status of a data store:</p> <dl> <dt>CREATING</dt> <dd> <p>The data store is being created.</p> </dd> <dt>ACTIVE</dt> <dd> <p>The data store has been created and can be used.</p> </dd> <dt>DELETING</dt> <dd> <p>The data store is being deleted.</p> </dd> </dl></p>
691    #[serde(rename = "status")]
692    #[serde(skip_serializing_if = "Option::is_none")]
693    pub status: Option<String>,
694    /// <p>Where data store data is stored. You may choose one of "serviceManagedS3" or "customerManagedS3" storage. If not specified, the default is "serviceManagedS3". This cannot be changed after the data store is created.</p>
695    #[serde(rename = "storage")]
696    #[serde(skip_serializing_if = "Option::is_none")]
697    pub storage: Option<DatastoreStorage>,
698}
699
700/// <p>The 'datastore' activity that specifies where to store the processed data.</p>
701#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
702pub struct DatastoreActivity {
703    /// <p>The name of the data store where processed messages are stored.</p>
704    #[serde(rename = "datastoreName")]
705    pub datastore_name: String,
706    /// <p>The name of the 'datastore' activity.</p>
707    #[serde(rename = "name")]
708    pub name: String,
709}
710
711/// <p>Statistical information about the data store.</p>
712#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
713#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
714pub struct DatastoreStatistics {
715    /// <p>The estimated size of the data store.</p>
716    #[serde(rename = "size")]
717    #[serde(skip_serializing_if = "Option::is_none")]
718    pub size: Option<EstimatedResourceSize>,
719}
720
721/// <p>Where data store data is stored. You may choose one of "serviceManagedS3" or "customerManagedS3" storage. If not specified, the default is "serviceManagedS3". This cannot be changed after the data store is created.</p>
722#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
723pub struct DatastoreStorage {
724    /// <p>Use this to store data store data in an S3 bucket that you manage. When customer managed storage is selected, the "retentionPeriod" parameter is ignored. The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the data store.</p>
725    #[serde(rename = "customerManagedS3")]
726    #[serde(skip_serializing_if = "Option::is_none")]
727    pub customer_managed_s3: Option<CustomerManagedDatastoreS3Storage>,
728    /// <p>Use this to store data store data in an S3 bucket managed by the AWS IoT Analytics service. The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the data store.</p>
729    #[serde(rename = "serviceManagedS3")]
730    #[serde(skip_serializing_if = "Option::is_none")]
731    pub service_managed_s3: Option<ServiceManagedDatastoreS3Storage>,
732}
733
734/// <p>Where data store data is stored.</p>
735#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
736#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
737pub struct DatastoreStorageSummary {
738    /// <p>Used to store data store data in an S3 bucket that you manage.</p>
739    #[serde(rename = "customerManagedS3")]
740    #[serde(skip_serializing_if = "Option::is_none")]
741    pub customer_managed_s3: Option<CustomerManagedDatastoreS3StorageSummary>,
742    /// <p>Used to store data store data in an S3 bucket managed by the AWS IoT Analytics service.</p>
743    #[serde(rename = "serviceManagedS3")]
744    #[serde(skip_serializing_if = "Option::is_none")]
745    pub service_managed_s3: Option<ServiceManagedDatastoreS3StorageSummary>,
746}
747
748/// <p>A summary of information about a data store.</p>
749#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
750#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
751pub struct DatastoreSummary {
752    /// <p>When the data store was created.</p>
753    #[serde(rename = "creationTime")]
754    #[serde(skip_serializing_if = "Option::is_none")]
755    pub creation_time: Option<f64>,
756    /// <p>The name of the data store.</p>
757    #[serde(rename = "datastoreName")]
758    #[serde(skip_serializing_if = "Option::is_none")]
759    pub datastore_name: Option<String>,
760    /// <p>Where data store data is stored.</p>
761    #[serde(rename = "datastoreStorage")]
762    #[serde(skip_serializing_if = "Option::is_none")]
763    pub datastore_storage: Option<DatastoreStorageSummary>,
764    /// <p>The last time the data store was updated.</p>
765    #[serde(rename = "lastUpdateTime")]
766    #[serde(skip_serializing_if = "Option::is_none")]
767    pub last_update_time: Option<f64>,
768    /// <p>The status of the data store.</p>
769    #[serde(rename = "status")]
770    #[serde(skip_serializing_if = "Option::is_none")]
771    pub status: Option<String>,
772}
773
774#[derive(Clone, Debug, Default, PartialEq, Serialize)]
775#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
776pub struct DeleteChannelRequest {
777    /// <p>The name of the channel to delete.</p>
778    #[serde(rename = "channelName")]
779    pub channel_name: String,
780}
781
782#[derive(Clone, Debug, Default, PartialEq, Serialize)]
783#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
784pub struct DeleteDatasetContentRequest {
785    /// <p>The name of the data set whose content is deleted.</p>
786    #[serde(rename = "datasetName")]
787    pub dataset_name: String,
788    /// <p>The version of the data set whose content is deleted. You can also use the strings "$LATEST" or "$LATEST_SUCCEEDED" to delete the latest or latest successfully completed data set. If not specified, "$LATEST_SUCCEEDED" is the default.</p>
789    #[serde(rename = "versionId")]
790    #[serde(skip_serializing_if = "Option::is_none")]
791    pub version_id: Option<String>,
792}
793
794#[derive(Clone, Debug, Default, PartialEq, Serialize)]
795#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
796pub struct DeleteDatasetRequest {
797    /// <p>The name of the data set to delete.</p>
798    #[serde(rename = "datasetName")]
799    pub dataset_name: String,
800}
801
802#[derive(Clone, Debug, Default, PartialEq, Serialize)]
803#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
804pub struct DeleteDatastoreRequest {
805    /// <p>The name of the data store to delete.</p>
806    #[serde(rename = "datastoreName")]
807    pub datastore_name: String,
808}
809
810#[derive(Clone, Debug, Default, PartialEq, Serialize)]
811#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
812pub struct DeletePipelineRequest {
813    /// <p>The name of the pipeline to delete.</p>
814    #[serde(rename = "pipelineName")]
815    pub pipeline_name: String,
816}
817
818/// <p>Used to limit data to that which has arrived since the last execution of the action.</p>
819#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
820pub struct DeltaTime {
821    /// <p>The number of seconds of estimated "in flight" lag time of message data. When you create data set contents using message data from a specified time frame, some message data may still be "in flight" when processing begins, and so will not arrive in time to be processed. Use this field to make allowances for the "in flight" time of your message data, so that data not processed from a previous time frame will be included with the next time frame. Without this, missed message data would be excluded from processing during the next time frame as well, because its timestamp places it within the previous time frame.</p>
822    #[serde(rename = "offsetSeconds")]
823    pub offset_seconds: i64,
824    /// <p>An expression by which the time of the message data may be determined. This may be the name of a timestamp field, or a SQL expression which is used to derive the time the message data was generated.</p>
825    #[serde(rename = "timeExpression")]
826    pub time_expression: String,
827}
828
829#[derive(Clone, Debug, Default, PartialEq, Serialize)]
830#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
831pub struct DescribeChannelRequest {
832    /// <p>The name of the channel whose information is retrieved.</p>
833    #[serde(rename = "channelName")]
834    pub channel_name: String,
835    /// <p>If true, additional statistical information about the channel is included in the response. This feature cannot be used with a channel whose S3 storage is customer-managed.</p>
836    #[serde(rename = "includeStatistics")]
837    #[serde(skip_serializing_if = "Option::is_none")]
838    pub include_statistics: Option<bool>,
839}
840
841#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
842#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
843pub struct DescribeChannelResponse {
844    /// <p>An object that contains information about the channel.</p>
845    #[serde(rename = "channel")]
846    #[serde(skip_serializing_if = "Option::is_none")]
847    pub channel: Option<Channel>,
848    /// <p>Statistics about the channel. Included if the 'includeStatistics' parameter is set to true in the request.</p>
849    #[serde(rename = "statistics")]
850    #[serde(skip_serializing_if = "Option::is_none")]
851    pub statistics: Option<ChannelStatistics>,
852}
853
854#[derive(Clone, Debug, Default, PartialEq, Serialize)]
855#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
856pub struct DescribeDatasetRequest {
857    /// <p>The name of the data set whose information is retrieved.</p>
858    #[serde(rename = "datasetName")]
859    pub dataset_name: String,
860}
861
862#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
863#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
864pub struct DescribeDatasetResponse {
865    /// <p>An object that contains information about the data set.</p>
866    #[serde(rename = "dataset")]
867    #[serde(skip_serializing_if = "Option::is_none")]
868    pub dataset: Option<Dataset>,
869}
870
871#[derive(Clone, Debug, Default, PartialEq, Serialize)]
872#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
873pub struct DescribeDatastoreRequest {
874    /// <p>The name of the data store</p>
875    #[serde(rename = "datastoreName")]
876    pub datastore_name: String,
877    /// <p>If true, additional statistical information about the data store is included in the response. This feature cannot be used with a data store whose S3 storage is customer-managed.</p>
878    #[serde(rename = "includeStatistics")]
879    #[serde(skip_serializing_if = "Option::is_none")]
880    pub include_statistics: Option<bool>,
881}
882
883#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
884#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
885pub struct DescribeDatastoreResponse {
886    /// <p>Information about the data store.</p>
887    #[serde(rename = "datastore")]
888    #[serde(skip_serializing_if = "Option::is_none")]
889    pub datastore: Option<Datastore>,
890    /// <p>Additional statistical information about the data store. Included if the 'includeStatistics' parameter is set to true in the request.</p>
891    #[serde(rename = "statistics")]
892    #[serde(skip_serializing_if = "Option::is_none")]
893    pub statistics: Option<DatastoreStatistics>,
894}
895
896#[derive(Clone, Debug, Default, PartialEq, Serialize)]
897#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
898pub struct DescribeLoggingOptionsRequest {}
899
900#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
901#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
902pub struct DescribeLoggingOptionsResponse {
903    /// <p>The current settings of the AWS IoT Analytics logging options.</p>
904    #[serde(rename = "loggingOptions")]
905    #[serde(skip_serializing_if = "Option::is_none")]
906    pub logging_options: Option<LoggingOptions>,
907}
908
909#[derive(Clone, Debug, Default, PartialEq, Serialize)]
910#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
911pub struct DescribePipelineRequest {
912    /// <p>The name of the pipeline whose information is retrieved.</p>
913    #[serde(rename = "pipelineName")]
914    pub pipeline_name: String,
915}
916
917#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
918#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
919pub struct DescribePipelineResponse {
920    /// <p>A "Pipeline" object that contains information about the pipeline.</p>
921    #[serde(rename = "pipeline")]
922    #[serde(skip_serializing_if = "Option::is_none")]
923    pub pipeline: Option<Pipeline>,
924}
925
926/// <p>An activity that adds data from the AWS IoT device registry to your message.</p>
927#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
928pub struct DeviceRegistryEnrichActivity {
929    /// <p>The name of the attribute that is added to the message.</p>
930    #[serde(rename = "attribute")]
931    pub attribute: String,
932    /// <p>The name of the 'deviceRegistryEnrich' activity.</p>
933    #[serde(rename = "name")]
934    pub name: String,
935    /// <p>The next activity in the pipeline.</p>
936    #[serde(rename = "next")]
937    #[serde(skip_serializing_if = "Option::is_none")]
938    pub next: Option<String>,
939    /// <p>The ARN of the role that allows access to the device's registry information.</p>
940    #[serde(rename = "roleArn")]
941    pub role_arn: String,
942    /// <p>The name of the IoT device whose registry information is added to the message.</p>
943    #[serde(rename = "thingName")]
944    pub thing_name: String,
945}
946
947/// <p>An activity that adds information from the AWS IoT Device Shadows service to a message.</p>
948#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
949pub struct DeviceShadowEnrichActivity {
950    /// <p>The name of the attribute that is added to the message.</p>
951    #[serde(rename = "attribute")]
952    pub attribute: String,
953    /// <p>The name of the 'deviceShadowEnrich' activity.</p>
954    #[serde(rename = "name")]
955    pub name: String,
956    /// <p>The next activity in the pipeline.</p>
957    #[serde(rename = "next")]
958    #[serde(skip_serializing_if = "Option::is_none")]
959    pub next: Option<String>,
960    /// <p>The ARN of the role that allows access to the device's shadow.</p>
961    #[serde(rename = "roleArn")]
962    pub role_arn: String,
963    /// <p>The name of the IoT device whose shadow information is added to the message.</p>
964    #[serde(rename = "thingName")]
965    pub thing_name: String,
966}
967
968/// <p>The estimated size of the resource.</p>
969#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
970#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
971pub struct EstimatedResourceSize {
972    /// <p>The time when the estimate of the size of the resource was made.</p>
973    #[serde(rename = "estimatedOn")]
974    #[serde(skip_serializing_if = "Option::is_none")]
975    pub estimated_on: Option<f64>,
976    /// <p>The estimated size of the resource in bytes.</p>
977    #[serde(rename = "estimatedSizeInBytes")]
978    #[serde(skip_serializing_if = "Option::is_none")]
979    pub estimated_size_in_bytes: Option<f64>,
980}
981
982/// <p>An activity that filters a message based on its attributes.</p>
983#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
984pub struct FilterActivity {
985    /// <p>An expression that looks like a SQL WHERE clause that must return a Boolean value.</p>
986    #[serde(rename = "filter")]
987    pub filter: String,
988    /// <p>The name of the 'filter' activity.</p>
989    #[serde(rename = "name")]
990    pub name: String,
991    /// <p>The next activity in the pipeline.</p>
992    #[serde(rename = "next")]
993    #[serde(skip_serializing_if = "Option::is_none")]
994    pub next: Option<String>,
995}
996
997#[derive(Clone, Debug, Default, PartialEq, Serialize)]
998#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
999pub struct GetDatasetContentRequest {
1000    /// <p>The name of the data set whose contents are retrieved.</p>
1001    #[serde(rename = "datasetName")]
1002    pub dataset_name: String,
1003    /// <p>The version of the data set whose contents are retrieved. You can also use the strings "$LATEST" or "$LATEST_SUCCEEDED" to retrieve the contents of the latest or latest successfully completed data set. If not specified, "$LATEST_SUCCEEDED" is the default.</p>
1004    #[serde(rename = "versionId")]
1005    #[serde(skip_serializing_if = "Option::is_none")]
1006    pub version_id: Option<String>,
1007}
1008
1009#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1010#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1011pub struct GetDatasetContentResponse {
1012    /// <p>A list of "DatasetEntry" objects.</p>
1013    #[serde(rename = "entries")]
1014    #[serde(skip_serializing_if = "Option::is_none")]
1015    pub entries: Option<Vec<DatasetEntry>>,
1016    /// <p>The status of the data set content.</p>
1017    #[serde(rename = "status")]
1018    #[serde(skip_serializing_if = "Option::is_none")]
1019    pub status: Option<DatasetContentStatus>,
1020    /// <p>The time when the request was made.</p>
1021    #[serde(rename = "timestamp")]
1022    #[serde(skip_serializing_if = "Option::is_none")]
1023    pub timestamp: Option<f64>,
1024}
1025
1026/// <p>Configuration information for coordination with the AWS Glue ETL (extract, transform and load) service.</p>
1027#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1028pub struct GlueConfiguration {
1029    /// <p>The name of the database in your AWS Glue Data Catalog in which the table is located. (An AWS Glue Data Catalog database contains Glue Data tables.)</p>
1030    #[serde(rename = "databaseName")]
1031    pub database_name: String,
1032    /// <p>The name of the table in your AWS Glue Data Catalog which is used to perform the ETL (extract, transform and load) operations. (An AWS Glue Data Catalog table contains partitioned data and descriptions of data sources and targets.)</p>
1033    #[serde(rename = "tableName")]
1034    pub table_name: String,
1035}
1036
1037/// <p>Configuration information for delivery of data set contents to AWS IoT Events.</p>
1038#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1039pub struct IotEventsDestinationConfiguration {
1040    /// <p>The name of the AWS IoT Events input to which data set contents are delivered.</p>
1041    #[serde(rename = "inputName")]
1042    pub input_name: String,
1043    /// <p>The ARN of the role which grants AWS IoT Analytics permission to deliver data set contents to an AWS IoT Events input.</p>
1044    #[serde(rename = "roleArn")]
1045    pub role_arn: String,
1046}
1047
1048/// <p>An activity that runs a Lambda function to modify the message.</p>
1049#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1050pub struct LambdaActivity {
1051    /// <p>The number of messages passed to the Lambda function for processing.</p> <p>The AWS Lambda function must be able to process all of these messages within five minutes, which is the maximum timeout duration for Lambda functions.</p>
1052    #[serde(rename = "batchSize")]
1053    pub batch_size: i64,
1054    /// <p>The name of the Lambda function that is run on the message.</p>
1055    #[serde(rename = "lambdaName")]
1056    pub lambda_name: String,
1057    /// <p>The name of the 'lambda' activity.</p>
1058    #[serde(rename = "name")]
1059    pub name: String,
1060    /// <p>The next activity in the pipeline.</p>
1061    #[serde(rename = "next")]
1062    #[serde(skip_serializing_if = "Option::is_none")]
1063    pub next: Option<String>,
1064}
1065
1066#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1067#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1068pub struct ListChannelsRequest {
1069    /// <p>The maximum number of results to return in this request.</p> <p>The default value is 100.</p>
1070    #[serde(rename = "maxResults")]
1071    #[serde(skip_serializing_if = "Option::is_none")]
1072    pub max_results: Option<i64>,
1073    /// <p>The token for the next set of results.</p>
1074    #[serde(rename = "nextToken")]
1075    #[serde(skip_serializing_if = "Option::is_none")]
1076    pub next_token: Option<String>,
1077}
1078
1079#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1080#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1081pub struct ListChannelsResponse {
1082    /// <p>A list of "ChannelSummary" objects.</p>
1083    #[serde(rename = "channelSummaries")]
1084    #[serde(skip_serializing_if = "Option::is_none")]
1085    pub channel_summaries: Option<Vec<ChannelSummary>>,
1086    /// <p>The token to retrieve the next set of results, or <code>null</code> if there are no more results.</p>
1087    #[serde(rename = "nextToken")]
1088    #[serde(skip_serializing_if = "Option::is_none")]
1089    pub next_token: Option<String>,
1090}
1091
1092#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1093#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1094pub struct ListDatasetContentsRequest {
1095    /// <p>The name of the data set whose contents information you want to list.</p>
1096    #[serde(rename = "datasetName")]
1097    pub dataset_name: String,
1098    /// <p>The maximum number of results to return in this request.</p>
1099    #[serde(rename = "maxResults")]
1100    #[serde(skip_serializing_if = "Option::is_none")]
1101    pub max_results: Option<i64>,
1102    /// <p>The token for the next set of results.</p>
1103    #[serde(rename = "nextToken")]
1104    #[serde(skip_serializing_if = "Option::is_none")]
1105    pub next_token: Option<String>,
1106    /// <p>A filter to limit results to those data set contents whose creation is scheduled before the given time. See the field <code>triggers.schedule</code> in the CreateDataset request. (timestamp)</p>
1107    #[serde(rename = "scheduledBefore")]
1108    #[serde(skip_serializing_if = "Option::is_none")]
1109    pub scheduled_before: Option<f64>,
1110    /// <p>A filter to limit results to those data set contents whose creation is scheduled on or after the given time. See the field <code>triggers.schedule</code> in the CreateDataset request. (timestamp)</p>
1111    #[serde(rename = "scheduledOnOrAfter")]
1112    #[serde(skip_serializing_if = "Option::is_none")]
1113    pub scheduled_on_or_after: Option<f64>,
1114}
1115
1116#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1117#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1118pub struct ListDatasetContentsResponse {
1119    /// <p>Summary information about data set contents that have been created.</p>
1120    #[serde(rename = "datasetContentSummaries")]
1121    #[serde(skip_serializing_if = "Option::is_none")]
1122    pub dataset_content_summaries: Option<Vec<DatasetContentSummary>>,
1123    /// <p>The token to retrieve the next set of results, or <code>null</code> if there are no more results.</p>
1124    #[serde(rename = "nextToken")]
1125    #[serde(skip_serializing_if = "Option::is_none")]
1126    pub next_token: Option<String>,
1127}
1128
1129#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1130#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1131pub struct ListDatasetsRequest {
1132    /// <p>The maximum number of results to return in this request.</p> <p>The default value is 100.</p>
1133    #[serde(rename = "maxResults")]
1134    #[serde(skip_serializing_if = "Option::is_none")]
1135    pub max_results: Option<i64>,
1136    /// <p>The token for the next set of results.</p>
1137    #[serde(rename = "nextToken")]
1138    #[serde(skip_serializing_if = "Option::is_none")]
1139    pub next_token: Option<String>,
1140}
1141
1142#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1143#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1144pub struct ListDatasetsResponse {
1145    /// <p>A list of "DatasetSummary" objects.</p>
1146    #[serde(rename = "datasetSummaries")]
1147    #[serde(skip_serializing_if = "Option::is_none")]
1148    pub dataset_summaries: Option<Vec<DatasetSummary>>,
1149    /// <p>The token to retrieve the next set of results, or <code>null</code> if there are no more results.</p>
1150    #[serde(rename = "nextToken")]
1151    #[serde(skip_serializing_if = "Option::is_none")]
1152    pub next_token: Option<String>,
1153}
1154
1155#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1156#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1157pub struct ListDatastoresRequest {
1158    /// <p>The maximum number of results to return in this request.</p> <p>The default value is 100.</p>
1159    #[serde(rename = "maxResults")]
1160    #[serde(skip_serializing_if = "Option::is_none")]
1161    pub max_results: Option<i64>,
1162    /// <p>The token for the next set of results.</p>
1163    #[serde(rename = "nextToken")]
1164    #[serde(skip_serializing_if = "Option::is_none")]
1165    pub next_token: Option<String>,
1166}
1167
1168#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1169#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1170pub struct ListDatastoresResponse {
1171    /// <p>A list of "DatastoreSummary" objects.</p>
1172    #[serde(rename = "datastoreSummaries")]
1173    #[serde(skip_serializing_if = "Option::is_none")]
1174    pub datastore_summaries: Option<Vec<DatastoreSummary>>,
1175    /// <p>The token to retrieve the next set of results, or <code>null</code> if there are no more results.</p>
1176    #[serde(rename = "nextToken")]
1177    #[serde(skip_serializing_if = "Option::is_none")]
1178    pub next_token: Option<String>,
1179}
1180
1181#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1182#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1183pub struct ListPipelinesRequest {
1184    /// <p>The maximum number of results to return in this request.</p> <p>The default value is 100.</p>
1185    #[serde(rename = "maxResults")]
1186    #[serde(skip_serializing_if = "Option::is_none")]
1187    pub max_results: Option<i64>,
1188    /// <p>The token for the next set of results.</p>
1189    #[serde(rename = "nextToken")]
1190    #[serde(skip_serializing_if = "Option::is_none")]
1191    pub next_token: Option<String>,
1192}
1193
1194#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1195#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1196pub struct ListPipelinesResponse {
1197    /// <p>The token to retrieve the next set of results, or <code>null</code> if there are no more results.</p>
1198    #[serde(rename = "nextToken")]
1199    #[serde(skip_serializing_if = "Option::is_none")]
1200    pub next_token: Option<String>,
1201    /// <p>A list of "PipelineSummary" objects.</p>
1202    #[serde(rename = "pipelineSummaries")]
1203    #[serde(skip_serializing_if = "Option::is_none")]
1204    pub pipeline_summaries: Option<Vec<PipelineSummary>>,
1205}
1206
1207#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1208#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1209pub struct ListTagsForResourceRequest {
1210    /// <p>The ARN of the resource whose tags you want to list.</p>
1211    #[serde(rename = "resourceArn")]
1212    pub resource_arn: String,
1213}
1214
1215#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1216#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1217pub struct ListTagsForResourceResponse {
1218    /// <p>The tags (metadata) which you have assigned to the resource.</p>
1219    #[serde(rename = "tags")]
1220    #[serde(skip_serializing_if = "Option::is_none")]
1221    pub tags: Option<Vec<Tag>>,
1222}
1223
1224/// <p>Information about logging options.</p>
1225#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1226pub struct LoggingOptions {
1227    /// <p>If true, logging is enabled for AWS IoT Analytics.</p>
1228    #[serde(rename = "enabled")]
1229    pub enabled: bool,
1230    /// <p>The logging level. Currently, only "ERROR" is supported.</p>
1231    #[serde(rename = "level")]
1232    pub level: String,
1233    /// <p>The ARN of the role that grants permission to AWS IoT Analytics to perform logging.</p>
1234    #[serde(rename = "roleArn")]
1235    pub role_arn: String,
1236}
1237
1238/// <p>An activity that computes an arithmetic expression using the message's attributes.</p>
1239#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1240pub struct MathActivity {
1241    /// <p>The name of the attribute that contains the result of the math operation.</p>
1242    #[serde(rename = "attribute")]
1243    pub attribute: String,
1244    /// <p>An expression that uses one or more existing attributes and must return an integer value.</p>
1245    #[serde(rename = "math")]
1246    pub math: String,
1247    /// <p>The name of the 'math' activity.</p>
1248    #[serde(rename = "name")]
1249    pub name: String,
1250    /// <p>The next activity in the pipeline.</p>
1251    #[serde(rename = "next")]
1252    #[serde(skip_serializing_if = "Option::is_none")]
1253    pub next: Option<String>,
1254}
1255
1256/// <p>Information about a message.</p>
1257#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1258#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1259pub struct Message {
1260    /// <p>The ID you wish to assign to the message. Each "messageId" must be unique within each batch sent.</p>
1261    #[serde(rename = "messageId")]
1262    pub message_id: String,
1263    /// <p>The payload of the message. This may be a JSON string or a Base64-encoded string representing binary data (in which case you must decode it by means of a pipeline activity).</p>
1264    #[serde(rename = "payload")]
1265    #[serde(
1266        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
1267        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
1268        default
1269    )]
1270    pub payload: bytes::Bytes,
1271}
1272
1273/// <p>The value of the variable as a structure that specifies an output file URI.</p>
1274#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1275pub struct OutputFileUriValue {
1276    /// <p>The URI of the location where data set contents are stored, usually the URI of a file in an S3 bucket.</p>
1277    #[serde(rename = "fileName")]
1278    pub file_name: String,
1279}
1280
1281/// <p>Contains information about a pipeline.</p>
1282#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1283#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1284pub struct Pipeline {
1285    /// <p>The activities that perform transformations on the messages.</p>
1286    #[serde(rename = "activities")]
1287    #[serde(skip_serializing_if = "Option::is_none")]
1288    pub activities: Option<Vec<PipelineActivity>>,
1289    /// <p>The ARN of the pipeline.</p>
1290    #[serde(rename = "arn")]
1291    #[serde(skip_serializing_if = "Option::is_none")]
1292    pub arn: Option<String>,
1293    /// <p>When the pipeline was created.</p>
1294    #[serde(rename = "creationTime")]
1295    #[serde(skip_serializing_if = "Option::is_none")]
1296    pub creation_time: Option<f64>,
1297    /// <p>The last time the pipeline was updated.</p>
1298    #[serde(rename = "lastUpdateTime")]
1299    #[serde(skip_serializing_if = "Option::is_none")]
1300    pub last_update_time: Option<f64>,
1301    /// <p>The name of the pipeline.</p>
1302    #[serde(rename = "name")]
1303    #[serde(skip_serializing_if = "Option::is_none")]
1304    pub name: Option<String>,
1305    /// <p>A summary of information about the pipeline reprocessing.</p>
1306    #[serde(rename = "reprocessingSummaries")]
1307    #[serde(skip_serializing_if = "Option::is_none")]
1308    pub reprocessing_summaries: Option<Vec<ReprocessingSummary>>,
1309}
1310
1311/// <p>An activity that performs a transformation on a message.</p>
1312#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1313pub struct PipelineActivity {
1314    /// <p>Adds other attributes based on existing attributes in the message.</p>
1315    #[serde(rename = "addAttributes")]
1316    #[serde(skip_serializing_if = "Option::is_none")]
1317    pub add_attributes: Option<AddAttributesActivity>,
1318    /// <p>Determines the source of the messages to be processed.</p>
1319    #[serde(rename = "channel")]
1320    #[serde(skip_serializing_if = "Option::is_none")]
1321    pub channel: Option<ChannelActivity>,
1322    /// <p>Specifies where to store the processed message data.</p>
1323    #[serde(rename = "datastore")]
1324    #[serde(skip_serializing_if = "Option::is_none")]
1325    pub datastore: Option<DatastoreActivity>,
1326    /// <p>Adds data from the AWS IoT device registry to your message.</p>
1327    #[serde(rename = "deviceRegistryEnrich")]
1328    #[serde(skip_serializing_if = "Option::is_none")]
1329    pub device_registry_enrich: Option<DeviceRegistryEnrichActivity>,
1330    /// <p>Adds information from the AWS IoT Device Shadows service to a message.</p>
1331    #[serde(rename = "deviceShadowEnrich")]
1332    #[serde(skip_serializing_if = "Option::is_none")]
1333    pub device_shadow_enrich: Option<DeviceShadowEnrichActivity>,
1334    /// <p>Filters a message based on its attributes.</p>
1335    #[serde(rename = "filter")]
1336    #[serde(skip_serializing_if = "Option::is_none")]
1337    pub filter: Option<FilterActivity>,
1338    /// <p>Runs a Lambda function to modify the message.</p>
1339    #[serde(rename = "lambda")]
1340    #[serde(skip_serializing_if = "Option::is_none")]
1341    pub lambda: Option<LambdaActivity>,
1342    /// <p>Computes an arithmetic expression using the message's attributes and adds it to the message.</p>
1343    #[serde(rename = "math")]
1344    #[serde(skip_serializing_if = "Option::is_none")]
1345    pub math: Option<MathActivity>,
1346    /// <p>Removes attributes from a message.</p>
1347    #[serde(rename = "removeAttributes")]
1348    #[serde(skip_serializing_if = "Option::is_none")]
1349    pub remove_attributes: Option<RemoveAttributesActivity>,
1350    /// <p>Creates a new message using only the specified attributes from the original message. </p>
1351    #[serde(rename = "selectAttributes")]
1352    #[serde(skip_serializing_if = "Option::is_none")]
1353    pub select_attributes: Option<SelectAttributesActivity>,
1354}
1355
1356/// <p>A summary of information about a pipeline.</p>
1357#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1358#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1359pub struct PipelineSummary {
1360    /// <p>When the pipeline was created.</p>
1361    #[serde(rename = "creationTime")]
1362    #[serde(skip_serializing_if = "Option::is_none")]
1363    pub creation_time: Option<f64>,
1364    /// <p>When the pipeline was last updated.</p>
1365    #[serde(rename = "lastUpdateTime")]
1366    #[serde(skip_serializing_if = "Option::is_none")]
1367    pub last_update_time: Option<f64>,
1368    /// <p>The name of the pipeline.</p>
1369    #[serde(rename = "pipelineName")]
1370    #[serde(skip_serializing_if = "Option::is_none")]
1371    pub pipeline_name: Option<String>,
1372    /// <p>A summary of information about the pipeline reprocessing.</p>
1373    #[serde(rename = "reprocessingSummaries")]
1374    #[serde(skip_serializing_if = "Option::is_none")]
1375    pub reprocessing_summaries: Option<Vec<ReprocessingSummary>>,
1376}
1377
1378#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1379#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1380pub struct PutLoggingOptionsRequest {
1381    /// <p>The new values of the AWS IoT Analytics logging options.</p>
1382    #[serde(rename = "loggingOptions")]
1383    pub logging_options: LoggingOptions,
1384}
1385
1386/// <p>Information which is used to filter message data, to segregate it according to the time frame in which it arrives.</p>
1387#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1388pub struct QueryFilter {
1389    /// <p>Used to limit data to that which has arrived since the last execution of the action.</p>
1390    #[serde(rename = "deltaTime")]
1391    #[serde(skip_serializing_if = "Option::is_none")]
1392    pub delta_time: Option<DeltaTime>,
1393}
1394
1395/// <p>An activity that removes attributes from a message.</p>
1396#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1397pub struct RemoveAttributesActivity {
1398    /// <p>A list of 1-50 attributes to remove from the message.</p>
1399    #[serde(rename = "attributes")]
1400    pub attributes: Vec<String>,
1401    /// <p>The name of the 'removeAttributes' activity.</p>
1402    #[serde(rename = "name")]
1403    pub name: String,
1404    /// <p>The next activity in the pipeline.</p>
1405    #[serde(rename = "next")]
1406    #[serde(skip_serializing_if = "Option::is_none")]
1407    pub next: Option<String>,
1408}
1409
1410/// <p>Information about pipeline reprocessing.</p>
1411#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1412#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1413pub struct ReprocessingSummary {
1414    /// <p>The time the pipeline reprocessing was created.</p>
1415    #[serde(rename = "creationTime")]
1416    #[serde(skip_serializing_if = "Option::is_none")]
1417    pub creation_time: Option<f64>,
1418    /// <p>The 'reprocessingId' returned by "StartPipelineReprocessing".</p>
1419    #[serde(rename = "id")]
1420    #[serde(skip_serializing_if = "Option::is_none")]
1421    pub id: Option<String>,
1422    /// <p>The status of the pipeline reprocessing.</p>
1423    #[serde(rename = "status")]
1424    #[serde(skip_serializing_if = "Option::is_none")]
1425    pub status: Option<String>,
1426}
1427
1428/// <p>The configuration of the resource used to execute the "containerAction".</p>
1429#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1430pub struct ResourceConfiguration {
1431    /// <p>The type of the compute resource used to execute the "containerAction". Possible values are: ACU_1 (vCPU=4, memory=16GiB) or ACU_2 (vCPU=8, memory=32GiB).</p>
1432    #[serde(rename = "computeType")]
1433    pub compute_type: String,
1434    /// <p>The size (in GB) of the persistent storage available to the resource instance used to execute the "containerAction" (min: 1, max: 50).</p>
1435    #[serde(rename = "volumeSizeInGB")]
1436    pub volume_size_in_gb: i64,
1437}
1438
1439/// <p>How long, in days, message data is kept.</p>
1440#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1441pub struct RetentionPeriod {
1442    /// <p>The number of days that message data is kept. The "unlimited" parameter must be false.</p>
1443    #[serde(rename = "numberOfDays")]
1444    #[serde(skip_serializing_if = "Option::is_none")]
1445    pub number_of_days: Option<i64>,
1446    /// <p>If true, message data is kept indefinitely.</p>
1447    #[serde(rename = "unlimited")]
1448    #[serde(skip_serializing_if = "Option::is_none")]
1449    pub unlimited: Option<bool>,
1450}
1451
1452#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1453#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1454pub struct RunPipelineActivityRequest {
1455    /// <p>The sample message payloads on which the pipeline activity is run.</p>
1456    #[serde(rename = "payloads")]
1457    #[serde(
1458        deserialize_with = "::rusoto_core::serialization::SerdeBlobList::deserialize_blob_list",
1459        serialize_with = "::rusoto_core::serialization::SerdeBlobList::serialize_blob_list",
1460        default
1461    )]
1462    pub payloads: Vec<bytes::Bytes>,
1463    /// <p>The pipeline activity that is run. This must not be a 'channel' activity or a 'datastore' activity because these activities are used in a pipeline only to load the original message and to store the (possibly) transformed message. If a 'lambda' activity is specified, only short-running Lambda functions (those with a timeout of less than 30 seconds or less) can be used.</p>
1464    #[serde(rename = "pipelineActivity")]
1465    pub pipeline_activity: PipelineActivity,
1466}
1467
1468#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1469#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1470pub struct RunPipelineActivityResponse {
1471    /// <p>In case the pipeline activity fails, the log message that is generated.</p>
1472    #[serde(rename = "logResult")]
1473    #[serde(skip_serializing_if = "Option::is_none")]
1474    pub log_result: Option<String>,
1475    /// <p>The enriched or transformed sample message payloads as base64-encoded strings. (The results of running the pipeline activity on each input sample message payload, encoded in base64.)</p>
1476    #[serde(rename = "payloads")]
1477    #[serde(
1478        deserialize_with = "::rusoto_core::serialization::SerdeBlobList::deserialize_blob_list",
1479        serialize_with = "::rusoto_core::serialization::SerdeBlobList::serialize_blob_list",
1480        default
1481    )]
1482    #[serde(skip_serializing_if = "Option::is_none")]
1483    pub payloads: Option<Vec<bytes::Bytes>>,
1484}
1485
1486/// <p>Configuration information for delivery of data set contents to Amazon S3.</p>
1487#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1488pub struct S3DestinationConfiguration {
1489    /// <p>The name of the Amazon S3 bucket to which data set contents are delivered.</p>
1490    #[serde(rename = "bucket")]
1491    pub bucket: String,
1492    /// <p>Configuration information for coordination with the AWS Glue ETL (extract, transform and load) service.</p>
1493    #[serde(rename = "glueConfiguration")]
1494    #[serde(skip_serializing_if = "Option::is_none")]
1495    pub glue_configuration: Option<GlueConfiguration>,
1496    /// <p>The key of the data set contents object. Each object in an Amazon S3 bucket has a key that is its unique identifier within the bucket (each object in a bucket has exactly one key). To produce a unique key, you can use "!{iotanalytics:scheduledTime}" to insert the time of the scheduled SQL query run, or "!{iotanalytics:versioned} to insert a unique hash identifying the data set, for example: "/DataSet/!{iotanalytics:scheduledTime}/!{iotanalytics:versioned}.csv".</p>
1497    #[serde(rename = "key")]
1498    pub key: String,
1499    /// <p>The ARN of the role which grants AWS IoT Analytics permission to interact with your Amazon S3 and AWS Glue resources.</p>
1500    #[serde(rename = "roleArn")]
1501    pub role_arn: String,
1502}
1503
1504#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1505#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1506pub struct SampleChannelDataRequest {
1507    /// <p>The name of the channel whose message samples are retrieved.</p>
1508    #[serde(rename = "channelName")]
1509    pub channel_name: String,
1510    /// <p>The end of the time window from which sample messages are retrieved.</p>
1511    #[serde(rename = "endTime")]
1512    #[serde(skip_serializing_if = "Option::is_none")]
1513    pub end_time: Option<f64>,
1514    /// <p>The number of sample messages to be retrieved. The limit is 10, the default is also 10.</p>
1515    #[serde(rename = "maxMessages")]
1516    #[serde(skip_serializing_if = "Option::is_none")]
1517    pub max_messages: Option<i64>,
1518    /// <p>The start of the time window from which sample messages are retrieved.</p>
1519    #[serde(rename = "startTime")]
1520    #[serde(skip_serializing_if = "Option::is_none")]
1521    pub start_time: Option<f64>,
1522}
1523
1524#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1525#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1526pub struct SampleChannelDataResponse {
1527    /// <p>The list of message samples. Each sample message is returned as a base64-encoded string.</p>
1528    #[serde(rename = "payloads")]
1529    #[serde(
1530        deserialize_with = "::rusoto_core::serialization::SerdeBlobList::deserialize_blob_list",
1531        serialize_with = "::rusoto_core::serialization::SerdeBlobList::serialize_blob_list",
1532        default
1533    )]
1534    #[serde(skip_serializing_if = "Option::is_none")]
1535    pub payloads: Option<Vec<bytes::Bytes>>,
1536}
1537
1538/// <p>The schedule for when to trigger an update.</p>
1539#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1540pub struct Schedule {
1541    /// <p>The expression that defines when to trigger an update. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html"> Schedule Expressions for Rules</a> in the Amazon CloudWatch Events User Guide.</p>
1542    #[serde(rename = "expression")]
1543    #[serde(skip_serializing_if = "Option::is_none")]
1544    pub expression: Option<String>,
1545}
1546
1547/// <p>Creates a new message using only the specified attributes from the original message.</p>
1548#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1549pub struct SelectAttributesActivity {
1550    /// <p>A list of the attributes to select from the message.</p>
1551    #[serde(rename = "attributes")]
1552    pub attributes: Vec<String>,
1553    /// <p>The name of the 'selectAttributes' activity.</p>
1554    #[serde(rename = "name")]
1555    pub name: String,
1556    /// <p>The next activity in the pipeline.</p>
1557    #[serde(rename = "next")]
1558    #[serde(skip_serializing_if = "Option::is_none")]
1559    pub next: Option<String>,
1560}
1561
1562/// <p>Use this to store channel data in an S3 bucket managed by the AWS IoT Analytics service. The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the channel.</p>
1563#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1564pub struct ServiceManagedChannelS3Storage {}
1565
1566/// <p>Used to store channel data in an S3 bucket managed by the AWS IoT Analytics service.</p>
1567#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1568#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1569pub struct ServiceManagedChannelS3StorageSummary {}
1570
1571/// <p>Use this to store data store data in an S3 bucket managed by the AWS IoT Analytics service. The choice of service-managed or customer-managed S3 storage cannot be changed after creation of the data store.</p>
1572#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1573pub struct ServiceManagedDatastoreS3Storage {}
1574
1575/// <p>Used to store data store data in an S3 bucket managed by the AWS IoT Analytics service.</p>
1576#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1577#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1578pub struct ServiceManagedDatastoreS3StorageSummary {}
1579
1580/// <p>The SQL query to modify the message.</p>
1581#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1582pub struct SqlQueryDatasetAction {
1583    /// <p>Pre-filters applied to message data.</p>
1584    #[serde(rename = "filters")]
1585    #[serde(skip_serializing_if = "Option::is_none")]
1586    pub filters: Option<Vec<QueryFilter>>,
1587    /// <p>A SQL query string.</p>
1588    #[serde(rename = "sqlQuery")]
1589    pub sql_query: String,
1590}
1591
1592#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1593#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1594pub struct StartPipelineReprocessingRequest {
1595    /// <p>The end time (exclusive) of raw message data that is reprocessed.</p>
1596    #[serde(rename = "endTime")]
1597    #[serde(skip_serializing_if = "Option::is_none")]
1598    pub end_time: Option<f64>,
1599    /// <p>The name of the pipeline on which to start reprocessing.</p>
1600    #[serde(rename = "pipelineName")]
1601    pub pipeline_name: String,
1602    /// <p>The start time (inclusive) of raw message data that is reprocessed.</p>
1603    #[serde(rename = "startTime")]
1604    #[serde(skip_serializing_if = "Option::is_none")]
1605    pub start_time: Option<f64>,
1606}
1607
1608#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1609#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1610pub struct StartPipelineReprocessingResponse {
1611    /// <p>The ID of the pipeline reprocessing activity that was started.</p>
1612    #[serde(rename = "reprocessingId")]
1613    #[serde(skip_serializing_if = "Option::is_none")]
1614    pub reprocessing_id: Option<String>,
1615}
1616
1617/// <p>A set of key/value pairs which are used to manage the resource.</p>
1618#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1619pub struct Tag {
1620    /// <p>The tag's key.</p>
1621    #[serde(rename = "key")]
1622    pub key: String,
1623    /// <p>The tag's value.</p>
1624    #[serde(rename = "value")]
1625    pub value: String,
1626}
1627
1628#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1629#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1630pub struct TagResourceRequest {
1631    /// <p>The ARN of the resource whose tags you want to modify.</p>
1632    #[serde(rename = "resourceArn")]
1633    pub resource_arn: String,
1634    /// <p>The new or modified tags for the resource.</p>
1635    #[serde(rename = "tags")]
1636    pub tags: Vec<Tag>,
1637}
1638
1639#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1640#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1641pub struct TagResourceResponse {}
1642
1643/// <p>Information about the data set whose content generation triggers the new data set content generation.</p>
1644#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1645pub struct TriggeringDataset {
1646    /// <p>The name of the data set whose content generation triggers the new data set content generation.</p>
1647    #[serde(rename = "name")]
1648    pub name: String,
1649}
1650
1651#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1652#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1653pub struct UntagResourceRequest {
1654    /// <p>The ARN of the resource whose tags you want to remove.</p>
1655    #[serde(rename = "resourceArn")]
1656    pub resource_arn: String,
1657    /// <p>The keys of those tags which you want to remove.</p>
1658    #[serde(rename = "tagKeys")]
1659    pub tag_keys: Vec<String>,
1660}
1661
1662#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1663#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1664pub struct UntagResourceResponse {}
1665
1666#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1667#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1668pub struct UpdateChannelRequest {
1669    /// <p>The name of the channel to be updated.</p>
1670    #[serde(rename = "channelName")]
1671    pub channel_name: String,
1672    /// <p>Where channel data is stored. You may choose one of "serviceManagedS3" or "customerManagedS3" storage. If not specified, the default is "serviceManagedS3". This cannot be changed after creation of the channel.</p>
1673    #[serde(rename = "channelStorage")]
1674    #[serde(skip_serializing_if = "Option::is_none")]
1675    pub channel_storage: Option<ChannelStorage>,
1676    /// <p>How long, in days, message data is kept for the channel. The retention period cannot be updated if the channel's S3 storage is customer-managed.</p>
1677    #[serde(rename = "retentionPeriod")]
1678    #[serde(skip_serializing_if = "Option::is_none")]
1679    pub retention_period: Option<RetentionPeriod>,
1680}
1681
1682#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1683#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1684pub struct UpdateDatasetRequest {
1685    /// <p>A list of "DatasetAction" objects.</p>
1686    #[serde(rename = "actions")]
1687    pub actions: Vec<DatasetAction>,
1688    /// <p>When data set contents are created they are delivered to destinations specified here.</p>
1689    #[serde(rename = "contentDeliveryRules")]
1690    #[serde(skip_serializing_if = "Option::is_none")]
1691    pub content_delivery_rules: Option<Vec<DatasetContentDeliveryRule>>,
1692    /// <p>The name of the data set to update.</p>
1693    #[serde(rename = "datasetName")]
1694    pub dataset_name: String,
1695    /// <p>How long, in days, data set contents are kept for the data set.</p>
1696    #[serde(rename = "retentionPeriod")]
1697    #[serde(skip_serializing_if = "Option::is_none")]
1698    pub retention_period: Option<RetentionPeriod>,
1699    /// <p>A list of "DatasetTrigger" objects. The list can be empty or can contain up to five <b>DataSetTrigger</b> objects.</p>
1700    #[serde(rename = "triggers")]
1701    #[serde(skip_serializing_if = "Option::is_none")]
1702    pub triggers: Option<Vec<DatasetTrigger>>,
1703    /// <p>[Optional] How many versions of data set contents are kept. If not specified or set to null, only the latest version plus the latest succeeded version (if they are different) are kept for the time period specified by the "retentionPeriod" parameter. (For more information, see https://docs.aws.amazon.com/iotanalytics/latest/userguide/getting-started.html#aws-iot-analytics-dataset-versions)</p>
1704    #[serde(rename = "versioningConfiguration")]
1705    #[serde(skip_serializing_if = "Option::is_none")]
1706    pub versioning_configuration: Option<VersioningConfiguration>,
1707}
1708
1709#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1710#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1711pub struct UpdateDatastoreRequest {
1712    /// <p>The name of the data store to be updated.</p>
1713    #[serde(rename = "datastoreName")]
1714    pub datastore_name: String,
1715    /// <p>Where data store data is stored. You may choose one of "serviceManagedS3" or "customerManagedS3" storage. If not specified, the default is "serviceManagedS3". This cannot be changed after the data store is created.</p>
1716    #[serde(rename = "datastoreStorage")]
1717    #[serde(skip_serializing_if = "Option::is_none")]
1718    pub datastore_storage: Option<DatastoreStorage>,
1719    /// <p>How long, in days, message data is kept for the data store. The retention period cannot be updated if the data store's S3 storage is customer-managed.</p>
1720    #[serde(rename = "retentionPeriod")]
1721    #[serde(skip_serializing_if = "Option::is_none")]
1722    pub retention_period: Option<RetentionPeriod>,
1723}
1724
1725#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1726#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1727pub struct UpdatePipelineRequest {
1728    /// <p>A list of "PipelineActivity" objects. Activities perform transformations on your messages, such as removing, renaming or adding message attributes; filtering messages based on attribute values; invoking your Lambda functions on messages for advanced processing; or performing mathematical transformations to normalize device data.</p> <p>The list can be 2-25 <b>PipelineActivity</b> objects and must contain both a <code>channel</code> and a <code>datastore</code> activity. Each entry in the list must contain only one activity, for example:</p> <p> <code>pipelineActivities = [ { "channel": { ... } }, { "lambda": { ... } }, ... ]</code> </p>
1729    #[serde(rename = "pipelineActivities")]
1730    pub pipeline_activities: Vec<PipelineActivity>,
1731    /// <p>The name of the pipeline to update.</p>
1732    #[serde(rename = "pipelineName")]
1733    pub pipeline_name: String,
1734}
1735
1736/// <p>An instance of a variable to be passed to the "containerAction" execution. Each variable must have a name and a value given by one of "stringValue", "datasetContentVersionValue", or "outputFileUriValue".</p>
1737#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1738pub struct Variable {
1739    /// <p>The value of the variable as a structure that specifies a data set content version.</p>
1740    #[serde(rename = "datasetContentVersionValue")]
1741    #[serde(skip_serializing_if = "Option::is_none")]
1742    pub dataset_content_version_value: Option<DatasetContentVersionValue>,
1743    /// <p>The value of the variable as a double (numeric).</p>
1744    #[serde(rename = "doubleValue")]
1745    #[serde(skip_serializing_if = "Option::is_none")]
1746    pub double_value: Option<f64>,
1747    /// <p>The name of the variable.</p>
1748    #[serde(rename = "name")]
1749    pub name: String,
1750    /// <p>The value of the variable as a structure that specifies an output file URI.</p>
1751    #[serde(rename = "outputFileUriValue")]
1752    #[serde(skip_serializing_if = "Option::is_none")]
1753    pub output_file_uri_value: Option<OutputFileUriValue>,
1754    /// <p>The value of the variable as a string.</p>
1755    #[serde(rename = "stringValue")]
1756    #[serde(skip_serializing_if = "Option::is_none")]
1757    pub string_value: Option<String>,
1758}
1759
1760/// <p>Information about the versioning of data set contents.</p>
1761#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1762pub struct VersioningConfiguration {
1763    /// <p>How many versions of data set contents will be kept. The "unlimited" parameter must be false.</p>
1764    #[serde(rename = "maxVersions")]
1765    #[serde(skip_serializing_if = "Option::is_none")]
1766    pub max_versions: Option<i64>,
1767    /// <p>If true, unlimited versions of data set contents will be kept.</p>
1768    #[serde(rename = "unlimited")]
1769    #[serde(skip_serializing_if = "Option::is_none")]
1770    pub unlimited: Option<bool>,
1771}
1772
1773/// Errors returned by BatchPutMessage
1774#[derive(Debug, PartialEq)]
1775pub enum BatchPutMessageError {
1776    /// <p>There was an internal failure.</p>
1777    InternalFailure(String),
1778    /// <p>The request was not valid.</p>
1779    InvalidRequest(String),
1780    /// <p>A resource with the specified name could not be found.</p>
1781    ResourceNotFound(String),
1782    /// <p>The service is temporarily unavailable.</p>
1783    ServiceUnavailable(String),
1784    /// <p>The request was denied due to request throttling.</p>
1785    Throttling(String),
1786}
1787
1788impl BatchPutMessageError {
1789    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchPutMessageError> {
1790        if let Some(err) = proto::json::Error::parse_rest(&res) {
1791            match err.typ.as_str() {
1792                "InternalFailureException" => {
1793                    return RusotoError::Service(BatchPutMessageError::InternalFailure(err.msg))
1794                }
1795                "InvalidRequestException" => {
1796                    return RusotoError::Service(BatchPutMessageError::InvalidRequest(err.msg))
1797                }
1798                "ResourceNotFoundException" => {
1799                    return RusotoError::Service(BatchPutMessageError::ResourceNotFound(err.msg))
1800                }
1801                "ServiceUnavailableException" => {
1802                    return RusotoError::Service(BatchPutMessageError::ServiceUnavailable(err.msg))
1803                }
1804                "ThrottlingException" => {
1805                    return RusotoError::Service(BatchPutMessageError::Throttling(err.msg))
1806                }
1807                "ValidationException" => return RusotoError::Validation(err.msg),
1808                _ => {}
1809            }
1810        }
1811        RusotoError::Unknown(res)
1812    }
1813}
1814impl fmt::Display for BatchPutMessageError {
1815    #[allow(unused_variables)]
1816    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1817        match *self {
1818            BatchPutMessageError::InternalFailure(ref cause) => write!(f, "{}", cause),
1819            BatchPutMessageError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1820            BatchPutMessageError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1821            BatchPutMessageError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1822            BatchPutMessageError::Throttling(ref cause) => write!(f, "{}", cause),
1823        }
1824    }
1825}
1826impl Error for BatchPutMessageError {}
1827/// Errors returned by CancelPipelineReprocessing
1828#[derive(Debug, PartialEq)]
1829pub enum CancelPipelineReprocessingError {
1830    /// <p>There was an internal failure.</p>
1831    InternalFailure(String),
1832    /// <p>The request was not valid.</p>
1833    InvalidRequest(String),
1834    /// <p>A resource with the specified name could not be found.</p>
1835    ResourceNotFound(String),
1836    /// <p>The service is temporarily unavailable.</p>
1837    ServiceUnavailable(String),
1838    /// <p>The request was denied due to request throttling.</p>
1839    Throttling(String),
1840}
1841
1842impl CancelPipelineReprocessingError {
1843    pub fn from_response(
1844        res: BufferedHttpResponse,
1845    ) -> RusotoError<CancelPipelineReprocessingError> {
1846        if let Some(err) = proto::json::Error::parse_rest(&res) {
1847            match err.typ.as_str() {
1848                "InternalFailureException" => {
1849                    return RusotoError::Service(CancelPipelineReprocessingError::InternalFailure(
1850                        err.msg,
1851                    ))
1852                }
1853                "InvalidRequestException" => {
1854                    return RusotoError::Service(CancelPipelineReprocessingError::InvalidRequest(
1855                        err.msg,
1856                    ))
1857                }
1858                "ResourceNotFoundException" => {
1859                    return RusotoError::Service(CancelPipelineReprocessingError::ResourceNotFound(
1860                        err.msg,
1861                    ))
1862                }
1863                "ServiceUnavailableException" => {
1864                    return RusotoError::Service(
1865                        CancelPipelineReprocessingError::ServiceUnavailable(err.msg),
1866                    )
1867                }
1868                "ThrottlingException" => {
1869                    return RusotoError::Service(CancelPipelineReprocessingError::Throttling(
1870                        err.msg,
1871                    ))
1872                }
1873                "ValidationException" => return RusotoError::Validation(err.msg),
1874                _ => {}
1875            }
1876        }
1877        RusotoError::Unknown(res)
1878    }
1879}
1880impl fmt::Display for CancelPipelineReprocessingError {
1881    #[allow(unused_variables)]
1882    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1883        match *self {
1884            CancelPipelineReprocessingError::InternalFailure(ref cause) => write!(f, "{}", cause),
1885            CancelPipelineReprocessingError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1886            CancelPipelineReprocessingError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1887            CancelPipelineReprocessingError::ServiceUnavailable(ref cause) => {
1888                write!(f, "{}", cause)
1889            }
1890            CancelPipelineReprocessingError::Throttling(ref cause) => write!(f, "{}", cause),
1891        }
1892    }
1893}
1894impl Error for CancelPipelineReprocessingError {}
1895/// Errors returned by CreateChannel
1896#[derive(Debug, PartialEq)]
1897pub enum CreateChannelError {
1898    /// <p>There was an internal failure.</p>
1899    InternalFailure(String),
1900    /// <p>The request was not valid.</p>
1901    InvalidRequest(String),
1902    /// <p>The command caused an internal limit to be exceeded.</p>
1903    LimitExceeded(String),
1904    /// <p>A resource with the same name already exists.</p>
1905    ResourceAlreadyExists(String),
1906    /// <p>The service is temporarily unavailable.</p>
1907    ServiceUnavailable(String),
1908    /// <p>The request was denied due to request throttling.</p>
1909    Throttling(String),
1910}
1911
1912impl CreateChannelError {
1913    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateChannelError> {
1914        if let Some(err) = proto::json::Error::parse_rest(&res) {
1915            match err.typ.as_str() {
1916                "InternalFailureException" => {
1917                    return RusotoError::Service(CreateChannelError::InternalFailure(err.msg))
1918                }
1919                "InvalidRequestException" => {
1920                    return RusotoError::Service(CreateChannelError::InvalidRequest(err.msg))
1921                }
1922                "LimitExceededException" => {
1923                    return RusotoError::Service(CreateChannelError::LimitExceeded(err.msg))
1924                }
1925                "ResourceAlreadyExistsException" => {
1926                    return RusotoError::Service(CreateChannelError::ResourceAlreadyExists(err.msg))
1927                }
1928                "ServiceUnavailableException" => {
1929                    return RusotoError::Service(CreateChannelError::ServiceUnavailable(err.msg))
1930                }
1931                "ThrottlingException" => {
1932                    return RusotoError::Service(CreateChannelError::Throttling(err.msg))
1933                }
1934                "ValidationException" => return RusotoError::Validation(err.msg),
1935                _ => {}
1936            }
1937        }
1938        RusotoError::Unknown(res)
1939    }
1940}
1941impl fmt::Display for CreateChannelError {
1942    #[allow(unused_variables)]
1943    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1944        match *self {
1945            CreateChannelError::InternalFailure(ref cause) => write!(f, "{}", cause),
1946            CreateChannelError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1947            CreateChannelError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1948            CreateChannelError::ResourceAlreadyExists(ref cause) => write!(f, "{}", cause),
1949            CreateChannelError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1950            CreateChannelError::Throttling(ref cause) => write!(f, "{}", cause),
1951        }
1952    }
1953}
1954impl Error for CreateChannelError {}
1955/// Errors returned by CreateDataset
1956#[derive(Debug, PartialEq)]
1957pub enum CreateDatasetError {
1958    /// <p>There was an internal failure.</p>
1959    InternalFailure(String),
1960    /// <p>The request was not valid.</p>
1961    InvalidRequest(String),
1962    /// <p>The command caused an internal limit to be exceeded.</p>
1963    LimitExceeded(String),
1964    /// <p>A resource with the same name already exists.</p>
1965    ResourceAlreadyExists(String),
1966    /// <p>The service is temporarily unavailable.</p>
1967    ServiceUnavailable(String),
1968    /// <p>The request was denied due to request throttling.</p>
1969    Throttling(String),
1970}
1971
1972impl CreateDatasetError {
1973    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDatasetError> {
1974        if let Some(err) = proto::json::Error::parse_rest(&res) {
1975            match err.typ.as_str() {
1976                "InternalFailureException" => {
1977                    return RusotoError::Service(CreateDatasetError::InternalFailure(err.msg))
1978                }
1979                "InvalidRequestException" => {
1980                    return RusotoError::Service(CreateDatasetError::InvalidRequest(err.msg))
1981                }
1982                "LimitExceededException" => {
1983                    return RusotoError::Service(CreateDatasetError::LimitExceeded(err.msg))
1984                }
1985                "ResourceAlreadyExistsException" => {
1986                    return RusotoError::Service(CreateDatasetError::ResourceAlreadyExists(err.msg))
1987                }
1988                "ServiceUnavailableException" => {
1989                    return RusotoError::Service(CreateDatasetError::ServiceUnavailable(err.msg))
1990                }
1991                "ThrottlingException" => {
1992                    return RusotoError::Service(CreateDatasetError::Throttling(err.msg))
1993                }
1994                "ValidationException" => return RusotoError::Validation(err.msg),
1995                _ => {}
1996            }
1997        }
1998        RusotoError::Unknown(res)
1999    }
2000}
2001impl fmt::Display for CreateDatasetError {
2002    #[allow(unused_variables)]
2003    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2004        match *self {
2005            CreateDatasetError::InternalFailure(ref cause) => write!(f, "{}", cause),
2006            CreateDatasetError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2007            CreateDatasetError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2008            CreateDatasetError::ResourceAlreadyExists(ref cause) => write!(f, "{}", cause),
2009            CreateDatasetError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2010            CreateDatasetError::Throttling(ref cause) => write!(f, "{}", cause),
2011        }
2012    }
2013}
2014impl Error for CreateDatasetError {}
2015/// Errors returned by CreateDatasetContent
2016#[derive(Debug, PartialEq)]
2017pub enum CreateDatasetContentError {
2018    /// <p>There was an internal failure.</p>
2019    InternalFailure(String),
2020    /// <p>The request was not valid.</p>
2021    InvalidRequest(String),
2022    /// <p>A resource with the specified name could not be found.</p>
2023    ResourceNotFound(String),
2024    /// <p>The service is temporarily unavailable.</p>
2025    ServiceUnavailable(String),
2026    /// <p>The request was denied due to request throttling.</p>
2027    Throttling(String),
2028}
2029
2030impl CreateDatasetContentError {
2031    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDatasetContentError> {
2032        if let Some(err) = proto::json::Error::parse_rest(&res) {
2033            match err.typ.as_str() {
2034                "InternalFailureException" => {
2035                    return RusotoError::Service(CreateDatasetContentError::InternalFailure(
2036                        err.msg,
2037                    ))
2038                }
2039                "InvalidRequestException" => {
2040                    return RusotoError::Service(CreateDatasetContentError::InvalidRequest(err.msg))
2041                }
2042                "ResourceNotFoundException" => {
2043                    return RusotoError::Service(CreateDatasetContentError::ResourceNotFound(
2044                        err.msg,
2045                    ))
2046                }
2047                "ServiceUnavailableException" => {
2048                    return RusotoError::Service(CreateDatasetContentError::ServiceUnavailable(
2049                        err.msg,
2050                    ))
2051                }
2052                "ThrottlingException" => {
2053                    return RusotoError::Service(CreateDatasetContentError::Throttling(err.msg))
2054                }
2055                "ValidationException" => return RusotoError::Validation(err.msg),
2056                _ => {}
2057            }
2058        }
2059        RusotoError::Unknown(res)
2060    }
2061}
2062impl fmt::Display for CreateDatasetContentError {
2063    #[allow(unused_variables)]
2064    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2065        match *self {
2066            CreateDatasetContentError::InternalFailure(ref cause) => write!(f, "{}", cause),
2067            CreateDatasetContentError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2068            CreateDatasetContentError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2069            CreateDatasetContentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2070            CreateDatasetContentError::Throttling(ref cause) => write!(f, "{}", cause),
2071        }
2072    }
2073}
2074impl Error for CreateDatasetContentError {}
2075/// Errors returned by CreateDatastore
2076#[derive(Debug, PartialEq)]
2077pub enum CreateDatastoreError {
2078    /// <p>There was an internal failure.</p>
2079    InternalFailure(String),
2080    /// <p>The request was not valid.</p>
2081    InvalidRequest(String),
2082    /// <p>The command caused an internal limit to be exceeded.</p>
2083    LimitExceeded(String),
2084    /// <p>A resource with the same name already exists.</p>
2085    ResourceAlreadyExists(String),
2086    /// <p>The service is temporarily unavailable.</p>
2087    ServiceUnavailable(String),
2088    /// <p>The request was denied due to request throttling.</p>
2089    Throttling(String),
2090}
2091
2092impl CreateDatastoreError {
2093    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDatastoreError> {
2094        if let Some(err) = proto::json::Error::parse_rest(&res) {
2095            match err.typ.as_str() {
2096                "InternalFailureException" => {
2097                    return RusotoError::Service(CreateDatastoreError::InternalFailure(err.msg))
2098                }
2099                "InvalidRequestException" => {
2100                    return RusotoError::Service(CreateDatastoreError::InvalidRequest(err.msg))
2101                }
2102                "LimitExceededException" => {
2103                    return RusotoError::Service(CreateDatastoreError::LimitExceeded(err.msg))
2104                }
2105                "ResourceAlreadyExistsException" => {
2106                    return RusotoError::Service(CreateDatastoreError::ResourceAlreadyExists(
2107                        err.msg,
2108                    ))
2109                }
2110                "ServiceUnavailableException" => {
2111                    return RusotoError::Service(CreateDatastoreError::ServiceUnavailable(err.msg))
2112                }
2113                "ThrottlingException" => {
2114                    return RusotoError::Service(CreateDatastoreError::Throttling(err.msg))
2115                }
2116                "ValidationException" => return RusotoError::Validation(err.msg),
2117                _ => {}
2118            }
2119        }
2120        RusotoError::Unknown(res)
2121    }
2122}
2123impl fmt::Display for CreateDatastoreError {
2124    #[allow(unused_variables)]
2125    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2126        match *self {
2127            CreateDatastoreError::InternalFailure(ref cause) => write!(f, "{}", cause),
2128            CreateDatastoreError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2129            CreateDatastoreError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2130            CreateDatastoreError::ResourceAlreadyExists(ref cause) => write!(f, "{}", cause),
2131            CreateDatastoreError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2132            CreateDatastoreError::Throttling(ref cause) => write!(f, "{}", cause),
2133        }
2134    }
2135}
2136impl Error for CreateDatastoreError {}
2137/// Errors returned by CreatePipeline
2138#[derive(Debug, PartialEq)]
2139pub enum CreatePipelineError {
2140    /// <p>There was an internal failure.</p>
2141    InternalFailure(String),
2142    /// <p>The request was not valid.</p>
2143    InvalidRequest(String),
2144    /// <p>The command caused an internal limit to be exceeded.</p>
2145    LimitExceeded(String),
2146    /// <p>A resource with the same name already exists.</p>
2147    ResourceAlreadyExists(String),
2148    /// <p>The service is temporarily unavailable.</p>
2149    ServiceUnavailable(String),
2150    /// <p>The request was denied due to request throttling.</p>
2151    Throttling(String),
2152}
2153
2154impl CreatePipelineError {
2155    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePipelineError> {
2156        if let Some(err) = proto::json::Error::parse_rest(&res) {
2157            match err.typ.as_str() {
2158                "InternalFailureException" => {
2159                    return RusotoError::Service(CreatePipelineError::InternalFailure(err.msg))
2160                }
2161                "InvalidRequestException" => {
2162                    return RusotoError::Service(CreatePipelineError::InvalidRequest(err.msg))
2163                }
2164                "LimitExceededException" => {
2165                    return RusotoError::Service(CreatePipelineError::LimitExceeded(err.msg))
2166                }
2167                "ResourceAlreadyExistsException" => {
2168                    return RusotoError::Service(CreatePipelineError::ResourceAlreadyExists(
2169                        err.msg,
2170                    ))
2171                }
2172                "ServiceUnavailableException" => {
2173                    return RusotoError::Service(CreatePipelineError::ServiceUnavailable(err.msg))
2174                }
2175                "ThrottlingException" => {
2176                    return RusotoError::Service(CreatePipelineError::Throttling(err.msg))
2177                }
2178                "ValidationException" => return RusotoError::Validation(err.msg),
2179                _ => {}
2180            }
2181        }
2182        RusotoError::Unknown(res)
2183    }
2184}
2185impl fmt::Display for CreatePipelineError {
2186    #[allow(unused_variables)]
2187    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2188        match *self {
2189            CreatePipelineError::InternalFailure(ref cause) => write!(f, "{}", cause),
2190            CreatePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2191            CreatePipelineError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2192            CreatePipelineError::ResourceAlreadyExists(ref cause) => write!(f, "{}", cause),
2193            CreatePipelineError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2194            CreatePipelineError::Throttling(ref cause) => write!(f, "{}", cause),
2195        }
2196    }
2197}
2198impl Error for CreatePipelineError {}
2199/// Errors returned by DeleteChannel
2200#[derive(Debug, PartialEq)]
2201pub enum DeleteChannelError {
2202    /// <p>There was an internal failure.</p>
2203    InternalFailure(String),
2204    /// <p>The request was not valid.</p>
2205    InvalidRequest(String),
2206    /// <p>A resource with the specified name could not be found.</p>
2207    ResourceNotFound(String),
2208    /// <p>The service is temporarily unavailable.</p>
2209    ServiceUnavailable(String),
2210    /// <p>The request was denied due to request throttling.</p>
2211    Throttling(String),
2212}
2213
2214impl DeleteChannelError {
2215    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteChannelError> {
2216        if let Some(err) = proto::json::Error::parse_rest(&res) {
2217            match err.typ.as_str() {
2218                "InternalFailureException" => {
2219                    return RusotoError::Service(DeleteChannelError::InternalFailure(err.msg))
2220                }
2221                "InvalidRequestException" => {
2222                    return RusotoError::Service(DeleteChannelError::InvalidRequest(err.msg))
2223                }
2224                "ResourceNotFoundException" => {
2225                    return RusotoError::Service(DeleteChannelError::ResourceNotFound(err.msg))
2226                }
2227                "ServiceUnavailableException" => {
2228                    return RusotoError::Service(DeleteChannelError::ServiceUnavailable(err.msg))
2229                }
2230                "ThrottlingException" => {
2231                    return RusotoError::Service(DeleteChannelError::Throttling(err.msg))
2232                }
2233                "ValidationException" => return RusotoError::Validation(err.msg),
2234                _ => {}
2235            }
2236        }
2237        RusotoError::Unknown(res)
2238    }
2239}
2240impl fmt::Display for DeleteChannelError {
2241    #[allow(unused_variables)]
2242    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2243        match *self {
2244            DeleteChannelError::InternalFailure(ref cause) => write!(f, "{}", cause),
2245            DeleteChannelError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2246            DeleteChannelError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2247            DeleteChannelError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2248            DeleteChannelError::Throttling(ref cause) => write!(f, "{}", cause),
2249        }
2250    }
2251}
2252impl Error for DeleteChannelError {}
2253/// Errors returned by DeleteDataset
2254#[derive(Debug, PartialEq)]
2255pub enum DeleteDatasetError {
2256    /// <p>There was an internal failure.</p>
2257    InternalFailure(String),
2258    /// <p>The request was not valid.</p>
2259    InvalidRequest(String),
2260    /// <p>A resource with the specified name could not be found.</p>
2261    ResourceNotFound(String),
2262    /// <p>The service is temporarily unavailable.</p>
2263    ServiceUnavailable(String),
2264    /// <p>The request was denied due to request throttling.</p>
2265    Throttling(String),
2266}
2267
2268impl DeleteDatasetError {
2269    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDatasetError> {
2270        if let Some(err) = proto::json::Error::parse_rest(&res) {
2271            match err.typ.as_str() {
2272                "InternalFailureException" => {
2273                    return RusotoError::Service(DeleteDatasetError::InternalFailure(err.msg))
2274                }
2275                "InvalidRequestException" => {
2276                    return RusotoError::Service(DeleteDatasetError::InvalidRequest(err.msg))
2277                }
2278                "ResourceNotFoundException" => {
2279                    return RusotoError::Service(DeleteDatasetError::ResourceNotFound(err.msg))
2280                }
2281                "ServiceUnavailableException" => {
2282                    return RusotoError::Service(DeleteDatasetError::ServiceUnavailable(err.msg))
2283                }
2284                "ThrottlingException" => {
2285                    return RusotoError::Service(DeleteDatasetError::Throttling(err.msg))
2286                }
2287                "ValidationException" => return RusotoError::Validation(err.msg),
2288                _ => {}
2289            }
2290        }
2291        RusotoError::Unknown(res)
2292    }
2293}
2294impl fmt::Display for DeleteDatasetError {
2295    #[allow(unused_variables)]
2296    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2297        match *self {
2298            DeleteDatasetError::InternalFailure(ref cause) => write!(f, "{}", cause),
2299            DeleteDatasetError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2300            DeleteDatasetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2301            DeleteDatasetError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2302            DeleteDatasetError::Throttling(ref cause) => write!(f, "{}", cause),
2303        }
2304    }
2305}
2306impl Error for DeleteDatasetError {}
2307/// Errors returned by DeleteDatasetContent
2308#[derive(Debug, PartialEq)]
2309pub enum DeleteDatasetContentError {
2310    /// <p>There was an internal failure.</p>
2311    InternalFailure(String),
2312    /// <p>The request was not valid.</p>
2313    InvalidRequest(String),
2314    /// <p>A resource with the specified name could not be found.</p>
2315    ResourceNotFound(String),
2316    /// <p>The service is temporarily unavailable.</p>
2317    ServiceUnavailable(String),
2318    /// <p>The request was denied due to request throttling.</p>
2319    Throttling(String),
2320}
2321
2322impl DeleteDatasetContentError {
2323    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDatasetContentError> {
2324        if let Some(err) = proto::json::Error::parse_rest(&res) {
2325            match err.typ.as_str() {
2326                "InternalFailureException" => {
2327                    return RusotoError::Service(DeleteDatasetContentError::InternalFailure(
2328                        err.msg,
2329                    ))
2330                }
2331                "InvalidRequestException" => {
2332                    return RusotoError::Service(DeleteDatasetContentError::InvalidRequest(err.msg))
2333                }
2334                "ResourceNotFoundException" => {
2335                    return RusotoError::Service(DeleteDatasetContentError::ResourceNotFound(
2336                        err.msg,
2337                    ))
2338                }
2339                "ServiceUnavailableException" => {
2340                    return RusotoError::Service(DeleteDatasetContentError::ServiceUnavailable(
2341                        err.msg,
2342                    ))
2343                }
2344                "ThrottlingException" => {
2345                    return RusotoError::Service(DeleteDatasetContentError::Throttling(err.msg))
2346                }
2347                "ValidationException" => return RusotoError::Validation(err.msg),
2348                _ => {}
2349            }
2350        }
2351        RusotoError::Unknown(res)
2352    }
2353}
2354impl fmt::Display for DeleteDatasetContentError {
2355    #[allow(unused_variables)]
2356    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2357        match *self {
2358            DeleteDatasetContentError::InternalFailure(ref cause) => write!(f, "{}", cause),
2359            DeleteDatasetContentError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2360            DeleteDatasetContentError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2361            DeleteDatasetContentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2362            DeleteDatasetContentError::Throttling(ref cause) => write!(f, "{}", cause),
2363        }
2364    }
2365}
2366impl Error for DeleteDatasetContentError {}
2367/// Errors returned by DeleteDatastore
2368#[derive(Debug, PartialEq)]
2369pub enum DeleteDatastoreError {
2370    /// <p>There was an internal failure.</p>
2371    InternalFailure(String),
2372    /// <p>The request was not valid.</p>
2373    InvalidRequest(String),
2374    /// <p>A resource with the specified name could not be found.</p>
2375    ResourceNotFound(String),
2376    /// <p>The service is temporarily unavailable.</p>
2377    ServiceUnavailable(String),
2378    /// <p>The request was denied due to request throttling.</p>
2379    Throttling(String),
2380}
2381
2382impl DeleteDatastoreError {
2383    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDatastoreError> {
2384        if let Some(err) = proto::json::Error::parse_rest(&res) {
2385            match err.typ.as_str() {
2386                "InternalFailureException" => {
2387                    return RusotoError::Service(DeleteDatastoreError::InternalFailure(err.msg))
2388                }
2389                "InvalidRequestException" => {
2390                    return RusotoError::Service(DeleteDatastoreError::InvalidRequest(err.msg))
2391                }
2392                "ResourceNotFoundException" => {
2393                    return RusotoError::Service(DeleteDatastoreError::ResourceNotFound(err.msg))
2394                }
2395                "ServiceUnavailableException" => {
2396                    return RusotoError::Service(DeleteDatastoreError::ServiceUnavailable(err.msg))
2397                }
2398                "ThrottlingException" => {
2399                    return RusotoError::Service(DeleteDatastoreError::Throttling(err.msg))
2400                }
2401                "ValidationException" => return RusotoError::Validation(err.msg),
2402                _ => {}
2403            }
2404        }
2405        RusotoError::Unknown(res)
2406    }
2407}
2408impl fmt::Display for DeleteDatastoreError {
2409    #[allow(unused_variables)]
2410    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2411        match *self {
2412            DeleteDatastoreError::InternalFailure(ref cause) => write!(f, "{}", cause),
2413            DeleteDatastoreError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2414            DeleteDatastoreError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2415            DeleteDatastoreError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2416            DeleteDatastoreError::Throttling(ref cause) => write!(f, "{}", cause),
2417        }
2418    }
2419}
2420impl Error for DeleteDatastoreError {}
2421/// Errors returned by DeletePipeline
2422#[derive(Debug, PartialEq)]
2423pub enum DeletePipelineError {
2424    /// <p>There was an internal failure.</p>
2425    InternalFailure(String),
2426    /// <p>The request was not valid.</p>
2427    InvalidRequest(String),
2428    /// <p>A resource with the specified name could not be found.</p>
2429    ResourceNotFound(String),
2430    /// <p>The service is temporarily unavailable.</p>
2431    ServiceUnavailable(String),
2432    /// <p>The request was denied due to request throttling.</p>
2433    Throttling(String),
2434}
2435
2436impl DeletePipelineError {
2437    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePipelineError> {
2438        if let Some(err) = proto::json::Error::parse_rest(&res) {
2439            match err.typ.as_str() {
2440                "InternalFailureException" => {
2441                    return RusotoError::Service(DeletePipelineError::InternalFailure(err.msg))
2442                }
2443                "InvalidRequestException" => {
2444                    return RusotoError::Service(DeletePipelineError::InvalidRequest(err.msg))
2445                }
2446                "ResourceNotFoundException" => {
2447                    return RusotoError::Service(DeletePipelineError::ResourceNotFound(err.msg))
2448                }
2449                "ServiceUnavailableException" => {
2450                    return RusotoError::Service(DeletePipelineError::ServiceUnavailable(err.msg))
2451                }
2452                "ThrottlingException" => {
2453                    return RusotoError::Service(DeletePipelineError::Throttling(err.msg))
2454                }
2455                "ValidationException" => return RusotoError::Validation(err.msg),
2456                _ => {}
2457            }
2458        }
2459        RusotoError::Unknown(res)
2460    }
2461}
2462impl fmt::Display for DeletePipelineError {
2463    #[allow(unused_variables)]
2464    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2465        match *self {
2466            DeletePipelineError::InternalFailure(ref cause) => write!(f, "{}", cause),
2467            DeletePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2468            DeletePipelineError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2469            DeletePipelineError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2470            DeletePipelineError::Throttling(ref cause) => write!(f, "{}", cause),
2471        }
2472    }
2473}
2474impl Error for DeletePipelineError {}
2475/// Errors returned by DescribeChannel
2476#[derive(Debug, PartialEq)]
2477pub enum DescribeChannelError {
2478    /// <p>There was an internal failure.</p>
2479    InternalFailure(String),
2480    /// <p>The request was not valid.</p>
2481    InvalidRequest(String),
2482    /// <p>A resource with the specified name could not be found.</p>
2483    ResourceNotFound(String),
2484    /// <p>The service is temporarily unavailable.</p>
2485    ServiceUnavailable(String),
2486    /// <p>The request was denied due to request throttling.</p>
2487    Throttling(String),
2488}
2489
2490impl DescribeChannelError {
2491    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeChannelError> {
2492        if let Some(err) = proto::json::Error::parse_rest(&res) {
2493            match err.typ.as_str() {
2494                "InternalFailureException" => {
2495                    return RusotoError::Service(DescribeChannelError::InternalFailure(err.msg))
2496                }
2497                "InvalidRequestException" => {
2498                    return RusotoError::Service(DescribeChannelError::InvalidRequest(err.msg))
2499                }
2500                "ResourceNotFoundException" => {
2501                    return RusotoError::Service(DescribeChannelError::ResourceNotFound(err.msg))
2502                }
2503                "ServiceUnavailableException" => {
2504                    return RusotoError::Service(DescribeChannelError::ServiceUnavailable(err.msg))
2505                }
2506                "ThrottlingException" => {
2507                    return RusotoError::Service(DescribeChannelError::Throttling(err.msg))
2508                }
2509                "ValidationException" => return RusotoError::Validation(err.msg),
2510                _ => {}
2511            }
2512        }
2513        RusotoError::Unknown(res)
2514    }
2515}
2516impl fmt::Display for DescribeChannelError {
2517    #[allow(unused_variables)]
2518    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2519        match *self {
2520            DescribeChannelError::InternalFailure(ref cause) => write!(f, "{}", cause),
2521            DescribeChannelError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2522            DescribeChannelError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2523            DescribeChannelError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2524            DescribeChannelError::Throttling(ref cause) => write!(f, "{}", cause),
2525        }
2526    }
2527}
2528impl Error for DescribeChannelError {}
2529/// Errors returned by DescribeDataset
2530#[derive(Debug, PartialEq)]
2531pub enum DescribeDatasetError {
2532    /// <p>There was an internal failure.</p>
2533    InternalFailure(String),
2534    /// <p>The request was not valid.</p>
2535    InvalidRequest(String),
2536    /// <p>A resource with the specified name could not be found.</p>
2537    ResourceNotFound(String),
2538    /// <p>The service is temporarily unavailable.</p>
2539    ServiceUnavailable(String),
2540    /// <p>The request was denied due to request throttling.</p>
2541    Throttling(String),
2542}
2543
2544impl DescribeDatasetError {
2545    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDatasetError> {
2546        if let Some(err) = proto::json::Error::parse_rest(&res) {
2547            match err.typ.as_str() {
2548                "InternalFailureException" => {
2549                    return RusotoError::Service(DescribeDatasetError::InternalFailure(err.msg))
2550                }
2551                "InvalidRequestException" => {
2552                    return RusotoError::Service(DescribeDatasetError::InvalidRequest(err.msg))
2553                }
2554                "ResourceNotFoundException" => {
2555                    return RusotoError::Service(DescribeDatasetError::ResourceNotFound(err.msg))
2556                }
2557                "ServiceUnavailableException" => {
2558                    return RusotoError::Service(DescribeDatasetError::ServiceUnavailable(err.msg))
2559                }
2560                "ThrottlingException" => {
2561                    return RusotoError::Service(DescribeDatasetError::Throttling(err.msg))
2562                }
2563                "ValidationException" => return RusotoError::Validation(err.msg),
2564                _ => {}
2565            }
2566        }
2567        RusotoError::Unknown(res)
2568    }
2569}
2570impl fmt::Display for DescribeDatasetError {
2571    #[allow(unused_variables)]
2572    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2573        match *self {
2574            DescribeDatasetError::InternalFailure(ref cause) => write!(f, "{}", cause),
2575            DescribeDatasetError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2576            DescribeDatasetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2577            DescribeDatasetError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2578            DescribeDatasetError::Throttling(ref cause) => write!(f, "{}", cause),
2579        }
2580    }
2581}
2582impl Error for DescribeDatasetError {}
2583/// Errors returned by DescribeDatastore
2584#[derive(Debug, PartialEq)]
2585pub enum DescribeDatastoreError {
2586    /// <p>There was an internal failure.</p>
2587    InternalFailure(String),
2588    /// <p>The request was not valid.</p>
2589    InvalidRequest(String),
2590    /// <p>A resource with the specified name could not be found.</p>
2591    ResourceNotFound(String),
2592    /// <p>The service is temporarily unavailable.</p>
2593    ServiceUnavailable(String),
2594    /// <p>The request was denied due to request throttling.</p>
2595    Throttling(String),
2596}
2597
2598impl DescribeDatastoreError {
2599    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDatastoreError> {
2600        if let Some(err) = proto::json::Error::parse_rest(&res) {
2601            match err.typ.as_str() {
2602                "InternalFailureException" => {
2603                    return RusotoError::Service(DescribeDatastoreError::InternalFailure(err.msg))
2604                }
2605                "InvalidRequestException" => {
2606                    return RusotoError::Service(DescribeDatastoreError::InvalidRequest(err.msg))
2607                }
2608                "ResourceNotFoundException" => {
2609                    return RusotoError::Service(DescribeDatastoreError::ResourceNotFound(err.msg))
2610                }
2611                "ServiceUnavailableException" => {
2612                    return RusotoError::Service(DescribeDatastoreError::ServiceUnavailable(
2613                        err.msg,
2614                    ))
2615                }
2616                "ThrottlingException" => {
2617                    return RusotoError::Service(DescribeDatastoreError::Throttling(err.msg))
2618                }
2619                "ValidationException" => return RusotoError::Validation(err.msg),
2620                _ => {}
2621            }
2622        }
2623        RusotoError::Unknown(res)
2624    }
2625}
2626impl fmt::Display for DescribeDatastoreError {
2627    #[allow(unused_variables)]
2628    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2629        match *self {
2630            DescribeDatastoreError::InternalFailure(ref cause) => write!(f, "{}", cause),
2631            DescribeDatastoreError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2632            DescribeDatastoreError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2633            DescribeDatastoreError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2634            DescribeDatastoreError::Throttling(ref cause) => write!(f, "{}", cause),
2635        }
2636    }
2637}
2638impl Error for DescribeDatastoreError {}
2639/// Errors returned by DescribeLoggingOptions
2640#[derive(Debug, PartialEq)]
2641pub enum DescribeLoggingOptionsError {
2642    /// <p>There was an internal failure.</p>
2643    InternalFailure(String),
2644    /// <p>The request was not valid.</p>
2645    InvalidRequest(String),
2646    /// <p>A resource with the specified name could not be found.</p>
2647    ResourceNotFound(String),
2648    /// <p>The service is temporarily unavailable.</p>
2649    ServiceUnavailable(String),
2650    /// <p>The request was denied due to request throttling.</p>
2651    Throttling(String),
2652}
2653
2654impl DescribeLoggingOptionsError {
2655    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLoggingOptionsError> {
2656        if let Some(err) = proto::json::Error::parse_rest(&res) {
2657            match err.typ.as_str() {
2658                "InternalFailureException" => {
2659                    return RusotoError::Service(DescribeLoggingOptionsError::InternalFailure(
2660                        err.msg,
2661                    ))
2662                }
2663                "InvalidRequestException" => {
2664                    return RusotoError::Service(DescribeLoggingOptionsError::InvalidRequest(
2665                        err.msg,
2666                    ))
2667                }
2668                "ResourceNotFoundException" => {
2669                    return RusotoError::Service(DescribeLoggingOptionsError::ResourceNotFound(
2670                        err.msg,
2671                    ))
2672                }
2673                "ServiceUnavailableException" => {
2674                    return RusotoError::Service(DescribeLoggingOptionsError::ServiceUnavailable(
2675                        err.msg,
2676                    ))
2677                }
2678                "ThrottlingException" => {
2679                    return RusotoError::Service(DescribeLoggingOptionsError::Throttling(err.msg))
2680                }
2681                "ValidationException" => return RusotoError::Validation(err.msg),
2682                _ => {}
2683            }
2684        }
2685        RusotoError::Unknown(res)
2686    }
2687}
2688impl fmt::Display for DescribeLoggingOptionsError {
2689    #[allow(unused_variables)]
2690    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2691        match *self {
2692            DescribeLoggingOptionsError::InternalFailure(ref cause) => write!(f, "{}", cause),
2693            DescribeLoggingOptionsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2694            DescribeLoggingOptionsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2695            DescribeLoggingOptionsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2696            DescribeLoggingOptionsError::Throttling(ref cause) => write!(f, "{}", cause),
2697        }
2698    }
2699}
2700impl Error for DescribeLoggingOptionsError {}
2701/// Errors returned by DescribePipeline
2702#[derive(Debug, PartialEq)]
2703pub enum DescribePipelineError {
2704    /// <p>There was an internal failure.</p>
2705    InternalFailure(String),
2706    /// <p>The request was not valid.</p>
2707    InvalidRequest(String),
2708    /// <p>A resource with the specified name could not be found.</p>
2709    ResourceNotFound(String),
2710    /// <p>The service is temporarily unavailable.</p>
2711    ServiceUnavailable(String),
2712    /// <p>The request was denied due to request throttling.</p>
2713    Throttling(String),
2714}
2715
2716impl DescribePipelineError {
2717    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribePipelineError> {
2718        if let Some(err) = proto::json::Error::parse_rest(&res) {
2719            match err.typ.as_str() {
2720                "InternalFailureException" => {
2721                    return RusotoError::Service(DescribePipelineError::InternalFailure(err.msg))
2722                }
2723                "InvalidRequestException" => {
2724                    return RusotoError::Service(DescribePipelineError::InvalidRequest(err.msg))
2725                }
2726                "ResourceNotFoundException" => {
2727                    return RusotoError::Service(DescribePipelineError::ResourceNotFound(err.msg))
2728                }
2729                "ServiceUnavailableException" => {
2730                    return RusotoError::Service(DescribePipelineError::ServiceUnavailable(err.msg))
2731                }
2732                "ThrottlingException" => {
2733                    return RusotoError::Service(DescribePipelineError::Throttling(err.msg))
2734                }
2735                "ValidationException" => return RusotoError::Validation(err.msg),
2736                _ => {}
2737            }
2738        }
2739        RusotoError::Unknown(res)
2740    }
2741}
2742impl fmt::Display for DescribePipelineError {
2743    #[allow(unused_variables)]
2744    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2745        match *self {
2746            DescribePipelineError::InternalFailure(ref cause) => write!(f, "{}", cause),
2747            DescribePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2748            DescribePipelineError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2749            DescribePipelineError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2750            DescribePipelineError::Throttling(ref cause) => write!(f, "{}", cause),
2751        }
2752    }
2753}
2754impl Error for DescribePipelineError {}
2755/// Errors returned by GetDatasetContent
2756#[derive(Debug, PartialEq)]
2757pub enum GetDatasetContentError {
2758    /// <p>There was an internal failure.</p>
2759    InternalFailure(String),
2760    /// <p>The request was not valid.</p>
2761    InvalidRequest(String),
2762    /// <p>A resource with the specified name could not be found.</p>
2763    ResourceNotFound(String),
2764    /// <p>The service is temporarily unavailable.</p>
2765    ServiceUnavailable(String),
2766    /// <p>The request was denied due to request throttling.</p>
2767    Throttling(String),
2768}
2769
2770impl GetDatasetContentError {
2771    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDatasetContentError> {
2772        if let Some(err) = proto::json::Error::parse_rest(&res) {
2773            match err.typ.as_str() {
2774                "InternalFailureException" => {
2775                    return RusotoError::Service(GetDatasetContentError::InternalFailure(err.msg))
2776                }
2777                "InvalidRequestException" => {
2778                    return RusotoError::Service(GetDatasetContentError::InvalidRequest(err.msg))
2779                }
2780                "ResourceNotFoundException" => {
2781                    return RusotoError::Service(GetDatasetContentError::ResourceNotFound(err.msg))
2782                }
2783                "ServiceUnavailableException" => {
2784                    return RusotoError::Service(GetDatasetContentError::ServiceUnavailable(
2785                        err.msg,
2786                    ))
2787                }
2788                "ThrottlingException" => {
2789                    return RusotoError::Service(GetDatasetContentError::Throttling(err.msg))
2790                }
2791                "ValidationException" => return RusotoError::Validation(err.msg),
2792                _ => {}
2793            }
2794        }
2795        RusotoError::Unknown(res)
2796    }
2797}
2798impl fmt::Display for GetDatasetContentError {
2799    #[allow(unused_variables)]
2800    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2801        match *self {
2802            GetDatasetContentError::InternalFailure(ref cause) => write!(f, "{}", cause),
2803            GetDatasetContentError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2804            GetDatasetContentError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2805            GetDatasetContentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2806            GetDatasetContentError::Throttling(ref cause) => write!(f, "{}", cause),
2807        }
2808    }
2809}
2810impl Error for GetDatasetContentError {}
2811/// Errors returned by ListChannels
2812#[derive(Debug, PartialEq)]
2813pub enum ListChannelsError {
2814    /// <p>There was an internal failure.</p>
2815    InternalFailure(String),
2816    /// <p>The request was not valid.</p>
2817    InvalidRequest(String),
2818    /// <p>The service is temporarily unavailable.</p>
2819    ServiceUnavailable(String),
2820    /// <p>The request was denied due to request throttling.</p>
2821    Throttling(String),
2822}
2823
2824impl ListChannelsError {
2825    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListChannelsError> {
2826        if let Some(err) = proto::json::Error::parse_rest(&res) {
2827            match err.typ.as_str() {
2828                "InternalFailureException" => {
2829                    return RusotoError::Service(ListChannelsError::InternalFailure(err.msg))
2830                }
2831                "InvalidRequestException" => {
2832                    return RusotoError::Service(ListChannelsError::InvalidRequest(err.msg))
2833                }
2834                "ServiceUnavailableException" => {
2835                    return RusotoError::Service(ListChannelsError::ServiceUnavailable(err.msg))
2836                }
2837                "ThrottlingException" => {
2838                    return RusotoError::Service(ListChannelsError::Throttling(err.msg))
2839                }
2840                "ValidationException" => return RusotoError::Validation(err.msg),
2841                _ => {}
2842            }
2843        }
2844        RusotoError::Unknown(res)
2845    }
2846}
2847impl fmt::Display for ListChannelsError {
2848    #[allow(unused_variables)]
2849    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2850        match *self {
2851            ListChannelsError::InternalFailure(ref cause) => write!(f, "{}", cause),
2852            ListChannelsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2853            ListChannelsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2854            ListChannelsError::Throttling(ref cause) => write!(f, "{}", cause),
2855        }
2856    }
2857}
2858impl Error for ListChannelsError {}
2859/// Errors returned by ListDatasetContents
2860#[derive(Debug, PartialEq)]
2861pub enum ListDatasetContentsError {
2862    /// <p>There was an internal failure.</p>
2863    InternalFailure(String),
2864    /// <p>The request was not valid.</p>
2865    InvalidRequest(String),
2866    /// <p>A resource with the specified name could not be found.</p>
2867    ResourceNotFound(String),
2868    /// <p>The service is temporarily unavailable.</p>
2869    ServiceUnavailable(String),
2870    /// <p>The request was denied due to request throttling.</p>
2871    Throttling(String),
2872}
2873
2874impl ListDatasetContentsError {
2875    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDatasetContentsError> {
2876        if let Some(err) = proto::json::Error::parse_rest(&res) {
2877            match err.typ.as_str() {
2878                "InternalFailureException" => {
2879                    return RusotoError::Service(ListDatasetContentsError::InternalFailure(err.msg))
2880                }
2881                "InvalidRequestException" => {
2882                    return RusotoError::Service(ListDatasetContentsError::InvalidRequest(err.msg))
2883                }
2884                "ResourceNotFoundException" => {
2885                    return RusotoError::Service(ListDatasetContentsError::ResourceNotFound(
2886                        err.msg,
2887                    ))
2888                }
2889                "ServiceUnavailableException" => {
2890                    return RusotoError::Service(ListDatasetContentsError::ServiceUnavailable(
2891                        err.msg,
2892                    ))
2893                }
2894                "ThrottlingException" => {
2895                    return RusotoError::Service(ListDatasetContentsError::Throttling(err.msg))
2896                }
2897                "ValidationException" => return RusotoError::Validation(err.msg),
2898                _ => {}
2899            }
2900        }
2901        RusotoError::Unknown(res)
2902    }
2903}
2904impl fmt::Display for ListDatasetContentsError {
2905    #[allow(unused_variables)]
2906    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2907        match *self {
2908            ListDatasetContentsError::InternalFailure(ref cause) => write!(f, "{}", cause),
2909            ListDatasetContentsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2910            ListDatasetContentsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2911            ListDatasetContentsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2912            ListDatasetContentsError::Throttling(ref cause) => write!(f, "{}", cause),
2913        }
2914    }
2915}
2916impl Error for ListDatasetContentsError {}
2917/// Errors returned by ListDatasets
2918#[derive(Debug, PartialEq)]
2919pub enum ListDatasetsError {
2920    /// <p>There was an internal failure.</p>
2921    InternalFailure(String),
2922    /// <p>The request was not valid.</p>
2923    InvalidRequest(String),
2924    /// <p>The service is temporarily unavailable.</p>
2925    ServiceUnavailable(String),
2926    /// <p>The request was denied due to request throttling.</p>
2927    Throttling(String),
2928}
2929
2930impl ListDatasetsError {
2931    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDatasetsError> {
2932        if let Some(err) = proto::json::Error::parse_rest(&res) {
2933            match err.typ.as_str() {
2934                "InternalFailureException" => {
2935                    return RusotoError::Service(ListDatasetsError::InternalFailure(err.msg))
2936                }
2937                "InvalidRequestException" => {
2938                    return RusotoError::Service(ListDatasetsError::InvalidRequest(err.msg))
2939                }
2940                "ServiceUnavailableException" => {
2941                    return RusotoError::Service(ListDatasetsError::ServiceUnavailable(err.msg))
2942                }
2943                "ThrottlingException" => {
2944                    return RusotoError::Service(ListDatasetsError::Throttling(err.msg))
2945                }
2946                "ValidationException" => return RusotoError::Validation(err.msg),
2947                _ => {}
2948            }
2949        }
2950        RusotoError::Unknown(res)
2951    }
2952}
2953impl fmt::Display for ListDatasetsError {
2954    #[allow(unused_variables)]
2955    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2956        match *self {
2957            ListDatasetsError::InternalFailure(ref cause) => write!(f, "{}", cause),
2958            ListDatasetsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2959            ListDatasetsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2960            ListDatasetsError::Throttling(ref cause) => write!(f, "{}", cause),
2961        }
2962    }
2963}
2964impl Error for ListDatasetsError {}
2965/// Errors returned by ListDatastores
2966#[derive(Debug, PartialEq)]
2967pub enum ListDatastoresError {
2968    /// <p>There was an internal failure.</p>
2969    InternalFailure(String),
2970    /// <p>The request was not valid.</p>
2971    InvalidRequest(String),
2972    /// <p>The service is temporarily unavailable.</p>
2973    ServiceUnavailable(String),
2974    /// <p>The request was denied due to request throttling.</p>
2975    Throttling(String),
2976}
2977
2978impl ListDatastoresError {
2979    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDatastoresError> {
2980        if let Some(err) = proto::json::Error::parse_rest(&res) {
2981            match err.typ.as_str() {
2982                "InternalFailureException" => {
2983                    return RusotoError::Service(ListDatastoresError::InternalFailure(err.msg))
2984                }
2985                "InvalidRequestException" => {
2986                    return RusotoError::Service(ListDatastoresError::InvalidRequest(err.msg))
2987                }
2988                "ServiceUnavailableException" => {
2989                    return RusotoError::Service(ListDatastoresError::ServiceUnavailable(err.msg))
2990                }
2991                "ThrottlingException" => {
2992                    return RusotoError::Service(ListDatastoresError::Throttling(err.msg))
2993                }
2994                "ValidationException" => return RusotoError::Validation(err.msg),
2995                _ => {}
2996            }
2997        }
2998        RusotoError::Unknown(res)
2999    }
3000}
3001impl fmt::Display for ListDatastoresError {
3002    #[allow(unused_variables)]
3003    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3004        match *self {
3005            ListDatastoresError::InternalFailure(ref cause) => write!(f, "{}", cause),
3006            ListDatastoresError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3007            ListDatastoresError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3008            ListDatastoresError::Throttling(ref cause) => write!(f, "{}", cause),
3009        }
3010    }
3011}
3012impl Error for ListDatastoresError {}
3013/// Errors returned by ListPipelines
3014#[derive(Debug, PartialEq)]
3015pub enum ListPipelinesError {
3016    /// <p>There was an internal failure.</p>
3017    InternalFailure(String),
3018    /// <p>The request was not valid.</p>
3019    InvalidRequest(String),
3020    /// <p>The service is temporarily unavailable.</p>
3021    ServiceUnavailable(String),
3022    /// <p>The request was denied due to request throttling.</p>
3023    Throttling(String),
3024}
3025
3026impl ListPipelinesError {
3027    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPipelinesError> {
3028        if let Some(err) = proto::json::Error::parse_rest(&res) {
3029            match err.typ.as_str() {
3030                "InternalFailureException" => {
3031                    return RusotoError::Service(ListPipelinesError::InternalFailure(err.msg))
3032                }
3033                "InvalidRequestException" => {
3034                    return RusotoError::Service(ListPipelinesError::InvalidRequest(err.msg))
3035                }
3036                "ServiceUnavailableException" => {
3037                    return RusotoError::Service(ListPipelinesError::ServiceUnavailable(err.msg))
3038                }
3039                "ThrottlingException" => {
3040                    return RusotoError::Service(ListPipelinesError::Throttling(err.msg))
3041                }
3042                "ValidationException" => return RusotoError::Validation(err.msg),
3043                _ => {}
3044            }
3045        }
3046        RusotoError::Unknown(res)
3047    }
3048}
3049impl fmt::Display for ListPipelinesError {
3050    #[allow(unused_variables)]
3051    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3052        match *self {
3053            ListPipelinesError::InternalFailure(ref cause) => write!(f, "{}", cause),
3054            ListPipelinesError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3055            ListPipelinesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3056            ListPipelinesError::Throttling(ref cause) => write!(f, "{}", cause),
3057        }
3058    }
3059}
3060impl Error for ListPipelinesError {}
3061/// Errors returned by ListTagsForResource
3062#[derive(Debug, PartialEq)]
3063pub enum ListTagsForResourceError {
3064    /// <p>There was an internal failure.</p>
3065    InternalFailure(String),
3066    /// <p>The request was not valid.</p>
3067    InvalidRequest(String),
3068    /// <p>The command caused an internal limit to be exceeded.</p>
3069    LimitExceeded(String),
3070    /// <p>A resource with the specified name could not be found.</p>
3071    ResourceNotFound(String),
3072    /// <p>The service is temporarily unavailable.</p>
3073    ServiceUnavailable(String),
3074    /// <p>The request was denied due to request throttling.</p>
3075    Throttling(String),
3076}
3077
3078impl ListTagsForResourceError {
3079    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
3080        if let Some(err) = proto::json::Error::parse_rest(&res) {
3081            match err.typ.as_str() {
3082                "InternalFailureException" => {
3083                    return RusotoError::Service(ListTagsForResourceError::InternalFailure(err.msg))
3084                }
3085                "InvalidRequestException" => {
3086                    return RusotoError::Service(ListTagsForResourceError::InvalidRequest(err.msg))
3087                }
3088                "LimitExceededException" => {
3089                    return RusotoError::Service(ListTagsForResourceError::LimitExceeded(err.msg))
3090                }
3091                "ResourceNotFoundException" => {
3092                    return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
3093                        err.msg,
3094                    ))
3095                }
3096                "ServiceUnavailableException" => {
3097                    return RusotoError::Service(ListTagsForResourceError::ServiceUnavailable(
3098                        err.msg,
3099                    ))
3100                }
3101                "ThrottlingException" => {
3102                    return RusotoError::Service(ListTagsForResourceError::Throttling(err.msg))
3103                }
3104                "ValidationException" => return RusotoError::Validation(err.msg),
3105                _ => {}
3106            }
3107        }
3108        RusotoError::Unknown(res)
3109    }
3110}
3111impl fmt::Display for ListTagsForResourceError {
3112    #[allow(unused_variables)]
3113    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3114        match *self {
3115            ListTagsForResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
3116            ListTagsForResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3117            ListTagsForResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3118            ListTagsForResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3119            ListTagsForResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3120            ListTagsForResourceError::Throttling(ref cause) => write!(f, "{}", cause),
3121        }
3122    }
3123}
3124impl Error for ListTagsForResourceError {}
3125/// Errors returned by PutLoggingOptions
3126#[derive(Debug, PartialEq)]
3127pub enum PutLoggingOptionsError {
3128    /// <p>There was an internal failure.</p>
3129    InternalFailure(String),
3130    /// <p>The request was not valid.</p>
3131    InvalidRequest(String),
3132    /// <p>The service is temporarily unavailable.</p>
3133    ServiceUnavailable(String),
3134    /// <p>The request was denied due to request throttling.</p>
3135    Throttling(String),
3136}
3137
3138impl PutLoggingOptionsError {
3139    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutLoggingOptionsError> {
3140        if let Some(err) = proto::json::Error::parse_rest(&res) {
3141            match err.typ.as_str() {
3142                "InternalFailureException" => {
3143                    return RusotoError::Service(PutLoggingOptionsError::InternalFailure(err.msg))
3144                }
3145                "InvalidRequestException" => {
3146                    return RusotoError::Service(PutLoggingOptionsError::InvalidRequest(err.msg))
3147                }
3148                "ServiceUnavailableException" => {
3149                    return RusotoError::Service(PutLoggingOptionsError::ServiceUnavailable(
3150                        err.msg,
3151                    ))
3152                }
3153                "ThrottlingException" => {
3154                    return RusotoError::Service(PutLoggingOptionsError::Throttling(err.msg))
3155                }
3156                "ValidationException" => return RusotoError::Validation(err.msg),
3157                _ => {}
3158            }
3159        }
3160        RusotoError::Unknown(res)
3161    }
3162}
3163impl fmt::Display for PutLoggingOptionsError {
3164    #[allow(unused_variables)]
3165    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3166        match *self {
3167            PutLoggingOptionsError::InternalFailure(ref cause) => write!(f, "{}", cause),
3168            PutLoggingOptionsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3169            PutLoggingOptionsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3170            PutLoggingOptionsError::Throttling(ref cause) => write!(f, "{}", cause),
3171        }
3172    }
3173}
3174impl Error for PutLoggingOptionsError {}
3175/// Errors returned by RunPipelineActivity
3176#[derive(Debug, PartialEq)]
3177pub enum RunPipelineActivityError {
3178    /// <p>There was an internal failure.</p>
3179    InternalFailure(String),
3180    /// <p>The request was not valid.</p>
3181    InvalidRequest(String),
3182    /// <p>The service is temporarily unavailable.</p>
3183    ServiceUnavailable(String),
3184    /// <p>The request was denied due to request throttling.</p>
3185    Throttling(String),
3186}
3187
3188impl RunPipelineActivityError {
3189    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RunPipelineActivityError> {
3190        if let Some(err) = proto::json::Error::parse_rest(&res) {
3191            match err.typ.as_str() {
3192                "InternalFailureException" => {
3193                    return RusotoError::Service(RunPipelineActivityError::InternalFailure(err.msg))
3194                }
3195                "InvalidRequestException" => {
3196                    return RusotoError::Service(RunPipelineActivityError::InvalidRequest(err.msg))
3197                }
3198                "ServiceUnavailableException" => {
3199                    return RusotoError::Service(RunPipelineActivityError::ServiceUnavailable(
3200                        err.msg,
3201                    ))
3202                }
3203                "ThrottlingException" => {
3204                    return RusotoError::Service(RunPipelineActivityError::Throttling(err.msg))
3205                }
3206                "ValidationException" => return RusotoError::Validation(err.msg),
3207                _ => {}
3208            }
3209        }
3210        RusotoError::Unknown(res)
3211    }
3212}
3213impl fmt::Display for RunPipelineActivityError {
3214    #[allow(unused_variables)]
3215    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3216        match *self {
3217            RunPipelineActivityError::InternalFailure(ref cause) => write!(f, "{}", cause),
3218            RunPipelineActivityError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3219            RunPipelineActivityError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3220            RunPipelineActivityError::Throttling(ref cause) => write!(f, "{}", cause),
3221        }
3222    }
3223}
3224impl Error for RunPipelineActivityError {}
3225/// Errors returned by SampleChannelData
3226#[derive(Debug, PartialEq)]
3227pub enum SampleChannelDataError {
3228    /// <p>There was an internal failure.</p>
3229    InternalFailure(String),
3230    /// <p>The request was not valid.</p>
3231    InvalidRequest(String),
3232    /// <p>A resource with the specified name could not be found.</p>
3233    ResourceNotFound(String),
3234    /// <p>The service is temporarily unavailable.</p>
3235    ServiceUnavailable(String),
3236    /// <p>The request was denied due to request throttling.</p>
3237    Throttling(String),
3238}
3239
3240impl SampleChannelDataError {
3241    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SampleChannelDataError> {
3242        if let Some(err) = proto::json::Error::parse_rest(&res) {
3243            match err.typ.as_str() {
3244                "InternalFailureException" => {
3245                    return RusotoError::Service(SampleChannelDataError::InternalFailure(err.msg))
3246                }
3247                "InvalidRequestException" => {
3248                    return RusotoError::Service(SampleChannelDataError::InvalidRequest(err.msg))
3249                }
3250                "ResourceNotFoundException" => {
3251                    return RusotoError::Service(SampleChannelDataError::ResourceNotFound(err.msg))
3252                }
3253                "ServiceUnavailableException" => {
3254                    return RusotoError::Service(SampleChannelDataError::ServiceUnavailable(
3255                        err.msg,
3256                    ))
3257                }
3258                "ThrottlingException" => {
3259                    return RusotoError::Service(SampleChannelDataError::Throttling(err.msg))
3260                }
3261                "ValidationException" => return RusotoError::Validation(err.msg),
3262                _ => {}
3263            }
3264        }
3265        RusotoError::Unknown(res)
3266    }
3267}
3268impl fmt::Display for SampleChannelDataError {
3269    #[allow(unused_variables)]
3270    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3271        match *self {
3272            SampleChannelDataError::InternalFailure(ref cause) => write!(f, "{}", cause),
3273            SampleChannelDataError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3274            SampleChannelDataError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3275            SampleChannelDataError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3276            SampleChannelDataError::Throttling(ref cause) => write!(f, "{}", cause),
3277        }
3278    }
3279}
3280impl Error for SampleChannelDataError {}
3281/// Errors returned by StartPipelineReprocessing
3282#[derive(Debug, PartialEq)]
3283pub enum StartPipelineReprocessingError {
3284    /// <p>There was an internal failure.</p>
3285    InternalFailure(String),
3286    /// <p>The request was not valid.</p>
3287    InvalidRequest(String),
3288    /// <p>A resource with the same name already exists.</p>
3289    ResourceAlreadyExists(String),
3290    /// <p>A resource with the specified name could not be found.</p>
3291    ResourceNotFound(String),
3292    /// <p>The service is temporarily unavailable.</p>
3293    ServiceUnavailable(String),
3294    /// <p>The request was denied due to request throttling.</p>
3295    Throttling(String),
3296}
3297
3298impl StartPipelineReprocessingError {
3299    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartPipelineReprocessingError> {
3300        if let Some(err) = proto::json::Error::parse_rest(&res) {
3301            match err.typ.as_str() {
3302                "InternalFailureException" => {
3303                    return RusotoError::Service(StartPipelineReprocessingError::InternalFailure(
3304                        err.msg,
3305                    ))
3306                }
3307                "InvalidRequestException" => {
3308                    return RusotoError::Service(StartPipelineReprocessingError::InvalidRequest(
3309                        err.msg,
3310                    ))
3311                }
3312                "ResourceAlreadyExistsException" => {
3313                    return RusotoError::Service(
3314                        StartPipelineReprocessingError::ResourceAlreadyExists(err.msg),
3315                    )
3316                }
3317                "ResourceNotFoundException" => {
3318                    return RusotoError::Service(StartPipelineReprocessingError::ResourceNotFound(
3319                        err.msg,
3320                    ))
3321                }
3322                "ServiceUnavailableException" => {
3323                    return RusotoError::Service(
3324                        StartPipelineReprocessingError::ServiceUnavailable(err.msg),
3325                    )
3326                }
3327                "ThrottlingException" => {
3328                    return RusotoError::Service(StartPipelineReprocessingError::Throttling(
3329                        err.msg,
3330                    ))
3331                }
3332                "ValidationException" => return RusotoError::Validation(err.msg),
3333                _ => {}
3334            }
3335        }
3336        RusotoError::Unknown(res)
3337    }
3338}
3339impl fmt::Display for StartPipelineReprocessingError {
3340    #[allow(unused_variables)]
3341    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3342        match *self {
3343            StartPipelineReprocessingError::InternalFailure(ref cause) => write!(f, "{}", cause),
3344            StartPipelineReprocessingError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3345            StartPipelineReprocessingError::ResourceAlreadyExists(ref cause) => {
3346                write!(f, "{}", cause)
3347            }
3348            StartPipelineReprocessingError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3349            StartPipelineReprocessingError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3350            StartPipelineReprocessingError::Throttling(ref cause) => write!(f, "{}", cause),
3351        }
3352    }
3353}
3354impl Error for StartPipelineReprocessingError {}
3355/// Errors returned by TagResource
3356#[derive(Debug, PartialEq)]
3357pub enum TagResourceError {
3358    /// <p>There was an internal failure.</p>
3359    InternalFailure(String),
3360    /// <p>The request was not valid.</p>
3361    InvalidRequest(String),
3362    /// <p>The command caused an internal limit to be exceeded.</p>
3363    LimitExceeded(String),
3364    /// <p>A resource with the specified name could not be found.</p>
3365    ResourceNotFound(String),
3366    /// <p>The service is temporarily unavailable.</p>
3367    ServiceUnavailable(String),
3368    /// <p>The request was denied due to request throttling.</p>
3369    Throttling(String),
3370}
3371
3372impl TagResourceError {
3373    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
3374        if let Some(err) = proto::json::Error::parse_rest(&res) {
3375            match err.typ.as_str() {
3376                "InternalFailureException" => {
3377                    return RusotoError::Service(TagResourceError::InternalFailure(err.msg))
3378                }
3379                "InvalidRequestException" => {
3380                    return RusotoError::Service(TagResourceError::InvalidRequest(err.msg))
3381                }
3382                "LimitExceededException" => {
3383                    return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
3384                }
3385                "ResourceNotFoundException" => {
3386                    return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
3387                }
3388                "ServiceUnavailableException" => {
3389                    return RusotoError::Service(TagResourceError::ServiceUnavailable(err.msg))
3390                }
3391                "ThrottlingException" => {
3392                    return RusotoError::Service(TagResourceError::Throttling(err.msg))
3393                }
3394                "ValidationException" => return RusotoError::Validation(err.msg),
3395                _ => {}
3396            }
3397        }
3398        RusotoError::Unknown(res)
3399    }
3400}
3401impl fmt::Display for TagResourceError {
3402    #[allow(unused_variables)]
3403    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3404        match *self {
3405            TagResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
3406            TagResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3407            TagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3408            TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3409            TagResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3410            TagResourceError::Throttling(ref cause) => write!(f, "{}", cause),
3411        }
3412    }
3413}
3414impl Error for TagResourceError {}
3415/// Errors returned by UntagResource
3416#[derive(Debug, PartialEq)]
3417pub enum UntagResourceError {
3418    /// <p>There was an internal failure.</p>
3419    InternalFailure(String),
3420    /// <p>The request was not valid.</p>
3421    InvalidRequest(String),
3422    /// <p>The command caused an internal limit to be exceeded.</p>
3423    LimitExceeded(String),
3424    /// <p>A resource with the specified name could not be found.</p>
3425    ResourceNotFound(String),
3426    /// <p>The service is temporarily unavailable.</p>
3427    ServiceUnavailable(String),
3428    /// <p>The request was denied due to request throttling.</p>
3429    Throttling(String),
3430}
3431
3432impl UntagResourceError {
3433    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
3434        if let Some(err) = proto::json::Error::parse_rest(&res) {
3435            match err.typ.as_str() {
3436                "InternalFailureException" => {
3437                    return RusotoError::Service(UntagResourceError::InternalFailure(err.msg))
3438                }
3439                "InvalidRequestException" => {
3440                    return RusotoError::Service(UntagResourceError::InvalidRequest(err.msg))
3441                }
3442                "LimitExceededException" => {
3443                    return RusotoError::Service(UntagResourceError::LimitExceeded(err.msg))
3444                }
3445                "ResourceNotFoundException" => {
3446                    return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
3447                }
3448                "ServiceUnavailableException" => {
3449                    return RusotoError::Service(UntagResourceError::ServiceUnavailable(err.msg))
3450                }
3451                "ThrottlingException" => {
3452                    return RusotoError::Service(UntagResourceError::Throttling(err.msg))
3453                }
3454                "ValidationException" => return RusotoError::Validation(err.msg),
3455                _ => {}
3456            }
3457        }
3458        RusotoError::Unknown(res)
3459    }
3460}
3461impl fmt::Display for UntagResourceError {
3462    #[allow(unused_variables)]
3463    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3464        match *self {
3465            UntagResourceError::InternalFailure(ref cause) => write!(f, "{}", cause),
3466            UntagResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3467            UntagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3468            UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3469            UntagResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3470            UntagResourceError::Throttling(ref cause) => write!(f, "{}", cause),
3471        }
3472    }
3473}
3474impl Error for UntagResourceError {}
3475/// Errors returned by UpdateChannel
3476#[derive(Debug, PartialEq)]
3477pub enum UpdateChannelError {
3478    /// <p>There was an internal failure.</p>
3479    InternalFailure(String),
3480    /// <p>The request was not valid.</p>
3481    InvalidRequest(String),
3482    /// <p>A resource with the specified name could not be found.</p>
3483    ResourceNotFound(String),
3484    /// <p>The service is temporarily unavailable.</p>
3485    ServiceUnavailable(String),
3486    /// <p>The request was denied due to request throttling.</p>
3487    Throttling(String),
3488}
3489
3490impl UpdateChannelError {
3491    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateChannelError> {
3492        if let Some(err) = proto::json::Error::parse_rest(&res) {
3493            match err.typ.as_str() {
3494                "InternalFailureException" => {
3495                    return RusotoError::Service(UpdateChannelError::InternalFailure(err.msg))
3496                }
3497                "InvalidRequestException" => {
3498                    return RusotoError::Service(UpdateChannelError::InvalidRequest(err.msg))
3499                }
3500                "ResourceNotFoundException" => {
3501                    return RusotoError::Service(UpdateChannelError::ResourceNotFound(err.msg))
3502                }
3503                "ServiceUnavailableException" => {
3504                    return RusotoError::Service(UpdateChannelError::ServiceUnavailable(err.msg))
3505                }
3506                "ThrottlingException" => {
3507                    return RusotoError::Service(UpdateChannelError::Throttling(err.msg))
3508                }
3509                "ValidationException" => return RusotoError::Validation(err.msg),
3510                _ => {}
3511            }
3512        }
3513        RusotoError::Unknown(res)
3514    }
3515}
3516impl fmt::Display for UpdateChannelError {
3517    #[allow(unused_variables)]
3518    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3519        match *self {
3520            UpdateChannelError::InternalFailure(ref cause) => write!(f, "{}", cause),
3521            UpdateChannelError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3522            UpdateChannelError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3523            UpdateChannelError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3524            UpdateChannelError::Throttling(ref cause) => write!(f, "{}", cause),
3525        }
3526    }
3527}
3528impl Error for UpdateChannelError {}
3529/// Errors returned by UpdateDataset
3530#[derive(Debug, PartialEq)]
3531pub enum UpdateDatasetError {
3532    /// <p>There was an internal failure.</p>
3533    InternalFailure(String),
3534    /// <p>The request was not valid.</p>
3535    InvalidRequest(String),
3536    /// <p>A resource with the specified name could not be found.</p>
3537    ResourceNotFound(String),
3538    /// <p>The service is temporarily unavailable.</p>
3539    ServiceUnavailable(String),
3540    /// <p>The request was denied due to request throttling.</p>
3541    Throttling(String),
3542}
3543
3544impl UpdateDatasetError {
3545    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDatasetError> {
3546        if let Some(err) = proto::json::Error::parse_rest(&res) {
3547            match err.typ.as_str() {
3548                "InternalFailureException" => {
3549                    return RusotoError::Service(UpdateDatasetError::InternalFailure(err.msg))
3550                }
3551                "InvalidRequestException" => {
3552                    return RusotoError::Service(UpdateDatasetError::InvalidRequest(err.msg))
3553                }
3554                "ResourceNotFoundException" => {
3555                    return RusotoError::Service(UpdateDatasetError::ResourceNotFound(err.msg))
3556                }
3557                "ServiceUnavailableException" => {
3558                    return RusotoError::Service(UpdateDatasetError::ServiceUnavailable(err.msg))
3559                }
3560                "ThrottlingException" => {
3561                    return RusotoError::Service(UpdateDatasetError::Throttling(err.msg))
3562                }
3563                "ValidationException" => return RusotoError::Validation(err.msg),
3564                _ => {}
3565            }
3566        }
3567        RusotoError::Unknown(res)
3568    }
3569}
3570impl fmt::Display for UpdateDatasetError {
3571    #[allow(unused_variables)]
3572    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3573        match *self {
3574            UpdateDatasetError::InternalFailure(ref cause) => write!(f, "{}", cause),
3575            UpdateDatasetError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3576            UpdateDatasetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3577            UpdateDatasetError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3578            UpdateDatasetError::Throttling(ref cause) => write!(f, "{}", cause),
3579        }
3580    }
3581}
3582impl Error for UpdateDatasetError {}
3583/// Errors returned by UpdateDatastore
3584#[derive(Debug, PartialEq)]
3585pub enum UpdateDatastoreError {
3586    /// <p>There was an internal failure.</p>
3587    InternalFailure(String),
3588    /// <p>The request was not valid.</p>
3589    InvalidRequest(String),
3590    /// <p>A resource with the specified name could not be found.</p>
3591    ResourceNotFound(String),
3592    /// <p>The service is temporarily unavailable.</p>
3593    ServiceUnavailable(String),
3594    /// <p>The request was denied due to request throttling.</p>
3595    Throttling(String),
3596}
3597
3598impl UpdateDatastoreError {
3599    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDatastoreError> {
3600        if let Some(err) = proto::json::Error::parse_rest(&res) {
3601            match err.typ.as_str() {
3602                "InternalFailureException" => {
3603                    return RusotoError::Service(UpdateDatastoreError::InternalFailure(err.msg))
3604                }
3605                "InvalidRequestException" => {
3606                    return RusotoError::Service(UpdateDatastoreError::InvalidRequest(err.msg))
3607                }
3608                "ResourceNotFoundException" => {
3609                    return RusotoError::Service(UpdateDatastoreError::ResourceNotFound(err.msg))
3610                }
3611                "ServiceUnavailableException" => {
3612                    return RusotoError::Service(UpdateDatastoreError::ServiceUnavailable(err.msg))
3613                }
3614                "ThrottlingException" => {
3615                    return RusotoError::Service(UpdateDatastoreError::Throttling(err.msg))
3616                }
3617                "ValidationException" => return RusotoError::Validation(err.msg),
3618                _ => {}
3619            }
3620        }
3621        RusotoError::Unknown(res)
3622    }
3623}
3624impl fmt::Display for UpdateDatastoreError {
3625    #[allow(unused_variables)]
3626    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3627        match *self {
3628            UpdateDatastoreError::InternalFailure(ref cause) => write!(f, "{}", cause),
3629            UpdateDatastoreError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3630            UpdateDatastoreError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3631            UpdateDatastoreError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3632            UpdateDatastoreError::Throttling(ref cause) => write!(f, "{}", cause),
3633        }
3634    }
3635}
3636impl Error for UpdateDatastoreError {}
3637/// Errors returned by UpdatePipeline
3638#[derive(Debug, PartialEq)]
3639pub enum UpdatePipelineError {
3640    /// <p>There was an internal failure.</p>
3641    InternalFailure(String),
3642    /// <p>The request was not valid.</p>
3643    InvalidRequest(String),
3644    /// <p>The command caused an internal limit to be exceeded.</p>
3645    LimitExceeded(String),
3646    /// <p>A resource with the specified name could not be found.</p>
3647    ResourceNotFound(String),
3648    /// <p>The service is temporarily unavailable.</p>
3649    ServiceUnavailable(String),
3650    /// <p>The request was denied due to request throttling.</p>
3651    Throttling(String),
3652}
3653
3654impl UpdatePipelineError {
3655    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdatePipelineError> {
3656        if let Some(err) = proto::json::Error::parse_rest(&res) {
3657            match err.typ.as_str() {
3658                "InternalFailureException" => {
3659                    return RusotoError::Service(UpdatePipelineError::InternalFailure(err.msg))
3660                }
3661                "InvalidRequestException" => {
3662                    return RusotoError::Service(UpdatePipelineError::InvalidRequest(err.msg))
3663                }
3664                "LimitExceededException" => {
3665                    return RusotoError::Service(UpdatePipelineError::LimitExceeded(err.msg))
3666                }
3667                "ResourceNotFoundException" => {
3668                    return RusotoError::Service(UpdatePipelineError::ResourceNotFound(err.msg))
3669                }
3670                "ServiceUnavailableException" => {
3671                    return RusotoError::Service(UpdatePipelineError::ServiceUnavailable(err.msg))
3672                }
3673                "ThrottlingException" => {
3674                    return RusotoError::Service(UpdatePipelineError::Throttling(err.msg))
3675                }
3676                "ValidationException" => return RusotoError::Validation(err.msg),
3677                _ => {}
3678            }
3679        }
3680        RusotoError::Unknown(res)
3681    }
3682}
3683impl fmt::Display for UpdatePipelineError {
3684    #[allow(unused_variables)]
3685    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3686        match *self {
3687            UpdatePipelineError::InternalFailure(ref cause) => write!(f, "{}", cause),
3688            UpdatePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3689            UpdatePipelineError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3690            UpdatePipelineError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3691            UpdatePipelineError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3692            UpdatePipelineError::Throttling(ref cause) => write!(f, "{}", cause),
3693        }
3694    }
3695}
3696impl Error for UpdatePipelineError {}
3697/// Trait representing the capabilities of the AWS IoT Analytics API. AWS IoT Analytics clients implement this trait.
3698#[async_trait]
3699pub trait IotAnalytics {
3700    /// <p>Sends messages to a channel.</p>
3701    async fn batch_put_message(
3702        &self,
3703        input: BatchPutMessageRequest,
3704    ) -> Result<BatchPutMessageResponse, RusotoError<BatchPutMessageError>>;
3705
3706    /// <p>Cancels the reprocessing of data through the pipeline.</p>
3707    async fn cancel_pipeline_reprocessing(
3708        &self,
3709        input: CancelPipelineReprocessingRequest,
3710    ) -> Result<CancelPipelineReprocessingResponse, RusotoError<CancelPipelineReprocessingError>>;
3711
3712    /// <p>Creates a channel. A channel collects data from an MQTT topic and archives the raw, unprocessed messages before publishing the data to a pipeline.</p>
3713    async fn create_channel(
3714        &self,
3715        input: CreateChannelRequest,
3716    ) -> Result<CreateChannelResponse, RusotoError<CreateChannelError>>;
3717
3718    /// <p>Creates a data set. A data set stores data retrieved from a data store by applying a "queryAction" (a SQL query) or a "containerAction" (executing a containerized application). This operation creates the skeleton of a data set. The data set can be populated manually by calling "CreateDatasetContent" or automatically according to a "trigger" you specify.</p>
3719    async fn create_dataset(
3720        &self,
3721        input: CreateDatasetRequest,
3722    ) -> Result<CreateDatasetResponse, RusotoError<CreateDatasetError>>;
3723
3724    /// <p>Creates the content of a data set by applying a "queryAction" (a SQL query) or a "containerAction" (executing a containerized application).</p>
3725    async fn create_dataset_content(
3726        &self,
3727        input: CreateDatasetContentRequest,
3728    ) -> Result<CreateDatasetContentResponse, RusotoError<CreateDatasetContentError>>;
3729
3730    /// <p>Creates a data store, which is a repository for messages.</p>
3731    async fn create_datastore(
3732        &self,
3733        input: CreateDatastoreRequest,
3734    ) -> Result<CreateDatastoreResponse, RusotoError<CreateDatastoreError>>;
3735
3736    /// <p>Creates a pipeline. A pipeline consumes messages from a channel and allows you to process the messages before storing them in a data store. You must specify both a <code>channel</code> and a <code>datastore</code> activity and, optionally, as many as 23 additional activities in the <code>pipelineActivities</code> array.</p>
3737    async fn create_pipeline(
3738        &self,
3739        input: CreatePipelineRequest,
3740    ) -> Result<CreatePipelineResponse, RusotoError<CreatePipelineError>>;
3741
3742    /// <p>Deletes the specified channel.</p>
3743    async fn delete_channel(
3744        &self,
3745        input: DeleteChannelRequest,
3746    ) -> Result<(), RusotoError<DeleteChannelError>>;
3747
3748    /// <p>Deletes the specified data set.</p> <p>You do not have to delete the content of the data set before you perform this operation.</p>
3749    async fn delete_dataset(
3750        &self,
3751        input: DeleteDatasetRequest,
3752    ) -> Result<(), RusotoError<DeleteDatasetError>>;
3753
3754    /// <p>Deletes the content of the specified data set.</p>
3755    async fn delete_dataset_content(
3756        &self,
3757        input: DeleteDatasetContentRequest,
3758    ) -> Result<(), RusotoError<DeleteDatasetContentError>>;
3759
3760    /// <p>Deletes the specified data store.</p>
3761    async fn delete_datastore(
3762        &self,
3763        input: DeleteDatastoreRequest,
3764    ) -> Result<(), RusotoError<DeleteDatastoreError>>;
3765
3766    /// <p>Deletes the specified pipeline.</p>
3767    async fn delete_pipeline(
3768        &self,
3769        input: DeletePipelineRequest,
3770    ) -> Result<(), RusotoError<DeletePipelineError>>;
3771
3772    /// <p>Retrieves information about a channel.</p>
3773    async fn describe_channel(
3774        &self,
3775        input: DescribeChannelRequest,
3776    ) -> Result<DescribeChannelResponse, RusotoError<DescribeChannelError>>;
3777
3778    /// <p>Retrieves information about a data set.</p>
3779    async fn describe_dataset(
3780        &self,
3781        input: DescribeDatasetRequest,
3782    ) -> Result<DescribeDatasetResponse, RusotoError<DescribeDatasetError>>;
3783
3784    /// <p>Retrieves information about a data store.</p>
3785    async fn describe_datastore(
3786        &self,
3787        input: DescribeDatastoreRequest,
3788    ) -> Result<DescribeDatastoreResponse, RusotoError<DescribeDatastoreError>>;
3789
3790    /// <p>Retrieves the current settings of the AWS IoT Analytics logging options.</p>
3791    async fn describe_logging_options(
3792        &self,
3793    ) -> Result<DescribeLoggingOptionsResponse, RusotoError<DescribeLoggingOptionsError>>;
3794
3795    /// <p>Retrieves information about a pipeline.</p>
3796    async fn describe_pipeline(
3797        &self,
3798        input: DescribePipelineRequest,
3799    ) -> Result<DescribePipelineResponse, RusotoError<DescribePipelineError>>;
3800
3801    /// <p>Retrieves the contents of a data set as pre-signed URIs.</p>
3802    async fn get_dataset_content(
3803        &self,
3804        input: GetDatasetContentRequest,
3805    ) -> Result<GetDatasetContentResponse, RusotoError<GetDatasetContentError>>;
3806
3807    /// <p>Retrieves a list of channels.</p>
3808    async fn list_channels(
3809        &self,
3810        input: ListChannelsRequest,
3811    ) -> Result<ListChannelsResponse, RusotoError<ListChannelsError>>;
3812
3813    /// <p>Lists information about data set contents that have been created.</p>
3814    async fn list_dataset_contents(
3815        &self,
3816        input: ListDatasetContentsRequest,
3817    ) -> Result<ListDatasetContentsResponse, RusotoError<ListDatasetContentsError>>;
3818
3819    /// <p>Retrieves information about data sets.</p>
3820    async fn list_datasets(
3821        &self,
3822        input: ListDatasetsRequest,
3823    ) -> Result<ListDatasetsResponse, RusotoError<ListDatasetsError>>;
3824
3825    /// <p>Retrieves a list of data stores.</p>
3826    async fn list_datastores(
3827        &self,
3828        input: ListDatastoresRequest,
3829    ) -> Result<ListDatastoresResponse, RusotoError<ListDatastoresError>>;
3830
3831    /// <p>Retrieves a list of pipelines.</p>
3832    async fn list_pipelines(
3833        &self,
3834        input: ListPipelinesRequest,
3835    ) -> Result<ListPipelinesResponse, RusotoError<ListPipelinesError>>;
3836
3837    /// <p>Lists the tags (metadata) which you have assigned to the resource.</p>
3838    async fn list_tags_for_resource(
3839        &self,
3840        input: ListTagsForResourceRequest,
3841    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
3842
3843    /// <p>Sets or updates the AWS IoT Analytics logging options.</p> <p>Note that if you update the value of any <code>loggingOptions</code> field, it takes up to one minute for the change to take effect. Also, if you change the policy attached to the role you specified in the roleArn field (for example, to correct an invalid policy) it takes up to 5 minutes for that change to take effect. </p>
3844    async fn put_logging_options(
3845        &self,
3846        input: PutLoggingOptionsRequest,
3847    ) -> Result<(), RusotoError<PutLoggingOptionsError>>;
3848
3849    /// <p>Simulates the results of running a pipeline activity on a message payload.</p>
3850    async fn run_pipeline_activity(
3851        &self,
3852        input: RunPipelineActivityRequest,
3853    ) -> Result<RunPipelineActivityResponse, RusotoError<RunPipelineActivityError>>;
3854
3855    /// <p>Retrieves a sample of messages from the specified channel ingested during the specified timeframe. Up to 10 messages can be retrieved.</p>
3856    async fn sample_channel_data(
3857        &self,
3858        input: SampleChannelDataRequest,
3859    ) -> Result<SampleChannelDataResponse, RusotoError<SampleChannelDataError>>;
3860
3861    /// <p>Starts the reprocessing of raw message data through the pipeline.</p>
3862    async fn start_pipeline_reprocessing(
3863        &self,
3864        input: StartPipelineReprocessingRequest,
3865    ) -> Result<StartPipelineReprocessingResponse, RusotoError<StartPipelineReprocessingError>>;
3866
3867    /// <p>Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.</p>
3868    async fn tag_resource(
3869        &self,
3870        input: TagResourceRequest,
3871    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
3872
3873    /// <p>Removes the given tags (metadata) from the resource.</p>
3874    async fn untag_resource(
3875        &self,
3876        input: UntagResourceRequest,
3877    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
3878
3879    /// <p>Updates the settings of a channel.</p>
3880    async fn update_channel(
3881        &self,
3882        input: UpdateChannelRequest,
3883    ) -> Result<(), RusotoError<UpdateChannelError>>;
3884
3885    /// <p>Updates the settings of a data set.</p>
3886    async fn update_dataset(
3887        &self,
3888        input: UpdateDatasetRequest,
3889    ) -> Result<(), RusotoError<UpdateDatasetError>>;
3890
3891    /// <p>Updates the settings of a data store.</p>
3892    async fn update_datastore(
3893        &self,
3894        input: UpdateDatastoreRequest,
3895    ) -> Result<(), RusotoError<UpdateDatastoreError>>;
3896
3897    /// <p>Updates the settings of a pipeline. You must specify both a <code>channel</code> and a <code>datastore</code> activity and, optionally, as many as 23 additional activities in the <code>pipelineActivities</code> array.</p>
3898    async fn update_pipeline(
3899        &self,
3900        input: UpdatePipelineRequest,
3901    ) -> Result<(), RusotoError<UpdatePipelineError>>;
3902}
3903/// A client for the AWS IoT Analytics API.
3904#[derive(Clone)]
3905pub struct IotAnalyticsClient {
3906    client: Client,
3907    region: region::Region,
3908}
3909
3910impl IotAnalyticsClient {
3911    /// Creates a client backed by the default tokio event loop.
3912    ///
3913    /// The client will use the default credentials provider and tls client.
3914    pub fn new(region: region::Region) -> IotAnalyticsClient {
3915        IotAnalyticsClient {
3916            client: Client::shared(),
3917            region,
3918        }
3919    }
3920
3921    pub fn new_with<P, D>(
3922        request_dispatcher: D,
3923        credentials_provider: P,
3924        region: region::Region,
3925    ) -> IotAnalyticsClient
3926    where
3927        P: ProvideAwsCredentials + Send + Sync + 'static,
3928        D: DispatchSignedRequest + Send + Sync + 'static,
3929    {
3930        IotAnalyticsClient {
3931            client: Client::new_with(credentials_provider, request_dispatcher),
3932            region,
3933        }
3934    }
3935
3936    pub fn new_with_client(client: Client, region: region::Region) -> IotAnalyticsClient {
3937        IotAnalyticsClient { client, region }
3938    }
3939}
3940
3941#[async_trait]
3942impl IotAnalytics for IotAnalyticsClient {
3943    /// <p>Sends messages to a channel.</p>
3944    #[allow(unused_mut)]
3945    async fn batch_put_message(
3946        &self,
3947        input: BatchPutMessageRequest,
3948    ) -> Result<BatchPutMessageResponse, RusotoError<BatchPutMessageError>> {
3949        let request_uri = "/messages/batch";
3950
3951        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
3952        request.set_content_type("application/x-amz-json-1.1".to_owned());
3953
3954        let encoded = Some(serde_json::to_vec(&input).unwrap());
3955        request.set_payload(encoded);
3956
3957        let mut response = self
3958            .client
3959            .sign_and_dispatch(request)
3960            .await
3961            .map_err(RusotoError::from)?;
3962        if response.status.as_u16() == 200 {
3963            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3964            let result = proto::json::ResponsePayload::new(&response)
3965                .deserialize::<BatchPutMessageResponse, _>()?;
3966
3967            Ok(result)
3968        } else {
3969            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3970            Err(BatchPutMessageError::from_response(response))
3971        }
3972    }
3973
3974    /// <p>Cancels the reprocessing of data through the pipeline.</p>
3975    #[allow(unused_mut)]
3976    async fn cancel_pipeline_reprocessing(
3977        &self,
3978        input: CancelPipelineReprocessingRequest,
3979    ) -> Result<CancelPipelineReprocessingResponse, RusotoError<CancelPipelineReprocessingError>>
3980    {
3981        let request_uri = format!(
3982            "/pipelines/{pipeline_name}/reprocessing/{reprocessing_id}",
3983            pipeline_name = input.pipeline_name,
3984            reprocessing_id = input.reprocessing_id
3985        );
3986
3987        let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
3988        request.set_content_type("application/x-amz-json-1.1".to_owned());
3989
3990        let mut response = self
3991            .client
3992            .sign_and_dispatch(request)
3993            .await
3994            .map_err(RusotoError::from)?;
3995        if response.status.is_success() {
3996            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3997            let result = proto::json::ResponsePayload::new(&response)
3998                .deserialize::<CancelPipelineReprocessingResponse, _>()?;
3999
4000            Ok(result)
4001        } else {
4002            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4003            Err(CancelPipelineReprocessingError::from_response(response))
4004        }
4005    }
4006
4007    /// <p>Creates a channel. A channel collects data from an MQTT topic and archives the raw, unprocessed messages before publishing the data to a pipeline.</p>
4008    #[allow(unused_mut)]
4009    async fn create_channel(
4010        &self,
4011        input: CreateChannelRequest,
4012    ) -> Result<CreateChannelResponse, RusotoError<CreateChannelError>> {
4013        let request_uri = "/channels";
4014
4015        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
4016        request.set_content_type("application/x-amz-json-1.1".to_owned());
4017
4018        let encoded = Some(serde_json::to_vec(&input).unwrap());
4019        request.set_payload(encoded);
4020
4021        let mut response = self
4022            .client
4023            .sign_and_dispatch(request)
4024            .await
4025            .map_err(RusotoError::from)?;
4026        if response.status.as_u16() == 201 {
4027            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4028            let result = proto::json::ResponsePayload::new(&response)
4029                .deserialize::<CreateChannelResponse, _>()?;
4030
4031            Ok(result)
4032        } else {
4033            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4034            Err(CreateChannelError::from_response(response))
4035        }
4036    }
4037
4038    /// <p>Creates a data set. A data set stores data retrieved from a data store by applying a "queryAction" (a SQL query) or a "containerAction" (executing a containerized application). This operation creates the skeleton of a data set. The data set can be populated manually by calling "CreateDatasetContent" or automatically according to a "trigger" you specify.</p>
4039    #[allow(unused_mut)]
4040    async fn create_dataset(
4041        &self,
4042        input: CreateDatasetRequest,
4043    ) -> Result<CreateDatasetResponse, RusotoError<CreateDatasetError>> {
4044        let request_uri = "/datasets";
4045
4046        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
4047        request.set_content_type("application/x-amz-json-1.1".to_owned());
4048
4049        let encoded = Some(serde_json::to_vec(&input).unwrap());
4050        request.set_payload(encoded);
4051
4052        let mut response = self
4053            .client
4054            .sign_and_dispatch(request)
4055            .await
4056            .map_err(RusotoError::from)?;
4057        if response.status.as_u16() == 201 {
4058            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4059            let result = proto::json::ResponsePayload::new(&response)
4060                .deserialize::<CreateDatasetResponse, _>()?;
4061
4062            Ok(result)
4063        } else {
4064            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4065            Err(CreateDatasetError::from_response(response))
4066        }
4067    }
4068
4069    /// <p>Creates the content of a data set by applying a "queryAction" (a SQL query) or a "containerAction" (executing a containerized application).</p>
4070    #[allow(unused_mut)]
4071    async fn create_dataset_content(
4072        &self,
4073        input: CreateDatasetContentRequest,
4074    ) -> Result<CreateDatasetContentResponse, RusotoError<CreateDatasetContentError>> {
4075        let request_uri = format!(
4076            "/datasets/{dataset_name}/content",
4077            dataset_name = input.dataset_name
4078        );
4079
4080        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
4081        request.set_content_type("application/x-amz-json-1.1".to_owned());
4082
4083        let mut response = self
4084            .client
4085            .sign_and_dispatch(request)
4086            .await
4087            .map_err(RusotoError::from)?;
4088        if response.status.is_success() {
4089            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4090            let result = proto::json::ResponsePayload::new(&response)
4091                .deserialize::<CreateDatasetContentResponse, _>()?;
4092
4093            Ok(result)
4094        } else {
4095            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4096            Err(CreateDatasetContentError::from_response(response))
4097        }
4098    }
4099
4100    /// <p>Creates a data store, which is a repository for messages.</p>
4101    #[allow(unused_mut)]
4102    async fn create_datastore(
4103        &self,
4104        input: CreateDatastoreRequest,
4105    ) -> Result<CreateDatastoreResponse, RusotoError<CreateDatastoreError>> {
4106        let request_uri = "/datastores";
4107
4108        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
4109        request.set_content_type("application/x-amz-json-1.1".to_owned());
4110
4111        let encoded = Some(serde_json::to_vec(&input).unwrap());
4112        request.set_payload(encoded);
4113
4114        let mut response = self
4115            .client
4116            .sign_and_dispatch(request)
4117            .await
4118            .map_err(RusotoError::from)?;
4119        if response.status.as_u16() == 201 {
4120            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4121            let result = proto::json::ResponsePayload::new(&response)
4122                .deserialize::<CreateDatastoreResponse, _>()?;
4123
4124            Ok(result)
4125        } else {
4126            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4127            Err(CreateDatastoreError::from_response(response))
4128        }
4129    }
4130
4131    /// <p>Creates a pipeline. A pipeline consumes messages from a channel and allows you to process the messages before storing them in a data store. You must specify both a <code>channel</code> and a <code>datastore</code> activity and, optionally, as many as 23 additional activities in the <code>pipelineActivities</code> array.</p>
4132    #[allow(unused_mut)]
4133    async fn create_pipeline(
4134        &self,
4135        input: CreatePipelineRequest,
4136    ) -> Result<CreatePipelineResponse, RusotoError<CreatePipelineError>> {
4137        let request_uri = "/pipelines";
4138
4139        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
4140        request.set_content_type("application/x-amz-json-1.1".to_owned());
4141
4142        let encoded = Some(serde_json::to_vec(&input).unwrap());
4143        request.set_payload(encoded);
4144
4145        let mut response = self
4146            .client
4147            .sign_and_dispatch(request)
4148            .await
4149            .map_err(RusotoError::from)?;
4150        if response.status.as_u16() == 201 {
4151            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4152            let result = proto::json::ResponsePayload::new(&response)
4153                .deserialize::<CreatePipelineResponse, _>()?;
4154
4155            Ok(result)
4156        } else {
4157            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4158            Err(CreatePipelineError::from_response(response))
4159        }
4160    }
4161
4162    /// <p>Deletes the specified channel.</p>
4163    #[allow(unused_mut)]
4164    async fn delete_channel(
4165        &self,
4166        input: DeleteChannelRequest,
4167    ) -> Result<(), RusotoError<DeleteChannelError>> {
4168        let request_uri = format!(
4169            "/channels/{channel_name}",
4170            channel_name = input.channel_name
4171        );
4172
4173        let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
4174        request.set_content_type("application/x-amz-json-1.1".to_owned());
4175
4176        let mut response = self
4177            .client
4178            .sign_and_dispatch(request)
4179            .await
4180            .map_err(RusotoError::from)?;
4181        if response.status.as_u16() == 204 {
4182            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4183            let result = ::std::mem::drop(response);
4184
4185            Ok(result)
4186        } else {
4187            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4188            Err(DeleteChannelError::from_response(response))
4189        }
4190    }
4191
4192    /// <p>Deletes the specified data set.</p> <p>You do not have to delete the content of the data set before you perform this operation.</p>
4193    #[allow(unused_mut)]
4194    async fn delete_dataset(
4195        &self,
4196        input: DeleteDatasetRequest,
4197    ) -> Result<(), RusotoError<DeleteDatasetError>> {
4198        let request_uri = format!(
4199            "/datasets/{dataset_name}",
4200            dataset_name = input.dataset_name
4201        );
4202
4203        let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
4204        request.set_content_type("application/x-amz-json-1.1".to_owned());
4205
4206        let mut response = self
4207            .client
4208            .sign_and_dispatch(request)
4209            .await
4210            .map_err(RusotoError::from)?;
4211        if response.status.as_u16() == 204 {
4212            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4213            let result = ::std::mem::drop(response);
4214
4215            Ok(result)
4216        } else {
4217            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4218            Err(DeleteDatasetError::from_response(response))
4219        }
4220    }
4221
4222    /// <p>Deletes the content of the specified data set.</p>
4223    #[allow(unused_mut)]
4224    async fn delete_dataset_content(
4225        &self,
4226        input: DeleteDatasetContentRequest,
4227    ) -> Result<(), RusotoError<DeleteDatasetContentError>> {
4228        let request_uri = format!(
4229            "/datasets/{dataset_name}/content",
4230            dataset_name = input.dataset_name
4231        );
4232
4233        let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
4234        request.set_content_type("application/x-amz-json-1.1".to_owned());
4235
4236        let mut params = Params::new();
4237        if let Some(ref x) = input.version_id {
4238            params.put("versionId", x);
4239        }
4240        request.set_params(params);
4241
4242        let mut response = self
4243            .client
4244            .sign_and_dispatch(request)
4245            .await
4246            .map_err(RusotoError::from)?;
4247        if response.status.as_u16() == 204 {
4248            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4249            let result = ::std::mem::drop(response);
4250
4251            Ok(result)
4252        } else {
4253            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4254            Err(DeleteDatasetContentError::from_response(response))
4255        }
4256    }
4257
4258    /// <p>Deletes the specified data store.</p>
4259    #[allow(unused_mut)]
4260    async fn delete_datastore(
4261        &self,
4262        input: DeleteDatastoreRequest,
4263    ) -> Result<(), RusotoError<DeleteDatastoreError>> {
4264        let request_uri = format!(
4265            "/datastores/{datastore_name}",
4266            datastore_name = input.datastore_name
4267        );
4268
4269        let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
4270        request.set_content_type("application/x-amz-json-1.1".to_owned());
4271
4272        let mut response = self
4273            .client
4274            .sign_and_dispatch(request)
4275            .await
4276            .map_err(RusotoError::from)?;
4277        if response.status.as_u16() == 204 {
4278            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4279            let result = ::std::mem::drop(response);
4280
4281            Ok(result)
4282        } else {
4283            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4284            Err(DeleteDatastoreError::from_response(response))
4285        }
4286    }
4287
4288    /// <p>Deletes the specified pipeline.</p>
4289    #[allow(unused_mut)]
4290    async fn delete_pipeline(
4291        &self,
4292        input: DeletePipelineRequest,
4293    ) -> Result<(), RusotoError<DeletePipelineError>> {
4294        let request_uri = format!(
4295            "/pipelines/{pipeline_name}",
4296            pipeline_name = input.pipeline_name
4297        );
4298
4299        let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
4300        request.set_content_type("application/x-amz-json-1.1".to_owned());
4301
4302        let mut response = self
4303            .client
4304            .sign_and_dispatch(request)
4305            .await
4306            .map_err(RusotoError::from)?;
4307        if response.status.as_u16() == 204 {
4308            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4309            let result = ::std::mem::drop(response);
4310
4311            Ok(result)
4312        } else {
4313            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4314            Err(DeletePipelineError::from_response(response))
4315        }
4316    }
4317
4318    /// <p>Retrieves information about a channel.</p>
4319    #[allow(unused_mut)]
4320    async fn describe_channel(
4321        &self,
4322        input: DescribeChannelRequest,
4323    ) -> Result<DescribeChannelResponse, RusotoError<DescribeChannelError>> {
4324        let request_uri = format!(
4325            "/channels/{channel_name}",
4326            channel_name = input.channel_name
4327        );
4328
4329        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4330        request.set_content_type("application/x-amz-json-1.1".to_owned());
4331
4332        let mut params = Params::new();
4333        if let Some(ref x) = input.include_statistics {
4334            params.put("includeStatistics", x);
4335        }
4336        request.set_params(params);
4337
4338        let mut response = self
4339            .client
4340            .sign_and_dispatch(request)
4341            .await
4342            .map_err(RusotoError::from)?;
4343        if response.status.is_success() {
4344            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4345            let result = proto::json::ResponsePayload::new(&response)
4346                .deserialize::<DescribeChannelResponse, _>()?;
4347
4348            Ok(result)
4349        } else {
4350            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4351            Err(DescribeChannelError::from_response(response))
4352        }
4353    }
4354
4355    /// <p>Retrieves information about a data set.</p>
4356    #[allow(unused_mut)]
4357    async fn describe_dataset(
4358        &self,
4359        input: DescribeDatasetRequest,
4360    ) -> Result<DescribeDatasetResponse, RusotoError<DescribeDatasetError>> {
4361        let request_uri = format!(
4362            "/datasets/{dataset_name}",
4363            dataset_name = input.dataset_name
4364        );
4365
4366        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4367        request.set_content_type("application/x-amz-json-1.1".to_owned());
4368
4369        let mut response = self
4370            .client
4371            .sign_and_dispatch(request)
4372            .await
4373            .map_err(RusotoError::from)?;
4374        if response.status.is_success() {
4375            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4376            let result = proto::json::ResponsePayload::new(&response)
4377                .deserialize::<DescribeDatasetResponse, _>()?;
4378
4379            Ok(result)
4380        } else {
4381            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4382            Err(DescribeDatasetError::from_response(response))
4383        }
4384    }
4385
4386    /// <p>Retrieves information about a data store.</p>
4387    #[allow(unused_mut)]
4388    async fn describe_datastore(
4389        &self,
4390        input: DescribeDatastoreRequest,
4391    ) -> Result<DescribeDatastoreResponse, RusotoError<DescribeDatastoreError>> {
4392        let request_uri = format!(
4393            "/datastores/{datastore_name}",
4394            datastore_name = input.datastore_name
4395        );
4396
4397        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4398        request.set_content_type("application/x-amz-json-1.1".to_owned());
4399
4400        let mut params = Params::new();
4401        if let Some(ref x) = input.include_statistics {
4402            params.put("includeStatistics", x);
4403        }
4404        request.set_params(params);
4405
4406        let mut response = self
4407            .client
4408            .sign_and_dispatch(request)
4409            .await
4410            .map_err(RusotoError::from)?;
4411        if response.status.is_success() {
4412            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4413            let result = proto::json::ResponsePayload::new(&response)
4414                .deserialize::<DescribeDatastoreResponse, _>()?;
4415
4416            Ok(result)
4417        } else {
4418            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4419            Err(DescribeDatastoreError::from_response(response))
4420        }
4421    }
4422
4423    /// <p>Retrieves the current settings of the AWS IoT Analytics logging options.</p>
4424    #[allow(unused_mut)]
4425    async fn describe_logging_options(
4426        &self,
4427    ) -> Result<DescribeLoggingOptionsResponse, RusotoError<DescribeLoggingOptionsError>> {
4428        let request_uri = "/logging";
4429
4430        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4431        request.set_content_type("application/x-amz-json-1.1".to_owned());
4432
4433        let mut response = self
4434            .client
4435            .sign_and_dispatch(request)
4436            .await
4437            .map_err(RusotoError::from)?;
4438        if response.status.is_success() {
4439            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4440            let result = proto::json::ResponsePayload::new(&response)
4441                .deserialize::<DescribeLoggingOptionsResponse, _>()?;
4442
4443            Ok(result)
4444        } else {
4445            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4446            Err(DescribeLoggingOptionsError::from_response(response))
4447        }
4448    }
4449
4450    /// <p>Retrieves information about a pipeline.</p>
4451    #[allow(unused_mut)]
4452    async fn describe_pipeline(
4453        &self,
4454        input: DescribePipelineRequest,
4455    ) -> Result<DescribePipelineResponse, RusotoError<DescribePipelineError>> {
4456        let request_uri = format!(
4457            "/pipelines/{pipeline_name}",
4458            pipeline_name = input.pipeline_name
4459        );
4460
4461        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4462        request.set_content_type("application/x-amz-json-1.1".to_owned());
4463
4464        let mut response = self
4465            .client
4466            .sign_and_dispatch(request)
4467            .await
4468            .map_err(RusotoError::from)?;
4469        if response.status.is_success() {
4470            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4471            let result = proto::json::ResponsePayload::new(&response)
4472                .deserialize::<DescribePipelineResponse, _>()?;
4473
4474            Ok(result)
4475        } else {
4476            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4477            Err(DescribePipelineError::from_response(response))
4478        }
4479    }
4480
4481    /// <p>Retrieves the contents of a data set as pre-signed URIs.</p>
4482    #[allow(unused_mut)]
4483    async fn get_dataset_content(
4484        &self,
4485        input: GetDatasetContentRequest,
4486    ) -> Result<GetDatasetContentResponse, RusotoError<GetDatasetContentError>> {
4487        let request_uri = format!(
4488            "/datasets/{dataset_name}/content",
4489            dataset_name = input.dataset_name
4490        );
4491
4492        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4493        request.set_content_type("application/x-amz-json-1.1".to_owned());
4494
4495        let mut params = Params::new();
4496        if let Some(ref x) = input.version_id {
4497            params.put("versionId", x);
4498        }
4499        request.set_params(params);
4500
4501        let mut response = self
4502            .client
4503            .sign_and_dispatch(request)
4504            .await
4505            .map_err(RusotoError::from)?;
4506        if response.status.is_success() {
4507            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4508            let result = proto::json::ResponsePayload::new(&response)
4509                .deserialize::<GetDatasetContentResponse, _>()?;
4510
4511            Ok(result)
4512        } else {
4513            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4514            Err(GetDatasetContentError::from_response(response))
4515        }
4516    }
4517
4518    /// <p>Retrieves a list of channels.</p>
4519    #[allow(unused_mut)]
4520    async fn list_channels(
4521        &self,
4522        input: ListChannelsRequest,
4523    ) -> Result<ListChannelsResponse, RusotoError<ListChannelsError>> {
4524        let request_uri = "/channels";
4525
4526        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4527        request.set_content_type("application/x-amz-json-1.1".to_owned());
4528
4529        let mut params = Params::new();
4530        if let Some(ref x) = input.max_results {
4531            params.put("maxResults", x);
4532        }
4533        if let Some(ref x) = input.next_token {
4534            params.put("nextToken", x);
4535        }
4536        request.set_params(params);
4537
4538        let mut response = self
4539            .client
4540            .sign_and_dispatch(request)
4541            .await
4542            .map_err(RusotoError::from)?;
4543        if response.status.is_success() {
4544            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4545            let result = proto::json::ResponsePayload::new(&response)
4546                .deserialize::<ListChannelsResponse, _>()?;
4547
4548            Ok(result)
4549        } else {
4550            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4551            Err(ListChannelsError::from_response(response))
4552        }
4553    }
4554
4555    /// <p>Lists information about data set contents that have been created.</p>
4556    #[allow(unused_mut)]
4557    async fn list_dataset_contents(
4558        &self,
4559        input: ListDatasetContentsRequest,
4560    ) -> Result<ListDatasetContentsResponse, RusotoError<ListDatasetContentsError>> {
4561        let request_uri = format!(
4562            "/datasets/{dataset_name}/contents",
4563            dataset_name = input.dataset_name
4564        );
4565
4566        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4567        request.set_content_type("application/x-amz-json-1.1".to_owned());
4568
4569        let mut params = Params::new();
4570        if let Some(ref x) = input.max_results {
4571            params.put("maxResults", x);
4572        }
4573        if let Some(ref x) = input.next_token {
4574            params.put("nextToken", x);
4575        }
4576        if let Some(ref x) = input.scheduled_before {
4577            params.put("scheduledBefore", x);
4578        }
4579        if let Some(ref x) = input.scheduled_on_or_after {
4580            params.put("scheduledOnOrAfter", x);
4581        }
4582        request.set_params(params);
4583
4584        let mut response = self
4585            .client
4586            .sign_and_dispatch(request)
4587            .await
4588            .map_err(RusotoError::from)?;
4589        if response.status.is_success() {
4590            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4591            let result = proto::json::ResponsePayload::new(&response)
4592                .deserialize::<ListDatasetContentsResponse, _>()?;
4593
4594            Ok(result)
4595        } else {
4596            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4597            Err(ListDatasetContentsError::from_response(response))
4598        }
4599    }
4600
4601    /// <p>Retrieves information about data sets.</p>
4602    #[allow(unused_mut)]
4603    async fn list_datasets(
4604        &self,
4605        input: ListDatasetsRequest,
4606    ) -> Result<ListDatasetsResponse, RusotoError<ListDatasetsError>> {
4607        let request_uri = "/datasets";
4608
4609        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4610        request.set_content_type("application/x-amz-json-1.1".to_owned());
4611
4612        let mut params = Params::new();
4613        if let Some(ref x) = input.max_results {
4614            params.put("maxResults", x);
4615        }
4616        if let Some(ref x) = input.next_token {
4617            params.put("nextToken", x);
4618        }
4619        request.set_params(params);
4620
4621        let mut response = self
4622            .client
4623            .sign_and_dispatch(request)
4624            .await
4625            .map_err(RusotoError::from)?;
4626        if response.status.is_success() {
4627            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4628            let result = proto::json::ResponsePayload::new(&response)
4629                .deserialize::<ListDatasetsResponse, _>()?;
4630
4631            Ok(result)
4632        } else {
4633            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4634            Err(ListDatasetsError::from_response(response))
4635        }
4636    }
4637
4638    /// <p>Retrieves a list of data stores.</p>
4639    #[allow(unused_mut)]
4640    async fn list_datastores(
4641        &self,
4642        input: ListDatastoresRequest,
4643    ) -> Result<ListDatastoresResponse, RusotoError<ListDatastoresError>> {
4644        let request_uri = "/datastores";
4645
4646        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4647        request.set_content_type("application/x-amz-json-1.1".to_owned());
4648
4649        let mut params = Params::new();
4650        if let Some(ref x) = input.max_results {
4651            params.put("maxResults", x);
4652        }
4653        if let Some(ref x) = input.next_token {
4654            params.put("nextToken", x);
4655        }
4656        request.set_params(params);
4657
4658        let mut response = self
4659            .client
4660            .sign_and_dispatch(request)
4661            .await
4662            .map_err(RusotoError::from)?;
4663        if response.status.is_success() {
4664            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4665            let result = proto::json::ResponsePayload::new(&response)
4666                .deserialize::<ListDatastoresResponse, _>()?;
4667
4668            Ok(result)
4669        } else {
4670            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4671            Err(ListDatastoresError::from_response(response))
4672        }
4673    }
4674
4675    /// <p>Retrieves a list of pipelines.</p>
4676    #[allow(unused_mut)]
4677    async fn list_pipelines(
4678        &self,
4679        input: ListPipelinesRequest,
4680    ) -> Result<ListPipelinesResponse, RusotoError<ListPipelinesError>> {
4681        let request_uri = "/pipelines";
4682
4683        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4684        request.set_content_type("application/x-amz-json-1.1".to_owned());
4685
4686        let mut params = Params::new();
4687        if let Some(ref x) = input.max_results {
4688            params.put("maxResults", x);
4689        }
4690        if let Some(ref x) = input.next_token {
4691            params.put("nextToken", x);
4692        }
4693        request.set_params(params);
4694
4695        let mut response = self
4696            .client
4697            .sign_and_dispatch(request)
4698            .await
4699            .map_err(RusotoError::from)?;
4700        if response.status.is_success() {
4701            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4702            let result = proto::json::ResponsePayload::new(&response)
4703                .deserialize::<ListPipelinesResponse, _>()?;
4704
4705            Ok(result)
4706        } else {
4707            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4708            Err(ListPipelinesError::from_response(response))
4709        }
4710    }
4711
4712    /// <p>Lists the tags (metadata) which you have assigned to the resource.</p>
4713    #[allow(unused_mut)]
4714    async fn list_tags_for_resource(
4715        &self,
4716        input: ListTagsForResourceRequest,
4717    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
4718        let request_uri = "/tags";
4719
4720        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4721        request.set_content_type("application/x-amz-json-1.1".to_owned());
4722
4723        let mut params = Params::new();
4724        params.put("resourceArn", &input.resource_arn);
4725        request.set_params(params);
4726
4727        let mut response = self
4728            .client
4729            .sign_and_dispatch(request)
4730            .await
4731            .map_err(RusotoError::from)?;
4732        if response.status.is_success() {
4733            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4734            let result = proto::json::ResponsePayload::new(&response)
4735                .deserialize::<ListTagsForResourceResponse, _>()?;
4736
4737            Ok(result)
4738        } else {
4739            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4740            Err(ListTagsForResourceError::from_response(response))
4741        }
4742    }
4743
4744    /// <p>Sets or updates the AWS IoT Analytics logging options.</p> <p>Note that if you update the value of any <code>loggingOptions</code> field, it takes up to one minute for the change to take effect. Also, if you change the policy attached to the role you specified in the roleArn field (for example, to correct an invalid policy) it takes up to 5 minutes for that change to take effect. </p>
4745    #[allow(unused_mut)]
4746    async fn put_logging_options(
4747        &self,
4748        input: PutLoggingOptionsRequest,
4749    ) -> Result<(), RusotoError<PutLoggingOptionsError>> {
4750        let request_uri = "/logging";
4751
4752        let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
4753        request.set_content_type("application/x-amz-json-1.1".to_owned());
4754
4755        let encoded = Some(serde_json::to_vec(&input).unwrap());
4756        request.set_payload(encoded);
4757
4758        let mut response = self
4759            .client
4760            .sign_and_dispatch(request)
4761            .await
4762            .map_err(RusotoError::from)?;
4763        if response.status.is_success() {
4764            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4765            let result = ::std::mem::drop(response);
4766
4767            Ok(result)
4768        } else {
4769            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4770            Err(PutLoggingOptionsError::from_response(response))
4771        }
4772    }
4773
4774    /// <p>Simulates the results of running a pipeline activity on a message payload.</p>
4775    #[allow(unused_mut)]
4776    async fn run_pipeline_activity(
4777        &self,
4778        input: RunPipelineActivityRequest,
4779    ) -> Result<RunPipelineActivityResponse, RusotoError<RunPipelineActivityError>> {
4780        let request_uri = "/pipelineactivities/run";
4781
4782        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
4783        request.set_content_type("application/x-amz-json-1.1".to_owned());
4784
4785        let encoded = Some(serde_json::to_vec(&input).unwrap());
4786        request.set_payload(encoded);
4787
4788        let mut response = self
4789            .client
4790            .sign_and_dispatch(request)
4791            .await
4792            .map_err(RusotoError::from)?;
4793        if response.status.is_success() {
4794            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4795            let result = proto::json::ResponsePayload::new(&response)
4796                .deserialize::<RunPipelineActivityResponse, _>()?;
4797
4798            Ok(result)
4799        } else {
4800            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4801            Err(RunPipelineActivityError::from_response(response))
4802        }
4803    }
4804
4805    /// <p>Retrieves a sample of messages from the specified channel ingested during the specified timeframe. Up to 10 messages can be retrieved.</p>
4806    #[allow(unused_mut)]
4807    async fn sample_channel_data(
4808        &self,
4809        input: SampleChannelDataRequest,
4810    ) -> Result<SampleChannelDataResponse, RusotoError<SampleChannelDataError>> {
4811        let request_uri = format!(
4812            "/channels/{channel_name}/sample",
4813            channel_name = input.channel_name
4814        );
4815
4816        let mut request = SignedRequest::new("GET", "iotanalytics", &self.region, &request_uri);
4817        request.set_content_type("application/x-amz-json-1.1".to_owned());
4818
4819        let mut params = Params::new();
4820        if let Some(ref x) = input.end_time {
4821            params.put("endTime", x);
4822        }
4823        if let Some(ref x) = input.max_messages {
4824            params.put("maxMessages", x);
4825        }
4826        if let Some(ref x) = input.start_time {
4827            params.put("startTime", x);
4828        }
4829        request.set_params(params);
4830
4831        let mut response = self
4832            .client
4833            .sign_and_dispatch(request)
4834            .await
4835            .map_err(RusotoError::from)?;
4836        if response.status.is_success() {
4837            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4838            let result = proto::json::ResponsePayload::new(&response)
4839                .deserialize::<SampleChannelDataResponse, _>()?;
4840
4841            Ok(result)
4842        } else {
4843            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4844            Err(SampleChannelDataError::from_response(response))
4845        }
4846    }
4847
4848    /// <p>Starts the reprocessing of raw message data through the pipeline.</p>
4849    #[allow(unused_mut)]
4850    async fn start_pipeline_reprocessing(
4851        &self,
4852        input: StartPipelineReprocessingRequest,
4853    ) -> Result<StartPipelineReprocessingResponse, RusotoError<StartPipelineReprocessingError>>
4854    {
4855        let request_uri = format!(
4856            "/pipelines/{pipeline_name}/reprocessing",
4857            pipeline_name = input.pipeline_name
4858        );
4859
4860        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
4861        request.set_content_type("application/x-amz-json-1.1".to_owned());
4862
4863        let encoded = Some(serde_json::to_vec(&input).unwrap());
4864        request.set_payload(encoded);
4865
4866        let mut response = self
4867            .client
4868            .sign_and_dispatch(request)
4869            .await
4870            .map_err(RusotoError::from)?;
4871        if response.status.is_success() {
4872            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4873            let result = proto::json::ResponsePayload::new(&response)
4874                .deserialize::<StartPipelineReprocessingResponse, _>()?;
4875
4876            Ok(result)
4877        } else {
4878            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4879            Err(StartPipelineReprocessingError::from_response(response))
4880        }
4881    }
4882
4883    /// <p>Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.</p>
4884    #[allow(unused_mut)]
4885    async fn tag_resource(
4886        &self,
4887        input: TagResourceRequest,
4888    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
4889        let request_uri = "/tags";
4890
4891        let mut request = SignedRequest::new("POST", "iotanalytics", &self.region, &request_uri);
4892        request.set_content_type("application/x-amz-json-1.1".to_owned());
4893
4894        let encoded = Some(serde_json::to_vec(&input).unwrap());
4895        request.set_payload(encoded);
4896
4897        let mut params = Params::new();
4898        params.put("resourceArn", &input.resource_arn);
4899        request.set_params(params);
4900
4901        let mut response = self
4902            .client
4903            .sign_and_dispatch(request)
4904            .await
4905            .map_err(RusotoError::from)?;
4906        if response.status.as_u16() == 204 {
4907            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4908            let result = proto::json::ResponsePayload::new(&response)
4909                .deserialize::<TagResourceResponse, _>()?;
4910
4911            Ok(result)
4912        } else {
4913            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4914            Err(TagResourceError::from_response(response))
4915        }
4916    }
4917
4918    /// <p>Removes the given tags (metadata) from the resource.</p>
4919    #[allow(unused_mut)]
4920    async fn untag_resource(
4921        &self,
4922        input: UntagResourceRequest,
4923    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
4924        let request_uri = "/tags";
4925
4926        let mut request = SignedRequest::new("DELETE", "iotanalytics", &self.region, &request_uri);
4927        request.set_content_type("application/x-amz-json-1.1".to_owned());
4928
4929        let mut params = Params::new();
4930        params.put("resourceArn", &input.resource_arn);
4931        for item in input.tag_keys.iter() {
4932            params.put("tagKeys", item);
4933        }
4934        request.set_params(params);
4935
4936        let mut response = self
4937            .client
4938            .sign_and_dispatch(request)
4939            .await
4940            .map_err(RusotoError::from)?;
4941        if response.status.as_u16() == 204 {
4942            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4943            let result = proto::json::ResponsePayload::new(&response)
4944                .deserialize::<UntagResourceResponse, _>()?;
4945
4946            Ok(result)
4947        } else {
4948            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4949            Err(UntagResourceError::from_response(response))
4950        }
4951    }
4952
4953    /// <p>Updates the settings of a channel.</p>
4954    #[allow(unused_mut)]
4955    async fn update_channel(
4956        &self,
4957        input: UpdateChannelRequest,
4958    ) -> Result<(), RusotoError<UpdateChannelError>> {
4959        let request_uri = format!(
4960            "/channels/{channel_name}",
4961            channel_name = input.channel_name
4962        );
4963
4964        let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
4965        request.set_content_type("application/x-amz-json-1.1".to_owned());
4966
4967        let encoded = Some(serde_json::to_vec(&input).unwrap());
4968        request.set_payload(encoded);
4969
4970        let mut response = self
4971            .client
4972            .sign_and_dispatch(request)
4973            .await
4974            .map_err(RusotoError::from)?;
4975        if response.status.is_success() {
4976            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4977            let result = ::std::mem::drop(response);
4978
4979            Ok(result)
4980        } else {
4981            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4982            Err(UpdateChannelError::from_response(response))
4983        }
4984    }
4985
4986    /// <p>Updates the settings of a data set.</p>
4987    #[allow(unused_mut)]
4988    async fn update_dataset(
4989        &self,
4990        input: UpdateDatasetRequest,
4991    ) -> Result<(), RusotoError<UpdateDatasetError>> {
4992        let request_uri = format!(
4993            "/datasets/{dataset_name}",
4994            dataset_name = input.dataset_name
4995        );
4996
4997        let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
4998        request.set_content_type("application/x-amz-json-1.1".to_owned());
4999
5000        let encoded = Some(serde_json::to_vec(&input).unwrap());
5001        request.set_payload(encoded);
5002
5003        let mut response = self
5004            .client
5005            .sign_and_dispatch(request)
5006            .await
5007            .map_err(RusotoError::from)?;
5008        if response.status.is_success() {
5009            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5010            let result = ::std::mem::drop(response);
5011
5012            Ok(result)
5013        } else {
5014            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5015            Err(UpdateDatasetError::from_response(response))
5016        }
5017    }
5018
5019    /// <p>Updates the settings of a data store.</p>
5020    #[allow(unused_mut)]
5021    async fn update_datastore(
5022        &self,
5023        input: UpdateDatastoreRequest,
5024    ) -> Result<(), RusotoError<UpdateDatastoreError>> {
5025        let request_uri = format!(
5026            "/datastores/{datastore_name}",
5027            datastore_name = input.datastore_name
5028        );
5029
5030        let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
5031        request.set_content_type("application/x-amz-json-1.1".to_owned());
5032
5033        let encoded = Some(serde_json::to_vec(&input).unwrap());
5034        request.set_payload(encoded);
5035
5036        let mut response = self
5037            .client
5038            .sign_and_dispatch(request)
5039            .await
5040            .map_err(RusotoError::from)?;
5041        if response.status.is_success() {
5042            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5043            let result = ::std::mem::drop(response);
5044
5045            Ok(result)
5046        } else {
5047            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5048            Err(UpdateDatastoreError::from_response(response))
5049        }
5050    }
5051
5052    /// <p>Updates the settings of a pipeline. You must specify both a <code>channel</code> and a <code>datastore</code> activity and, optionally, as many as 23 additional activities in the <code>pipelineActivities</code> array.</p>
5053    #[allow(unused_mut)]
5054    async fn update_pipeline(
5055        &self,
5056        input: UpdatePipelineRequest,
5057    ) -> Result<(), RusotoError<UpdatePipelineError>> {
5058        let request_uri = format!(
5059            "/pipelines/{pipeline_name}",
5060            pipeline_name = input.pipeline_name
5061        );
5062
5063        let mut request = SignedRequest::new("PUT", "iotanalytics", &self.region, &request_uri);
5064        request.set_content_type("application/x-amz-json-1.1".to_owned());
5065
5066        let encoded = Some(serde_json::to_vec(&input).unwrap());
5067        request.set_payload(encoded);
5068
5069        let mut response = self
5070            .client
5071            .sign_and_dispatch(request)
5072            .await
5073            .map_err(RusotoError::from)?;
5074        if response.status.is_success() {
5075            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5076            let result = ::std::mem::drop(response);
5077
5078            Ok(result)
5079        } else {
5080            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5081            Err(UpdatePipelineError::from_response(response))
5082        }
5083    }
5084}