rusoto_mq/
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>Name of the availability zone.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
30#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
31pub struct AvailabilityZone {
32    /// <p>Id for the availability zone.</p>
33    #[serde(rename = "Name")]
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub name: Option<String>,
36}
37
38/// <p>Types of broker engines.</p>
39#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
40#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
41pub struct BrokerEngineType {
42    /// <p>The type of broker engine.</p>
43    #[serde(rename = "EngineType")]
44    #[serde(skip_serializing_if = "Option::is_none")]
45    pub engine_type: Option<String>,
46    /// <p>The list of engine versions.</p>
47    #[serde(rename = "EngineVersions")]
48    #[serde(skip_serializing_if = "Option::is_none")]
49    pub engine_versions: Option<Vec<EngineVersion>>,
50}
51
52/// <p>Returns information about all brokers.</p>
53#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
54#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
55pub struct BrokerInstance {
56    /// <p>The URL of the broker&#39;s ActiveMQ Web Console.</p>
57    #[serde(rename = "ConsoleURL")]
58    #[serde(skip_serializing_if = "Option::is_none")]
59    pub console_url: Option<String>,
60    /// <p>The broker&#39;s wire-level protocol endpoints.</p>
61    #[serde(rename = "Endpoints")]
62    #[serde(skip_serializing_if = "Option::is_none")]
63    pub endpoints: Option<Vec<String>>,
64    /// <p>The IP address of the Elastic Network Interface (ENI) attached to the broker.</p>
65    #[serde(rename = "IpAddress")]
66    #[serde(skip_serializing_if = "Option::is_none")]
67    pub ip_address: Option<String>,
68}
69
70/// <p>Option for host instance type.</p>
71#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
72#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
73pub struct BrokerInstanceOption {
74    /// <p>The list of available az.</p>
75    #[serde(rename = "AvailabilityZones")]
76    #[serde(skip_serializing_if = "Option::is_none")]
77    pub availability_zones: Option<Vec<AvailabilityZone>>,
78    /// <p>The type of broker engine.</p>
79    #[serde(rename = "EngineType")]
80    #[serde(skip_serializing_if = "Option::is_none")]
81    pub engine_type: Option<String>,
82    /// <p>The type of broker instance.</p>
83    #[serde(rename = "HostInstanceType")]
84    #[serde(skip_serializing_if = "Option::is_none")]
85    pub host_instance_type: Option<String>,
86    /// <p>The broker&#39;s storage type.</p>
87    #[serde(rename = "StorageType")]
88    #[serde(skip_serializing_if = "Option::is_none")]
89    pub storage_type: Option<String>,
90    /// <p>The list of supported deployment modes.</p>
91    #[serde(rename = "SupportedDeploymentModes")]
92    #[serde(skip_serializing_if = "Option::is_none")]
93    pub supported_deployment_modes: Option<Vec<String>>,
94    /// <p>The list of supported engine versions.</p>
95    #[serde(rename = "SupportedEngineVersions")]
96    #[serde(skip_serializing_if = "Option::is_none")]
97    pub supported_engine_versions: Option<Vec<String>>,
98}
99
100/// <p>The Amazon Resource Name (ARN) of the broker.</p>
101#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
102#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
103pub struct BrokerSummary {
104    /// <p>The Amazon Resource Name (ARN) of the broker.</p>
105    #[serde(rename = "BrokerArn")]
106    #[serde(skip_serializing_if = "Option::is_none")]
107    pub broker_arn: Option<String>,
108    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
109    #[serde(rename = "BrokerId")]
110    #[serde(skip_serializing_if = "Option::is_none")]
111    pub broker_id: Option<String>,
112    /// <p>The name of the broker. This value must be unique in your AWS account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain whitespaces, brackets, wildcard characters, or special characters.</p>
113    #[serde(rename = "BrokerName")]
114    #[serde(skip_serializing_if = "Option::is_none")]
115    pub broker_name: Option<String>,
116    /// <p>The status of the broker.</p>
117    #[serde(rename = "BrokerState")]
118    #[serde(skip_serializing_if = "Option::is_none")]
119    pub broker_state: Option<String>,
120    /// <p>The time when the broker was created.</p>
121    #[serde(rename = "Created")]
122    #[serde(skip_serializing_if = "Option::is_none")]
123    pub created: Option<f64>,
124    /// <p>Required. The deployment mode of the broker.</p>
125    #[serde(rename = "DeploymentMode")]
126    #[serde(skip_serializing_if = "Option::is_none")]
127    pub deployment_mode: Option<String>,
128    /// <p>The broker&#39;s instance type.</p>
129    #[serde(rename = "HostInstanceType")]
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub host_instance_type: Option<String>,
132}
133
134/// <p>Returns information about all configurations.</p>
135#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
136#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
137pub struct Configuration {
138    /// <p>Required. The ARN of the configuration.</p>
139    #[serde(rename = "Arn")]
140    #[serde(skip_serializing_if = "Option::is_none")]
141    pub arn: Option<String>,
142    /// <p>Required. The date and time of the configuration revision.</p>
143    #[serde(rename = "Created")]
144    #[serde(skip_serializing_if = "Option::is_none")]
145    pub created: Option<f64>,
146    /// <p>Required. The description of the configuration.</p>
147    #[serde(rename = "Description")]
148    #[serde(skip_serializing_if = "Option::is_none")]
149    pub description: Option<String>,
150    /// <p>Required. The type of broker engine. Note: Currently, Amazon MQ supports only ACTIVEMQ.</p>
151    #[serde(rename = "EngineType")]
152    #[serde(skip_serializing_if = "Option::is_none")]
153    pub engine_type: Option<String>,
154    /// <p>Required. The version of the broker engine. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html</p>
155    #[serde(rename = "EngineVersion")]
156    #[serde(skip_serializing_if = "Option::is_none")]
157    pub engine_version: Option<String>,
158    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
159    #[serde(rename = "Id")]
160    #[serde(skip_serializing_if = "Option::is_none")]
161    pub id: Option<String>,
162    /// <p>Required. The latest revision of the configuration.</p>
163    #[serde(rename = "LatestRevision")]
164    #[serde(skip_serializing_if = "Option::is_none")]
165    pub latest_revision: Option<ConfigurationRevision>,
166    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
167    #[serde(rename = "Name")]
168    #[serde(skip_serializing_if = "Option::is_none")]
169    pub name: Option<String>,
170    /// <p>The list of all tags associated with this configuration.</p>
171    #[serde(rename = "Tags")]
172    #[serde(skip_serializing_if = "Option::is_none")]
173    pub tags: Option<::std::collections::HashMap<String, String>>,
174}
175
176/// <p>A list of information about the configuration.</p>
177#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
178pub struct ConfigurationId {
179    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
180    #[serde(rename = "Id")]
181    #[serde(skip_serializing_if = "Option::is_none")]
182    pub id: Option<String>,
183    /// <p>The revision number of the configuration.</p>
184    #[serde(rename = "Revision")]
185    #[serde(skip_serializing_if = "Option::is_none")]
186    pub revision: Option<i64>,
187}
188
189/// <p>Returns information about the specified configuration revision.</p>
190#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
191#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
192pub struct ConfigurationRevision {
193    /// <p>Required. The date and time of the configuration revision.</p>
194    #[serde(rename = "Created")]
195    #[serde(skip_serializing_if = "Option::is_none")]
196    pub created: Option<f64>,
197    /// <p>The description of the configuration revision.</p>
198    #[serde(rename = "Description")]
199    #[serde(skip_serializing_if = "Option::is_none")]
200    pub description: Option<String>,
201    /// <p>Required. The revision number of the configuration.</p>
202    #[serde(rename = "Revision")]
203    #[serde(skip_serializing_if = "Option::is_none")]
204    pub revision: Option<i64>,
205}
206
207/// <p>Broker configuration information</p>
208#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
209#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
210pub struct Configurations {
211    /// <p>The current configuration of the broker.</p>
212    #[serde(rename = "Current")]
213    #[serde(skip_serializing_if = "Option::is_none")]
214    pub current: Option<ConfigurationId>,
215    /// <p>The history of configurations applied to the broker.</p>
216    #[serde(rename = "History")]
217    #[serde(skip_serializing_if = "Option::is_none")]
218    pub history: Option<Vec<ConfigurationId>>,
219    /// <p>The pending configuration of the broker.</p>
220    #[serde(rename = "Pending")]
221    #[serde(skip_serializing_if = "Option::is_none")]
222    pub pending: Option<ConfigurationId>,
223}
224
225/// <p>Creates a broker using the specified properties.</p>
226#[derive(Clone, Debug, Default, PartialEq, Serialize)]
227#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
228pub struct CreateBrokerRequest {
229    /// <p>Required. Enables automatic upgrades to new minor versions for brokers, as Apache releases the versions. The automatic upgrades occur during the maintenance window of the broker or after a manual broker reboot.</p>
230    #[serde(rename = "AutoMinorVersionUpgrade")]
231    #[serde(skip_serializing_if = "Option::is_none")]
232    pub auto_minor_version_upgrade: Option<bool>,
233    /// <p>Required. The name of the broker. This value must be unique in your AWS account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain whitespaces, brackets, wildcard characters, or special characters.</p>
234    #[serde(rename = "BrokerName")]
235    #[serde(skip_serializing_if = "Option::is_none")]
236    pub broker_name: Option<String>,
237    /// <p>A list of information about the configuration.</p>
238    #[serde(rename = "Configuration")]
239    #[serde(skip_serializing_if = "Option::is_none")]
240    pub configuration: Option<ConfigurationId>,
241    /// <p>The unique ID that the requester receives for the created broker. Amazon MQ passes your ID with the API action. Note: We recommend using a Universally Unique Identifier (UUID) for the creatorRequestId. You may omit the creatorRequestId if your application doesn&#39;t require idempotency.</p>
242    #[serde(rename = "CreatorRequestId")]
243    #[serde(skip_serializing_if = "Option::is_none")]
244    pub creator_request_id: Option<String>,
245    /// <p>Required. The deployment mode of the broker.</p>
246    #[serde(rename = "DeploymentMode")]
247    #[serde(skip_serializing_if = "Option::is_none")]
248    pub deployment_mode: Option<String>,
249    /// <p>Encryption options for the broker.</p>
250    #[serde(rename = "EncryptionOptions")]
251    #[serde(skip_serializing_if = "Option::is_none")]
252    pub encryption_options: Option<EncryptionOptions>,
253    /// <p>Required. The type of broker engine. Note: Currently, Amazon MQ supports only ACTIVEMQ.</p>
254    #[serde(rename = "EngineType")]
255    #[serde(skip_serializing_if = "Option::is_none")]
256    pub engine_type: Option<String>,
257    /// <p>Required. The version of the broker engine. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html</p>
258    #[serde(rename = "EngineVersion")]
259    #[serde(skip_serializing_if = "Option::is_none")]
260    pub engine_version: Option<String>,
261    /// <p>Required. The broker&#39;s instance type.</p>
262    #[serde(rename = "HostInstanceType")]
263    #[serde(skip_serializing_if = "Option::is_none")]
264    pub host_instance_type: Option<String>,
265    /// <p>Enables Amazon CloudWatch logging for brokers.</p>
266    #[serde(rename = "Logs")]
267    #[serde(skip_serializing_if = "Option::is_none")]
268    pub logs: Option<Logs>,
269    /// <p>The parameters that determine the WeeklyStartTime.</p>
270    #[serde(rename = "MaintenanceWindowStartTime")]
271    #[serde(skip_serializing_if = "Option::is_none")]
272    pub maintenance_window_start_time: Option<WeeklyStartTime>,
273    /// <p>Required. Enables connections from applications outside of the VPC that hosts the broker&#39;s subnets.</p>
274    #[serde(rename = "PubliclyAccessible")]
275    #[serde(skip_serializing_if = "Option::is_none")]
276    pub publicly_accessible: Option<bool>,
277    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
278    #[serde(rename = "SecurityGroups")]
279    #[serde(skip_serializing_if = "Option::is_none")]
280    pub security_groups: Option<Vec<String>>,
281    /// <p>The broker&#39;s storage type.</p>
282    #[serde(rename = "StorageType")]
283    #[serde(skip_serializing_if = "Option::is_none")]
284    pub storage_type: Option<String>,
285    /// <p>The list of groups (2 maximum) that define which subnets and IP ranges the broker can use from different Availability Zones. A SINGLE<em>INSTANCE deployment requires one subnet (for example, the default subnet). An ACTIVE</em>STANDBY<em>MULTI</em>AZ deployment requires two subnets.</p>
286    #[serde(rename = "SubnetIds")]
287    #[serde(skip_serializing_if = "Option::is_none")]
288    pub subnet_ids: Option<Vec<String>>,
289    /// <p>Create tags when creating the broker.</p>
290    #[serde(rename = "Tags")]
291    #[serde(skip_serializing_if = "Option::is_none")]
292    pub tags: Option<::std::collections::HashMap<String, String>>,
293    /// <p>Required. The list of ActiveMQ users (persons or applications) who can access queues and topics. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
294    #[serde(rename = "Users")]
295    #[serde(skip_serializing_if = "Option::is_none")]
296    pub users: Option<Vec<User>>,
297}
298
299#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
300#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
301pub struct CreateBrokerResponse {
302    /// <p>The Amazon Resource Name (ARN) of the broker.</p>
303    #[serde(rename = "BrokerArn")]
304    #[serde(skip_serializing_if = "Option::is_none")]
305    pub broker_arn: Option<String>,
306    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
307    #[serde(rename = "BrokerId")]
308    #[serde(skip_serializing_if = "Option::is_none")]
309    pub broker_id: Option<String>,
310}
311
312/// <p>Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).</p>
313#[derive(Clone, Debug, Default, PartialEq, Serialize)]
314#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
315pub struct CreateConfigurationRequest {
316    /// <p>Required. The type of broker engine. Note: Currently, Amazon MQ supports only ACTIVEMQ.</p>
317    #[serde(rename = "EngineType")]
318    #[serde(skip_serializing_if = "Option::is_none")]
319    pub engine_type: Option<String>,
320    /// <p>Required. The version of the broker engine. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html</p>
321    #[serde(rename = "EngineVersion")]
322    #[serde(skip_serializing_if = "Option::is_none")]
323    pub engine_version: Option<String>,
324    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
325    #[serde(rename = "Name")]
326    #[serde(skip_serializing_if = "Option::is_none")]
327    pub name: Option<String>,
328    /// <p>Create tags when creating the configuration.</p>
329    #[serde(rename = "Tags")]
330    #[serde(skip_serializing_if = "Option::is_none")]
331    pub tags: Option<::std::collections::HashMap<String, String>>,
332}
333
334#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
335#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
336pub struct CreateConfigurationResponse {
337    /// <p>Required. The Amazon Resource Name (ARN) of the configuration.</p>
338    #[serde(rename = "Arn")]
339    #[serde(skip_serializing_if = "Option::is_none")]
340    pub arn: Option<String>,
341    /// <p>Required. The date and time of the configuration.</p>
342    #[serde(rename = "Created")]
343    #[serde(skip_serializing_if = "Option::is_none")]
344    pub created: Option<f64>,
345    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
346    #[serde(rename = "Id")]
347    #[serde(skip_serializing_if = "Option::is_none")]
348    pub id: Option<String>,
349    /// <p>The latest revision of the configuration.</p>
350    #[serde(rename = "LatestRevision")]
351    #[serde(skip_serializing_if = "Option::is_none")]
352    pub latest_revision: Option<ConfigurationRevision>,
353    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
354    #[serde(rename = "Name")]
355    #[serde(skip_serializing_if = "Option::is_none")]
356    pub name: Option<String>,
357}
358
359/// <p>A map of the key-value pairs for the resource tag.</p>
360#[derive(Clone, Debug, Default, PartialEq, Serialize)]
361#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
362pub struct CreateTagsRequest {
363    /// <p>The Amazon Resource Name (ARN) of the resource tag.</p>
364    #[serde(rename = "ResourceArn")]
365    pub resource_arn: String,
366    /// <p>The key-value pair for the resource tag.</p>
367    #[serde(rename = "Tags")]
368    #[serde(skip_serializing_if = "Option::is_none")]
369    pub tags: Option<::std::collections::HashMap<String, String>>,
370}
371
372/// <p>Creates a new ActiveMQ user.</p>
373#[derive(Clone, Debug, Default, PartialEq, Serialize)]
374#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
375pub struct CreateUserRequest {
376    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
377    #[serde(rename = "BrokerId")]
378    pub broker_id: String,
379    /// <p>Enables access to the the ActiveMQ Web Console for the ActiveMQ user.</p>
380    #[serde(rename = "ConsoleAccess")]
381    #[serde(skip_serializing_if = "Option::is_none")]
382    pub console_access: Option<bool>,
383    /// <p>The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
384    #[serde(rename = "Groups")]
385    #[serde(skip_serializing_if = "Option::is_none")]
386    pub groups: Option<Vec<String>>,
387    /// <p>Required. The password of the user. This value must be at least 12 characters long, must contain at least 4 unique characters, and must not contain commas.</p>
388    #[serde(rename = "Password")]
389    #[serde(skip_serializing_if = "Option::is_none")]
390    pub password: Option<String>,
391    /// <p>The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
392    #[serde(rename = "Username")]
393    pub username: String,
394}
395
396#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
397#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
398pub struct CreateUserResponse {}
399
400#[derive(Clone, Debug, Default, PartialEq, Serialize)]
401#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
402pub struct DeleteBrokerRequest {
403    /// <p>The name of the broker. This value must be unique in your AWS account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain whitespaces, brackets, wildcard characters, or special characters.</p>
404    #[serde(rename = "BrokerId")]
405    pub broker_id: String,
406}
407
408#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
409#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
410pub struct DeleteBrokerResponse {
411    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
412    #[serde(rename = "BrokerId")]
413    #[serde(skip_serializing_if = "Option::is_none")]
414    pub broker_id: Option<String>,
415}
416
417#[derive(Clone, Debug, Default, PartialEq, Serialize)]
418#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
419pub struct DeleteTagsRequest {
420    /// <p>The Amazon Resource Name (ARN) of the resource tag.</p>
421    #[serde(rename = "ResourceArn")]
422    pub resource_arn: String,
423    /// <p>An array of tag keys to delete</p>
424    #[serde(rename = "TagKeys")]
425    pub tag_keys: Vec<String>,
426}
427
428#[derive(Clone, Debug, Default, PartialEq, Serialize)]
429#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
430pub struct DeleteUserRequest {
431    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
432    #[serde(rename = "BrokerId")]
433    pub broker_id: String,
434    /// <p>The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
435    #[serde(rename = "Username")]
436    pub username: String,
437}
438
439#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
440#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
441pub struct DeleteUserResponse {}
442
443#[derive(Clone, Debug, Default, PartialEq, Serialize)]
444#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
445pub struct DescribeBrokerEngineTypesRequest {
446    /// <p>Filter response by engine type.</p>
447    #[serde(rename = "EngineType")]
448    #[serde(skip_serializing_if = "Option::is_none")]
449    pub engine_type: Option<String>,
450    /// <p>The maximum number of engine types that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.</p>
451    #[serde(rename = "MaxResults")]
452    #[serde(skip_serializing_if = "Option::is_none")]
453    pub max_results: Option<i64>,
454    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
455    #[serde(rename = "NextToken")]
456    #[serde(skip_serializing_if = "Option::is_none")]
457    pub next_token: Option<String>,
458}
459
460#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
461#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
462pub struct DescribeBrokerEngineTypesResponse {
463    /// <p>List of available engine types and versions.</p>
464    #[serde(rename = "BrokerEngineTypes")]
465    #[serde(skip_serializing_if = "Option::is_none")]
466    pub broker_engine_types: Option<Vec<BrokerEngineType>>,
467    /// <p>Required. The maximum number of engine types that can be returned per page (20 by default). This value must be an integer from 5 to 100.</p>
468    #[serde(rename = "MaxResults")]
469    #[serde(skip_serializing_if = "Option::is_none")]
470    pub max_results: Option<i64>,
471    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
472    #[serde(rename = "NextToken")]
473    #[serde(skip_serializing_if = "Option::is_none")]
474    pub next_token: Option<String>,
475}
476
477#[derive(Clone, Debug, Default, PartialEq, Serialize)]
478#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
479pub struct DescribeBrokerInstanceOptionsRequest {
480    /// <p>Filter response by engine type.</p>
481    #[serde(rename = "EngineType")]
482    #[serde(skip_serializing_if = "Option::is_none")]
483    pub engine_type: Option<String>,
484    /// <p>Filter response by host instance type.</p>
485    #[serde(rename = "HostInstanceType")]
486    #[serde(skip_serializing_if = "Option::is_none")]
487    pub host_instance_type: Option<String>,
488    /// <p>The maximum number of instance options that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.</p>
489    #[serde(rename = "MaxResults")]
490    #[serde(skip_serializing_if = "Option::is_none")]
491    pub max_results: Option<i64>,
492    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
493    #[serde(rename = "NextToken")]
494    #[serde(skip_serializing_if = "Option::is_none")]
495    pub next_token: Option<String>,
496    /// <p>Filter response by storage type.</p>
497    #[serde(rename = "StorageType")]
498    #[serde(skip_serializing_if = "Option::is_none")]
499    pub storage_type: Option<String>,
500}
501
502#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
503#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
504pub struct DescribeBrokerInstanceOptionsResponse {
505    /// <p>List of available broker instance options.</p>
506    #[serde(rename = "BrokerInstanceOptions")]
507    #[serde(skip_serializing_if = "Option::is_none")]
508    pub broker_instance_options: Option<Vec<BrokerInstanceOption>>,
509    /// <p>Required. The maximum number of instance options that can be returned per page (20 by default). This value must be an integer from 5 to 100.</p>
510    #[serde(rename = "MaxResults")]
511    #[serde(skip_serializing_if = "Option::is_none")]
512    pub max_results: Option<i64>,
513    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
514    #[serde(rename = "NextToken")]
515    #[serde(skip_serializing_if = "Option::is_none")]
516    pub next_token: Option<String>,
517}
518
519#[derive(Clone, Debug, Default, PartialEq, Serialize)]
520#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
521pub struct DescribeBrokerRequest {
522    /// <p>The name of the broker. This value must be unique in your AWS account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain whitespaces, brackets, wildcard characters, or special characters.</p>
523    #[serde(rename = "BrokerId")]
524    pub broker_id: String,
525}
526
527#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
528#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
529pub struct DescribeBrokerResponse {
530    /// <p>Required. Enables automatic upgrades to new minor versions for brokers, as Apache releases the versions. The automatic upgrades occur during the maintenance window of the broker or after a manual broker reboot.</p>
531    #[serde(rename = "AutoMinorVersionUpgrade")]
532    #[serde(skip_serializing_if = "Option::is_none")]
533    pub auto_minor_version_upgrade: Option<bool>,
534    /// <p>The Amazon Resource Name (ARN) of the broker.</p>
535    #[serde(rename = "BrokerArn")]
536    #[serde(skip_serializing_if = "Option::is_none")]
537    pub broker_arn: Option<String>,
538    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
539    #[serde(rename = "BrokerId")]
540    #[serde(skip_serializing_if = "Option::is_none")]
541    pub broker_id: Option<String>,
542    /// <p>A list of information about allocated brokers.</p>
543    #[serde(rename = "BrokerInstances")]
544    #[serde(skip_serializing_if = "Option::is_none")]
545    pub broker_instances: Option<Vec<BrokerInstance>>,
546    /// <p>The name of the broker. This value must be unique in your AWS account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain whitespaces, brackets, wildcard characters, or special characters.</p>
547    #[serde(rename = "BrokerName")]
548    #[serde(skip_serializing_if = "Option::is_none")]
549    pub broker_name: Option<String>,
550    /// <p>The status of the broker.</p>
551    #[serde(rename = "BrokerState")]
552    #[serde(skip_serializing_if = "Option::is_none")]
553    pub broker_state: Option<String>,
554    /// <p>The list of all revisions for the specified configuration.</p>
555    #[serde(rename = "Configurations")]
556    #[serde(skip_serializing_if = "Option::is_none")]
557    pub configurations: Option<Configurations>,
558    /// <p>The time when the broker was created.</p>
559    #[serde(rename = "Created")]
560    #[serde(skip_serializing_if = "Option::is_none")]
561    pub created: Option<f64>,
562    /// <p>Required. The deployment mode of the broker.</p>
563    #[serde(rename = "DeploymentMode")]
564    #[serde(skip_serializing_if = "Option::is_none")]
565    pub deployment_mode: Option<String>,
566    /// <p>Encryption options for the broker.</p>
567    #[serde(rename = "EncryptionOptions")]
568    #[serde(skip_serializing_if = "Option::is_none")]
569    pub encryption_options: Option<EncryptionOptions>,
570    /// <p>Required. The type of broker engine. Note: Currently, Amazon MQ supports only ACTIVEMQ.</p>
571    #[serde(rename = "EngineType")]
572    #[serde(skip_serializing_if = "Option::is_none")]
573    pub engine_type: Option<String>,
574    /// <p>The version of the broker engine. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html</p>
575    #[serde(rename = "EngineVersion")]
576    #[serde(skip_serializing_if = "Option::is_none")]
577    pub engine_version: Option<String>,
578    /// <p>The broker&#39;s instance type.</p>
579    #[serde(rename = "HostInstanceType")]
580    #[serde(skip_serializing_if = "Option::is_none")]
581    pub host_instance_type: Option<String>,
582    /// <p>The list of information about logs currently enabled and pending to be deployed for the specified broker.</p>
583    #[serde(rename = "Logs")]
584    #[serde(skip_serializing_if = "Option::is_none")]
585    pub logs: Option<LogsSummary>,
586    /// <p>The parameters that determine the WeeklyStartTime.</p>
587    #[serde(rename = "MaintenanceWindowStartTime")]
588    #[serde(skip_serializing_if = "Option::is_none")]
589    pub maintenance_window_start_time: Option<WeeklyStartTime>,
590    /// <p>The version of the broker engine to upgrade to. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html</p>
591    #[serde(rename = "PendingEngineVersion")]
592    #[serde(skip_serializing_if = "Option::is_none")]
593    pub pending_engine_version: Option<String>,
594    /// <p>The host instance type of the broker to upgrade to. For a list of supported instance types, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide//broker.html#broker-instance-types</p>
595    #[serde(rename = "PendingHostInstanceType")]
596    #[serde(skip_serializing_if = "Option::is_none")]
597    pub pending_host_instance_type: Option<String>,
598    /// <p>The list of pending security groups to authorize connections to brokers.</p>
599    #[serde(rename = "PendingSecurityGroups")]
600    #[serde(skip_serializing_if = "Option::is_none")]
601    pub pending_security_groups: Option<Vec<String>>,
602    /// <p>Required. Enables connections from applications outside of the VPC that hosts the broker&#39;s subnets.</p>
603    #[serde(rename = "PubliclyAccessible")]
604    #[serde(skip_serializing_if = "Option::is_none")]
605    pub publicly_accessible: Option<bool>,
606    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
607    #[serde(rename = "SecurityGroups")]
608    #[serde(skip_serializing_if = "Option::is_none")]
609    pub security_groups: Option<Vec<String>>,
610    /// <p>The broker&#39;s storage type.</p>
611    #[serde(rename = "StorageType")]
612    #[serde(skip_serializing_if = "Option::is_none")]
613    pub storage_type: Option<String>,
614    /// <p>The list of groups (2 maximum) that define which subnets and IP ranges the broker can use from different Availability Zones. A SINGLE<em>INSTANCE deployment requires one subnet (for example, the default subnet). An ACTIVE</em>STANDBY<em>MULTI</em>AZ deployment requires two subnets.</p>
615    #[serde(rename = "SubnetIds")]
616    #[serde(skip_serializing_if = "Option::is_none")]
617    pub subnet_ids: Option<Vec<String>>,
618    /// <p>The list of all tags associated with this broker.</p>
619    #[serde(rename = "Tags")]
620    #[serde(skip_serializing_if = "Option::is_none")]
621    pub tags: Option<::std::collections::HashMap<String, String>>,
622    /// <p>The list of all ActiveMQ usernames for the specified broker.</p>
623    #[serde(rename = "Users")]
624    #[serde(skip_serializing_if = "Option::is_none")]
625    pub users: Option<Vec<UserSummary>>,
626}
627
628#[derive(Clone, Debug, Default, PartialEq, Serialize)]
629#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
630pub struct DescribeConfigurationRequest {
631    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
632    #[serde(rename = "ConfigurationId")]
633    pub configuration_id: String,
634}
635
636#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
637#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
638pub struct DescribeConfigurationResponse {
639    /// <p>Required. The ARN of the configuration.</p>
640    #[serde(rename = "Arn")]
641    #[serde(skip_serializing_if = "Option::is_none")]
642    pub arn: Option<String>,
643    /// <p>Required. The date and time of the configuration revision.</p>
644    #[serde(rename = "Created")]
645    #[serde(skip_serializing_if = "Option::is_none")]
646    pub created: Option<f64>,
647    /// <p>Required. The description of the configuration.</p>
648    #[serde(rename = "Description")]
649    #[serde(skip_serializing_if = "Option::is_none")]
650    pub description: Option<String>,
651    /// <p>Required. The type of broker engine. Note: Currently, Amazon MQ supports only ACTIVEMQ.</p>
652    #[serde(rename = "EngineType")]
653    #[serde(skip_serializing_if = "Option::is_none")]
654    pub engine_type: Option<String>,
655    /// <p>Required. The version of the broker engine. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html</p>
656    #[serde(rename = "EngineVersion")]
657    #[serde(skip_serializing_if = "Option::is_none")]
658    pub engine_version: Option<String>,
659    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
660    #[serde(rename = "Id")]
661    #[serde(skip_serializing_if = "Option::is_none")]
662    pub id: Option<String>,
663    /// <p>Required. The latest revision of the configuration.</p>
664    #[serde(rename = "LatestRevision")]
665    #[serde(skip_serializing_if = "Option::is_none")]
666    pub latest_revision: Option<ConfigurationRevision>,
667    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
668    #[serde(rename = "Name")]
669    #[serde(skip_serializing_if = "Option::is_none")]
670    pub name: Option<String>,
671    /// <p>The list of all tags associated with this configuration.</p>
672    #[serde(rename = "Tags")]
673    #[serde(skip_serializing_if = "Option::is_none")]
674    pub tags: Option<::std::collections::HashMap<String, String>>,
675}
676
677#[derive(Clone, Debug, Default, PartialEq, Serialize)]
678#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
679pub struct DescribeConfigurationRevisionRequest {
680    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
681    #[serde(rename = "ConfigurationId")]
682    pub configuration_id: String,
683    /// <p>The revision of the configuration.</p>
684    #[serde(rename = "ConfigurationRevision")]
685    pub configuration_revision: String,
686}
687
688#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
689#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
690pub struct DescribeConfigurationRevisionResponse {
691    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
692    #[serde(rename = "ConfigurationId")]
693    #[serde(skip_serializing_if = "Option::is_none")]
694    pub configuration_id: Option<String>,
695    /// <p>Required. The date and time of the configuration.</p>
696    #[serde(rename = "Created")]
697    #[serde(skip_serializing_if = "Option::is_none")]
698    pub created: Option<f64>,
699    /// <p>Required. The base64-encoded XML configuration.</p>
700    #[serde(rename = "Data")]
701    #[serde(skip_serializing_if = "Option::is_none")]
702    pub data: Option<String>,
703    /// <p>The description of the configuration.</p>
704    #[serde(rename = "Description")]
705    #[serde(skip_serializing_if = "Option::is_none")]
706    pub description: Option<String>,
707}
708
709#[derive(Clone, Debug, Default, PartialEq, Serialize)]
710#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
711pub struct DescribeUserRequest {
712    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
713    #[serde(rename = "BrokerId")]
714    pub broker_id: String,
715    /// <p>The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
716    #[serde(rename = "Username")]
717    pub username: String,
718}
719
720#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
721#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
722pub struct DescribeUserResponse {
723    /// <p>Required. The unique ID that Amazon MQ generates for the broker.</p>
724    #[serde(rename = "BrokerId")]
725    #[serde(skip_serializing_if = "Option::is_none")]
726    pub broker_id: Option<String>,
727    /// <p>Enables access to the the ActiveMQ Web Console for the ActiveMQ user.</p>
728    #[serde(rename = "ConsoleAccess")]
729    #[serde(skip_serializing_if = "Option::is_none")]
730    pub console_access: Option<bool>,
731    /// <p>The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
732    #[serde(rename = "Groups")]
733    #[serde(skip_serializing_if = "Option::is_none")]
734    pub groups: Option<Vec<String>>,
735    /// <p>The status of the changes pending for the ActiveMQ user.</p>
736    #[serde(rename = "Pending")]
737    #[serde(skip_serializing_if = "Option::is_none")]
738    pub pending: Option<UserPendingChanges>,
739    /// <p>Required. The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
740    #[serde(rename = "Username")]
741    #[serde(skip_serializing_if = "Option::is_none")]
742    pub username: Option<String>,
743}
744
745/// <p>Encryption options for the broker.</p>
746#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
747pub struct EncryptionOptions {
748    /// <p>The customer master key (CMK) to use for the AWS Key Management Service (KMS). This key is used to encrypt your data at rest. If not provided, Amazon MQ will use a default CMK to encrypt your data.</p>
749    #[serde(rename = "KmsKeyId")]
750    #[serde(skip_serializing_if = "Option::is_none")]
751    pub kms_key_id: Option<String>,
752    /// <p>Enables the use of an AWS owned CMK using AWS Key Management Service (KMS).</p>
753    #[serde(rename = "UseAwsOwnedKey")]
754    pub use_aws_owned_key: bool,
755}
756
757/// <p>Id of the engine version.</p>
758#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
759#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
760pub struct EngineVersion {
761    /// <p>Id for the version.</p>
762    #[serde(rename = "Name")]
763    #[serde(skip_serializing_if = "Option::is_none")]
764    pub name: Option<String>,
765}
766
767#[derive(Clone, Debug, Default, PartialEq, Serialize)]
768#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
769pub struct ListBrokersRequest {
770    /// <p>The maximum number of brokers that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.</p>
771    #[serde(rename = "MaxResults")]
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub max_results: Option<i64>,
774    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
775    #[serde(rename = "NextToken")]
776    #[serde(skip_serializing_if = "Option::is_none")]
777    pub next_token: Option<String>,
778}
779
780#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
781#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
782pub struct ListBrokersResponse {
783    /// <p>A list of information about all brokers.</p>
784    #[serde(rename = "BrokerSummaries")]
785    #[serde(skip_serializing_if = "Option::is_none")]
786    pub broker_summaries: Option<Vec<BrokerSummary>>,
787    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
788    #[serde(rename = "NextToken")]
789    #[serde(skip_serializing_if = "Option::is_none")]
790    pub next_token: Option<String>,
791}
792
793#[derive(Clone, Debug, Default, PartialEq, Serialize)]
794#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
795pub struct ListConfigurationRevisionsRequest {
796    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
797    #[serde(rename = "ConfigurationId")]
798    pub configuration_id: String,
799    /// <p>The maximum number of configurations that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.</p>
800    #[serde(rename = "MaxResults")]
801    #[serde(skip_serializing_if = "Option::is_none")]
802    pub max_results: Option<i64>,
803    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
804    #[serde(rename = "NextToken")]
805    #[serde(skip_serializing_if = "Option::is_none")]
806    pub next_token: Option<String>,
807}
808
809#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
810#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
811pub struct ListConfigurationRevisionsResponse {
812    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
813    #[serde(rename = "ConfigurationId")]
814    #[serde(skip_serializing_if = "Option::is_none")]
815    pub configuration_id: Option<String>,
816    /// <p>The maximum number of configuration revisions that can be returned per page (20 by default). This value must be an integer from 5 to 100.</p>
817    #[serde(rename = "MaxResults")]
818    #[serde(skip_serializing_if = "Option::is_none")]
819    pub max_results: Option<i64>,
820    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
821    #[serde(rename = "NextToken")]
822    #[serde(skip_serializing_if = "Option::is_none")]
823    pub next_token: Option<String>,
824    /// <p>The list of all revisions for the specified configuration.</p>
825    #[serde(rename = "Revisions")]
826    #[serde(skip_serializing_if = "Option::is_none")]
827    pub revisions: Option<Vec<ConfigurationRevision>>,
828}
829
830#[derive(Clone, Debug, Default, PartialEq, Serialize)]
831#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
832pub struct ListConfigurationsRequest {
833    /// <p>The maximum number of configurations that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.</p>
834    #[serde(rename = "MaxResults")]
835    #[serde(skip_serializing_if = "Option::is_none")]
836    pub max_results: Option<i64>,
837    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
838    #[serde(rename = "NextToken")]
839    #[serde(skip_serializing_if = "Option::is_none")]
840    pub next_token: Option<String>,
841}
842
843#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
844#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
845pub struct ListConfigurationsResponse {
846    /// <p>The list of all revisions for the specified configuration.</p>
847    #[serde(rename = "Configurations")]
848    #[serde(skip_serializing_if = "Option::is_none")]
849    pub configurations: Option<Vec<Configuration>>,
850    /// <p>The maximum number of configurations that Amazon MQ can return per page (20 by default). This value must be an integer from 5 to 100.</p>
851    #[serde(rename = "MaxResults")]
852    #[serde(skip_serializing_if = "Option::is_none")]
853    pub max_results: Option<i64>,
854    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
855    #[serde(rename = "NextToken")]
856    #[serde(skip_serializing_if = "Option::is_none")]
857    pub next_token: Option<String>,
858}
859
860#[derive(Clone, Debug, Default, PartialEq, Serialize)]
861#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
862pub struct ListTagsRequest {
863    /// <p>The Amazon Resource Name (ARN) of the resource tag.</p>
864    #[serde(rename = "ResourceArn")]
865    pub resource_arn: String,
866}
867
868#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
869#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
870pub struct ListTagsResponse {
871    /// <p>The key-value pair for the resource tag.</p>
872    #[serde(rename = "Tags")]
873    #[serde(skip_serializing_if = "Option::is_none")]
874    pub tags: Option<::std::collections::HashMap<String, String>>,
875}
876
877#[derive(Clone, Debug, Default, PartialEq, Serialize)]
878#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
879pub struct ListUsersRequest {
880    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
881    #[serde(rename = "BrokerId")]
882    pub broker_id: String,
883    /// <p>The maximum number of ActiveMQ users that can be returned per page (20 by default). This value must be an integer from 5 to 100.</p>
884    #[serde(rename = "MaxResults")]
885    #[serde(skip_serializing_if = "Option::is_none")]
886    pub max_results: Option<i64>,
887    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
888    #[serde(rename = "NextToken")]
889    #[serde(skip_serializing_if = "Option::is_none")]
890    pub next_token: Option<String>,
891}
892
893#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
894#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
895pub struct ListUsersResponse {
896    /// <p>Required. The unique ID that Amazon MQ generates for the broker.</p>
897    #[serde(rename = "BrokerId")]
898    #[serde(skip_serializing_if = "Option::is_none")]
899    pub broker_id: Option<String>,
900    /// <p>Required. The maximum number of ActiveMQ users that can be returned per page (20 by default). This value must be an integer from 5 to 100.</p>
901    #[serde(rename = "MaxResults")]
902    #[serde(skip_serializing_if = "Option::is_none")]
903    pub max_results: Option<i64>,
904    /// <p>The token that specifies the next page of results Amazon MQ should return. To request the first page, leave nextToken empty.</p>
905    #[serde(rename = "NextToken")]
906    #[serde(skip_serializing_if = "Option::is_none")]
907    pub next_token: Option<String>,
908    /// <p>Required. The list of all ActiveMQ usernames for the specified broker.</p>
909    #[serde(rename = "Users")]
910    #[serde(skip_serializing_if = "Option::is_none")]
911    pub users: Option<Vec<UserSummary>>,
912}
913
914/// <p>The list of information about logs to be enabled for the specified broker.</p>
915#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
916pub struct Logs {
917    /// <p>Enables audit logging. Every user management action made using JMX or the ActiveMQ Web Console is logged.</p>
918    #[serde(rename = "Audit")]
919    #[serde(skip_serializing_if = "Option::is_none")]
920    pub audit: Option<bool>,
921    /// <p>Enables general logging.</p>
922    #[serde(rename = "General")]
923    #[serde(skip_serializing_if = "Option::is_none")]
924    pub general: Option<bool>,
925}
926
927/// <p>The list of information about logs currently enabled and pending to be deployed for the specified broker.</p>
928#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
929#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
930pub struct LogsSummary {
931    /// <p>Enables audit logging. Every user management action made using JMX or the ActiveMQ Web Console is logged.</p>
932    #[serde(rename = "Audit")]
933    #[serde(skip_serializing_if = "Option::is_none")]
934    pub audit: Option<bool>,
935    /// <p>The location of the CloudWatch Logs log group where audit logs are sent.</p>
936    #[serde(rename = "AuditLogGroup")]
937    #[serde(skip_serializing_if = "Option::is_none")]
938    pub audit_log_group: Option<String>,
939    /// <p>Enables general logging.</p>
940    #[serde(rename = "General")]
941    #[serde(skip_serializing_if = "Option::is_none")]
942    pub general: Option<bool>,
943    /// <p>The location of the CloudWatch Logs log group where general logs are sent.</p>
944    #[serde(rename = "GeneralLogGroup")]
945    #[serde(skip_serializing_if = "Option::is_none")]
946    pub general_log_group: Option<String>,
947    /// <p>The list of information about logs pending to be deployed for the specified broker.</p>
948    #[serde(rename = "Pending")]
949    #[serde(skip_serializing_if = "Option::is_none")]
950    pub pending: Option<PendingLogs>,
951}
952
953/// <p>The list of information about logs to be enabled for the specified broker.</p>
954#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
955#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
956pub struct PendingLogs {
957    /// <p>Enables audit logging. Every user management action made using JMX or the ActiveMQ Web Console is logged.</p>
958    #[serde(rename = "Audit")]
959    #[serde(skip_serializing_if = "Option::is_none")]
960    pub audit: Option<bool>,
961    /// <p>Enables general logging.</p>
962    #[serde(rename = "General")]
963    #[serde(skip_serializing_if = "Option::is_none")]
964    pub general: Option<bool>,
965}
966
967#[derive(Clone, Debug, Default, PartialEq, Serialize)]
968#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
969pub struct RebootBrokerRequest {
970    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
971    #[serde(rename = "BrokerId")]
972    pub broker_id: String,
973}
974
975#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
976#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
977pub struct RebootBrokerResponse {}
978
979/// <p>Returns information about the XML element or attribute that was sanitized in the configuration.</p>
980#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
981#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
982pub struct SanitizationWarning {
983    /// <p>The name of the XML attribute that has been sanitized.</p>
984    #[serde(rename = "AttributeName")]
985    #[serde(skip_serializing_if = "Option::is_none")]
986    pub attribute_name: Option<String>,
987    /// <p>The name of the XML element that has been sanitized.</p>
988    #[serde(rename = "ElementName")]
989    #[serde(skip_serializing_if = "Option::is_none")]
990    pub element_name: Option<String>,
991    /// <p>Required. The reason for which the XML elements or attributes were sanitized.</p>
992    #[serde(rename = "Reason")]
993    #[serde(skip_serializing_if = "Option::is_none")]
994    pub reason: Option<String>,
995}
996
997/// <p>Updates the broker using the specified properties.</p>
998#[derive(Clone, Debug, Default, PartialEq, Serialize)]
999#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1000pub struct UpdateBrokerRequest {
1001    /// <p>Enables automatic upgrades to new minor versions for brokers, as Apache releases the versions. The automatic upgrades occur during the maintenance window of the broker or after a manual broker reboot.</p>
1002    #[serde(rename = "AutoMinorVersionUpgrade")]
1003    #[serde(skip_serializing_if = "Option::is_none")]
1004    pub auto_minor_version_upgrade: Option<bool>,
1005    /// <p>The name of the broker. This value must be unique in your AWS account, 1-50 characters long, must contain only letters, numbers, dashes, and underscores, and must not contain whitespaces, brackets, wildcard characters, or special characters.</p>
1006    #[serde(rename = "BrokerId")]
1007    pub broker_id: String,
1008    /// <p>A list of information about the configuration.</p>
1009    #[serde(rename = "Configuration")]
1010    #[serde(skip_serializing_if = "Option::is_none")]
1011    pub configuration: Option<ConfigurationId>,
1012    /// <p>The version of the broker engine. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html</p>
1013    #[serde(rename = "EngineVersion")]
1014    #[serde(skip_serializing_if = "Option::is_none")]
1015    pub engine_version: Option<String>,
1016    /// <p>The host instance type of the broker to upgrade to. For a list of supported instance types, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide//broker.html#broker-instance-types</p>
1017    #[serde(rename = "HostInstanceType")]
1018    #[serde(skip_serializing_if = "Option::is_none")]
1019    pub host_instance_type: Option<String>,
1020    /// <p>Enables Amazon CloudWatch logging for brokers.</p>
1021    #[serde(rename = "Logs")]
1022    #[serde(skip_serializing_if = "Option::is_none")]
1023    pub logs: Option<Logs>,
1024    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
1025    #[serde(rename = "SecurityGroups")]
1026    #[serde(skip_serializing_if = "Option::is_none")]
1027    pub security_groups: Option<Vec<String>>,
1028}
1029
1030#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1031#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1032pub struct UpdateBrokerResponse {
1033    /// <p>The new value of automatic upgrades to new minor version for brokers.</p>
1034    #[serde(rename = "AutoMinorVersionUpgrade")]
1035    #[serde(skip_serializing_if = "Option::is_none")]
1036    pub auto_minor_version_upgrade: Option<bool>,
1037    /// <p>Required. The unique ID that Amazon MQ generates for the broker.</p>
1038    #[serde(rename = "BrokerId")]
1039    #[serde(skip_serializing_if = "Option::is_none")]
1040    pub broker_id: Option<String>,
1041    /// <p>The ID of the updated configuration.</p>
1042    #[serde(rename = "Configuration")]
1043    #[serde(skip_serializing_if = "Option::is_none")]
1044    pub configuration: Option<ConfigurationId>,
1045    /// <p>The version of the broker engine to upgrade to. For a list of supported engine versions, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-engine.html</p>
1046    #[serde(rename = "EngineVersion")]
1047    #[serde(skip_serializing_if = "Option::is_none")]
1048    pub engine_version: Option<String>,
1049    /// <p>The host instance type of the broker to upgrade to. For a list of supported instance types, see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide//broker.html#broker-instance-types</p>
1050    #[serde(rename = "HostInstanceType")]
1051    #[serde(skip_serializing_if = "Option::is_none")]
1052    pub host_instance_type: Option<String>,
1053    /// <p>The list of information about logs to be enabled for the specified broker.</p>
1054    #[serde(rename = "Logs")]
1055    #[serde(skip_serializing_if = "Option::is_none")]
1056    pub logs: Option<Logs>,
1057    /// <p>The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers.</p>
1058    #[serde(rename = "SecurityGroups")]
1059    #[serde(skip_serializing_if = "Option::is_none")]
1060    pub security_groups: Option<Vec<String>>,
1061}
1062
1063/// <p>Updates the specified configuration.</p>
1064#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1065#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1066pub struct UpdateConfigurationRequest {
1067    /// <p>The unique ID that Amazon MQ generates for the configuration.</p>
1068    #[serde(rename = "ConfigurationId")]
1069    pub configuration_id: String,
1070    /// <p>Required. The base64-encoded XML configuration.</p>
1071    #[serde(rename = "Data")]
1072    #[serde(skip_serializing_if = "Option::is_none")]
1073    pub data: Option<String>,
1074    /// <p>The description of the configuration.</p>
1075    #[serde(rename = "Description")]
1076    #[serde(skip_serializing_if = "Option::is_none")]
1077    pub description: Option<String>,
1078}
1079
1080#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1081#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1082pub struct UpdateConfigurationResponse {
1083    /// <p>Required. The Amazon Resource Name (ARN) of the configuration.</p>
1084    #[serde(rename = "Arn")]
1085    #[serde(skip_serializing_if = "Option::is_none")]
1086    pub arn: Option<String>,
1087    /// <p>Required. The date and time of the configuration.</p>
1088    #[serde(rename = "Created")]
1089    #[serde(skip_serializing_if = "Option::is_none")]
1090    pub created: Option<f64>,
1091    /// <p>Required. The unique ID that Amazon MQ generates for the configuration.</p>
1092    #[serde(rename = "Id")]
1093    #[serde(skip_serializing_if = "Option::is_none")]
1094    pub id: Option<String>,
1095    /// <p>The latest revision of the configuration.</p>
1096    #[serde(rename = "LatestRevision")]
1097    #[serde(skip_serializing_if = "Option::is_none")]
1098    pub latest_revision: Option<ConfigurationRevision>,
1099    /// <p>Required. The name of the configuration. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 1-150 characters long.</p>
1100    #[serde(rename = "Name")]
1101    #[serde(skip_serializing_if = "Option::is_none")]
1102    pub name: Option<String>,
1103    /// <p>The list of the first 20 warnings about the configuration XML elements or attributes that were sanitized.</p>
1104    #[serde(rename = "Warnings")]
1105    #[serde(skip_serializing_if = "Option::is_none")]
1106    pub warnings: Option<Vec<SanitizationWarning>>,
1107}
1108
1109/// <p>Updates the information for an ActiveMQ user.</p>
1110#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1111#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1112pub struct UpdateUserRequest {
1113    /// <p>The unique ID that Amazon MQ generates for the broker.</p>
1114    #[serde(rename = "BrokerId")]
1115    pub broker_id: String,
1116    /// <p>Enables access to the the ActiveMQ Web Console for the ActiveMQ user.</p>
1117    #[serde(rename = "ConsoleAccess")]
1118    #[serde(skip_serializing_if = "Option::is_none")]
1119    pub console_access: Option<bool>,
1120    /// <p>The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
1121    #[serde(rename = "Groups")]
1122    #[serde(skip_serializing_if = "Option::is_none")]
1123    pub groups: Option<Vec<String>>,
1124    /// <p>The password of the user. This value must be at least 12 characters long, must contain at least 4 unique characters, and must not contain commas.</p>
1125    #[serde(rename = "Password")]
1126    #[serde(skip_serializing_if = "Option::is_none")]
1127    pub password: Option<String>,
1128    /// <p>Required. The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
1129    #[serde(rename = "Username")]
1130    pub username: String,
1131}
1132
1133#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1134#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1135pub struct UpdateUserResponse {}
1136
1137/// <p>An ActiveMQ user associated with the broker.</p>
1138#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1139#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1140pub struct User {
1141    /// <p>Enables access to the the ActiveMQ Web Console for the ActiveMQ user.</p>
1142    #[serde(rename = "ConsoleAccess")]
1143    #[serde(skip_serializing_if = "Option::is_none")]
1144    pub console_access: Option<bool>,
1145    /// <p>The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
1146    #[serde(rename = "Groups")]
1147    #[serde(skip_serializing_if = "Option::is_none")]
1148    pub groups: Option<Vec<String>>,
1149    /// <p>Required. The password of the ActiveMQ user. This value must be at least 12 characters long, must contain at least 4 unique characters, and must not contain commas.</p>
1150    #[serde(rename = "Password")]
1151    #[serde(skip_serializing_if = "Option::is_none")]
1152    pub password: Option<String>,
1153    /// <p>Required. The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
1154    #[serde(rename = "Username")]
1155    #[serde(skip_serializing_if = "Option::is_none")]
1156    pub username: Option<String>,
1157}
1158
1159/// <p>Returns information about the status of the changes pending for the ActiveMQ user.</p>
1160#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1161#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1162pub struct UserPendingChanges {
1163    /// <p>Enables access to the the ActiveMQ Web Console for the ActiveMQ user.</p>
1164    #[serde(rename = "ConsoleAccess")]
1165    #[serde(skip_serializing_if = "Option::is_none")]
1166    pub console_access: Option<bool>,
1167    /// <p>The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
1168    #[serde(rename = "Groups")]
1169    #[serde(skip_serializing_if = "Option::is_none")]
1170    pub groups: Option<Vec<String>>,
1171    /// <p>Required. The type of change pending for the ActiveMQ user.</p>
1172    #[serde(rename = "PendingChange")]
1173    #[serde(skip_serializing_if = "Option::is_none")]
1174    pub pending_change: Option<String>,
1175}
1176
1177/// <p>Returns a list of all ActiveMQ users.</p>
1178#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1179#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1180pub struct UserSummary {
1181    /// <p>The type of change pending for the ActiveMQ user.</p>
1182    #[serde(rename = "PendingChange")]
1183    #[serde(skip_serializing_if = "Option::is_none")]
1184    pub pending_change: Option<String>,
1185    /// <p>Required. The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long.</p>
1186    #[serde(rename = "Username")]
1187    #[serde(skip_serializing_if = "Option::is_none")]
1188    pub username: Option<String>,
1189}
1190
1191/// <p>The scheduled time period relative to UTC during which Amazon MQ begins to apply pending updates or patches to the broker.</p>
1192#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1193pub struct WeeklyStartTime {
1194    /// <p>Required. The day of the week.</p>
1195    #[serde(rename = "DayOfWeek")]
1196    #[serde(skip_serializing_if = "Option::is_none")]
1197    pub day_of_week: Option<String>,
1198    /// <p>Required. The time, in 24-hour format.</p>
1199    #[serde(rename = "TimeOfDay")]
1200    #[serde(skip_serializing_if = "Option::is_none")]
1201    pub time_of_day: Option<String>,
1202    /// <p>The time zone, UTC by default, in either the Country/City format, or the UTC offset format.</p>
1203    #[serde(rename = "TimeZone")]
1204    #[serde(skip_serializing_if = "Option::is_none")]
1205    pub time_zone: Option<String>,
1206}
1207
1208/// Errors returned by CreateBroker
1209#[derive(Debug, PartialEq)]
1210pub enum CreateBrokerError {
1211    /// <p>Returns information about an error.</p>
1212    BadRequest(String),
1213    /// <p>Returns information about an error.</p>
1214    Conflict(String),
1215    /// <p>Returns information about an error.</p>
1216    Forbidden(String),
1217    /// <p>Returns information about an error.</p>
1218    InternalServerError(String),
1219    /// <p>Returns information about an error.</p>
1220    Unauthorized(String),
1221}
1222
1223impl CreateBrokerError {
1224    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBrokerError> {
1225        if let Some(err) = proto::json::Error::parse_rest(&res) {
1226            match err.typ.as_str() {
1227                "BadRequestException" => {
1228                    return RusotoError::Service(CreateBrokerError::BadRequest(err.msg))
1229                }
1230                "ConflictException" => {
1231                    return RusotoError::Service(CreateBrokerError::Conflict(err.msg))
1232                }
1233                "ForbiddenException" => {
1234                    return RusotoError::Service(CreateBrokerError::Forbidden(err.msg))
1235                }
1236                "InternalServerErrorException" => {
1237                    return RusotoError::Service(CreateBrokerError::InternalServerError(err.msg))
1238                }
1239                "UnauthorizedException" => {
1240                    return RusotoError::Service(CreateBrokerError::Unauthorized(err.msg))
1241                }
1242                "ValidationException" => return RusotoError::Validation(err.msg),
1243                _ => {}
1244            }
1245        }
1246        RusotoError::Unknown(res)
1247    }
1248}
1249impl fmt::Display for CreateBrokerError {
1250    #[allow(unused_variables)]
1251    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1252        match *self {
1253            CreateBrokerError::BadRequest(ref cause) => write!(f, "{}", cause),
1254            CreateBrokerError::Conflict(ref cause) => write!(f, "{}", cause),
1255            CreateBrokerError::Forbidden(ref cause) => write!(f, "{}", cause),
1256            CreateBrokerError::InternalServerError(ref cause) => write!(f, "{}", cause),
1257            CreateBrokerError::Unauthorized(ref cause) => write!(f, "{}", cause),
1258        }
1259    }
1260}
1261impl Error for CreateBrokerError {}
1262/// Errors returned by CreateConfiguration
1263#[derive(Debug, PartialEq)]
1264pub enum CreateConfigurationError {
1265    /// <p>Returns information about an error.</p>
1266    BadRequest(String),
1267    /// <p>Returns information about an error.</p>
1268    Conflict(String),
1269    /// <p>Returns information about an error.</p>
1270    Forbidden(String),
1271    /// <p>Returns information about an error.</p>
1272    InternalServerError(String),
1273}
1274
1275impl CreateConfigurationError {
1276    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateConfigurationError> {
1277        if let Some(err) = proto::json::Error::parse_rest(&res) {
1278            match err.typ.as_str() {
1279                "BadRequestException" => {
1280                    return RusotoError::Service(CreateConfigurationError::BadRequest(err.msg))
1281                }
1282                "ConflictException" => {
1283                    return RusotoError::Service(CreateConfigurationError::Conflict(err.msg))
1284                }
1285                "ForbiddenException" => {
1286                    return RusotoError::Service(CreateConfigurationError::Forbidden(err.msg))
1287                }
1288                "InternalServerErrorException" => {
1289                    return RusotoError::Service(CreateConfigurationError::InternalServerError(
1290                        err.msg,
1291                    ))
1292                }
1293                "ValidationException" => return RusotoError::Validation(err.msg),
1294                _ => {}
1295            }
1296        }
1297        RusotoError::Unknown(res)
1298    }
1299}
1300impl fmt::Display for CreateConfigurationError {
1301    #[allow(unused_variables)]
1302    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1303        match *self {
1304            CreateConfigurationError::BadRequest(ref cause) => write!(f, "{}", cause),
1305            CreateConfigurationError::Conflict(ref cause) => write!(f, "{}", cause),
1306            CreateConfigurationError::Forbidden(ref cause) => write!(f, "{}", cause),
1307            CreateConfigurationError::InternalServerError(ref cause) => write!(f, "{}", cause),
1308        }
1309    }
1310}
1311impl Error for CreateConfigurationError {}
1312/// Errors returned by CreateTags
1313#[derive(Debug, PartialEq)]
1314pub enum CreateTagsError {
1315    /// <p>Returns information about an error.</p>
1316    BadRequest(String),
1317    /// <p>Returns information about an error.</p>
1318    Forbidden(String),
1319    /// <p>Returns information about an error.</p>
1320    InternalServerError(String),
1321    /// <p>Returns information about an error.</p>
1322    NotFound(String),
1323}
1324
1325impl CreateTagsError {
1326    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTagsError> {
1327        if let Some(err) = proto::json::Error::parse_rest(&res) {
1328            match err.typ.as_str() {
1329                "BadRequestException" => {
1330                    return RusotoError::Service(CreateTagsError::BadRequest(err.msg))
1331                }
1332                "ForbiddenException" => {
1333                    return RusotoError::Service(CreateTagsError::Forbidden(err.msg))
1334                }
1335                "InternalServerErrorException" => {
1336                    return RusotoError::Service(CreateTagsError::InternalServerError(err.msg))
1337                }
1338                "NotFoundException" => {
1339                    return RusotoError::Service(CreateTagsError::NotFound(err.msg))
1340                }
1341                "ValidationException" => return RusotoError::Validation(err.msg),
1342                _ => {}
1343            }
1344        }
1345        RusotoError::Unknown(res)
1346    }
1347}
1348impl fmt::Display for CreateTagsError {
1349    #[allow(unused_variables)]
1350    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1351        match *self {
1352            CreateTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
1353            CreateTagsError::Forbidden(ref cause) => write!(f, "{}", cause),
1354            CreateTagsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1355            CreateTagsError::NotFound(ref cause) => write!(f, "{}", cause),
1356        }
1357    }
1358}
1359impl Error for CreateTagsError {}
1360/// Errors returned by CreateUser
1361#[derive(Debug, PartialEq)]
1362pub enum CreateUserError {
1363    /// <p>Returns information about an error.</p>
1364    BadRequest(String),
1365    /// <p>Returns information about an error.</p>
1366    Conflict(String),
1367    /// <p>Returns information about an error.</p>
1368    Forbidden(String),
1369    /// <p>Returns information about an error.</p>
1370    InternalServerError(String),
1371    /// <p>Returns information about an error.</p>
1372    NotFound(String),
1373}
1374
1375impl CreateUserError {
1376    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserError> {
1377        if let Some(err) = proto::json::Error::parse_rest(&res) {
1378            match err.typ.as_str() {
1379                "BadRequestException" => {
1380                    return RusotoError::Service(CreateUserError::BadRequest(err.msg))
1381                }
1382                "ConflictException" => {
1383                    return RusotoError::Service(CreateUserError::Conflict(err.msg))
1384                }
1385                "ForbiddenException" => {
1386                    return RusotoError::Service(CreateUserError::Forbidden(err.msg))
1387                }
1388                "InternalServerErrorException" => {
1389                    return RusotoError::Service(CreateUserError::InternalServerError(err.msg))
1390                }
1391                "NotFoundException" => {
1392                    return RusotoError::Service(CreateUserError::NotFound(err.msg))
1393                }
1394                "ValidationException" => return RusotoError::Validation(err.msg),
1395                _ => {}
1396            }
1397        }
1398        RusotoError::Unknown(res)
1399    }
1400}
1401impl fmt::Display for CreateUserError {
1402    #[allow(unused_variables)]
1403    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1404        match *self {
1405            CreateUserError::BadRequest(ref cause) => write!(f, "{}", cause),
1406            CreateUserError::Conflict(ref cause) => write!(f, "{}", cause),
1407            CreateUserError::Forbidden(ref cause) => write!(f, "{}", cause),
1408            CreateUserError::InternalServerError(ref cause) => write!(f, "{}", cause),
1409            CreateUserError::NotFound(ref cause) => write!(f, "{}", cause),
1410        }
1411    }
1412}
1413impl Error for CreateUserError {}
1414/// Errors returned by DeleteBroker
1415#[derive(Debug, PartialEq)]
1416pub enum DeleteBrokerError {
1417    /// <p>Returns information about an error.</p>
1418    BadRequest(String),
1419    /// <p>Returns information about an error.</p>
1420    Forbidden(String),
1421    /// <p>Returns information about an error.</p>
1422    InternalServerError(String),
1423    /// <p>Returns information about an error.</p>
1424    NotFound(String),
1425}
1426
1427impl DeleteBrokerError {
1428    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBrokerError> {
1429        if let Some(err) = proto::json::Error::parse_rest(&res) {
1430            match err.typ.as_str() {
1431                "BadRequestException" => {
1432                    return RusotoError::Service(DeleteBrokerError::BadRequest(err.msg))
1433                }
1434                "ForbiddenException" => {
1435                    return RusotoError::Service(DeleteBrokerError::Forbidden(err.msg))
1436                }
1437                "InternalServerErrorException" => {
1438                    return RusotoError::Service(DeleteBrokerError::InternalServerError(err.msg))
1439                }
1440                "NotFoundException" => {
1441                    return RusotoError::Service(DeleteBrokerError::NotFound(err.msg))
1442                }
1443                "ValidationException" => return RusotoError::Validation(err.msg),
1444                _ => {}
1445            }
1446        }
1447        RusotoError::Unknown(res)
1448    }
1449}
1450impl fmt::Display for DeleteBrokerError {
1451    #[allow(unused_variables)]
1452    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1453        match *self {
1454            DeleteBrokerError::BadRequest(ref cause) => write!(f, "{}", cause),
1455            DeleteBrokerError::Forbidden(ref cause) => write!(f, "{}", cause),
1456            DeleteBrokerError::InternalServerError(ref cause) => write!(f, "{}", cause),
1457            DeleteBrokerError::NotFound(ref cause) => write!(f, "{}", cause),
1458        }
1459    }
1460}
1461impl Error for DeleteBrokerError {}
1462/// Errors returned by DeleteTags
1463#[derive(Debug, PartialEq)]
1464pub enum DeleteTagsError {
1465    /// <p>Returns information about an error.</p>
1466    BadRequest(String),
1467    /// <p>Returns information about an error.</p>
1468    Forbidden(String),
1469    /// <p>Returns information about an error.</p>
1470    InternalServerError(String),
1471    /// <p>Returns information about an error.</p>
1472    NotFound(String),
1473}
1474
1475impl DeleteTagsError {
1476    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTagsError> {
1477        if let Some(err) = proto::json::Error::parse_rest(&res) {
1478            match err.typ.as_str() {
1479                "BadRequestException" => {
1480                    return RusotoError::Service(DeleteTagsError::BadRequest(err.msg))
1481                }
1482                "ForbiddenException" => {
1483                    return RusotoError::Service(DeleteTagsError::Forbidden(err.msg))
1484                }
1485                "InternalServerErrorException" => {
1486                    return RusotoError::Service(DeleteTagsError::InternalServerError(err.msg))
1487                }
1488                "NotFoundException" => {
1489                    return RusotoError::Service(DeleteTagsError::NotFound(err.msg))
1490                }
1491                "ValidationException" => return RusotoError::Validation(err.msg),
1492                _ => {}
1493            }
1494        }
1495        RusotoError::Unknown(res)
1496    }
1497}
1498impl fmt::Display for DeleteTagsError {
1499    #[allow(unused_variables)]
1500    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1501        match *self {
1502            DeleteTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
1503            DeleteTagsError::Forbidden(ref cause) => write!(f, "{}", cause),
1504            DeleteTagsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1505            DeleteTagsError::NotFound(ref cause) => write!(f, "{}", cause),
1506        }
1507    }
1508}
1509impl Error for DeleteTagsError {}
1510/// Errors returned by DeleteUser
1511#[derive(Debug, PartialEq)]
1512pub enum DeleteUserError {
1513    /// <p>Returns information about an error.</p>
1514    BadRequest(String),
1515    /// <p>Returns information about an error.</p>
1516    Forbidden(String),
1517    /// <p>Returns information about an error.</p>
1518    InternalServerError(String),
1519    /// <p>Returns information about an error.</p>
1520    NotFound(String),
1521}
1522
1523impl DeleteUserError {
1524    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserError> {
1525        if let Some(err) = proto::json::Error::parse_rest(&res) {
1526            match err.typ.as_str() {
1527                "BadRequestException" => {
1528                    return RusotoError::Service(DeleteUserError::BadRequest(err.msg))
1529                }
1530                "ForbiddenException" => {
1531                    return RusotoError::Service(DeleteUserError::Forbidden(err.msg))
1532                }
1533                "InternalServerErrorException" => {
1534                    return RusotoError::Service(DeleteUserError::InternalServerError(err.msg))
1535                }
1536                "NotFoundException" => {
1537                    return RusotoError::Service(DeleteUserError::NotFound(err.msg))
1538                }
1539                "ValidationException" => return RusotoError::Validation(err.msg),
1540                _ => {}
1541            }
1542        }
1543        RusotoError::Unknown(res)
1544    }
1545}
1546impl fmt::Display for DeleteUserError {
1547    #[allow(unused_variables)]
1548    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1549        match *self {
1550            DeleteUserError::BadRequest(ref cause) => write!(f, "{}", cause),
1551            DeleteUserError::Forbidden(ref cause) => write!(f, "{}", cause),
1552            DeleteUserError::InternalServerError(ref cause) => write!(f, "{}", cause),
1553            DeleteUserError::NotFound(ref cause) => write!(f, "{}", cause),
1554        }
1555    }
1556}
1557impl Error for DeleteUserError {}
1558/// Errors returned by DescribeBroker
1559#[derive(Debug, PartialEq)]
1560pub enum DescribeBrokerError {
1561    /// <p>Returns information about an error.</p>
1562    BadRequest(String),
1563    /// <p>Returns information about an error.</p>
1564    Forbidden(String),
1565    /// <p>Returns information about an error.</p>
1566    InternalServerError(String),
1567    /// <p>Returns information about an error.</p>
1568    NotFound(String),
1569}
1570
1571impl DescribeBrokerError {
1572    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBrokerError> {
1573        if let Some(err) = proto::json::Error::parse_rest(&res) {
1574            match err.typ.as_str() {
1575                "BadRequestException" => {
1576                    return RusotoError::Service(DescribeBrokerError::BadRequest(err.msg))
1577                }
1578                "ForbiddenException" => {
1579                    return RusotoError::Service(DescribeBrokerError::Forbidden(err.msg))
1580                }
1581                "InternalServerErrorException" => {
1582                    return RusotoError::Service(DescribeBrokerError::InternalServerError(err.msg))
1583                }
1584                "NotFoundException" => {
1585                    return RusotoError::Service(DescribeBrokerError::NotFound(err.msg))
1586                }
1587                "ValidationException" => return RusotoError::Validation(err.msg),
1588                _ => {}
1589            }
1590        }
1591        RusotoError::Unknown(res)
1592    }
1593}
1594impl fmt::Display for DescribeBrokerError {
1595    #[allow(unused_variables)]
1596    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1597        match *self {
1598            DescribeBrokerError::BadRequest(ref cause) => write!(f, "{}", cause),
1599            DescribeBrokerError::Forbidden(ref cause) => write!(f, "{}", cause),
1600            DescribeBrokerError::InternalServerError(ref cause) => write!(f, "{}", cause),
1601            DescribeBrokerError::NotFound(ref cause) => write!(f, "{}", cause),
1602        }
1603    }
1604}
1605impl Error for DescribeBrokerError {}
1606/// Errors returned by DescribeBrokerEngineTypes
1607#[derive(Debug, PartialEq)]
1608pub enum DescribeBrokerEngineTypesError {
1609    /// <p>Returns information about an error.</p>
1610    BadRequest(String),
1611    /// <p>Returns information about an error.</p>
1612    Forbidden(String),
1613    /// <p>Returns information about an error.</p>
1614    InternalServerError(String),
1615}
1616
1617impl DescribeBrokerEngineTypesError {
1618    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBrokerEngineTypesError> {
1619        if let Some(err) = proto::json::Error::parse_rest(&res) {
1620            match err.typ.as_str() {
1621                "BadRequestException" => {
1622                    return RusotoError::Service(DescribeBrokerEngineTypesError::BadRequest(
1623                        err.msg,
1624                    ))
1625                }
1626                "ForbiddenException" => {
1627                    return RusotoError::Service(DescribeBrokerEngineTypesError::Forbidden(err.msg))
1628                }
1629                "InternalServerErrorException" => {
1630                    return RusotoError::Service(
1631                        DescribeBrokerEngineTypesError::InternalServerError(err.msg),
1632                    )
1633                }
1634                "ValidationException" => return RusotoError::Validation(err.msg),
1635                _ => {}
1636            }
1637        }
1638        RusotoError::Unknown(res)
1639    }
1640}
1641impl fmt::Display for DescribeBrokerEngineTypesError {
1642    #[allow(unused_variables)]
1643    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1644        match *self {
1645            DescribeBrokerEngineTypesError::BadRequest(ref cause) => write!(f, "{}", cause),
1646            DescribeBrokerEngineTypesError::Forbidden(ref cause) => write!(f, "{}", cause),
1647            DescribeBrokerEngineTypesError::InternalServerError(ref cause) => {
1648                write!(f, "{}", cause)
1649            }
1650        }
1651    }
1652}
1653impl Error for DescribeBrokerEngineTypesError {}
1654/// Errors returned by DescribeBrokerInstanceOptions
1655#[derive(Debug, PartialEq)]
1656pub enum DescribeBrokerInstanceOptionsError {
1657    /// <p>Returns information about an error.</p>
1658    BadRequest(String),
1659    /// <p>Returns information about an error.</p>
1660    Forbidden(String),
1661    /// <p>Returns information about an error.</p>
1662    InternalServerError(String),
1663}
1664
1665impl DescribeBrokerInstanceOptionsError {
1666    pub fn from_response(
1667        res: BufferedHttpResponse,
1668    ) -> RusotoError<DescribeBrokerInstanceOptionsError> {
1669        if let Some(err) = proto::json::Error::parse_rest(&res) {
1670            match err.typ.as_str() {
1671                "BadRequestException" => {
1672                    return RusotoError::Service(DescribeBrokerInstanceOptionsError::BadRequest(
1673                        err.msg,
1674                    ))
1675                }
1676                "ForbiddenException" => {
1677                    return RusotoError::Service(DescribeBrokerInstanceOptionsError::Forbidden(
1678                        err.msg,
1679                    ))
1680                }
1681                "InternalServerErrorException" => {
1682                    return RusotoError::Service(
1683                        DescribeBrokerInstanceOptionsError::InternalServerError(err.msg),
1684                    )
1685                }
1686                "ValidationException" => return RusotoError::Validation(err.msg),
1687                _ => {}
1688            }
1689        }
1690        RusotoError::Unknown(res)
1691    }
1692}
1693impl fmt::Display for DescribeBrokerInstanceOptionsError {
1694    #[allow(unused_variables)]
1695    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1696        match *self {
1697            DescribeBrokerInstanceOptionsError::BadRequest(ref cause) => write!(f, "{}", cause),
1698            DescribeBrokerInstanceOptionsError::Forbidden(ref cause) => write!(f, "{}", cause),
1699            DescribeBrokerInstanceOptionsError::InternalServerError(ref cause) => {
1700                write!(f, "{}", cause)
1701            }
1702        }
1703    }
1704}
1705impl Error for DescribeBrokerInstanceOptionsError {}
1706/// Errors returned by DescribeConfiguration
1707#[derive(Debug, PartialEq)]
1708pub enum DescribeConfigurationError {
1709    /// <p>Returns information about an error.</p>
1710    BadRequest(String),
1711    /// <p>Returns information about an error.</p>
1712    Forbidden(String),
1713    /// <p>Returns information about an error.</p>
1714    InternalServerError(String),
1715    /// <p>Returns information about an error.</p>
1716    NotFound(String),
1717}
1718
1719impl DescribeConfigurationError {
1720    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeConfigurationError> {
1721        if let Some(err) = proto::json::Error::parse_rest(&res) {
1722            match err.typ.as_str() {
1723                "BadRequestException" => {
1724                    return RusotoError::Service(DescribeConfigurationError::BadRequest(err.msg))
1725                }
1726                "ForbiddenException" => {
1727                    return RusotoError::Service(DescribeConfigurationError::Forbidden(err.msg))
1728                }
1729                "InternalServerErrorException" => {
1730                    return RusotoError::Service(DescribeConfigurationError::InternalServerError(
1731                        err.msg,
1732                    ))
1733                }
1734                "NotFoundException" => {
1735                    return RusotoError::Service(DescribeConfigurationError::NotFound(err.msg))
1736                }
1737                "ValidationException" => return RusotoError::Validation(err.msg),
1738                _ => {}
1739            }
1740        }
1741        RusotoError::Unknown(res)
1742    }
1743}
1744impl fmt::Display for DescribeConfigurationError {
1745    #[allow(unused_variables)]
1746    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1747        match *self {
1748            DescribeConfigurationError::BadRequest(ref cause) => write!(f, "{}", cause),
1749            DescribeConfigurationError::Forbidden(ref cause) => write!(f, "{}", cause),
1750            DescribeConfigurationError::InternalServerError(ref cause) => write!(f, "{}", cause),
1751            DescribeConfigurationError::NotFound(ref cause) => write!(f, "{}", cause),
1752        }
1753    }
1754}
1755impl Error for DescribeConfigurationError {}
1756/// Errors returned by DescribeConfigurationRevision
1757#[derive(Debug, PartialEq)]
1758pub enum DescribeConfigurationRevisionError {
1759    /// <p>Returns information about an error.</p>
1760    BadRequest(String),
1761    /// <p>Returns information about an error.</p>
1762    Forbidden(String),
1763    /// <p>Returns information about an error.</p>
1764    InternalServerError(String),
1765    /// <p>Returns information about an error.</p>
1766    NotFound(String),
1767}
1768
1769impl DescribeConfigurationRevisionError {
1770    pub fn from_response(
1771        res: BufferedHttpResponse,
1772    ) -> RusotoError<DescribeConfigurationRevisionError> {
1773        if let Some(err) = proto::json::Error::parse_rest(&res) {
1774            match err.typ.as_str() {
1775                "BadRequestException" => {
1776                    return RusotoError::Service(DescribeConfigurationRevisionError::BadRequest(
1777                        err.msg,
1778                    ))
1779                }
1780                "ForbiddenException" => {
1781                    return RusotoError::Service(DescribeConfigurationRevisionError::Forbidden(
1782                        err.msg,
1783                    ))
1784                }
1785                "InternalServerErrorException" => {
1786                    return RusotoError::Service(
1787                        DescribeConfigurationRevisionError::InternalServerError(err.msg),
1788                    )
1789                }
1790                "NotFoundException" => {
1791                    return RusotoError::Service(DescribeConfigurationRevisionError::NotFound(
1792                        err.msg,
1793                    ))
1794                }
1795                "ValidationException" => return RusotoError::Validation(err.msg),
1796                _ => {}
1797            }
1798        }
1799        RusotoError::Unknown(res)
1800    }
1801}
1802impl fmt::Display for DescribeConfigurationRevisionError {
1803    #[allow(unused_variables)]
1804    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1805        match *self {
1806            DescribeConfigurationRevisionError::BadRequest(ref cause) => write!(f, "{}", cause),
1807            DescribeConfigurationRevisionError::Forbidden(ref cause) => write!(f, "{}", cause),
1808            DescribeConfigurationRevisionError::InternalServerError(ref cause) => {
1809                write!(f, "{}", cause)
1810            }
1811            DescribeConfigurationRevisionError::NotFound(ref cause) => write!(f, "{}", cause),
1812        }
1813    }
1814}
1815impl Error for DescribeConfigurationRevisionError {}
1816/// Errors returned by DescribeUser
1817#[derive(Debug, PartialEq)]
1818pub enum DescribeUserError {
1819    /// <p>Returns information about an error.</p>
1820    BadRequest(String),
1821    /// <p>Returns information about an error.</p>
1822    Forbidden(String),
1823    /// <p>Returns information about an error.</p>
1824    InternalServerError(String),
1825    /// <p>Returns information about an error.</p>
1826    NotFound(String),
1827}
1828
1829impl DescribeUserError {
1830    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUserError> {
1831        if let Some(err) = proto::json::Error::parse_rest(&res) {
1832            match err.typ.as_str() {
1833                "BadRequestException" => {
1834                    return RusotoError::Service(DescribeUserError::BadRequest(err.msg))
1835                }
1836                "ForbiddenException" => {
1837                    return RusotoError::Service(DescribeUserError::Forbidden(err.msg))
1838                }
1839                "InternalServerErrorException" => {
1840                    return RusotoError::Service(DescribeUserError::InternalServerError(err.msg))
1841                }
1842                "NotFoundException" => {
1843                    return RusotoError::Service(DescribeUserError::NotFound(err.msg))
1844                }
1845                "ValidationException" => return RusotoError::Validation(err.msg),
1846                _ => {}
1847            }
1848        }
1849        RusotoError::Unknown(res)
1850    }
1851}
1852impl fmt::Display for DescribeUserError {
1853    #[allow(unused_variables)]
1854    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1855        match *self {
1856            DescribeUserError::BadRequest(ref cause) => write!(f, "{}", cause),
1857            DescribeUserError::Forbidden(ref cause) => write!(f, "{}", cause),
1858            DescribeUserError::InternalServerError(ref cause) => write!(f, "{}", cause),
1859            DescribeUserError::NotFound(ref cause) => write!(f, "{}", cause),
1860        }
1861    }
1862}
1863impl Error for DescribeUserError {}
1864/// Errors returned by ListBrokers
1865#[derive(Debug, PartialEq)]
1866pub enum ListBrokersError {
1867    /// <p>Returns information about an error.</p>
1868    BadRequest(String),
1869    /// <p>Returns information about an error.</p>
1870    Forbidden(String),
1871    /// <p>Returns information about an error.</p>
1872    InternalServerError(String),
1873}
1874
1875impl ListBrokersError {
1876    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBrokersError> {
1877        if let Some(err) = proto::json::Error::parse_rest(&res) {
1878            match err.typ.as_str() {
1879                "BadRequestException" => {
1880                    return RusotoError::Service(ListBrokersError::BadRequest(err.msg))
1881                }
1882                "ForbiddenException" => {
1883                    return RusotoError::Service(ListBrokersError::Forbidden(err.msg))
1884                }
1885                "InternalServerErrorException" => {
1886                    return RusotoError::Service(ListBrokersError::InternalServerError(err.msg))
1887                }
1888                "ValidationException" => return RusotoError::Validation(err.msg),
1889                _ => {}
1890            }
1891        }
1892        RusotoError::Unknown(res)
1893    }
1894}
1895impl fmt::Display for ListBrokersError {
1896    #[allow(unused_variables)]
1897    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1898        match *self {
1899            ListBrokersError::BadRequest(ref cause) => write!(f, "{}", cause),
1900            ListBrokersError::Forbidden(ref cause) => write!(f, "{}", cause),
1901            ListBrokersError::InternalServerError(ref cause) => write!(f, "{}", cause),
1902        }
1903    }
1904}
1905impl Error for ListBrokersError {}
1906/// Errors returned by ListConfigurationRevisions
1907#[derive(Debug, PartialEq)]
1908pub enum ListConfigurationRevisionsError {
1909    /// <p>Returns information about an error.</p>
1910    BadRequest(String),
1911    /// <p>Returns information about an error.</p>
1912    Forbidden(String),
1913    /// <p>Returns information about an error.</p>
1914    InternalServerError(String),
1915    /// <p>Returns information about an error.</p>
1916    NotFound(String),
1917}
1918
1919impl ListConfigurationRevisionsError {
1920    pub fn from_response(
1921        res: BufferedHttpResponse,
1922    ) -> RusotoError<ListConfigurationRevisionsError> {
1923        if let Some(err) = proto::json::Error::parse_rest(&res) {
1924            match err.typ.as_str() {
1925                "BadRequestException" => {
1926                    return RusotoError::Service(ListConfigurationRevisionsError::BadRequest(
1927                        err.msg,
1928                    ))
1929                }
1930                "ForbiddenException" => {
1931                    return RusotoError::Service(ListConfigurationRevisionsError::Forbidden(
1932                        err.msg,
1933                    ))
1934                }
1935                "InternalServerErrorException" => {
1936                    return RusotoError::Service(
1937                        ListConfigurationRevisionsError::InternalServerError(err.msg),
1938                    )
1939                }
1940                "NotFoundException" => {
1941                    return RusotoError::Service(ListConfigurationRevisionsError::NotFound(err.msg))
1942                }
1943                "ValidationException" => return RusotoError::Validation(err.msg),
1944                _ => {}
1945            }
1946        }
1947        RusotoError::Unknown(res)
1948    }
1949}
1950impl fmt::Display for ListConfigurationRevisionsError {
1951    #[allow(unused_variables)]
1952    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1953        match *self {
1954            ListConfigurationRevisionsError::BadRequest(ref cause) => write!(f, "{}", cause),
1955            ListConfigurationRevisionsError::Forbidden(ref cause) => write!(f, "{}", cause),
1956            ListConfigurationRevisionsError::InternalServerError(ref cause) => {
1957                write!(f, "{}", cause)
1958            }
1959            ListConfigurationRevisionsError::NotFound(ref cause) => write!(f, "{}", cause),
1960        }
1961    }
1962}
1963impl Error for ListConfigurationRevisionsError {}
1964/// Errors returned by ListConfigurations
1965#[derive(Debug, PartialEq)]
1966pub enum ListConfigurationsError {
1967    /// <p>Returns information about an error.</p>
1968    BadRequest(String),
1969    /// <p>Returns information about an error.</p>
1970    Forbidden(String),
1971    /// <p>Returns information about an error.</p>
1972    InternalServerError(String),
1973}
1974
1975impl ListConfigurationsError {
1976    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListConfigurationsError> {
1977        if let Some(err) = proto::json::Error::parse_rest(&res) {
1978            match err.typ.as_str() {
1979                "BadRequestException" => {
1980                    return RusotoError::Service(ListConfigurationsError::BadRequest(err.msg))
1981                }
1982                "ForbiddenException" => {
1983                    return RusotoError::Service(ListConfigurationsError::Forbidden(err.msg))
1984                }
1985                "InternalServerErrorException" => {
1986                    return RusotoError::Service(ListConfigurationsError::InternalServerError(
1987                        err.msg,
1988                    ))
1989                }
1990                "ValidationException" => return RusotoError::Validation(err.msg),
1991                _ => {}
1992            }
1993        }
1994        RusotoError::Unknown(res)
1995    }
1996}
1997impl fmt::Display for ListConfigurationsError {
1998    #[allow(unused_variables)]
1999    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2000        match *self {
2001            ListConfigurationsError::BadRequest(ref cause) => write!(f, "{}", cause),
2002            ListConfigurationsError::Forbidden(ref cause) => write!(f, "{}", cause),
2003            ListConfigurationsError::InternalServerError(ref cause) => write!(f, "{}", cause),
2004        }
2005    }
2006}
2007impl Error for ListConfigurationsError {}
2008/// Errors returned by ListTags
2009#[derive(Debug, PartialEq)]
2010pub enum ListTagsError {
2011    /// <p>Returns information about an error.</p>
2012    BadRequest(String),
2013    /// <p>Returns information about an error.</p>
2014    Forbidden(String),
2015    /// <p>Returns information about an error.</p>
2016    InternalServerError(String),
2017    /// <p>Returns information about an error.</p>
2018    NotFound(String),
2019}
2020
2021impl ListTagsError {
2022    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsError> {
2023        if let Some(err) = proto::json::Error::parse_rest(&res) {
2024            match err.typ.as_str() {
2025                "BadRequestException" => {
2026                    return RusotoError::Service(ListTagsError::BadRequest(err.msg))
2027                }
2028                "ForbiddenException" => {
2029                    return RusotoError::Service(ListTagsError::Forbidden(err.msg))
2030                }
2031                "InternalServerErrorException" => {
2032                    return RusotoError::Service(ListTagsError::InternalServerError(err.msg))
2033                }
2034                "NotFoundException" => {
2035                    return RusotoError::Service(ListTagsError::NotFound(err.msg))
2036                }
2037                "ValidationException" => return RusotoError::Validation(err.msg),
2038                _ => {}
2039            }
2040        }
2041        RusotoError::Unknown(res)
2042    }
2043}
2044impl fmt::Display for ListTagsError {
2045    #[allow(unused_variables)]
2046    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2047        match *self {
2048            ListTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
2049            ListTagsError::Forbidden(ref cause) => write!(f, "{}", cause),
2050            ListTagsError::InternalServerError(ref cause) => write!(f, "{}", cause),
2051            ListTagsError::NotFound(ref cause) => write!(f, "{}", cause),
2052        }
2053    }
2054}
2055impl Error for ListTagsError {}
2056/// Errors returned by ListUsers
2057#[derive(Debug, PartialEq)]
2058pub enum ListUsersError {
2059    /// <p>Returns information about an error.</p>
2060    BadRequest(String),
2061    /// <p>Returns information about an error.</p>
2062    Forbidden(String),
2063    /// <p>Returns information about an error.</p>
2064    InternalServerError(String),
2065    /// <p>Returns information about an error.</p>
2066    NotFound(String),
2067}
2068
2069impl ListUsersError {
2070    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListUsersError> {
2071        if let Some(err) = proto::json::Error::parse_rest(&res) {
2072            match err.typ.as_str() {
2073                "BadRequestException" => {
2074                    return RusotoError::Service(ListUsersError::BadRequest(err.msg))
2075                }
2076                "ForbiddenException" => {
2077                    return RusotoError::Service(ListUsersError::Forbidden(err.msg))
2078                }
2079                "InternalServerErrorException" => {
2080                    return RusotoError::Service(ListUsersError::InternalServerError(err.msg))
2081                }
2082                "NotFoundException" => {
2083                    return RusotoError::Service(ListUsersError::NotFound(err.msg))
2084                }
2085                "ValidationException" => return RusotoError::Validation(err.msg),
2086                _ => {}
2087            }
2088        }
2089        RusotoError::Unknown(res)
2090    }
2091}
2092impl fmt::Display for ListUsersError {
2093    #[allow(unused_variables)]
2094    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2095        match *self {
2096            ListUsersError::BadRequest(ref cause) => write!(f, "{}", cause),
2097            ListUsersError::Forbidden(ref cause) => write!(f, "{}", cause),
2098            ListUsersError::InternalServerError(ref cause) => write!(f, "{}", cause),
2099            ListUsersError::NotFound(ref cause) => write!(f, "{}", cause),
2100        }
2101    }
2102}
2103impl Error for ListUsersError {}
2104/// Errors returned by RebootBroker
2105#[derive(Debug, PartialEq)]
2106pub enum RebootBrokerError {
2107    /// <p>Returns information about an error.</p>
2108    BadRequest(String),
2109    /// <p>Returns information about an error.</p>
2110    Forbidden(String),
2111    /// <p>Returns information about an error.</p>
2112    InternalServerError(String),
2113    /// <p>Returns information about an error.</p>
2114    NotFound(String),
2115}
2116
2117impl RebootBrokerError {
2118    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RebootBrokerError> {
2119        if let Some(err) = proto::json::Error::parse_rest(&res) {
2120            match err.typ.as_str() {
2121                "BadRequestException" => {
2122                    return RusotoError::Service(RebootBrokerError::BadRequest(err.msg))
2123                }
2124                "ForbiddenException" => {
2125                    return RusotoError::Service(RebootBrokerError::Forbidden(err.msg))
2126                }
2127                "InternalServerErrorException" => {
2128                    return RusotoError::Service(RebootBrokerError::InternalServerError(err.msg))
2129                }
2130                "NotFoundException" => {
2131                    return RusotoError::Service(RebootBrokerError::NotFound(err.msg))
2132                }
2133                "ValidationException" => return RusotoError::Validation(err.msg),
2134                _ => {}
2135            }
2136        }
2137        RusotoError::Unknown(res)
2138    }
2139}
2140impl fmt::Display for RebootBrokerError {
2141    #[allow(unused_variables)]
2142    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2143        match *self {
2144            RebootBrokerError::BadRequest(ref cause) => write!(f, "{}", cause),
2145            RebootBrokerError::Forbidden(ref cause) => write!(f, "{}", cause),
2146            RebootBrokerError::InternalServerError(ref cause) => write!(f, "{}", cause),
2147            RebootBrokerError::NotFound(ref cause) => write!(f, "{}", cause),
2148        }
2149    }
2150}
2151impl Error for RebootBrokerError {}
2152/// Errors returned by UpdateBroker
2153#[derive(Debug, PartialEq)]
2154pub enum UpdateBrokerError {
2155    /// <p>Returns information about an error.</p>
2156    BadRequest(String),
2157    /// <p>Returns information about an error.</p>
2158    Conflict(String),
2159    /// <p>Returns information about an error.</p>
2160    Forbidden(String),
2161    /// <p>Returns information about an error.</p>
2162    InternalServerError(String),
2163    /// <p>Returns information about an error.</p>
2164    NotFound(String),
2165}
2166
2167impl UpdateBrokerError {
2168    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateBrokerError> {
2169        if let Some(err) = proto::json::Error::parse_rest(&res) {
2170            match err.typ.as_str() {
2171                "BadRequestException" => {
2172                    return RusotoError::Service(UpdateBrokerError::BadRequest(err.msg))
2173                }
2174                "ConflictException" => {
2175                    return RusotoError::Service(UpdateBrokerError::Conflict(err.msg))
2176                }
2177                "ForbiddenException" => {
2178                    return RusotoError::Service(UpdateBrokerError::Forbidden(err.msg))
2179                }
2180                "InternalServerErrorException" => {
2181                    return RusotoError::Service(UpdateBrokerError::InternalServerError(err.msg))
2182                }
2183                "NotFoundException" => {
2184                    return RusotoError::Service(UpdateBrokerError::NotFound(err.msg))
2185                }
2186                "ValidationException" => return RusotoError::Validation(err.msg),
2187                _ => {}
2188            }
2189        }
2190        RusotoError::Unknown(res)
2191    }
2192}
2193impl fmt::Display for UpdateBrokerError {
2194    #[allow(unused_variables)]
2195    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2196        match *self {
2197            UpdateBrokerError::BadRequest(ref cause) => write!(f, "{}", cause),
2198            UpdateBrokerError::Conflict(ref cause) => write!(f, "{}", cause),
2199            UpdateBrokerError::Forbidden(ref cause) => write!(f, "{}", cause),
2200            UpdateBrokerError::InternalServerError(ref cause) => write!(f, "{}", cause),
2201            UpdateBrokerError::NotFound(ref cause) => write!(f, "{}", cause),
2202        }
2203    }
2204}
2205impl Error for UpdateBrokerError {}
2206/// Errors returned by UpdateConfiguration
2207#[derive(Debug, PartialEq)]
2208pub enum UpdateConfigurationError {
2209    /// <p>Returns information about an error.</p>
2210    BadRequest(String),
2211    /// <p>Returns information about an error.</p>
2212    Conflict(String),
2213    /// <p>Returns information about an error.</p>
2214    Forbidden(String),
2215    /// <p>Returns information about an error.</p>
2216    InternalServerError(String),
2217    /// <p>Returns information about an error.</p>
2218    NotFound(String),
2219}
2220
2221impl UpdateConfigurationError {
2222    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateConfigurationError> {
2223        if let Some(err) = proto::json::Error::parse_rest(&res) {
2224            match err.typ.as_str() {
2225                "BadRequestException" => {
2226                    return RusotoError::Service(UpdateConfigurationError::BadRequest(err.msg))
2227                }
2228                "ConflictException" => {
2229                    return RusotoError::Service(UpdateConfigurationError::Conflict(err.msg))
2230                }
2231                "ForbiddenException" => {
2232                    return RusotoError::Service(UpdateConfigurationError::Forbidden(err.msg))
2233                }
2234                "InternalServerErrorException" => {
2235                    return RusotoError::Service(UpdateConfigurationError::InternalServerError(
2236                        err.msg,
2237                    ))
2238                }
2239                "NotFoundException" => {
2240                    return RusotoError::Service(UpdateConfigurationError::NotFound(err.msg))
2241                }
2242                "ValidationException" => return RusotoError::Validation(err.msg),
2243                _ => {}
2244            }
2245        }
2246        RusotoError::Unknown(res)
2247    }
2248}
2249impl fmt::Display for UpdateConfigurationError {
2250    #[allow(unused_variables)]
2251    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2252        match *self {
2253            UpdateConfigurationError::BadRequest(ref cause) => write!(f, "{}", cause),
2254            UpdateConfigurationError::Conflict(ref cause) => write!(f, "{}", cause),
2255            UpdateConfigurationError::Forbidden(ref cause) => write!(f, "{}", cause),
2256            UpdateConfigurationError::InternalServerError(ref cause) => write!(f, "{}", cause),
2257            UpdateConfigurationError::NotFound(ref cause) => write!(f, "{}", cause),
2258        }
2259    }
2260}
2261impl Error for UpdateConfigurationError {}
2262/// Errors returned by UpdateUser
2263#[derive(Debug, PartialEq)]
2264pub enum UpdateUserError {
2265    /// <p>Returns information about an error.</p>
2266    BadRequest(String),
2267    /// <p>Returns information about an error.</p>
2268    Conflict(String),
2269    /// <p>Returns information about an error.</p>
2270    Forbidden(String),
2271    /// <p>Returns information about an error.</p>
2272    InternalServerError(String),
2273    /// <p>Returns information about an error.</p>
2274    NotFound(String),
2275}
2276
2277impl UpdateUserError {
2278    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserError> {
2279        if let Some(err) = proto::json::Error::parse_rest(&res) {
2280            match err.typ.as_str() {
2281                "BadRequestException" => {
2282                    return RusotoError::Service(UpdateUserError::BadRequest(err.msg))
2283                }
2284                "ConflictException" => {
2285                    return RusotoError::Service(UpdateUserError::Conflict(err.msg))
2286                }
2287                "ForbiddenException" => {
2288                    return RusotoError::Service(UpdateUserError::Forbidden(err.msg))
2289                }
2290                "InternalServerErrorException" => {
2291                    return RusotoError::Service(UpdateUserError::InternalServerError(err.msg))
2292                }
2293                "NotFoundException" => {
2294                    return RusotoError::Service(UpdateUserError::NotFound(err.msg))
2295                }
2296                "ValidationException" => return RusotoError::Validation(err.msg),
2297                _ => {}
2298            }
2299        }
2300        RusotoError::Unknown(res)
2301    }
2302}
2303impl fmt::Display for UpdateUserError {
2304    #[allow(unused_variables)]
2305    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2306        match *self {
2307            UpdateUserError::BadRequest(ref cause) => write!(f, "{}", cause),
2308            UpdateUserError::Conflict(ref cause) => write!(f, "{}", cause),
2309            UpdateUserError::Forbidden(ref cause) => write!(f, "{}", cause),
2310            UpdateUserError::InternalServerError(ref cause) => write!(f, "{}", cause),
2311            UpdateUserError::NotFound(ref cause) => write!(f, "{}", cause),
2312        }
2313    }
2314}
2315impl Error for UpdateUserError {}
2316/// Trait representing the capabilities of the AmazonMQ API. AmazonMQ clients implement this trait.
2317#[async_trait]
2318pub trait MQ {
2319    /// <p>Creates a broker. Note: This API is asynchronous.</p>
2320    async fn create_broker(
2321        &self,
2322        input: CreateBrokerRequest,
2323    ) -> Result<CreateBrokerResponse, RusotoError<CreateBrokerError>>;
2324
2325    /// <p>Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).</p>
2326    async fn create_configuration(
2327        &self,
2328        input: CreateConfigurationRequest,
2329    ) -> Result<CreateConfigurationResponse, RusotoError<CreateConfigurationError>>;
2330
2331    /// <p>Add a tag to a resource.</p>
2332    async fn create_tags(
2333        &self,
2334        input: CreateTagsRequest,
2335    ) -> Result<(), RusotoError<CreateTagsError>>;
2336
2337    /// <p>Creates an ActiveMQ user.</p>
2338    async fn create_user(
2339        &self,
2340        input: CreateUserRequest,
2341    ) -> Result<CreateUserResponse, RusotoError<CreateUserError>>;
2342
2343    /// <p>Deletes a broker. Note: This API is asynchronous.</p>
2344    async fn delete_broker(
2345        &self,
2346        input: DeleteBrokerRequest,
2347    ) -> Result<DeleteBrokerResponse, RusotoError<DeleteBrokerError>>;
2348
2349    /// <p>Removes a tag from a resource.</p>
2350    async fn delete_tags(
2351        &self,
2352        input: DeleteTagsRequest,
2353    ) -> Result<(), RusotoError<DeleteTagsError>>;
2354
2355    /// <p>Deletes an ActiveMQ user.</p>
2356    async fn delete_user(
2357        &self,
2358        input: DeleteUserRequest,
2359    ) -> Result<DeleteUserResponse, RusotoError<DeleteUserError>>;
2360
2361    /// <p>Returns information about the specified broker.</p>
2362    async fn describe_broker(
2363        &self,
2364        input: DescribeBrokerRequest,
2365    ) -> Result<DescribeBrokerResponse, RusotoError<DescribeBrokerError>>;
2366
2367    /// <p>Describe available engine types and versions.</p>
2368    async fn describe_broker_engine_types(
2369        &self,
2370        input: DescribeBrokerEngineTypesRequest,
2371    ) -> Result<DescribeBrokerEngineTypesResponse, RusotoError<DescribeBrokerEngineTypesError>>;
2372
2373    /// <p>Describe available broker instance options.</p>
2374    async fn describe_broker_instance_options(
2375        &self,
2376        input: DescribeBrokerInstanceOptionsRequest,
2377    ) -> Result<
2378        DescribeBrokerInstanceOptionsResponse,
2379        RusotoError<DescribeBrokerInstanceOptionsError>,
2380    >;
2381
2382    /// <p>Returns information about the specified configuration.</p>
2383    async fn describe_configuration(
2384        &self,
2385        input: DescribeConfigurationRequest,
2386    ) -> Result<DescribeConfigurationResponse, RusotoError<DescribeConfigurationError>>;
2387
2388    /// <p>Returns the specified configuration revision for the specified configuration.</p>
2389    async fn describe_configuration_revision(
2390        &self,
2391        input: DescribeConfigurationRevisionRequest,
2392    ) -> Result<
2393        DescribeConfigurationRevisionResponse,
2394        RusotoError<DescribeConfigurationRevisionError>,
2395    >;
2396
2397    /// <p>Returns information about an ActiveMQ user.</p>
2398    async fn describe_user(
2399        &self,
2400        input: DescribeUserRequest,
2401    ) -> Result<DescribeUserResponse, RusotoError<DescribeUserError>>;
2402
2403    /// <p>Returns a list of all brokers.</p>
2404    async fn list_brokers(
2405        &self,
2406        input: ListBrokersRequest,
2407    ) -> Result<ListBrokersResponse, RusotoError<ListBrokersError>>;
2408
2409    /// <p>Returns a list of all revisions for the specified configuration.</p>
2410    async fn list_configuration_revisions(
2411        &self,
2412        input: ListConfigurationRevisionsRequest,
2413    ) -> Result<ListConfigurationRevisionsResponse, RusotoError<ListConfigurationRevisionsError>>;
2414
2415    /// <p>Returns a list of all configurations.</p>
2416    async fn list_configurations(
2417        &self,
2418        input: ListConfigurationsRequest,
2419    ) -> Result<ListConfigurationsResponse, RusotoError<ListConfigurationsError>>;
2420
2421    /// <p>Lists tags for a resource.</p>
2422    async fn list_tags(
2423        &self,
2424        input: ListTagsRequest,
2425    ) -> Result<ListTagsResponse, RusotoError<ListTagsError>>;
2426
2427    /// <p>Returns a list of all ActiveMQ users.</p>
2428    async fn list_users(
2429        &self,
2430        input: ListUsersRequest,
2431    ) -> Result<ListUsersResponse, RusotoError<ListUsersError>>;
2432
2433    /// <p>Reboots a broker. Note: This API is asynchronous.</p>
2434    async fn reboot_broker(
2435        &self,
2436        input: RebootBrokerRequest,
2437    ) -> Result<RebootBrokerResponse, RusotoError<RebootBrokerError>>;
2438
2439    /// <p>Adds a pending configuration change to a broker.</p>
2440    async fn update_broker(
2441        &self,
2442        input: UpdateBrokerRequest,
2443    ) -> Result<UpdateBrokerResponse, RusotoError<UpdateBrokerError>>;
2444
2445    /// <p>Updates the specified configuration.</p>
2446    async fn update_configuration(
2447        &self,
2448        input: UpdateConfigurationRequest,
2449    ) -> Result<UpdateConfigurationResponse, RusotoError<UpdateConfigurationError>>;
2450
2451    /// <p>Updates the information for an ActiveMQ user.</p>
2452    async fn update_user(
2453        &self,
2454        input: UpdateUserRequest,
2455    ) -> Result<UpdateUserResponse, RusotoError<UpdateUserError>>;
2456}
2457/// A client for the AmazonMQ API.
2458#[derive(Clone)]
2459pub struct MQClient {
2460    client: Client,
2461    region: region::Region,
2462}
2463
2464impl MQClient {
2465    /// Creates a client backed by the default tokio event loop.
2466    ///
2467    /// The client will use the default credentials provider and tls client.
2468    pub fn new(region: region::Region) -> MQClient {
2469        MQClient {
2470            client: Client::shared(),
2471            region,
2472        }
2473    }
2474
2475    pub fn new_with<P, D>(
2476        request_dispatcher: D,
2477        credentials_provider: P,
2478        region: region::Region,
2479    ) -> MQClient
2480    where
2481        P: ProvideAwsCredentials + Send + Sync + 'static,
2482        D: DispatchSignedRequest + Send + Sync + 'static,
2483    {
2484        MQClient {
2485            client: Client::new_with(credentials_provider, request_dispatcher),
2486            region,
2487        }
2488    }
2489
2490    pub fn new_with_client(client: Client, region: region::Region) -> MQClient {
2491        MQClient { client, region }
2492    }
2493}
2494
2495#[async_trait]
2496impl MQ for MQClient {
2497    /// <p>Creates a broker. Note: This API is asynchronous.</p>
2498    #[allow(unused_mut)]
2499    async fn create_broker(
2500        &self,
2501        input: CreateBrokerRequest,
2502    ) -> Result<CreateBrokerResponse, RusotoError<CreateBrokerError>> {
2503        let request_uri = "/v1/brokers";
2504
2505        let mut request = SignedRequest::new("POST", "mq", &self.region, &request_uri);
2506        request.set_content_type("application/x-amz-json-1.1".to_owned());
2507
2508        let encoded = Some(serde_json::to_vec(&input).unwrap());
2509        request.set_payload(encoded);
2510
2511        let mut response = self
2512            .client
2513            .sign_and_dispatch(request)
2514            .await
2515            .map_err(RusotoError::from)?;
2516        if response.status.as_u16() == 200 {
2517            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2518            let result = proto::json::ResponsePayload::new(&response)
2519                .deserialize::<CreateBrokerResponse, _>()?;
2520
2521            Ok(result)
2522        } else {
2523            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2524            Err(CreateBrokerError::from_response(response))
2525        }
2526    }
2527
2528    /// <p>Creates a new configuration for the specified configuration name. Amazon MQ uses the default configuration (the engine type and version).</p>
2529    #[allow(unused_mut)]
2530    async fn create_configuration(
2531        &self,
2532        input: CreateConfigurationRequest,
2533    ) -> Result<CreateConfigurationResponse, RusotoError<CreateConfigurationError>> {
2534        let request_uri = "/v1/configurations";
2535
2536        let mut request = SignedRequest::new("POST", "mq", &self.region, &request_uri);
2537        request.set_content_type("application/x-amz-json-1.1".to_owned());
2538
2539        let encoded = Some(serde_json::to_vec(&input).unwrap());
2540        request.set_payload(encoded);
2541
2542        let mut response = self
2543            .client
2544            .sign_and_dispatch(request)
2545            .await
2546            .map_err(RusotoError::from)?;
2547        if response.status.as_u16() == 200 {
2548            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2549            let result = proto::json::ResponsePayload::new(&response)
2550                .deserialize::<CreateConfigurationResponse, _>()?;
2551
2552            Ok(result)
2553        } else {
2554            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2555            Err(CreateConfigurationError::from_response(response))
2556        }
2557    }
2558
2559    /// <p>Add a tag to a resource.</p>
2560    #[allow(unused_mut)]
2561    async fn create_tags(
2562        &self,
2563        input: CreateTagsRequest,
2564    ) -> Result<(), RusotoError<CreateTagsError>> {
2565        let request_uri = format!("/v1/tags/{resource_arn}", resource_arn = input.resource_arn);
2566
2567        let mut request = SignedRequest::new("POST", "mq", &self.region, &request_uri);
2568        request.set_content_type("application/x-amz-json-1.1".to_owned());
2569
2570        let encoded = Some(serde_json::to_vec(&input).unwrap());
2571        request.set_payload(encoded);
2572
2573        let mut response = self
2574            .client
2575            .sign_and_dispatch(request)
2576            .await
2577            .map_err(RusotoError::from)?;
2578        if response.status.as_u16() == 204 {
2579            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2580            let result = ::std::mem::drop(response);
2581
2582            Ok(result)
2583        } else {
2584            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2585            Err(CreateTagsError::from_response(response))
2586        }
2587    }
2588
2589    /// <p>Creates an ActiveMQ user.</p>
2590    #[allow(unused_mut)]
2591    async fn create_user(
2592        &self,
2593        input: CreateUserRequest,
2594    ) -> Result<CreateUserResponse, RusotoError<CreateUserError>> {
2595        let request_uri = format!(
2596            "/v1/brokers/{broker_id}/users/{username}",
2597            broker_id = input.broker_id,
2598            username = input.username
2599        );
2600
2601        let mut request = SignedRequest::new("POST", "mq", &self.region, &request_uri);
2602        request.set_content_type("application/x-amz-json-1.1".to_owned());
2603
2604        let encoded = Some(serde_json::to_vec(&input).unwrap());
2605        request.set_payload(encoded);
2606
2607        let mut response = self
2608            .client
2609            .sign_and_dispatch(request)
2610            .await
2611            .map_err(RusotoError::from)?;
2612        if response.status.as_u16() == 200 {
2613            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2614            let result = proto::json::ResponsePayload::new(&response)
2615                .deserialize::<CreateUserResponse, _>()?;
2616
2617            Ok(result)
2618        } else {
2619            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2620            Err(CreateUserError::from_response(response))
2621        }
2622    }
2623
2624    /// <p>Deletes a broker. Note: This API is asynchronous.</p>
2625    #[allow(unused_mut)]
2626    async fn delete_broker(
2627        &self,
2628        input: DeleteBrokerRequest,
2629    ) -> Result<DeleteBrokerResponse, RusotoError<DeleteBrokerError>> {
2630        let request_uri = format!("/v1/brokers/{broker_id}", broker_id = input.broker_id);
2631
2632        let mut request = SignedRequest::new("DELETE", "mq", &self.region, &request_uri);
2633        request.set_content_type("application/x-amz-json-1.1".to_owned());
2634
2635        let mut response = self
2636            .client
2637            .sign_and_dispatch(request)
2638            .await
2639            .map_err(RusotoError::from)?;
2640        if response.status.as_u16() == 200 {
2641            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2642            let result = proto::json::ResponsePayload::new(&response)
2643                .deserialize::<DeleteBrokerResponse, _>()?;
2644
2645            Ok(result)
2646        } else {
2647            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2648            Err(DeleteBrokerError::from_response(response))
2649        }
2650    }
2651
2652    /// <p>Removes a tag from a resource.</p>
2653    #[allow(unused_mut)]
2654    async fn delete_tags(
2655        &self,
2656        input: DeleteTagsRequest,
2657    ) -> Result<(), RusotoError<DeleteTagsError>> {
2658        let request_uri = format!("/v1/tags/{resource_arn}", resource_arn = input.resource_arn);
2659
2660        let mut request = SignedRequest::new("DELETE", "mq", &self.region, &request_uri);
2661        request.set_content_type("application/x-amz-json-1.1".to_owned());
2662
2663        let mut params = Params::new();
2664        for item in input.tag_keys.iter() {
2665            params.put("tagKeys", item);
2666        }
2667        request.set_params(params);
2668
2669        let mut response = self
2670            .client
2671            .sign_and_dispatch(request)
2672            .await
2673            .map_err(RusotoError::from)?;
2674        if response.status.as_u16() == 204 {
2675            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2676            let result = ::std::mem::drop(response);
2677
2678            Ok(result)
2679        } else {
2680            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2681            Err(DeleteTagsError::from_response(response))
2682        }
2683    }
2684
2685    /// <p>Deletes an ActiveMQ user.</p>
2686    #[allow(unused_mut)]
2687    async fn delete_user(
2688        &self,
2689        input: DeleteUserRequest,
2690    ) -> Result<DeleteUserResponse, RusotoError<DeleteUserError>> {
2691        let request_uri = format!(
2692            "/v1/brokers/{broker_id}/users/{username}",
2693            broker_id = input.broker_id,
2694            username = input.username
2695        );
2696
2697        let mut request = SignedRequest::new("DELETE", "mq", &self.region, &request_uri);
2698        request.set_content_type("application/x-amz-json-1.1".to_owned());
2699
2700        let mut response = self
2701            .client
2702            .sign_and_dispatch(request)
2703            .await
2704            .map_err(RusotoError::from)?;
2705        if response.status.as_u16() == 200 {
2706            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2707            let result = proto::json::ResponsePayload::new(&response)
2708                .deserialize::<DeleteUserResponse, _>()?;
2709
2710            Ok(result)
2711        } else {
2712            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2713            Err(DeleteUserError::from_response(response))
2714        }
2715    }
2716
2717    /// <p>Returns information about the specified broker.</p>
2718    #[allow(unused_mut)]
2719    async fn describe_broker(
2720        &self,
2721        input: DescribeBrokerRequest,
2722    ) -> Result<DescribeBrokerResponse, RusotoError<DescribeBrokerError>> {
2723        let request_uri = format!("/v1/brokers/{broker_id}", broker_id = input.broker_id);
2724
2725        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
2726        request.set_content_type("application/x-amz-json-1.1".to_owned());
2727
2728        let mut response = self
2729            .client
2730            .sign_and_dispatch(request)
2731            .await
2732            .map_err(RusotoError::from)?;
2733        if response.status.as_u16() == 200 {
2734            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2735            let result = proto::json::ResponsePayload::new(&response)
2736                .deserialize::<DescribeBrokerResponse, _>()?;
2737
2738            Ok(result)
2739        } else {
2740            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2741            Err(DescribeBrokerError::from_response(response))
2742        }
2743    }
2744
2745    /// <p>Describe available engine types and versions.</p>
2746    #[allow(unused_mut)]
2747    async fn describe_broker_engine_types(
2748        &self,
2749        input: DescribeBrokerEngineTypesRequest,
2750    ) -> Result<DescribeBrokerEngineTypesResponse, RusotoError<DescribeBrokerEngineTypesError>>
2751    {
2752        let request_uri = "/v1/broker-engine-types";
2753
2754        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
2755        request.set_content_type("application/x-amz-json-1.1".to_owned());
2756
2757        let mut params = Params::new();
2758        if let Some(ref x) = input.engine_type {
2759            params.put("engineType", x);
2760        }
2761        if let Some(ref x) = input.max_results {
2762            params.put("maxResults", x);
2763        }
2764        if let Some(ref x) = input.next_token {
2765            params.put("nextToken", x);
2766        }
2767        request.set_params(params);
2768
2769        let mut response = self
2770            .client
2771            .sign_and_dispatch(request)
2772            .await
2773            .map_err(RusotoError::from)?;
2774        if response.status.as_u16() == 200 {
2775            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2776            let result = proto::json::ResponsePayload::new(&response)
2777                .deserialize::<DescribeBrokerEngineTypesResponse, _>()?;
2778
2779            Ok(result)
2780        } else {
2781            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2782            Err(DescribeBrokerEngineTypesError::from_response(response))
2783        }
2784    }
2785
2786    /// <p>Describe available broker instance options.</p>
2787    #[allow(unused_mut)]
2788    async fn describe_broker_instance_options(
2789        &self,
2790        input: DescribeBrokerInstanceOptionsRequest,
2791    ) -> Result<
2792        DescribeBrokerInstanceOptionsResponse,
2793        RusotoError<DescribeBrokerInstanceOptionsError>,
2794    > {
2795        let request_uri = "/v1/broker-instance-options";
2796
2797        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
2798        request.set_content_type("application/x-amz-json-1.1".to_owned());
2799
2800        let mut params = Params::new();
2801        if let Some(ref x) = input.engine_type {
2802            params.put("engineType", x);
2803        }
2804        if let Some(ref x) = input.host_instance_type {
2805            params.put("hostInstanceType", x);
2806        }
2807        if let Some(ref x) = input.max_results {
2808            params.put("maxResults", x);
2809        }
2810        if let Some(ref x) = input.next_token {
2811            params.put("nextToken", x);
2812        }
2813        if let Some(ref x) = input.storage_type {
2814            params.put("storageType", x);
2815        }
2816        request.set_params(params);
2817
2818        let mut response = self
2819            .client
2820            .sign_and_dispatch(request)
2821            .await
2822            .map_err(RusotoError::from)?;
2823        if response.status.as_u16() == 200 {
2824            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2825            let result = proto::json::ResponsePayload::new(&response)
2826                .deserialize::<DescribeBrokerInstanceOptionsResponse, _>()?;
2827
2828            Ok(result)
2829        } else {
2830            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2831            Err(DescribeBrokerInstanceOptionsError::from_response(response))
2832        }
2833    }
2834
2835    /// <p>Returns information about the specified configuration.</p>
2836    #[allow(unused_mut)]
2837    async fn describe_configuration(
2838        &self,
2839        input: DescribeConfigurationRequest,
2840    ) -> Result<DescribeConfigurationResponse, RusotoError<DescribeConfigurationError>> {
2841        let request_uri = format!(
2842            "/v1/configurations/{configuration_id}",
2843            configuration_id = input.configuration_id
2844        );
2845
2846        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
2847        request.set_content_type("application/x-amz-json-1.1".to_owned());
2848
2849        let mut response = self
2850            .client
2851            .sign_and_dispatch(request)
2852            .await
2853            .map_err(RusotoError::from)?;
2854        if response.status.as_u16() == 200 {
2855            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2856            let result = proto::json::ResponsePayload::new(&response)
2857                .deserialize::<DescribeConfigurationResponse, _>()?;
2858
2859            Ok(result)
2860        } else {
2861            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2862            Err(DescribeConfigurationError::from_response(response))
2863        }
2864    }
2865
2866    /// <p>Returns the specified configuration revision for the specified configuration.</p>
2867    #[allow(unused_mut)]
2868    async fn describe_configuration_revision(
2869        &self,
2870        input: DescribeConfigurationRevisionRequest,
2871    ) -> Result<
2872        DescribeConfigurationRevisionResponse,
2873        RusotoError<DescribeConfigurationRevisionError>,
2874    > {
2875        let request_uri = format!(
2876            "/v1/configurations/{configuration_id}/revisions/{configuration_revision}",
2877            configuration_id = input.configuration_id,
2878            configuration_revision = input.configuration_revision
2879        );
2880
2881        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
2882        request.set_content_type("application/x-amz-json-1.1".to_owned());
2883
2884        let mut response = self
2885            .client
2886            .sign_and_dispatch(request)
2887            .await
2888            .map_err(RusotoError::from)?;
2889        if response.status.as_u16() == 200 {
2890            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2891            let result = proto::json::ResponsePayload::new(&response)
2892                .deserialize::<DescribeConfigurationRevisionResponse, _>()?;
2893
2894            Ok(result)
2895        } else {
2896            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2897            Err(DescribeConfigurationRevisionError::from_response(response))
2898        }
2899    }
2900
2901    /// <p>Returns information about an ActiveMQ user.</p>
2902    #[allow(unused_mut)]
2903    async fn describe_user(
2904        &self,
2905        input: DescribeUserRequest,
2906    ) -> Result<DescribeUserResponse, RusotoError<DescribeUserError>> {
2907        let request_uri = format!(
2908            "/v1/brokers/{broker_id}/users/{username}",
2909            broker_id = input.broker_id,
2910            username = input.username
2911        );
2912
2913        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
2914        request.set_content_type("application/x-amz-json-1.1".to_owned());
2915
2916        let mut response = self
2917            .client
2918            .sign_and_dispatch(request)
2919            .await
2920            .map_err(RusotoError::from)?;
2921        if response.status.as_u16() == 200 {
2922            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2923            let result = proto::json::ResponsePayload::new(&response)
2924                .deserialize::<DescribeUserResponse, _>()?;
2925
2926            Ok(result)
2927        } else {
2928            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2929            Err(DescribeUserError::from_response(response))
2930        }
2931    }
2932
2933    /// <p>Returns a list of all brokers.</p>
2934    #[allow(unused_mut)]
2935    async fn list_brokers(
2936        &self,
2937        input: ListBrokersRequest,
2938    ) -> Result<ListBrokersResponse, RusotoError<ListBrokersError>> {
2939        let request_uri = "/v1/brokers";
2940
2941        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
2942        request.set_content_type("application/x-amz-json-1.1".to_owned());
2943
2944        let mut params = Params::new();
2945        if let Some(ref x) = input.max_results {
2946            params.put("maxResults", x);
2947        }
2948        if let Some(ref x) = input.next_token {
2949            params.put("nextToken", x);
2950        }
2951        request.set_params(params);
2952
2953        let mut response = self
2954            .client
2955            .sign_and_dispatch(request)
2956            .await
2957            .map_err(RusotoError::from)?;
2958        if response.status.as_u16() == 200 {
2959            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2960            let result = proto::json::ResponsePayload::new(&response)
2961                .deserialize::<ListBrokersResponse, _>()?;
2962
2963            Ok(result)
2964        } else {
2965            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2966            Err(ListBrokersError::from_response(response))
2967        }
2968    }
2969
2970    /// <p>Returns a list of all revisions for the specified configuration.</p>
2971    #[allow(unused_mut)]
2972    async fn list_configuration_revisions(
2973        &self,
2974        input: ListConfigurationRevisionsRequest,
2975    ) -> Result<ListConfigurationRevisionsResponse, RusotoError<ListConfigurationRevisionsError>>
2976    {
2977        let request_uri = format!(
2978            "/v1/configurations/{configuration_id}/revisions",
2979            configuration_id = input.configuration_id
2980        );
2981
2982        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
2983        request.set_content_type("application/x-amz-json-1.1".to_owned());
2984
2985        let mut params = Params::new();
2986        if let Some(ref x) = input.max_results {
2987            params.put("maxResults", x);
2988        }
2989        if let Some(ref x) = input.next_token {
2990            params.put("nextToken", x);
2991        }
2992        request.set_params(params);
2993
2994        let mut response = self
2995            .client
2996            .sign_and_dispatch(request)
2997            .await
2998            .map_err(RusotoError::from)?;
2999        if response.status.as_u16() == 200 {
3000            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3001            let result = proto::json::ResponsePayload::new(&response)
3002                .deserialize::<ListConfigurationRevisionsResponse, _>()?;
3003
3004            Ok(result)
3005        } else {
3006            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3007            Err(ListConfigurationRevisionsError::from_response(response))
3008        }
3009    }
3010
3011    /// <p>Returns a list of all configurations.</p>
3012    #[allow(unused_mut)]
3013    async fn list_configurations(
3014        &self,
3015        input: ListConfigurationsRequest,
3016    ) -> Result<ListConfigurationsResponse, RusotoError<ListConfigurationsError>> {
3017        let request_uri = "/v1/configurations";
3018
3019        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
3020        request.set_content_type("application/x-amz-json-1.1".to_owned());
3021
3022        let mut params = Params::new();
3023        if let Some(ref x) = input.max_results {
3024            params.put("maxResults", x);
3025        }
3026        if let Some(ref x) = input.next_token {
3027            params.put("nextToken", x);
3028        }
3029        request.set_params(params);
3030
3031        let mut response = self
3032            .client
3033            .sign_and_dispatch(request)
3034            .await
3035            .map_err(RusotoError::from)?;
3036        if response.status.as_u16() == 200 {
3037            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3038            let result = proto::json::ResponsePayload::new(&response)
3039                .deserialize::<ListConfigurationsResponse, _>()?;
3040
3041            Ok(result)
3042        } else {
3043            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3044            Err(ListConfigurationsError::from_response(response))
3045        }
3046    }
3047
3048    /// <p>Lists tags for a resource.</p>
3049    #[allow(unused_mut)]
3050    async fn list_tags(
3051        &self,
3052        input: ListTagsRequest,
3053    ) -> Result<ListTagsResponse, RusotoError<ListTagsError>> {
3054        let request_uri = format!("/v1/tags/{resource_arn}", resource_arn = input.resource_arn);
3055
3056        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
3057        request.set_content_type("application/x-amz-json-1.1".to_owned());
3058
3059        let mut response = self
3060            .client
3061            .sign_and_dispatch(request)
3062            .await
3063            .map_err(RusotoError::from)?;
3064        if response.status.as_u16() == 200 {
3065            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3066            let result = proto::json::ResponsePayload::new(&response)
3067                .deserialize::<ListTagsResponse, _>()?;
3068
3069            Ok(result)
3070        } else {
3071            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3072            Err(ListTagsError::from_response(response))
3073        }
3074    }
3075
3076    /// <p>Returns a list of all ActiveMQ users.</p>
3077    #[allow(unused_mut)]
3078    async fn list_users(
3079        &self,
3080        input: ListUsersRequest,
3081    ) -> Result<ListUsersResponse, RusotoError<ListUsersError>> {
3082        let request_uri = format!("/v1/brokers/{broker_id}/users", broker_id = input.broker_id);
3083
3084        let mut request = SignedRequest::new("GET", "mq", &self.region, &request_uri);
3085        request.set_content_type("application/x-amz-json-1.1".to_owned());
3086
3087        let mut params = Params::new();
3088        if let Some(ref x) = input.max_results {
3089            params.put("maxResults", x);
3090        }
3091        if let Some(ref x) = input.next_token {
3092            params.put("nextToken", x);
3093        }
3094        request.set_params(params);
3095
3096        let mut response = self
3097            .client
3098            .sign_and_dispatch(request)
3099            .await
3100            .map_err(RusotoError::from)?;
3101        if response.status.as_u16() == 200 {
3102            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3103            let result = proto::json::ResponsePayload::new(&response)
3104                .deserialize::<ListUsersResponse, _>()?;
3105
3106            Ok(result)
3107        } else {
3108            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3109            Err(ListUsersError::from_response(response))
3110        }
3111    }
3112
3113    /// <p>Reboots a broker. Note: This API is asynchronous.</p>
3114    #[allow(unused_mut)]
3115    async fn reboot_broker(
3116        &self,
3117        input: RebootBrokerRequest,
3118    ) -> Result<RebootBrokerResponse, RusotoError<RebootBrokerError>> {
3119        let request_uri = format!(
3120            "/v1/brokers/{broker_id}/reboot",
3121            broker_id = input.broker_id
3122        );
3123
3124        let mut request = SignedRequest::new("POST", "mq", &self.region, &request_uri);
3125        request.set_content_type("application/x-amz-json-1.1".to_owned());
3126
3127        let mut response = self
3128            .client
3129            .sign_and_dispatch(request)
3130            .await
3131            .map_err(RusotoError::from)?;
3132        if response.status.as_u16() == 200 {
3133            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3134            let result = proto::json::ResponsePayload::new(&response)
3135                .deserialize::<RebootBrokerResponse, _>()?;
3136
3137            Ok(result)
3138        } else {
3139            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3140            Err(RebootBrokerError::from_response(response))
3141        }
3142    }
3143
3144    /// <p>Adds a pending configuration change to a broker.</p>
3145    #[allow(unused_mut)]
3146    async fn update_broker(
3147        &self,
3148        input: UpdateBrokerRequest,
3149    ) -> Result<UpdateBrokerResponse, RusotoError<UpdateBrokerError>> {
3150        let request_uri = format!("/v1/brokers/{broker_id}", broker_id = input.broker_id);
3151
3152        let mut request = SignedRequest::new("PUT", "mq", &self.region, &request_uri);
3153        request.set_content_type("application/x-amz-json-1.1".to_owned());
3154
3155        let encoded = Some(serde_json::to_vec(&input).unwrap());
3156        request.set_payload(encoded);
3157
3158        let mut response = self
3159            .client
3160            .sign_and_dispatch(request)
3161            .await
3162            .map_err(RusotoError::from)?;
3163        if response.status.as_u16() == 200 {
3164            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3165            let result = proto::json::ResponsePayload::new(&response)
3166                .deserialize::<UpdateBrokerResponse, _>()?;
3167
3168            Ok(result)
3169        } else {
3170            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3171            Err(UpdateBrokerError::from_response(response))
3172        }
3173    }
3174
3175    /// <p>Updates the specified configuration.</p>
3176    #[allow(unused_mut)]
3177    async fn update_configuration(
3178        &self,
3179        input: UpdateConfigurationRequest,
3180    ) -> Result<UpdateConfigurationResponse, RusotoError<UpdateConfigurationError>> {
3181        let request_uri = format!(
3182            "/v1/configurations/{configuration_id}",
3183            configuration_id = input.configuration_id
3184        );
3185
3186        let mut request = SignedRequest::new("PUT", "mq", &self.region, &request_uri);
3187        request.set_content_type("application/x-amz-json-1.1".to_owned());
3188
3189        let encoded = Some(serde_json::to_vec(&input).unwrap());
3190        request.set_payload(encoded);
3191
3192        let mut response = self
3193            .client
3194            .sign_and_dispatch(request)
3195            .await
3196            .map_err(RusotoError::from)?;
3197        if response.status.as_u16() == 200 {
3198            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3199            let result = proto::json::ResponsePayload::new(&response)
3200                .deserialize::<UpdateConfigurationResponse, _>()?;
3201
3202            Ok(result)
3203        } else {
3204            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3205            Err(UpdateConfigurationError::from_response(response))
3206        }
3207    }
3208
3209    /// <p>Updates the information for an ActiveMQ user.</p>
3210    #[allow(unused_mut)]
3211    async fn update_user(
3212        &self,
3213        input: UpdateUserRequest,
3214    ) -> Result<UpdateUserResponse, RusotoError<UpdateUserError>> {
3215        let request_uri = format!(
3216            "/v1/brokers/{broker_id}/users/{username}",
3217            broker_id = input.broker_id,
3218            username = input.username
3219        );
3220
3221        let mut request = SignedRequest::new("PUT", "mq", &self.region, &request_uri);
3222        request.set_content_type("application/x-amz-json-1.1".to_owned());
3223
3224        let encoded = Some(serde_json::to_vec(&input).unwrap());
3225        request.set_payload(encoded);
3226
3227        let mut response = self
3228            .client
3229            .sign_and_dispatch(request)
3230            .await
3231            .map_err(RusotoError::from)?;
3232        if response.status.as_u16() == 200 {
3233            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3234            let result = proto::json::ResponsePayload::new(&response)
3235                .deserialize::<UpdateUserResponse, _>()?;
3236
3237            Ok(result)
3238        } else {
3239            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3240            Err(UpdateUserError::from_response(response))
3241        }
3242    }
3243}