1use 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
29#[derive(Clone, Debug, Default, PartialEq, Serialize)]
30#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
31pub struct CreateDiscovererRequest {
32 #[serde(rename = "Description")]
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub description: Option<String>,
36 #[serde(rename = "SourceArn")]
38 pub source_arn: String,
39 #[serde(rename = "Tags")]
41 #[serde(skip_serializing_if = "Option::is_none")]
42 pub tags: Option<::std::collections::HashMap<String, String>>,
43}
44
45#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
46#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
47pub struct CreateDiscovererResponse {
48 #[serde(rename = "Description")]
50 #[serde(skip_serializing_if = "Option::is_none")]
51 pub description: Option<String>,
52 #[serde(rename = "DiscovererArn")]
54 #[serde(skip_serializing_if = "Option::is_none")]
55 pub discoverer_arn: Option<String>,
56 #[serde(rename = "DiscovererId")]
58 #[serde(skip_serializing_if = "Option::is_none")]
59 pub discoverer_id: Option<String>,
60 #[serde(rename = "SourceArn")]
62 #[serde(skip_serializing_if = "Option::is_none")]
63 pub source_arn: Option<String>,
64 #[serde(rename = "State")]
66 #[serde(skip_serializing_if = "Option::is_none")]
67 pub state: Option<String>,
68 #[serde(rename = "Tags")]
70 #[serde(skip_serializing_if = "Option::is_none")]
71 pub tags: Option<::std::collections::HashMap<String, String>>,
72}
73
74#[derive(Clone, Debug, Default, PartialEq, Serialize)]
75#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
76pub struct CreateRegistryRequest {
77 #[serde(rename = "Description")]
79 #[serde(skip_serializing_if = "Option::is_none")]
80 pub description: Option<String>,
81 #[serde(rename = "RegistryName")]
83 pub registry_name: String,
84 #[serde(rename = "Tags")]
86 #[serde(skip_serializing_if = "Option::is_none")]
87 pub tags: Option<::std::collections::HashMap<String, String>>,
88}
89
90#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
91#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
92pub struct CreateRegistryResponse {
93 #[serde(rename = "Description")]
95 #[serde(skip_serializing_if = "Option::is_none")]
96 pub description: Option<String>,
97 #[serde(rename = "RegistryArn")]
99 #[serde(skip_serializing_if = "Option::is_none")]
100 pub registry_arn: Option<String>,
101 #[serde(rename = "RegistryName")]
103 #[serde(skip_serializing_if = "Option::is_none")]
104 pub registry_name: Option<String>,
105 #[serde(rename = "Tags")]
107 #[serde(skip_serializing_if = "Option::is_none")]
108 pub tags: Option<::std::collections::HashMap<String, String>>,
109}
110
111#[derive(Clone, Debug, Default, PartialEq, Serialize)]
112#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
113pub struct CreateSchemaRequest {
114 #[serde(rename = "Content")]
116 pub content: String,
117 #[serde(rename = "Description")]
119 #[serde(skip_serializing_if = "Option::is_none")]
120 pub description: Option<String>,
121 #[serde(rename = "RegistryName")]
123 pub registry_name: String,
124 #[serde(rename = "SchemaName")]
126 pub schema_name: String,
127 #[serde(rename = "Tags")]
129 #[serde(skip_serializing_if = "Option::is_none")]
130 pub tags: Option<::std::collections::HashMap<String, String>>,
131 #[serde(rename = "Type")]
133 pub type_: String,
134}
135
136#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
137#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
138pub struct CreateSchemaResponse {
139 #[serde(rename = "Description")]
141 #[serde(skip_serializing_if = "Option::is_none")]
142 pub description: Option<String>,
143 #[serde(rename = "LastModified")]
145 #[serde(skip_serializing_if = "Option::is_none")]
146 pub last_modified: Option<f64>,
147 #[serde(rename = "SchemaArn")]
149 #[serde(skip_serializing_if = "Option::is_none")]
150 pub schema_arn: Option<String>,
151 #[serde(rename = "SchemaName")]
153 #[serde(skip_serializing_if = "Option::is_none")]
154 pub schema_name: Option<String>,
155 #[serde(rename = "SchemaVersion")]
157 #[serde(skip_serializing_if = "Option::is_none")]
158 pub schema_version: Option<String>,
159 #[serde(rename = "Tags")]
160 #[serde(skip_serializing_if = "Option::is_none")]
161 pub tags: Option<::std::collections::HashMap<String, String>>,
162 #[serde(rename = "Type")]
164 #[serde(skip_serializing_if = "Option::is_none")]
165 pub type_: Option<String>,
166 #[serde(rename = "VersionCreatedDate")]
168 #[serde(skip_serializing_if = "Option::is_none")]
169 pub version_created_date: Option<f64>,
170}
171
172#[derive(Clone, Debug, Default, PartialEq, Serialize)]
173#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
174pub struct DeleteDiscovererRequest {
175 #[serde(rename = "DiscovererId")]
177 pub discoverer_id: String,
178}
179
180#[derive(Clone, Debug, Default, PartialEq, Serialize)]
181#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
182pub struct DeleteRegistryRequest {
183 #[serde(rename = "RegistryName")]
185 pub registry_name: String,
186}
187
188#[derive(Clone, Debug, Default, PartialEq, Serialize)]
189#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
190pub struct DeleteResourcePolicyRequest {
191 #[serde(rename = "RegistryName")]
193 #[serde(skip_serializing_if = "Option::is_none")]
194 pub registry_name: Option<String>,
195}
196
197#[derive(Clone, Debug, Default, PartialEq, Serialize)]
198#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
199pub struct DeleteSchemaRequest {
200 #[serde(rename = "RegistryName")]
202 pub registry_name: String,
203 #[serde(rename = "SchemaName")]
205 pub schema_name: String,
206}
207
208#[derive(Clone, Debug, Default, PartialEq, Serialize)]
209#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
210pub struct DeleteSchemaVersionRequest {
211 #[serde(rename = "RegistryName")]
213 pub registry_name: String,
214 #[serde(rename = "SchemaName")]
216 pub schema_name: String,
217 #[serde(rename = "SchemaVersion")]
219 pub schema_version: String,
220}
221
222#[derive(Clone, Debug, Default, PartialEq, Serialize)]
223#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
224pub struct DescribeCodeBindingRequest {
225 #[serde(rename = "Language")]
227 pub language: String,
228 #[serde(rename = "RegistryName")]
230 pub registry_name: String,
231 #[serde(rename = "SchemaName")]
233 pub schema_name: String,
234 #[serde(rename = "SchemaVersion")]
236 #[serde(skip_serializing_if = "Option::is_none")]
237 pub schema_version: Option<String>,
238}
239
240#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
241#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
242pub struct DescribeCodeBindingResponse {
243 #[serde(rename = "CreationDate")]
245 #[serde(skip_serializing_if = "Option::is_none")]
246 pub creation_date: Option<f64>,
247 #[serde(rename = "LastModified")]
249 #[serde(skip_serializing_if = "Option::is_none")]
250 pub last_modified: Option<f64>,
251 #[serde(rename = "SchemaVersion")]
253 #[serde(skip_serializing_if = "Option::is_none")]
254 pub schema_version: Option<String>,
255 #[serde(rename = "Status")]
257 #[serde(skip_serializing_if = "Option::is_none")]
258 pub status: Option<String>,
259}
260
261#[derive(Clone, Debug, Default, PartialEq, Serialize)]
262#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
263pub struct DescribeDiscovererRequest {
264 #[serde(rename = "DiscovererId")]
266 pub discoverer_id: String,
267}
268
269#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
270#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
271pub struct DescribeDiscovererResponse {
272 #[serde(rename = "Description")]
274 #[serde(skip_serializing_if = "Option::is_none")]
275 pub description: Option<String>,
276 #[serde(rename = "DiscovererArn")]
278 #[serde(skip_serializing_if = "Option::is_none")]
279 pub discoverer_arn: Option<String>,
280 #[serde(rename = "DiscovererId")]
282 #[serde(skip_serializing_if = "Option::is_none")]
283 pub discoverer_id: Option<String>,
284 #[serde(rename = "SourceArn")]
286 #[serde(skip_serializing_if = "Option::is_none")]
287 pub source_arn: Option<String>,
288 #[serde(rename = "State")]
290 #[serde(skip_serializing_if = "Option::is_none")]
291 pub state: Option<String>,
292 #[serde(rename = "Tags")]
294 #[serde(skip_serializing_if = "Option::is_none")]
295 pub tags: Option<::std::collections::HashMap<String, String>>,
296}
297
298#[derive(Clone, Debug, Default, PartialEq, Serialize)]
299#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
300pub struct DescribeRegistryRequest {
301 #[serde(rename = "RegistryName")]
303 pub registry_name: String,
304}
305
306#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
307#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
308pub struct DescribeRegistryResponse {
309 #[serde(rename = "Description")]
311 #[serde(skip_serializing_if = "Option::is_none")]
312 pub description: Option<String>,
313 #[serde(rename = "RegistryArn")]
315 #[serde(skip_serializing_if = "Option::is_none")]
316 pub registry_arn: Option<String>,
317 #[serde(rename = "RegistryName")]
319 #[serde(skip_serializing_if = "Option::is_none")]
320 pub registry_name: Option<String>,
321 #[serde(rename = "Tags")]
323 #[serde(skip_serializing_if = "Option::is_none")]
324 pub tags: Option<::std::collections::HashMap<String, String>>,
325}
326
327#[derive(Clone, Debug, Default, PartialEq, Serialize)]
328#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
329pub struct DescribeSchemaRequest {
330 #[serde(rename = "RegistryName")]
332 pub registry_name: String,
333 #[serde(rename = "SchemaName")]
335 pub schema_name: String,
336 #[serde(rename = "SchemaVersion")]
338 #[serde(skip_serializing_if = "Option::is_none")]
339 pub schema_version: Option<String>,
340}
341
342#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
343#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
344pub struct DescribeSchemaResponse {
345 #[serde(rename = "Content")]
347 #[serde(skip_serializing_if = "Option::is_none")]
348 pub content: Option<String>,
349 #[serde(rename = "Description")]
351 #[serde(skip_serializing_if = "Option::is_none")]
352 pub description: Option<String>,
353 #[serde(rename = "LastModified")]
355 #[serde(skip_serializing_if = "Option::is_none")]
356 pub last_modified: Option<f64>,
357 #[serde(rename = "SchemaArn")]
359 #[serde(skip_serializing_if = "Option::is_none")]
360 pub schema_arn: Option<String>,
361 #[serde(rename = "SchemaName")]
363 #[serde(skip_serializing_if = "Option::is_none")]
364 pub schema_name: Option<String>,
365 #[serde(rename = "SchemaVersion")]
367 #[serde(skip_serializing_if = "Option::is_none")]
368 pub schema_version: Option<String>,
369 #[serde(rename = "Tags")]
371 #[serde(skip_serializing_if = "Option::is_none")]
372 pub tags: Option<::std::collections::HashMap<String, String>>,
373 #[serde(rename = "Type")]
375 #[serde(skip_serializing_if = "Option::is_none")]
376 pub type_: Option<String>,
377 #[serde(rename = "VersionCreatedDate")]
379 #[serde(skip_serializing_if = "Option::is_none")]
380 pub version_created_date: Option<f64>,
381}
382
383#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
384#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
385pub struct DiscovererSummary {
386 #[serde(rename = "DiscovererArn")]
388 #[serde(skip_serializing_if = "Option::is_none")]
389 pub discoverer_arn: Option<String>,
390 #[serde(rename = "DiscovererId")]
392 #[serde(skip_serializing_if = "Option::is_none")]
393 pub discoverer_id: Option<String>,
394 #[serde(rename = "SourceArn")]
396 #[serde(skip_serializing_if = "Option::is_none")]
397 pub source_arn: Option<String>,
398 #[serde(rename = "State")]
400 #[serde(skip_serializing_if = "Option::is_none")]
401 pub state: Option<String>,
402 #[serde(rename = "Tags")]
404 #[serde(skip_serializing_if = "Option::is_none")]
405 pub tags: Option<::std::collections::HashMap<String, String>>,
406}
407
408#[derive(Clone, Debug, Default, PartialEq, Serialize)]
409#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
410pub struct GetCodeBindingSourceRequest {
411 #[serde(rename = "Language")]
413 pub language: String,
414 #[serde(rename = "RegistryName")]
416 pub registry_name: String,
417 #[serde(rename = "SchemaName")]
419 pub schema_name: String,
420 #[serde(rename = "SchemaVersion")]
422 #[serde(skip_serializing_if = "Option::is_none")]
423 pub schema_version: Option<String>,
424}
425
426#[derive(Clone, Debug, Default, PartialEq)]
427pub struct GetCodeBindingSourceResponse {
428 pub body: Option<bytes::Bytes>,
429}
430
431#[derive(Clone, Debug, Default, PartialEq, Serialize)]
432#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
433pub struct GetDiscoveredSchemaRequest {
434 #[serde(rename = "Events")]
436 pub events: Vec<String>,
437 #[serde(rename = "Type")]
439 pub type_: String,
440}
441
442#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
443#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
444pub struct GetDiscoveredSchemaResponse {
445 #[serde(rename = "Content")]
447 #[serde(skip_serializing_if = "Option::is_none")]
448 pub content: Option<String>,
449}
450
451#[derive(Clone, Debug, Default, PartialEq, Serialize)]
452#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
453pub struct GetResourcePolicyRequest {
454 #[serde(rename = "RegistryName")]
456 #[serde(skip_serializing_if = "Option::is_none")]
457 pub registry_name: Option<String>,
458}
459
460#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
461#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
462pub struct GetResourcePolicyResponse {
463 #[serde(rename = "Policy")]
465 #[serde(skip_serializing_if = "Option::is_none")]
466 pub policy: Option<String>,
467 #[serde(rename = "RevisionId")]
469 #[serde(skip_serializing_if = "Option::is_none")]
470 pub revision_id: Option<String>,
471}
472
473#[derive(Clone, Debug, Default, PartialEq, Serialize)]
474#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
475pub struct ListDiscoverersRequest {
476 #[serde(rename = "DiscovererIdPrefix")]
478 #[serde(skip_serializing_if = "Option::is_none")]
479 pub discoverer_id_prefix: Option<String>,
480 #[serde(rename = "Limit")]
481 #[serde(skip_serializing_if = "Option::is_none")]
482 pub limit: Option<i64>,
483 #[serde(rename = "NextToken")]
485 #[serde(skip_serializing_if = "Option::is_none")]
486 pub next_token: Option<String>,
487 #[serde(rename = "SourceArnPrefix")]
489 #[serde(skip_serializing_if = "Option::is_none")]
490 pub source_arn_prefix: Option<String>,
491}
492
493#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
494#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
495pub struct ListDiscoverersResponse {
496 #[serde(rename = "Discoverers")]
498 #[serde(skip_serializing_if = "Option::is_none")]
499 pub discoverers: Option<Vec<DiscovererSummary>>,
500 #[serde(rename = "NextToken")]
502 #[serde(skip_serializing_if = "Option::is_none")]
503 pub next_token: Option<String>,
504}
505
506#[derive(Clone, Debug, Default, PartialEq, Serialize)]
507#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
508pub struct ListRegistriesRequest {
509 #[serde(rename = "Limit")]
510 #[serde(skip_serializing_if = "Option::is_none")]
511 pub limit: Option<i64>,
512 #[serde(rename = "NextToken")]
514 #[serde(skip_serializing_if = "Option::is_none")]
515 pub next_token: Option<String>,
516 #[serde(rename = "RegistryNamePrefix")]
518 #[serde(skip_serializing_if = "Option::is_none")]
519 pub registry_name_prefix: Option<String>,
520 #[serde(rename = "Scope")]
522 #[serde(skip_serializing_if = "Option::is_none")]
523 pub scope: Option<String>,
524}
525
526#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
527#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
528pub struct ListRegistriesResponse {
529 #[serde(rename = "NextToken")]
531 #[serde(skip_serializing_if = "Option::is_none")]
532 pub next_token: Option<String>,
533 #[serde(rename = "Registries")]
535 #[serde(skip_serializing_if = "Option::is_none")]
536 pub registries: Option<Vec<RegistrySummary>>,
537}
538
539#[derive(Clone, Debug, Default, PartialEq, Serialize)]
540#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
541pub struct ListSchemaVersionsRequest {
542 #[serde(rename = "Limit")]
543 #[serde(skip_serializing_if = "Option::is_none")]
544 pub limit: Option<i64>,
545 #[serde(rename = "NextToken")]
547 #[serde(skip_serializing_if = "Option::is_none")]
548 pub next_token: Option<String>,
549 #[serde(rename = "RegistryName")]
551 pub registry_name: String,
552 #[serde(rename = "SchemaName")]
554 pub schema_name: String,
555}
556
557#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
558#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
559pub struct ListSchemaVersionsResponse {
560 #[serde(rename = "NextToken")]
562 #[serde(skip_serializing_if = "Option::is_none")]
563 pub next_token: Option<String>,
564 #[serde(rename = "SchemaVersions")]
566 #[serde(skip_serializing_if = "Option::is_none")]
567 pub schema_versions: Option<Vec<SchemaVersionSummary>>,
568}
569
570#[derive(Clone, Debug, Default, PartialEq, Serialize)]
571#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
572pub struct ListSchemasRequest {
573 #[serde(rename = "Limit")]
574 #[serde(skip_serializing_if = "Option::is_none")]
575 pub limit: Option<i64>,
576 #[serde(rename = "NextToken")]
578 #[serde(skip_serializing_if = "Option::is_none")]
579 pub next_token: Option<String>,
580 #[serde(rename = "RegistryName")]
582 pub registry_name: String,
583 #[serde(rename = "SchemaNamePrefix")]
585 #[serde(skip_serializing_if = "Option::is_none")]
586 pub schema_name_prefix: Option<String>,
587}
588
589#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
590#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
591pub struct ListSchemasResponse {
592 #[serde(rename = "NextToken")]
594 #[serde(skip_serializing_if = "Option::is_none")]
595 pub next_token: Option<String>,
596 #[serde(rename = "Schemas")]
598 #[serde(skip_serializing_if = "Option::is_none")]
599 pub schemas: Option<Vec<SchemaSummary>>,
600}
601
602#[derive(Clone, Debug, Default, PartialEq, Serialize)]
603#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
604pub struct ListTagsForResourceRequest {
605 #[serde(rename = "ResourceArn")]
607 pub resource_arn: String,
608}
609
610#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
611#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
612pub struct ListTagsForResourceResponse {
613 #[serde(rename = "Tags")]
614 #[serde(skip_serializing_if = "Option::is_none")]
615 pub tags: Option<::std::collections::HashMap<String, String>>,
616}
617
618#[derive(Clone, Debug, Default, PartialEq, Serialize)]
619#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
620pub struct PutCodeBindingRequest {
621 #[serde(rename = "Language")]
623 pub language: String,
624 #[serde(rename = "RegistryName")]
626 pub registry_name: String,
627 #[serde(rename = "SchemaName")]
629 pub schema_name: String,
630 #[serde(rename = "SchemaVersion")]
632 #[serde(skip_serializing_if = "Option::is_none")]
633 pub schema_version: Option<String>,
634}
635
636#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
637#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
638pub struct PutCodeBindingResponse {
639 #[serde(rename = "CreationDate")]
641 #[serde(skip_serializing_if = "Option::is_none")]
642 pub creation_date: Option<f64>,
643 #[serde(rename = "LastModified")]
645 #[serde(skip_serializing_if = "Option::is_none")]
646 pub last_modified: Option<f64>,
647 #[serde(rename = "SchemaVersion")]
649 #[serde(skip_serializing_if = "Option::is_none")]
650 pub schema_version: Option<String>,
651 #[serde(rename = "Status")]
653 #[serde(skip_serializing_if = "Option::is_none")]
654 pub status: Option<String>,
655}
656
657#[derive(Clone, Debug, Default, PartialEq, Serialize)]
659#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
660pub struct PutResourcePolicyRequest {
661 #[serde(rename = "Policy")]
663 pub policy: String,
664 #[serde(rename = "RegistryName")]
666 #[serde(skip_serializing_if = "Option::is_none")]
667 pub registry_name: Option<String>,
668 #[serde(rename = "RevisionId")]
670 #[serde(skip_serializing_if = "Option::is_none")]
671 pub revision_id: Option<String>,
672}
673
674#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
675#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
676pub struct PutResourcePolicyResponse {
677 #[serde(rename = "Policy")]
679 #[serde(skip_serializing_if = "Option::is_none")]
680 pub policy: Option<String>,
681 #[serde(rename = "RevisionId")]
683 #[serde(skip_serializing_if = "Option::is_none")]
684 pub revision_id: Option<String>,
685}
686
687#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
688#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
689pub struct RegistrySummary {
690 #[serde(rename = "RegistryArn")]
692 #[serde(skip_serializing_if = "Option::is_none")]
693 pub registry_arn: Option<String>,
694 #[serde(rename = "RegistryName")]
696 #[serde(skip_serializing_if = "Option::is_none")]
697 pub registry_name: Option<String>,
698 #[serde(rename = "Tags")]
700 #[serde(skip_serializing_if = "Option::is_none")]
701 pub tags: Option<::std::collections::HashMap<String, String>>,
702}
703
704#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
706#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
707pub struct SchemaSummary {
708 #[serde(rename = "LastModified")]
710 #[serde(skip_serializing_if = "Option::is_none")]
711 pub last_modified: Option<f64>,
712 #[serde(rename = "SchemaArn")]
714 #[serde(skip_serializing_if = "Option::is_none")]
715 pub schema_arn: Option<String>,
716 #[serde(rename = "SchemaName")]
718 #[serde(skip_serializing_if = "Option::is_none")]
719 pub schema_name: Option<String>,
720 #[serde(rename = "Tags")]
722 #[serde(skip_serializing_if = "Option::is_none")]
723 pub tags: Option<::std::collections::HashMap<String, String>>,
724 #[serde(rename = "VersionCount")]
726 #[serde(skip_serializing_if = "Option::is_none")]
727 pub version_count: Option<i64>,
728}
729
730#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
731#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
732pub struct SchemaVersionSummary {
733 #[serde(rename = "SchemaArn")]
735 #[serde(skip_serializing_if = "Option::is_none")]
736 pub schema_arn: Option<String>,
737 #[serde(rename = "SchemaName")]
739 #[serde(skip_serializing_if = "Option::is_none")]
740 pub schema_name: Option<String>,
741 #[serde(rename = "SchemaVersion")]
743 #[serde(skip_serializing_if = "Option::is_none")]
744 pub schema_version: Option<String>,
745}
746
747#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
748#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
749pub struct SearchSchemaSummary {
750 #[serde(rename = "RegistryName")]
752 #[serde(skip_serializing_if = "Option::is_none")]
753 pub registry_name: Option<String>,
754 #[serde(rename = "SchemaArn")]
756 #[serde(skip_serializing_if = "Option::is_none")]
757 pub schema_arn: Option<String>,
758 #[serde(rename = "SchemaName")]
760 #[serde(skip_serializing_if = "Option::is_none")]
761 pub schema_name: Option<String>,
762 #[serde(rename = "SchemaVersions")]
764 #[serde(skip_serializing_if = "Option::is_none")]
765 pub schema_versions: Option<Vec<SearchSchemaVersionSummary>>,
766}
767
768#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
769#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
770pub struct SearchSchemaVersionSummary {
771 #[serde(rename = "CreatedDate")]
773 #[serde(skip_serializing_if = "Option::is_none")]
774 pub created_date: Option<f64>,
775 #[serde(rename = "SchemaVersion")]
777 #[serde(skip_serializing_if = "Option::is_none")]
778 pub schema_version: Option<String>,
779}
780
781#[derive(Clone, Debug, Default, PartialEq, Serialize)]
782#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
783pub struct SearchSchemasRequest {
784 #[serde(rename = "Keywords")]
786 pub keywords: String,
787 #[serde(rename = "Limit")]
788 #[serde(skip_serializing_if = "Option::is_none")]
789 pub limit: Option<i64>,
790 #[serde(rename = "NextToken")]
792 #[serde(skip_serializing_if = "Option::is_none")]
793 pub next_token: Option<String>,
794 #[serde(rename = "RegistryName")]
796 pub registry_name: String,
797}
798
799#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
800#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
801pub struct SearchSchemasResponse {
802 #[serde(rename = "NextToken")]
804 #[serde(skip_serializing_if = "Option::is_none")]
805 pub next_token: Option<String>,
806 #[serde(rename = "Schemas")]
808 #[serde(skip_serializing_if = "Option::is_none")]
809 pub schemas: Option<Vec<SearchSchemaSummary>>,
810}
811
812#[derive(Clone, Debug, Default, PartialEq, Serialize)]
813#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
814pub struct StartDiscovererRequest {
815 #[serde(rename = "DiscovererId")]
817 pub discoverer_id: String,
818}
819
820#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
821#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
822pub struct StartDiscovererResponse {
823 #[serde(rename = "DiscovererId")]
825 #[serde(skip_serializing_if = "Option::is_none")]
826 pub discoverer_id: Option<String>,
827 #[serde(rename = "State")]
829 #[serde(skip_serializing_if = "Option::is_none")]
830 pub state: Option<String>,
831}
832
833#[derive(Clone, Debug, Default, PartialEq, Serialize)]
834#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
835pub struct StopDiscovererRequest {
836 #[serde(rename = "DiscovererId")]
838 pub discoverer_id: String,
839}
840
841#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
842#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
843pub struct StopDiscovererResponse {
844 #[serde(rename = "DiscovererId")]
846 #[serde(skip_serializing_if = "Option::is_none")]
847 pub discoverer_id: Option<String>,
848 #[serde(rename = "State")]
850 #[serde(skip_serializing_if = "Option::is_none")]
851 pub state: Option<String>,
852}
853
854#[derive(Clone, Debug, Default, PartialEq, Serialize)]
856#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
857pub struct TagResourceRequest {
858 #[serde(rename = "ResourceArn")]
860 pub resource_arn: String,
861 #[serde(rename = "Tags")]
863 pub tags: ::std::collections::HashMap<String, String>,
864}
865
866#[derive(Clone, Debug, Default, PartialEq, Serialize)]
867#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
868pub struct UntagResourceRequest {
869 #[serde(rename = "ResourceArn")]
871 pub resource_arn: String,
872 #[serde(rename = "TagKeys")]
874 pub tag_keys: Vec<String>,
875}
876
877#[derive(Clone, Debug, Default, PartialEq, Serialize)]
878#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
879pub struct UpdateDiscovererRequest {
880 #[serde(rename = "Description")]
882 #[serde(skip_serializing_if = "Option::is_none")]
883 pub description: Option<String>,
884 #[serde(rename = "DiscovererId")]
886 pub discoverer_id: String,
887}
888
889#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
890#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
891pub struct UpdateDiscovererResponse {
892 #[serde(rename = "Description")]
894 #[serde(skip_serializing_if = "Option::is_none")]
895 pub description: Option<String>,
896 #[serde(rename = "DiscovererArn")]
898 #[serde(skip_serializing_if = "Option::is_none")]
899 pub discoverer_arn: Option<String>,
900 #[serde(rename = "DiscovererId")]
902 #[serde(skip_serializing_if = "Option::is_none")]
903 pub discoverer_id: Option<String>,
904 #[serde(rename = "SourceArn")]
906 #[serde(skip_serializing_if = "Option::is_none")]
907 pub source_arn: Option<String>,
908 #[serde(rename = "State")]
910 #[serde(skip_serializing_if = "Option::is_none")]
911 pub state: Option<String>,
912 #[serde(rename = "Tags")]
914 #[serde(skip_serializing_if = "Option::is_none")]
915 pub tags: Option<::std::collections::HashMap<String, String>>,
916}
917
918#[derive(Clone, Debug, Default, PartialEq, Serialize)]
920#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
921pub struct UpdateRegistryRequest {
922 #[serde(rename = "Description")]
924 #[serde(skip_serializing_if = "Option::is_none")]
925 pub description: Option<String>,
926 #[serde(rename = "RegistryName")]
928 pub registry_name: String,
929}
930
931#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
932#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
933pub struct UpdateRegistryResponse {
934 #[serde(rename = "Description")]
936 #[serde(skip_serializing_if = "Option::is_none")]
937 pub description: Option<String>,
938 #[serde(rename = "RegistryArn")]
940 #[serde(skip_serializing_if = "Option::is_none")]
941 pub registry_arn: Option<String>,
942 #[serde(rename = "RegistryName")]
944 #[serde(skip_serializing_if = "Option::is_none")]
945 pub registry_name: Option<String>,
946 #[serde(rename = "Tags")]
948 #[serde(skip_serializing_if = "Option::is_none")]
949 pub tags: Option<::std::collections::HashMap<String, String>>,
950}
951
952#[derive(Clone, Debug, Default, PartialEq, Serialize)]
953#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
954pub struct UpdateSchemaRequest {
955 #[serde(rename = "ClientTokenId")]
957 #[serde(skip_serializing_if = "Option::is_none")]
958 pub client_token_id: Option<String>,
959 #[serde(rename = "Content")]
961 #[serde(skip_serializing_if = "Option::is_none")]
962 pub content: Option<String>,
963 #[serde(rename = "Description")]
965 #[serde(skip_serializing_if = "Option::is_none")]
966 pub description: Option<String>,
967 #[serde(rename = "RegistryName")]
969 pub registry_name: String,
970 #[serde(rename = "SchemaName")]
972 pub schema_name: String,
973 #[serde(rename = "Type")]
975 #[serde(skip_serializing_if = "Option::is_none")]
976 pub type_: Option<String>,
977}
978
979#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
980#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
981pub struct UpdateSchemaResponse {
982 #[serde(rename = "Description")]
984 #[serde(skip_serializing_if = "Option::is_none")]
985 pub description: Option<String>,
986 #[serde(rename = "LastModified")]
988 #[serde(skip_serializing_if = "Option::is_none")]
989 pub last_modified: Option<f64>,
990 #[serde(rename = "SchemaArn")]
992 #[serde(skip_serializing_if = "Option::is_none")]
993 pub schema_arn: Option<String>,
994 #[serde(rename = "SchemaName")]
996 #[serde(skip_serializing_if = "Option::is_none")]
997 pub schema_name: Option<String>,
998 #[serde(rename = "SchemaVersion")]
1000 #[serde(skip_serializing_if = "Option::is_none")]
1001 pub schema_version: Option<String>,
1002 #[serde(rename = "Tags")]
1003 #[serde(skip_serializing_if = "Option::is_none")]
1004 pub tags: Option<::std::collections::HashMap<String, String>>,
1005 #[serde(rename = "Type")]
1007 #[serde(skip_serializing_if = "Option::is_none")]
1008 pub type_: Option<String>,
1009 #[serde(rename = "VersionCreatedDate")]
1011 #[serde(skip_serializing_if = "Option::is_none")]
1012 pub version_created_date: Option<f64>,
1013}
1014
1015#[derive(Debug, PartialEq)]
1017pub enum CreateDiscovererError {
1018 BadRequest(String),
1019
1020 Conflict(String),
1021
1022 Forbidden(String),
1023
1024 InternalServerError(String),
1025
1026 ServiceUnavailable(String),
1027
1028 Unauthorized(String),
1029}
1030
1031impl CreateDiscovererError {
1032 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDiscovererError> {
1033 if let Some(err) = proto::json::Error::parse_rest(&res) {
1034 match err.typ.as_str() {
1035 "BadRequestException" => {
1036 return RusotoError::Service(CreateDiscovererError::BadRequest(err.msg))
1037 }
1038 "ConflictException" => {
1039 return RusotoError::Service(CreateDiscovererError::Conflict(err.msg))
1040 }
1041 "ForbiddenException" => {
1042 return RusotoError::Service(CreateDiscovererError::Forbidden(err.msg))
1043 }
1044 "InternalServerErrorException" => {
1045 return RusotoError::Service(CreateDiscovererError::InternalServerError(
1046 err.msg,
1047 ))
1048 }
1049 "ServiceUnavailableException" => {
1050 return RusotoError::Service(CreateDiscovererError::ServiceUnavailable(err.msg))
1051 }
1052 "UnauthorizedException" => {
1053 return RusotoError::Service(CreateDiscovererError::Unauthorized(err.msg))
1054 }
1055 "ValidationException" => return RusotoError::Validation(err.msg),
1056 _ => {}
1057 }
1058 }
1059 RusotoError::Unknown(res)
1060 }
1061}
1062impl fmt::Display for CreateDiscovererError {
1063 #[allow(unused_variables)]
1064 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1065 match *self {
1066 CreateDiscovererError::BadRequest(ref cause) => write!(f, "{}", cause),
1067 CreateDiscovererError::Conflict(ref cause) => write!(f, "{}", cause),
1068 CreateDiscovererError::Forbidden(ref cause) => write!(f, "{}", cause),
1069 CreateDiscovererError::InternalServerError(ref cause) => write!(f, "{}", cause),
1070 CreateDiscovererError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1071 CreateDiscovererError::Unauthorized(ref cause) => write!(f, "{}", cause),
1072 }
1073 }
1074}
1075impl Error for CreateDiscovererError {}
1076#[derive(Debug, PartialEq)]
1078pub enum CreateRegistryError {
1079 BadRequest(String),
1080
1081 Conflict(String),
1082
1083 Forbidden(String),
1084
1085 InternalServerError(String),
1086
1087 ServiceUnavailable(String),
1088
1089 Unauthorized(String),
1090}
1091
1092impl CreateRegistryError {
1093 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRegistryError> {
1094 if let Some(err) = proto::json::Error::parse_rest(&res) {
1095 match err.typ.as_str() {
1096 "BadRequestException" => {
1097 return RusotoError::Service(CreateRegistryError::BadRequest(err.msg))
1098 }
1099 "ConflictException" => {
1100 return RusotoError::Service(CreateRegistryError::Conflict(err.msg))
1101 }
1102 "ForbiddenException" => {
1103 return RusotoError::Service(CreateRegistryError::Forbidden(err.msg))
1104 }
1105 "InternalServerErrorException" => {
1106 return RusotoError::Service(CreateRegistryError::InternalServerError(err.msg))
1107 }
1108 "ServiceUnavailableException" => {
1109 return RusotoError::Service(CreateRegistryError::ServiceUnavailable(err.msg))
1110 }
1111 "UnauthorizedException" => {
1112 return RusotoError::Service(CreateRegistryError::Unauthorized(err.msg))
1113 }
1114 "ValidationException" => return RusotoError::Validation(err.msg),
1115 _ => {}
1116 }
1117 }
1118 RusotoError::Unknown(res)
1119 }
1120}
1121impl fmt::Display for CreateRegistryError {
1122 #[allow(unused_variables)]
1123 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1124 match *self {
1125 CreateRegistryError::BadRequest(ref cause) => write!(f, "{}", cause),
1126 CreateRegistryError::Conflict(ref cause) => write!(f, "{}", cause),
1127 CreateRegistryError::Forbidden(ref cause) => write!(f, "{}", cause),
1128 CreateRegistryError::InternalServerError(ref cause) => write!(f, "{}", cause),
1129 CreateRegistryError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1130 CreateRegistryError::Unauthorized(ref cause) => write!(f, "{}", cause),
1131 }
1132 }
1133}
1134impl Error for CreateRegistryError {}
1135#[derive(Debug, PartialEq)]
1137pub enum CreateSchemaError {
1138 BadRequest(String),
1139
1140 Forbidden(String),
1141
1142 InternalServerError(String),
1143
1144 ServiceUnavailable(String),
1145}
1146
1147impl CreateSchemaError {
1148 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSchemaError> {
1149 if let Some(err) = proto::json::Error::parse_rest(&res) {
1150 match err.typ.as_str() {
1151 "BadRequestException" => {
1152 return RusotoError::Service(CreateSchemaError::BadRequest(err.msg))
1153 }
1154 "ForbiddenException" => {
1155 return RusotoError::Service(CreateSchemaError::Forbidden(err.msg))
1156 }
1157 "InternalServerErrorException" => {
1158 return RusotoError::Service(CreateSchemaError::InternalServerError(err.msg))
1159 }
1160 "ServiceUnavailableException" => {
1161 return RusotoError::Service(CreateSchemaError::ServiceUnavailable(err.msg))
1162 }
1163 "ValidationException" => return RusotoError::Validation(err.msg),
1164 _ => {}
1165 }
1166 }
1167 RusotoError::Unknown(res)
1168 }
1169}
1170impl fmt::Display for CreateSchemaError {
1171 #[allow(unused_variables)]
1172 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1173 match *self {
1174 CreateSchemaError::BadRequest(ref cause) => write!(f, "{}", cause),
1175 CreateSchemaError::Forbidden(ref cause) => write!(f, "{}", cause),
1176 CreateSchemaError::InternalServerError(ref cause) => write!(f, "{}", cause),
1177 CreateSchemaError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1178 }
1179 }
1180}
1181impl Error for CreateSchemaError {}
1182#[derive(Debug, PartialEq)]
1184pub enum DeleteDiscovererError {
1185 BadRequest(String),
1186
1187 Forbidden(String),
1188
1189 InternalServerError(String),
1190
1191 NotFound(String),
1192
1193 ServiceUnavailable(String),
1194
1195 Unauthorized(String),
1196}
1197
1198impl DeleteDiscovererError {
1199 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDiscovererError> {
1200 if let Some(err) = proto::json::Error::parse_rest(&res) {
1201 match err.typ.as_str() {
1202 "BadRequestException" => {
1203 return RusotoError::Service(DeleteDiscovererError::BadRequest(err.msg))
1204 }
1205 "ForbiddenException" => {
1206 return RusotoError::Service(DeleteDiscovererError::Forbidden(err.msg))
1207 }
1208 "InternalServerErrorException" => {
1209 return RusotoError::Service(DeleteDiscovererError::InternalServerError(
1210 err.msg,
1211 ))
1212 }
1213 "NotFoundException" => {
1214 return RusotoError::Service(DeleteDiscovererError::NotFound(err.msg))
1215 }
1216 "ServiceUnavailableException" => {
1217 return RusotoError::Service(DeleteDiscovererError::ServiceUnavailable(err.msg))
1218 }
1219 "UnauthorizedException" => {
1220 return RusotoError::Service(DeleteDiscovererError::Unauthorized(err.msg))
1221 }
1222 "ValidationException" => return RusotoError::Validation(err.msg),
1223 _ => {}
1224 }
1225 }
1226 RusotoError::Unknown(res)
1227 }
1228}
1229impl fmt::Display for DeleteDiscovererError {
1230 #[allow(unused_variables)]
1231 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1232 match *self {
1233 DeleteDiscovererError::BadRequest(ref cause) => write!(f, "{}", cause),
1234 DeleteDiscovererError::Forbidden(ref cause) => write!(f, "{}", cause),
1235 DeleteDiscovererError::InternalServerError(ref cause) => write!(f, "{}", cause),
1236 DeleteDiscovererError::NotFound(ref cause) => write!(f, "{}", cause),
1237 DeleteDiscovererError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1238 DeleteDiscovererError::Unauthorized(ref cause) => write!(f, "{}", cause),
1239 }
1240 }
1241}
1242impl Error for DeleteDiscovererError {}
1243#[derive(Debug, PartialEq)]
1245pub enum DeleteRegistryError {
1246 BadRequest(String),
1247
1248 Forbidden(String),
1249
1250 InternalServerError(String),
1251
1252 NotFound(String),
1253
1254 ServiceUnavailable(String),
1255
1256 Unauthorized(String),
1257}
1258
1259impl DeleteRegistryError {
1260 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRegistryError> {
1261 if let Some(err) = proto::json::Error::parse_rest(&res) {
1262 match err.typ.as_str() {
1263 "BadRequestException" => {
1264 return RusotoError::Service(DeleteRegistryError::BadRequest(err.msg))
1265 }
1266 "ForbiddenException" => {
1267 return RusotoError::Service(DeleteRegistryError::Forbidden(err.msg))
1268 }
1269 "InternalServerErrorException" => {
1270 return RusotoError::Service(DeleteRegistryError::InternalServerError(err.msg))
1271 }
1272 "NotFoundException" => {
1273 return RusotoError::Service(DeleteRegistryError::NotFound(err.msg))
1274 }
1275 "ServiceUnavailableException" => {
1276 return RusotoError::Service(DeleteRegistryError::ServiceUnavailable(err.msg))
1277 }
1278 "UnauthorizedException" => {
1279 return RusotoError::Service(DeleteRegistryError::Unauthorized(err.msg))
1280 }
1281 "ValidationException" => return RusotoError::Validation(err.msg),
1282 _ => {}
1283 }
1284 }
1285 RusotoError::Unknown(res)
1286 }
1287}
1288impl fmt::Display for DeleteRegistryError {
1289 #[allow(unused_variables)]
1290 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1291 match *self {
1292 DeleteRegistryError::BadRequest(ref cause) => write!(f, "{}", cause),
1293 DeleteRegistryError::Forbidden(ref cause) => write!(f, "{}", cause),
1294 DeleteRegistryError::InternalServerError(ref cause) => write!(f, "{}", cause),
1295 DeleteRegistryError::NotFound(ref cause) => write!(f, "{}", cause),
1296 DeleteRegistryError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1297 DeleteRegistryError::Unauthorized(ref cause) => write!(f, "{}", cause),
1298 }
1299 }
1300}
1301impl Error for DeleteRegistryError {}
1302#[derive(Debug, PartialEq)]
1304pub enum DeleteResourcePolicyError {
1305 BadRequest(String),
1306
1307 Forbidden(String),
1308
1309 InternalServerError(String),
1310
1311 NotFound(String),
1312
1313 ServiceUnavailable(String),
1314
1315 Unauthorized(String),
1316}
1317
1318impl DeleteResourcePolicyError {
1319 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteResourcePolicyError> {
1320 if let Some(err) = proto::json::Error::parse_rest(&res) {
1321 match err.typ.as_str() {
1322 "BadRequestException" => {
1323 return RusotoError::Service(DeleteResourcePolicyError::BadRequest(err.msg))
1324 }
1325 "ForbiddenException" => {
1326 return RusotoError::Service(DeleteResourcePolicyError::Forbidden(err.msg))
1327 }
1328 "InternalServerErrorException" => {
1329 return RusotoError::Service(DeleteResourcePolicyError::InternalServerError(
1330 err.msg,
1331 ))
1332 }
1333 "NotFoundException" => {
1334 return RusotoError::Service(DeleteResourcePolicyError::NotFound(err.msg))
1335 }
1336 "ServiceUnavailableException" => {
1337 return RusotoError::Service(DeleteResourcePolicyError::ServiceUnavailable(
1338 err.msg,
1339 ))
1340 }
1341 "UnauthorizedException" => {
1342 return RusotoError::Service(DeleteResourcePolicyError::Unauthorized(err.msg))
1343 }
1344 "ValidationException" => return RusotoError::Validation(err.msg),
1345 _ => {}
1346 }
1347 }
1348 RusotoError::Unknown(res)
1349 }
1350}
1351impl fmt::Display for DeleteResourcePolicyError {
1352 #[allow(unused_variables)]
1353 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1354 match *self {
1355 DeleteResourcePolicyError::BadRequest(ref cause) => write!(f, "{}", cause),
1356 DeleteResourcePolicyError::Forbidden(ref cause) => write!(f, "{}", cause),
1357 DeleteResourcePolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
1358 DeleteResourcePolicyError::NotFound(ref cause) => write!(f, "{}", cause),
1359 DeleteResourcePolicyError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1360 DeleteResourcePolicyError::Unauthorized(ref cause) => write!(f, "{}", cause),
1361 }
1362 }
1363}
1364impl Error for DeleteResourcePolicyError {}
1365#[derive(Debug, PartialEq)]
1367pub enum DeleteSchemaError {
1368 BadRequest(String),
1369
1370 Forbidden(String),
1371
1372 InternalServerError(String),
1373
1374 NotFound(String),
1375
1376 ServiceUnavailable(String),
1377
1378 Unauthorized(String),
1379}
1380
1381impl DeleteSchemaError {
1382 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSchemaError> {
1383 if let Some(err) = proto::json::Error::parse_rest(&res) {
1384 match err.typ.as_str() {
1385 "BadRequestException" => {
1386 return RusotoError::Service(DeleteSchemaError::BadRequest(err.msg))
1387 }
1388 "ForbiddenException" => {
1389 return RusotoError::Service(DeleteSchemaError::Forbidden(err.msg))
1390 }
1391 "InternalServerErrorException" => {
1392 return RusotoError::Service(DeleteSchemaError::InternalServerError(err.msg))
1393 }
1394 "NotFoundException" => {
1395 return RusotoError::Service(DeleteSchemaError::NotFound(err.msg))
1396 }
1397 "ServiceUnavailableException" => {
1398 return RusotoError::Service(DeleteSchemaError::ServiceUnavailable(err.msg))
1399 }
1400 "UnauthorizedException" => {
1401 return RusotoError::Service(DeleteSchemaError::Unauthorized(err.msg))
1402 }
1403 "ValidationException" => return RusotoError::Validation(err.msg),
1404 _ => {}
1405 }
1406 }
1407 RusotoError::Unknown(res)
1408 }
1409}
1410impl fmt::Display for DeleteSchemaError {
1411 #[allow(unused_variables)]
1412 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1413 match *self {
1414 DeleteSchemaError::BadRequest(ref cause) => write!(f, "{}", cause),
1415 DeleteSchemaError::Forbidden(ref cause) => write!(f, "{}", cause),
1416 DeleteSchemaError::InternalServerError(ref cause) => write!(f, "{}", cause),
1417 DeleteSchemaError::NotFound(ref cause) => write!(f, "{}", cause),
1418 DeleteSchemaError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1419 DeleteSchemaError::Unauthorized(ref cause) => write!(f, "{}", cause),
1420 }
1421 }
1422}
1423impl Error for DeleteSchemaError {}
1424#[derive(Debug, PartialEq)]
1426pub enum DeleteSchemaVersionError {
1427 BadRequest(String),
1428
1429 Forbidden(String),
1430
1431 InternalServerError(String),
1432
1433 NotFound(String),
1434
1435 ServiceUnavailable(String),
1436
1437 Unauthorized(String),
1438}
1439
1440impl DeleteSchemaVersionError {
1441 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSchemaVersionError> {
1442 if let Some(err) = proto::json::Error::parse_rest(&res) {
1443 match err.typ.as_str() {
1444 "BadRequestException" => {
1445 return RusotoError::Service(DeleteSchemaVersionError::BadRequest(err.msg))
1446 }
1447 "ForbiddenException" => {
1448 return RusotoError::Service(DeleteSchemaVersionError::Forbidden(err.msg))
1449 }
1450 "InternalServerErrorException" => {
1451 return RusotoError::Service(DeleteSchemaVersionError::InternalServerError(
1452 err.msg,
1453 ))
1454 }
1455 "NotFoundException" => {
1456 return RusotoError::Service(DeleteSchemaVersionError::NotFound(err.msg))
1457 }
1458 "ServiceUnavailableException" => {
1459 return RusotoError::Service(DeleteSchemaVersionError::ServiceUnavailable(
1460 err.msg,
1461 ))
1462 }
1463 "UnauthorizedException" => {
1464 return RusotoError::Service(DeleteSchemaVersionError::Unauthorized(err.msg))
1465 }
1466 "ValidationException" => return RusotoError::Validation(err.msg),
1467 _ => {}
1468 }
1469 }
1470 RusotoError::Unknown(res)
1471 }
1472}
1473impl fmt::Display for DeleteSchemaVersionError {
1474 #[allow(unused_variables)]
1475 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1476 match *self {
1477 DeleteSchemaVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
1478 DeleteSchemaVersionError::Forbidden(ref cause) => write!(f, "{}", cause),
1479 DeleteSchemaVersionError::InternalServerError(ref cause) => write!(f, "{}", cause),
1480 DeleteSchemaVersionError::NotFound(ref cause) => write!(f, "{}", cause),
1481 DeleteSchemaVersionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1482 DeleteSchemaVersionError::Unauthorized(ref cause) => write!(f, "{}", cause),
1483 }
1484 }
1485}
1486impl Error for DeleteSchemaVersionError {}
1487#[derive(Debug, PartialEq)]
1489pub enum DescribeCodeBindingError {
1490 BadRequest(String),
1491
1492 Forbidden(String),
1493
1494 InternalServerError(String),
1495
1496 NotFound(String),
1497
1498 TooManyRequests(String),
1499
1500 Unauthorized(String),
1501}
1502
1503impl DescribeCodeBindingError {
1504 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCodeBindingError> {
1505 if let Some(err) = proto::json::Error::parse_rest(&res) {
1506 match err.typ.as_str() {
1507 "BadRequestException" => {
1508 return RusotoError::Service(DescribeCodeBindingError::BadRequest(err.msg))
1509 }
1510 "ForbiddenException" => {
1511 return RusotoError::Service(DescribeCodeBindingError::Forbidden(err.msg))
1512 }
1513 "InternalServerErrorException" => {
1514 return RusotoError::Service(DescribeCodeBindingError::InternalServerError(
1515 err.msg,
1516 ))
1517 }
1518 "NotFoundException" => {
1519 return RusotoError::Service(DescribeCodeBindingError::NotFound(err.msg))
1520 }
1521 "TooManyRequestsException" => {
1522 return RusotoError::Service(DescribeCodeBindingError::TooManyRequests(err.msg))
1523 }
1524 "UnauthorizedException" => {
1525 return RusotoError::Service(DescribeCodeBindingError::Unauthorized(err.msg))
1526 }
1527 "ValidationException" => return RusotoError::Validation(err.msg),
1528 _ => {}
1529 }
1530 }
1531 RusotoError::Unknown(res)
1532 }
1533}
1534impl fmt::Display for DescribeCodeBindingError {
1535 #[allow(unused_variables)]
1536 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1537 match *self {
1538 DescribeCodeBindingError::BadRequest(ref cause) => write!(f, "{}", cause),
1539 DescribeCodeBindingError::Forbidden(ref cause) => write!(f, "{}", cause),
1540 DescribeCodeBindingError::InternalServerError(ref cause) => write!(f, "{}", cause),
1541 DescribeCodeBindingError::NotFound(ref cause) => write!(f, "{}", cause),
1542 DescribeCodeBindingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1543 DescribeCodeBindingError::Unauthorized(ref cause) => write!(f, "{}", cause),
1544 }
1545 }
1546}
1547impl Error for DescribeCodeBindingError {}
1548#[derive(Debug, PartialEq)]
1550pub enum DescribeDiscovererError {
1551 BadRequest(String),
1552
1553 Forbidden(String),
1554
1555 InternalServerError(String),
1556
1557 NotFound(String),
1558
1559 ServiceUnavailable(String),
1560
1561 Unauthorized(String),
1562}
1563
1564impl DescribeDiscovererError {
1565 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDiscovererError> {
1566 if let Some(err) = proto::json::Error::parse_rest(&res) {
1567 match err.typ.as_str() {
1568 "BadRequestException" => {
1569 return RusotoError::Service(DescribeDiscovererError::BadRequest(err.msg))
1570 }
1571 "ForbiddenException" => {
1572 return RusotoError::Service(DescribeDiscovererError::Forbidden(err.msg))
1573 }
1574 "InternalServerErrorException" => {
1575 return RusotoError::Service(DescribeDiscovererError::InternalServerError(
1576 err.msg,
1577 ))
1578 }
1579 "NotFoundException" => {
1580 return RusotoError::Service(DescribeDiscovererError::NotFound(err.msg))
1581 }
1582 "ServiceUnavailableException" => {
1583 return RusotoError::Service(DescribeDiscovererError::ServiceUnavailable(
1584 err.msg,
1585 ))
1586 }
1587 "UnauthorizedException" => {
1588 return RusotoError::Service(DescribeDiscovererError::Unauthorized(err.msg))
1589 }
1590 "ValidationException" => return RusotoError::Validation(err.msg),
1591 _ => {}
1592 }
1593 }
1594 RusotoError::Unknown(res)
1595 }
1596}
1597impl fmt::Display for DescribeDiscovererError {
1598 #[allow(unused_variables)]
1599 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1600 match *self {
1601 DescribeDiscovererError::BadRequest(ref cause) => write!(f, "{}", cause),
1602 DescribeDiscovererError::Forbidden(ref cause) => write!(f, "{}", cause),
1603 DescribeDiscovererError::InternalServerError(ref cause) => write!(f, "{}", cause),
1604 DescribeDiscovererError::NotFound(ref cause) => write!(f, "{}", cause),
1605 DescribeDiscovererError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1606 DescribeDiscovererError::Unauthorized(ref cause) => write!(f, "{}", cause),
1607 }
1608 }
1609}
1610impl Error for DescribeDiscovererError {}
1611#[derive(Debug, PartialEq)]
1613pub enum DescribeRegistryError {
1614 BadRequest(String),
1615
1616 Forbidden(String),
1617
1618 InternalServerError(String),
1619
1620 NotFound(String),
1621
1622 ServiceUnavailable(String),
1623
1624 Unauthorized(String),
1625}
1626
1627impl DescribeRegistryError {
1628 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRegistryError> {
1629 if let Some(err) = proto::json::Error::parse_rest(&res) {
1630 match err.typ.as_str() {
1631 "BadRequestException" => {
1632 return RusotoError::Service(DescribeRegistryError::BadRequest(err.msg))
1633 }
1634 "ForbiddenException" => {
1635 return RusotoError::Service(DescribeRegistryError::Forbidden(err.msg))
1636 }
1637 "InternalServerErrorException" => {
1638 return RusotoError::Service(DescribeRegistryError::InternalServerError(
1639 err.msg,
1640 ))
1641 }
1642 "NotFoundException" => {
1643 return RusotoError::Service(DescribeRegistryError::NotFound(err.msg))
1644 }
1645 "ServiceUnavailableException" => {
1646 return RusotoError::Service(DescribeRegistryError::ServiceUnavailable(err.msg))
1647 }
1648 "UnauthorizedException" => {
1649 return RusotoError::Service(DescribeRegistryError::Unauthorized(err.msg))
1650 }
1651 "ValidationException" => return RusotoError::Validation(err.msg),
1652 _ => {}
1653 }
1654 }
1655 RusotoError::Unknown(res)
1656 }
1657}
1658impl fmt::Display for DescribeRegistryError {
1659 #[allow(unused_variables)]
1660 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1661 match *self {
1662 DescribeRegistryError::BadRequest(ref cause) => write!(f, "{}", cause),
1663 DescribeRegistryError::Forbidden(ref cause) => write!(f, "{}", cause),
1664 DescribeRegistryError::InternalServerError(ref cause) => write!(f, "{}", cause),
1665 DescribeRegistryError::NotFound(ref cause) => write!(f, "{}", cause),
1666 DescribeRegistryError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1667 DescribeRegistryError::Unauthorized(ref cause) => write!(f, "{}", cause),
1668 }
1669 }
1670}
1671impl Error for DescribeRegistryError {}
1672#[derive(Debug, PartialEq)]
1674pub enum DescribeSchemaError {
1675 BadRequest(String),
1676
1677 Forbidden(String),
1678
1679 InternalServerError(String),
1680
1681 NotFound(String),
1682
1683 ServiceUnavailable(String),
1684
1685 Unauthorized(String),
1686}
1687
1688impl DescribeSchemaError {
1689 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSchemaError> {
1690 if let Some(err) = proto::json::Error::parse_rest(&res) {
1691 match err.typ.as_str() {
1692 "BadRequestException" => {
1693 return RusotoError::Service(DescribeSchemaError::BadRequest(err.msg))
1694 }
1695 "ForbiddenException" => {
1696 return RusotoError::Service(DescribeSchemaError::Forbidden(err.msg))
1697 }
1698 "InternalServerErrorException" => {
1699 return RusotoError::Service(DescribeSchemaError::InternalServerError(err.msg))
1700 }
1701 "NotFoundException" => {
1702 return RusotoError::Service(DescribeSchemaError::NotFound(err.msg))
1703 }
1704 "ServiceUnavailableException" => {
1705 return RusotoError::Service(DescribeSchemaError::ServiceUnavailable(err.msg))
1706 }
1707 "UnauthorizedException" => {
1708 return RusotoError::Service(DescribeSchemaError::Unauthorized(err.msg))
1709 }
1710 "ValidationException" => return RusotoError::Validation(err.msg),
1711 _ => {}
1712 }
1713 }
1714 RusotoError::Unknown(res)
1715 }
1716}
1717impl fmt::Display for DescribeSchemaError {
1718 #[allow(unused_variables)]
1719 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1720 match *self {
1721 DescribeSchemaError::BadRequest(ref cause) => write!(f, "{}", cause),
1722 DescribeSchemaError::Forbidden(ref cause) => write!(f, "{}", cause),
1723 DescribeSchemaError::InternalServerError(ref cause) => write!(f, "{}", cause),
1724 DescribeSchemaError::NotFound(ref cause) => write!(f, "{}", cause),
1725 DescribeSchemaError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1726 DescribeSchemaError::Unauthorized(ref cause) => write!(f, "{}", cause),
1727 }
1728 }
1729}
1730impl Error for DescribeSchemaError {}
1731#[derive(Debug, PartialEq)]
1733pub enum GetCodeBindingSourceError {
1734 BadRequest(String),
1735
1736 Forbidden(String),
1737
1738 InternalServerError(String),
1739
1740 NotFound(String),
1741
1742 TooManyRequests(String),
1743
1744 Unauthorized(String),
1745}
1746
1747impl GetCodeBindingSourceError {
1748 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCodeBindingSourceError> {
1749 if let Some(err) = proto::json::Error::parse_rest(&res) {
1750 match err.typ.as_str() {
1751 "BadRequestException" => {
1752 return RusotoError::Service(GetCodeBindingSourceError::BadRequest(err.msg))
1753 }
1754 "ForbiddenException" => {
1755 return RusotoError::Service(GetCodeBindingSourceError::Forbidden(err.msg))
1756 }
1757 "InternalServerErrorException" => {
1758 return RusotoError::Service(GetCodeBindingSourceError::InternalServerError(
1759 err.msg,
1760 ))
1761 }
1762 "NotFoundException" => {
1763 return RusotoError::Service(GetCodeBindingSourceError::NotFound(err.msg))
1764 }
1765 "TooManyRequestsException" => {
1766 return RusotoError::Service(GetCodeBindingSourceError::TooManyRequests(
1767 err.msg,
1768 ))
1769 }
1770 "UnauthorizedException" => {
1771 return RusotoError::Service(GetCodeBindingSourceError::Unauthorized(err.msg))
1772 }
1773 "ValidationException" => return RusotoError::Validation(err.msg),
1774 _ => {}
1775 }
1776 }
1777 RusotoError::Unknown(res)
1778 }
1779}
1780impl fmt::Display for GetCodeBindingSourceError {
1781 #[allow(unused_variables)]
1782 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1783 match *self {
1784 GetCodeBindingSourceError::BadRequest(ref cause) => write!(f, "{}", cause),
1785 GetCodeBindingSourceError::Forbidden(ref cause) => write!(f, "{}", cause),
1786 GetCodeBindingSourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
1787 GetCodeBindingSourceError::NotFound(ref cause) => write!(f, "{}", cause),
1788 GetCodeBindingSourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1789 GetCodeBindingSourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
1790 }
1791 }
1792}
1793impl Error for GetCodeBindingSourceError {}
1794#[derive(Debug, PartialEq)]
1796pub enum GetDiscoveredSchemaError {
1797 BadRequest(String),
1798
1799 Forbidden(String),
1800
1801 InternalServerError(String),
1802
1803 ServiceUnavailable(String),
1804
1805 Unauthorized(String),
1806}
1807
1808impl GetDiscoveredSchemaError {
1809 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDiscoveredSchemaError> {
1810 if let Some(err) = proto::json::Error::parse_rest(&res) {
1811 match err.typ.as_str() {
1812 "BadRequestException" => {
1813 return RusotoError::Service(GetDiscoveredSchemaError::BadRequest(err.msg))
1814 }
1815 "ForbiddenException" => {
1816 return RusotoError::Service(GetDiscoveredSchemaError::Forbidden(err.msg))
1817 }
1818 "InternalServerErrorException" => {
1819 return RusotoError::Service(GetDiscoveredSchemaError::InternalServerError(
1820 err.msg,
1821 ))
1822 }
1823 "ServiceUnavailableException" => {
1824 return RusotoError::Service(GetDiscoveredSchemaError::ServiceUnavailable(
1825 err.msg,
1826 ))
1827 }
1828 "UnauthorizedException" => {
1829 return RusotoError::Service(GetDiscoveredSchemaError::Unauthorized(err.msg))
1830 }
1831 "ValidationException" => return RusotoError::Validation(err.msg),
1832 _ => {}
1833 }
1834 }
1835 RusotoError::Unknown(res)
1836 }
1837}
1838impl fmt::Display for GetDiscoveredSchemaError {
1839 #[allow(unused_variables)]
1840 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1841 match *self {
1842 GetDiscoveredSchemaError::BadRequest(ref cause) => write!(f, "{}", cause),
1843 GetDiscoveredSchemaError::Forbidden(ref cause) => write!(f, "{}", cause),
1844 GetDiscoveredSchemaError::InternalServerError(ref cause) => write!(f, "{}", cause),
1845 GetDiscoveredSchemaError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1846 GetDiscoveredSchemaError::Unauthorized(ref cause) => write!(f, "{}", cause),
1847 }
1848 }
1849}
1850impl Error for GetDiscoveredSchemaError {}
1851#[derive(Debug, PartialEq)]
1853pub enum GetResourcePolicyError {
1854 BadRequest(String),
1855
1856 Forbidden(String),
1857
1858 InternalServerError(String),
1859
1860 NotFound(String),
1861
1862 ServiceUnavailable(String),
1863
1864 Unauthorized(String),
1865}
1866
1867impl GetResourcePolicyError {
1868 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetResourcePolicyError> {
1869 if let Some(err) = proto::json::Error::parse_rest(&res) {
1870 match err.typ.as_str() {
1871 "BadRequestException" => {
1872 return RusotoError::Service(GetResourcePolicyError::BadRequest(err.msg))
1873 }
1874 "ForbiddenException" => {
1875 return RusotoError::Service(GetResourcePolicyError::Forbidden(err.msg))
1876 }
1877 "InternalServerErrorException" => {
1878 return RusotoError::Service(GetResourcePolicyError::InternalServerError(
1879 err.msg,
1880 ))
1881 }
1882 "NotFoundException" => {
1883 return RusotoError::Service(GetResourcePolicyError::NotFound(err.msg))
1884 }
1885 "ServiceUnavailableException" => {
1886 return RusotoError::Service(GetResourcePolicyError::ServiceUnavailable(
1887 err.msg,
1888 ))
1889 }
1890 "UnauthorizedException" => {
1891 return RusotoError::Service(GetResourcePolicyError::Unauthorized(err.msg))
1892 }
1893 "ValidationException" => return RusotoError::Validation(err.msg),
1894 _ => {}
1895 }
1896 }
1897 RusotoError::Unknown(res)
1898 }
1899}
1900impl fmt::Display for GetResourcePolicyError {
1901 #[allow(unused_variables)]
1902 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1903 match *self {
1904 GetResourcePolicyError::BadRequest(ref cause) => write!(f, "{}", cause),
1905 GetResourcePolicyError::Forbidden(ref cause) => write!(f, "{}", cause),
1906 GetResourcePolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
1907 GetResourcePolicyError::NotFound(ref cause) => write!(f, "{}", cause),
1908 GetResourcePolicyError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1909 GetResourcePolicyError::Unauthorized(ref cause) => write!(f, "{}", cause),
1910 }
1911 }
1912}
1913impl Error for GetResourcePolicyError {}
1914#[derive(Debug, PartialEq)]
1916pub enum ListDiscoverersError {
1917 BadRequest(String),
1918
1919 Forbidden(String),
1920
1921 InternalServerError(String),
1922
1923 ServiceUnavailable(String),
1924
1925 Unauthorized(String),
1926}
1927
1928impl ListDiscoverersError {
1929 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDiscoverersError> {
1930 if let Some(err) = proto::json::Error::parse_rest(&res) {
1931 match err.typ.as_str() {
1932 "BadRequestException" => {
1933 return RusotoError::Service(ListDiscoverersError::BadRequest(err.msg))
1934 }
1935 "ForbiddenException" => {
1936 return RusotoError::Service(ListDiscoverersError::Forbidden(err.msg))
1937 }
1938 "InternalServerErrorException" => {
1939 return RusotoError::Service(ListDiscoverersError::InternalServerError(err.msg))
1940 }
1941 "ServiceUnavailableException" => {
1942 return RusotoError::Service(ListDiscoverersError::ServiceUnavailable(err.msg))
1943 }
1944 "UnauthorizedException" => {
1945 return RusotoError::Service(ListDiscoverersError::Unauthorized(err.msg))
1946 }
1947 "ValidationException" => return RusotoError::Validation(err.msg),
1948 _ => {}
1949 }
1950 }
1951 RusotoError::Unknown(res)
1952 }
1953}
1954impl fmt::Display for ListDiscoverersError {
1955 #[allow(unused_variables)]
1956 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1957 match *self {
1958 ListDiscoverersError::BadRequest(ref cause) => write!(f, "{}", cause),
1959 ListDiscoverersError::Forbidden(ref cause) => write!(f, "{}", cause),
1960 ListDiscoverersError::InternalServerError(ref cause) => write!(f, "{}", cause),
1961 ListDiscoverersError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1962 ListDiscoverersError::Unauthorized(ref cause) => write!(f, "{}", cause),
1963 }
1964 }
1965}
1966impl Error for ListDiscoverersError {}
1967#[derive(Debug, PartialEq)]
1969pub enum ListRegistriesError {
1970 BadRequest(String),
1971
1972 Forbidden(String),
1973
1974 InternalServerError(String),
1975
1976 ServiceUnavailable(String),
1977
1978 Unauthorized(String),
1979}
1980
1981impl ListRegistriesError {
1982 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRegistriesError> {
1983 if let Some(err) = proto::json::Error::parse_rest(&res) {
1984 match err.typ.as_str() {
1985 "BadRequestException" => {
1986 return RusotoError::Service(ListRegistriesError::BadRequest(err.msg))
1987 }
1988 "ForbiddenException" => {
1989 return RusotoError::Service(ListRegistriesError::Forbidden(err.msg))
1990 }
1991 "InternalServerErrorException" => {
1992 return RusotoError::Service(ListRegistriesError::InternalServerError(err.msg))
1993 }
1994 "ServiceUnavailableException" => {
1995 return RusotoError::Service(ListRegistriesError::ServiceUnavailable(err.msg))
1996 }
1997 "UnauthorizedException" => {
1998 return RusotoError::Service(ListRegistriesError::Unauthorized(err.msg))
1999 }
2000 "ValidationException" => return RusotoError::Validation(err.msg),
2001 _ => {}
2002 }
2003 }
2004 RusotoError::Unknown(res)
2005 }
2006}
2007impl fmt::Display for ListRegistriesError {
2008 #[allow(unused_variables)]
2009 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2010 match *self {
2011 ListRegistriesError::BadRequest(ref cause) => write!(f, "{}", cause),
2012 ListRegistriesError::Forbidden(ref cause) => write!(f, "{}", cause),
2013 ListRegistriesError::InternalServerError(ref cause) => write!(f, "{}", cause),
2014 ListRegistriesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2015 ListRegistriesError::Unauthorized(ref cause) => write!(f, "{}", cause),
2016 }
2017 }
2018}
2019impl Error for ListRegistriesError {}
2020#[derive(Debug, PartialEq)]
2022pub enum ListSchemaVersionsError {
2023 BadRequest(String),
2024
2025 Forbidden(String),
2026
2027 InternalServerError(String),
2028
2029 NotFound(String),
2030
2031 ServiceUnavailable(String),
2032
2033 Unauthorized(String),
2034}
2035
2036impl ListSchemaVersionsError {
2037 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSchemaVersionsError> {
2038 if let Some(err) = proto::json::Error::parse_rest(&res) {
2039 match err.typ.as_str() {
2040 "BadRequestException" => {
2041 return RusotoError::Service(ListSchemaVersionsError::BadRequest(err.msg))
2042 }
2043 "ForbiddenException" => {
2044 return RusotoError::Service(ListSchemaVersionsError::Forbidden(err.msg))
2045 }
2046 "InternalServerErrorException" => {
2047 return RusotoError::Service(ListSchemaVersionsError::InternalServerError(
2048 err.msg,
2049 ))
2050 }
2051 "NotFoundException" => {
2052 return RusotoError::Service(ListSchemaVersionsError::NotFound(err.msg))
2053 }
2054 "ServiceUnavailableException" => {
2055 return RusotoError::Service(ListSchemaVersionsError::ServiceUnavailable(
2056 err.msg,
2057 ))
2058 }
2059 "UnauthorizedException" => {
2060 return RusotoError::Service(ListSchemaVersionsError::Unauthorized(err.msg))
2061 }
2062 "ValidationException" => return RusotoError::Validation(err.msg),
2063 _ => {}
2064 }
2065 }
2066 RusotoError::Unknown(res)
2067 }
2068}
2069impl fmt::Display for ListSchemaVersionsError {
2070 #[allow(unused_variables)]
2071 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2072 match *self {
2073 ListSchemaVersionsError::BadRequest(ref cause) => write!(f, "{}", cause),
2074 ListSchemaVersionsError::Forbidden(ref cause) => write!(f, "{}", cause),
2075 ListSchemaVersionsError::InternalServerError(ref cause) => write!(f, "{}", cause),
2076 ListSchemaVersionsError::NotFound(ref cause) => write!(f, "{}", cause),
2077 ListSchemaVersionsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2078 ListSchemaVersionsError::Unauthorized(ref cause) => write!(f, "{}", cause),
2079 }
2080 }
2081}
2082impl Error for ListSchemaVersionsError {}
2083#[derive(Debug, PartialEq)]
2085pub enum ListSchemasError {
2086 BadRequest(String),
2087
2088 Forbidden(String),
2089
2090 InternalServerError(String),
2091
2092 ServiceUnavailable(String),
2093
2094 Unauthorized(String),
2095}
2096
2097impl ListSchemasError {
2098 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSchemasError> {
2099 if let Some(err) = proto::json::Error::parse_rest(&res) {
2100 match err.typ.as_str() {
2101 "BadRequestException" => {
2102 return RusotoError::Service(ListSchemasError::BadRequest(err.msg))
2103 }
2104 "ForbiddenException" => {
2105 return RusotoError::Service(ListSchemasError::Forbidden(err.msg))
2106 }
2107 "InternalServerErrorException" => {
2108 return RusotoError::Service(ListSchemasError::InternalServerError(err.msg))
2109 }
2110 "ServiceUnavailableException" => {
2111 return RusotoError::Service(ListSchemasError::ServiceUnavailable(err.msg))
2112 }
2113 "UnauthorizedException" => {
2114 return RusotoError::Service(ListSchemasError::Unauthorized(err.msg))
2115 }
2116 "ValidationException" => return RusotoError::Validation(err.msg),
2117 _ => {}
2118 }
2119 }
2120 RusotoError::Unknown(res)
2121 }
2122}
2123impl fmt::Display for ListSchemasError {
2124 #[allow(unused_variables)]
2125 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2126 match *self {
2127 ListSchemasError::BadRequest(ref cause) => write!(f, "{}", cause),
2128 ListSchemasError::Forbidden(ref cause) => write!(f, "{}", cause),
2129 ListSchemasError::InternalServerError(ref cause) => write!(f, "{}", cause),
2130 ListSchemasError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2131 ListSchemasError::Unauthorized(ref cause) => write!(f, "{}", cause),
2132 }
2133 }
2134}
2135impl Error for ListSchemasError {}
2136#[derive(Debug, PartialEq)]
2138pub enum ListTagsForResourceError {
2139 BadRequest(String),
2140
2141 Forbidden(String),
2142
2143 InternalServerError(String),
2144
2145 NotFound(String),
2146}
2147
2148impl ListTagsForResourceError {
2149 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
2150 if let Some(err) = proto::json::Error::parse_rest(&res) {
2151 match err.typ.as_str() {
2152 "BadRequestException" => {
2153 return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
2154 }
2155 "ForbiddenException" => {
2156 return RusotoError::Service(ListTagsForResourceError::Forbidden(err.msg))
2157 }
2158 "InternalServerErrorException" => {
2159 return RusotoError::Service(ListTagsForResourceError::InternalServerError(
2160 err.msg,
2161 ))
2162 }
2163 "NotFoundException" => {
2164 return RusotoError::Service(ListTagsForResourceError::NotFound(err.msg))
2165 }
2166 "ValidationException" => return RusotoError::Validation(err.msg),
2167 _ => {}
2168 }
2169 }
2170 RusotoError::Unknown(res)
2171 }
2172}
2173impl fmt::Display for ListTagsForResourceError {
2174 #[allow(unused_variables)]
2175 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2176 match *self {
2177 ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2178 ListTagsForResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
2179 ListTagsForResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
2180 ListTagsForResourceError::NotFound(ref cause) => write!(f, "{}", cause),
2181 }
2182 }
2183}
2184impl Error for ListTagsForResourceError {}
2185#[derive(Debug, PartialEq)]
2187pub enum PutCodeBindingError {
2188 BadRequest(String),
2189
2190 Forbidden(String),
2191
2192 Gone(String),
2193
2194 InternalServerError(String),
2195
2196 NotFound(String),
2197
2198 TooManyRequests(String),
2199
2200 Unauthorized(String),
2201}
2202
2203impl PutCodeBindingError {
2204 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutCodeBindingError> {
2205 if let Some(err) = proto::json::Error::parse_rest(&res) {
2206 match err.typ.as_str() {
2207 "BadRequestException" => {
2208 return RusotoError::Service(PutCodeBindingError::BadRequest(err.msg))
2209 }
2210 "ForbiddenException" => {
2211 return RusotoError::Service(PutCodeBindingError::Forbidden(err.msg))
2212 }
2213 "GoneException" => return RusotoError::Service(PutCodeBindingError::Gone(err.msg)),
2214 "InternalServerErrorException" => {
2215 return RusotoError::Service(PutCodeBindingError::InternalServerError(err.msg))
2216 }
2217 "NotFoundException" => {
2218 return RusotoError::Service(PutCodeBindingError::NotFound(err.msg))
2219 }
2220 "TooManyRequestsException" => {
2221 return RusotoError::Service(PutCodeBindingError::TooManyRequests(err.msg))
2222 }
2223 "UnauthorizedException" => {
2224 return RusotoError::Service(PutCodeBindingError::Unauthorized(err.msg))
2225 }
2226 "ValidationException" => return RusotoError::Validation(err.msg),
2227 _ => {}
2228 }
2229 }
2230 RusotoError::Unknown(res)
2231 }
2232}
2233impl fmt::Display for PutCodeBindingError {
2234 #[allow(unused_variables)]
2235 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2236 match *self {
2237 PutCodeBindingError::BadRequest(ref cause) => write!(f, "{}", cause),
2238 PutCodeBindingError::Forbidden(ref cause) => write!(f, "{}", cause),
2239 PutCodeBindingError::Gone(ref cause) => write!(f, "{}", cause),
2240 PutCodeBindingError::InternalServerError(ref cause) => write!(f, "{}", cause),
2241 PutCodeBindingError::NotFound(ref cause) => write!(f, "{}", cause),
2242 PutCodeBindingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2243 PutCodeBindingError::Unauthorized(ref cause) => write!(f, "{}", cause),
2244 }
2245 }
2246}
2247impl Error for PutCodeBindingError {}
2248#[derive(Debug, PartialEq)]
2250pub enum PutResourcePolicyError {
2251 BadRequest(String),
2252
2253 Forbidden(String),
2254
2255 InternalServerError(String),
2256
2257 NotFound(String),
2258
2259 PreconditionFailed(String),
2260
2261 ServiceUnavailable(String),
2262
2263 Unauthorized(String),
2264}
2265
2266impl PutResourcePolicyError {
2267 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutResourcePolicyError> {
2268 if let Some(err) = proto::json::Error::parse_rest(&res) {
2269 match err.typ.as_str() {
2270 "BadRequestException" => {
2271 return RusotoError::Service(PutResourcePolicyError::BadRequest(err.msg))
2272 }
2273 "ForbiddenException" => {
2274 return RusotoError::Service(PutResourcePolicyError::Forbidden(err.msg))
2275 }
2276 "InternalServerErrorException" => {
2277 return RusotoError::Service(PutResourcePolicyError::InternalServerError(
2278 err.msg,
2279 ))
2280 }
2281 "NotFoundException" => {
2282 return RusotoError::Service(PutResourcePolicyError::NotFound(err.msg))
2283 }
2284 "PreconditionFailedException" => {
2285 return RusotoError::Service(PutResourcePolicyError::PreconditionFailed(
2286 err.msg,
2287 ))
2288 }
2289 "ServiceUnavailableException" => {
2290 return RusotoError::Service(PutResourcePolicyError::ServiceUnavailable(
2291 err.msg,
2292 ))
2293 }
2294 "UnauthorizedException" => {
2295 return RusotoError::Service(PutResourcePolicyError::Unauthorized(err.msg))
2296 }
2297 "ValidationException" => return RusotoError::Validation(err.msg),
2298 _ => {}
2299 }
2300 }
2301 RusotoError::Unknown(res)
2302 }
2303}
2304impl fmt::Display for PutResourcePolicyError {
2305 #[allow(unused_variables)]
2306 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2307 match *self {
2308 PutResourcePolicyError::BadRequest(ref cause) => write!(f, "{}", cause),
2309 PutResourcePolicyError::Forbidden(ref cause) => write!(f, "{}", cause),
2310 PutResourcePolicyError::InternalServerError(ref cause) => write!(f, "{}", cause),
2311 PutResourcePolicyError::NotFound(ref cause) => write!(f, "{}", cause),
2312 PutResourcePolicyError::PreconditionFailed(ref cause) => write!(f, "{}", cause),
2313 PutResourcePolicyError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2314 PutResourcePolicyError::Unauthorized(ref cause) => write!(f, "{}", cause),
2315 }
2316 }
2317}
2318impl Error for PutResourcePolicyError {}
2319#[derive(Debug, PartialEq)]
2321pub enum SearchSchemasError {
2322 BadRequest(String),
2323
2324 Forbidden(String),
2325
2326 InternalServerError(String),
2327
2328 ServiceUnavailable(String),
2329
2330 Unauthorized(String),
2331}
2332
2333impl SearchSchemasError {
2334 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SearchSchemasError> {
2335 if let Some(err) = proto::json::Error::parse_rest(&res) {
2336 match err.typ.as_str() {
2337 "BadRequestException" => {
2338 return RusotoError::Service(SearchSchemasError::BadRequest(err.msg))
2339 }
2340 "ForbiddenException" => {
2341 return RusotoError::Service(SearchSchemasError::Forbidden(err.msg))
2342 }
2343 "InternalServerErrorException" => {
2344 return RusotoError::Service(SearchSchemasError::InternalServerError(err.msg))
2345 }
2346 "ServiceUnavailableException" => {
2347 return RusotoError::Service(SearchSchemasError::ServiceUnavailable(err.msg))
2348 }
2349 "UnauthorizedException" => {
2350 return RusotoError::Service(SearchSchemasError::Unauthorized(err.msg))
2351 }
2352 "ValidationException" => return RusotoError::Validation(err.msg),
2353 _ => {}
2354 }
2355 }
2356 RusotoError::Unknown(res)
2357 }
2358}
2359impl fmt::Display for SearchSchemasError {
2360 #[allow(unused_variables)]
2361 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2362 match *self {
2363 SearchSchemasError::BadRequest(ref cause) => write!(f, "{}", cause),
2364 SearchSchemasError::Forbidden(ref cause) => write!(f, "{}", cause),
2365 SearchSchemasError::InternalServerError(ref cause) => write!(f, "{}", cause),
2366 SearchSchemasError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2367 SearchSchemasError::Unauthorized(ref cause) => write!(f, "{}", cause),
2368 }
2369 }
2370}
2371impl Error for SearchSchemasError {}
2372#[derive(Debug, PartialEq)]
2374pub enum StartDiscovererError {
2375 BadRequest(String),
2376
2377 Forbidden(String),
2378
2379 InternalServerError(String),
2380
2381 NotFound(String),
2382
2383 ServiceUnavailable(String),
2384
2385 Unauthorized(String),
2386}
2387
2388impl StartDiscovererError {
2389 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartDiscovererError> {
2390 if let Some(err) = proto::json::Error::parse_rest(&res) {
2391 match err.typ.as_str() {
2392 "BadRequestException" => {
2393 return RusotoError::Service(StartDiscovererError::BadRequest(err.msg))
2394 }
2395 "ForbiddenException" => {
2396 return RusotoError::Service(StartDiscovererError::Forbidden(err.msg))
2397 }
2398 "InternalServerErrorException" => {
2399 return RusotoError::Service(StartDiscovererError::InternalServerError(err.msg))
2400 }
2401 "NotFoundException" => {
2402 return RusotoError::Service(StartDiscovererError::NotFound(err.msg))
2403 }
2404 "ServiceUnavailableException" => {
2405 return RusotoError::Service(StartDiscovererError::ServiceUnavailable(err.msg))
2406 }
2407 "UnauthorizedException" => {
2408 return RusotoError::Service(StartDiscovererError::Unauthorized(err.msg))
2409 }
2410 "ValidationException" => return RusotoError::Validation(err.msg),
2411 _ => {}
2412 }
2413 }
2414 RusotoError::Unknown(res)
2415 }
2416}
2417impl fmt::Display for StartDiscovererError {
2418 #[allow(unused_variables)]
2419 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2420 match *self {
2421 StartDiscovererError::BadRequest(ref cause) => write!(f, "{}", cause),
2422 StartDiscovererError::Forbidden(ref cause) => write!(f, "{}", cause),
2423 StartDiscovererError::InternalServerError(ref cause) => write!(f, "{}", cause),
2424 StartDiscovererError::NotFound(ref cause) => write!(f, "{}", cause),
2425 StartDiscovererError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2426 StartDiscovererError::Unauthorized(ref cause) => write!(f, "{}", cause),
2427 }
2428 }
2429}
2430impl Error for StartDiscovererError {}
2431#[derive(Debug, PartialEq)]
2433pub enum StopDiscovererError {
2434 BadRequest(String),
2435
2436 Forbidden(String),
2437
2438 InternalServerError(String),
2439
2440 NotFound(String),
2441
2442 ServiceUnavailable(String),
2443
2444 Unauthorized(String),
2445}
2446
2447impl StopDiscovererError {
2448 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopDiscovererError> {
2449 if let Some(err) = proto::json::Error::parse_rest(&res) {
2450 match err.typ.as_str() {
2451 "BadRequestException" => {
2452 return RusotoError::Service(StopDiscovererError::BadRequest(err.msg))
2453 }
2454 "ForbiddenException" => {
2455 return RusotoError::Service(StopDiscovererError::Forbidden(err.msg))
2456 }
2457 "InternalServerErrorException" => {
2458 return RusotoError::Service(StopDiscovererError::InternalServerError(err.msg))
2459 }
2460 "NotFoundException" => {
2461 return RusotoError::Service(StopDiscovererError::NotFound(err.msg))
2462 }
2463 "ServiceUnavailableException" => {
2464 return RusotoError::Service(StopDiscovererError::ServiceUnavailable(err.msg))
2465 }
2466 "UnauthorizedException" => {
2467 return RusotoError::Service(StopDiscovererError::Unauthorized(err.msg))
2468 }
2469 "ValidationException" => return RusotoError::Validation(err.msg),
2470 _ => {}
2471 }
2472 }
2473 RusotoError::Unknown(res)
2474 }
2475}
2476impl fmt::Display for StopDiscovererError {
2477 #[allow(unused_variables)]
2478 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2479 match *self {
2480 StopDiscovererError::BadRequest(ref cause) => write!(f, "{}", cause),
2481 StopDiscovererError::Forbidden(ref cause) => write!(f, "{}", cause),
2482 StopDiscovererError::InternalServerError(ref cause) => write!(f, "{}", cause),
2483 StopDiscovererError::NotFound(ref cause) => write!(f, "{}", cause),
2484 StopDiscovererError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2485 StopDiscovererError::Unauthorized(ref cause) => write!(f, "{}", cause),
2486 }
2487 }
2488}
2489impl Error for StopDiscovererError {}
2490#[derive(Debug, PartialEq)]
2492pub enum TagResourceError {
2493 BadRequest(String),
2494
2495 Forbidden(String),
2496
2497 InternalServerError(String),
2498
2499 NotFound(String),
2500}
2501
2502impl TagResourceError {
2503 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
2504 if let Some(err) = proto::json::Error::parse_rest(&res) {
2505 match err.typ.as_str() {
2506 "BadRequestException" => {
2507 return RusotoError::Service(TagResourceError::BadRequest(err.msg))
2508 }
2509 "ForbiddenException" => {
2510 return RusotoError::Service(TagResourceError::Forbidden(err.msg))
2511 }
2512 "InternalServerErrorException" => {
2513 return RusotoError::Service(TagResourceError::InternalServerError(err.msg))
2514 }
2515 "NotFoundException" => {
2516 return RusotoError::Service(TagResourceError::NotFound(err.msg))
2517 }
2518 "ValidationException" => return RusotoError::Validation(err.msg),
2519 _ => {}
2520 }
2521 }
2522 RusotoError::Unknown(res)
2523 }
2524}
2525impl fmt::Display for TagResourceError {
2526 #[allow(unused_variables)]
2527 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2528 match *self {
2529 TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2530 TagResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
2531 TagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
2532 TagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
2533 }
2534 }
2535}
2536impl Error for TagResourceError {}
2537#[derive(Debug, PartialEq)]
2539pub enum UntagResourceError {
2540 BadRequest(String),
2541
2542 Forbidden(String),
2543
2544 InternalServerError(String),
2545
2546 NotFound(String),
2547}
2548
2549impl UntagResourceError {
2550 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
2551 if let Some(err) = proto::json::Error::parse_rest(&res) {
2552 match err.typ.as_str() {
2553 "BadRequestException" => {
2554 return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
2555 }
2556 "ForbiddenException" => {
2557 return RusotoError::Service(UntagResourceError::Forbidden(err.msg))
2558 }
2559 "InternalServerErrorException" => {
2560 return RusotoError::Service(UntagResourceError::InternalServerError(err.msg))
2561 }
2562 "NotFoundException" => {
2563 return RusotoError::Service(UntagResourceError::NotFound(err.msg))
2564 }
2565 "ValidationException" => return RusotoError::Validation(err.msg),
2566 _ => {}
2567 }
2568 }
2569 RusotoError::Unknown(res)
2570 }
2571}
2572impl fmt::Display for UntagResourceError {
2573 #[allow(unused_variables)]
2574 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2575 match *self {
2576 UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2577 UntagResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
2578 UntagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
2579 UntagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
2580 }
2581 }
2582}
2583impl Error for UntagResourceError {}
2584#[derive(Debug, PartialEq)]
2586pub enum UpdateDiscovererError {
2587 BadRequest(String),
2588
2589 Forbidden(String),
2590
2591 InternalServerError(String),
2592
2593 NotFound(String),
2594
2595 ServiceUnavailable(String),
2596
2597 Unauthorized(String),
2598}
2599
2600impl UpdateDiscovererError {
2601 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDiscovererError> {
2602 if let Some(err) = proto::json::Error::parse_rest(&res) {
2603 match err.typ.as_str() {
2604 "BadRequestException" => {
2605 return RusotoError::Service(UpdateDiscovererError::BadRequest(err.msg))
2606 }
2607 "ForbiddenException" => {
2608 return RusotoError::Service(UpdateDiscovererError::Forbidden(err.msg))
2609 }
2610 "InternalServerErrorException" => {
2611 return RusotoError::Service(UpdateDiscovererError::InternalServerError(
2612 err.msg,
2613 ))
2614 }
2615 "NotFoundException" => {
2616 return RusotoError::Service(UpdateDiscovererError::NotFound(err.msg))
2617 }
2618 "ServiceUnavailableException" => {
2619 return RusotoError::Service(UpdateDiscovererError::ServiceUnavailable(err.msg))
2620 }
2621 "UnauthorizedException" => {
2622 return RusotoError::Service(UpdateDiscovererError::Unauthorized(err.msg))
2623 }
2624 "ValidationException" => return RusotoError::Validation(err.msg),
2625 _ => {}
2626 }
2627 }
2628 RusotoError::Unknown(res)
2629 }
2630}
2631impl fmt::Display for UpdateDiscovererError {
2632 #[allow(unused_variables)]
2633 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2634 match *self {
2635 UpdateDiscovererError::BadRequest(ref cause) => write!(f, "{}", cause),
2636 UpdateDiscovererError::Forbidden(ref cause) => write!(f, "{}", cause),
2637 UpdateDiscovererError::InternalServerError(ref cause) => write!(f, "{}", cause),
2638 UpdateDiscovererError::NotFound(ref cause) => write!(f, "{}", cause),
2639 UpdateDiscovererError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2640 UpdateDiscovererError::Unauthorized(ref cause) => write!(f, "{}", cause),
2641 }
2642 }
2643}
2644impl Error for UpdateDiscovererError {}
2645#[derive(Debug, PartialEq)]
2647pub enum UpdateRegistryError {
2648 BadRequest(String),
2649
2650 Forbidden(String),
2651
2652 InternalServerError(String),
2653
2654 NotFound(String),
2655
2656 ServiceUnavailable(String),
2657
2658 Unauthorized(String),
2659}
2660
2661impl UpdateRegistryError {
2662 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRegistryError> {
2663 if let Some(err) = proto::json::Error::parse_rest(&res) {
2664 match err.typ.as_str() {
2665 "BadRequestException" => {
2666 return RusotoError::Service(UpdateRegistryError::BadRequest(err.msg))
2667 }
2668 "ForbiddenException" => {
2669 return RusotoError::Service(UpdateRegistryError::Forbidden(err.msg))
2670 }
2671 "InternalServerErrorException" => {
2672 return RusotoError::Service(UpdateRegistryError::InternalServerError(err.msg))
2673 }
2674 "NotFoundException" => {
2675 return RusotoError::Service(UpdateRegistryError::NotFound(err.msg))
2676 }
2677 "ServiceUnavailableException" => {
2678 return RusotoError::Service(UpdateRegistryError::ServiceUnavailable(err.msg))
2679 }
2680 "UnauthorizedException" => {
2681 return RusotoError::Service(UpdateRegistryError::Unauthorized(err.msg))
2682 }
2683 "ValidationException" => return RusotoError::Validation(err.msg),
2684 _ => {}
2685 }
2686 }
2687 RusotoError::Unknown(res)
2688 }
2689}
2690impl fmt::Display for UpdateRegistryError {
2691 #[allow(unused_variables)]
2692 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2693 match *self {
2694 UpdateRegistryError::BadRequest(ref cause) => write!(f, "{}", cause),
2695 UpdateRegistryError::Forbidden(ref cause) => write!(f, "{}", cause),
2696 UpdateRegistryError::InternalServerError(ref cause) => write!(f, "{}", cause),
2697 UpdateRegistryError::NotFound(ref cause) => write!(f, "{}", cause),
2698 UpdateRegistryError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2699 UpdateRegistryError::Unauthorized(ref cause) => write!(f, "{}", cause),
2700 }
2701 }
2702}
2703impl Error for UpdateRegistryError {}
2704#[derive(Debug, PartialEq)]
2706pub enum UpdateSchemaError {
2707 BadRequest(String),
2708
2709 Forbidden(String),
2710
2711 InternalServerError(String),
2712
2713 NotFound(String),
2714
2715 ServiceUnavailable(String),
2716}
2717
2718impl UpdateSchemaError {
2719 pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateSchemaError> {
2720 if let Some(err) = proto::json::Error::parse_rest(&res) {
2721 match err.typ.as_str() {
2722 "BadRequestException" => {
2723 return RusotoError::Service(UpdateSchemaError::BadRequest(err.msg))
2724 }
2725 "ForbiddenException" => {
2726 return RusotoError::Service(UpdateSchemaError::Forbidden(err.msg))
2727 }
2728 "InternalServerErrorException" => {
2729 return RusotoError::Service(UpdateSchemaError::InternalServerError(err.msg))
2730 }
2731 "NotFoundException" => {
2732 return RusotoError::Service(UpdateSchemaError::NotFound(err.msg))
2733 }
2734 "ServiceUnavailableException" => {
2735 return RusotoError::Service(UpdateSchemaError::ServiceUnavailable(err.msg))
2736 }
2737 "ValidationException" => return RusotoError::Validation(err.msg),
2738 _ => {}
2739 }
2740 }
2741 RusotoError::Unknown(res)
2742 }
2743}
2744impl fmt::Display for UpdateSchemaError {
2745 #[allow(unused_variables)]
2746 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2747 match *self {
2748 UpdateSchemaError::BadRequest(ref cause) => write!(f, "{}", cause),
2749 UpdateSchemaError::Forbidden(ref cause) => write!(f, "{}", cause),
2750 UpdateSchemaError::InternalServerError(ref cause) => write!(f, "{}", cause),
2751 UpdateSchemaError::NotFound(ref cause) => write!(f, "{}", cause),
2752 UpdateSchemaError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2753 }
2754 }
2755}
2756impl Error for UpdateSchemaError {}
2757#[async_trait]
2759pub trait Schemas {
2760 async fn create_discoverer(
2762 &self,
2763 input: CreateDiscovererRequest,
2764 ) -> Result<CreateDiscovererResponse, RusotoError<CreateDiscovererError>>;
2765
2766 async fn create_registry(
2768 &self,
2769 input: CreateRegistryRequest,
2770 ) -> Result<CreateRegistryResponse, RusotoError<CreateRegistryError>>;
2771
2772 async fn create_schema(
2774 &self,
2775 input: CreateSchemaRequest,
2776 ) -> Result<CreateSchemaResponse, RusotoError<CreateSchemaError>>;
2777
2778 async fn delete_discoverer(
2780 &self,
2781 input: DeleteDiscovererRequest,
2782 ) -> Result<(), RusotoError<DeleteDiscovererError>>;
2783
2784 async fn delete_registry(
2786 &self,
2787 input: DeleteRegistryRequest,
2788 ) -> Result<(), RusotoError<DeleteRegistryError>>;
2789
2790 async fn delete_resource_policy(
2792 &self,
2793 input: DeleteResourcePolicyRequest,
2794 ) -> Result<(), RusotoError<DeleteResourcePolicyError>>;
2795
2796 async fn delete_schema(
2798 &self,
2799 input: DeleteSchemaRequest,
2800 ) -> Result<(), RusotoError<DeleteSchemaError>>;
2801
2802 async fn delete_schema_version(
2804 &self,
2805 input: DeleteSchemaVersionRequest,
2806 ) -> Result<(), RusotoError<DeleteSchemaVersionError>>;
2807
2808 async fn describe_code_binding(
2810 &self,
2811 input: DescribeCodeBindingRequest,
2812 ) -> Result<DescribeCodeBindingResponse, RusotoError<DescribeCodeBindingError>>;
2813
2814 async fn describe_discoverer(
2816 &self,
2817 input: DescribeDiscovererRequest,
2818 ) -> Result<DescribeDiscovererResponse, RusotoError<DescribeDiscovererError>>;
2819
2820 async fn describe_registry(
2822 &self,
2823 input: DescribeRegistryRequest,
2824 ) -> Result<DescribeRegistryResponse, RusotoError<DescribeRegistryError>>;
2825
2826 async fn describe_schema(
2828 &self,
2829 input: DescribeSchemaRequest,
2830 ) -> Result<DescribeSchemaResponse, RusotoError<DescribeSchemaError>>;
2831
2832 async fn get_code_binding_source(
2834 &self,
2835 input: GetCodeBindingSourceRequest,
2836 ) -> Result<GetCodeBindingSourceResponse, RusotoError<GetCodeBindingSourceError>>;
2837
2838 async fn get_discovered_schema(
2840 &self,
2841 input: GetDiscoveredSchemaRequest,
2842 ) -> Result<GetDiscoveredSchemaResponse, RusotoError<GetDiscoveredSchemaError>>;
2843
2844 async fn get_resource_policy(
2846 &self,
2847 input: GetResourcePolicyRequest,
2848 ) -> Result<GetResourcePolicyResponse, RusotoError<GetResourcePolicyError>>;
2849
2850 async fn list_discoverers(
2852 &self,
2853 input: ListDiscoverersRequest,
2854 ) -> Result<ListDiscoverersResponse, RusotoError<ListDiscoverersError>>;
2855
2856 async fn list_registries(
2858 &self,
2859 input: ListRegistriesRequest,
2860 ) -> Result<ListRegistriesResponse, RusotoError<ListRegistriesError>>;
2861
2862 async fn list_schema_versions(
2864 &self,
2865 input: ListSchemaVersionsRequest,
2866 ) -> Result<ListSchemaVersionsResponse, RusotoError<ListSchemaVersionsError>>;
2867
2868 async fn list_schemas(
2870 &self,
2871 input: ListSchemasRequest,
2872 ) -> Result<ListSchemasResponse, RusotoError<ListSchemasError>>;
2873
2874 async fn list_tags_for_resource(
2876 &self,
2877 input: ListTagsForResourceRequest,
2878 ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2879
2880 async fn put_code_binding(
2882 &self,
2883 input: PutCodeBindingRequest,
2884 ) -> Result<PutCodeBindingResponse, RusotoError<PutCodeBindingError>>;
2885
2886 async fn put_resource_policy(
2888 &self,
2889 input: PutResourcePolicyRequest,
2890 ) -> Result<PutResourcePolicyResponse, RusotoError<PutResourcePolicyError>>;
2891
2892 async fn search_schemas(
2894 &self,
2895 input: SearchSchemasRequest,
2896 ) -> Result<SearchSchemasResponse, RusotoError<SearchSchemasError>>;
2897
2898 async fn start_discoverer(
2900 &self,
2901 input: StartDiscovererRequest,
2902 ) -> Result<StartDiscovererResponse, RusotoError<StartDiscovererError>>;
2903
2904 async fn stop_discoverer(
2906 &self,
2907 input: StopDiscovererRequest,
2908 ) -> Result<StopDiscovererResponse, RusotoError<StopDiscovererError>>;
2909
2910 async fn tag_resource(
2912 &self,
2913 input: TagResourceRequest,
2914 ) -> Result<(), RusotoError<TagResourceError>>;
2915
2916 async fn untag_resource(
2918 &self,
2919 input: UntagResourceRequest,
2920 ) -> Result<(), RusotoError<UntagResourceError>>;
2921
2922 async fn update_discoverer(
2924 &self,
2925 input: UpdateDiscovererRequest,
2926 ) -> Result<UpdateDiscovererResponse, RusotoError<UpdateDiscovererError>>;
2927
2928 async fn update_registry(
2930 &self,
2931 input: UpdateRegistryRequest,
2932 ) -> Result<UpdateRegistryResponse, RusotoError<UpdateRegistryError>>;
2933
2934 async fn update_schema(
2936 &self,
2937 input: UpdateSchemaRequest,
2938 ) -> Result<UpdateSchemaResponse, RusotoError<UpdateSchemaError>>;
2939}
2940#[derive(Clone)]
2942pub struct SchemasClient {
2943 client: Client,
2944 region: region::Region,
2945}
2946
2947impl SchemasClient {
2948 pub fn new(region: region::Region) -> SchemasClient {
2952 SchemasClient {
2953 client: Client::shared(),
2954 region,
2955 }
2956 }
2957
2958 pub fn new_with<P, D>(
2959 request_dispatcher: D,
2960 credentials_provider: P,
2961 region: region::Region,
2962 ) -> SchemasClient
2963 where
2964 P: ProvideAwsCredentials + Send + Sync + 'static,
2965 D: DispatchSignedRequest + Send + Sync + 'static,
2966 {
2967 SchemasClient {
2968 client: Client::new_with(credentials_provider, request_dispatcher),
2969 region,
2970 }
2971 }
2972
2973 pub fn new_with_client(client: Client, region: region::Region) -> SchemasClient {
2974 SchemasClient { client, region }
2975 }
2976}
2977
2978#[async_trait]
2979impl Schemas for SchemasClient {
2980 #[allow(unused_mut)]
2982 async fn create_discoverer(
2983 &self,
2984 input: CreateDiscovererRequest,
2985 ) -> Result<CreateDiscovererResponse, RusotoError<CreateDiscovererError>> {
2986 let request_uri = "/v1/discoverers";
2987
2988 let mut request = SignedRequest::new("POST", "schemas", &self.region, &request_uri);
2989 request.set_content_type("application/x-amz-json-1.1".to_owned());
2990
2991 let encoded = Some(serde_json::to_vec(&input).unwrap());
2992 request.set_payload(encoded);
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() == 201 {
3000 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3001 let result = proto::json::ResponsePayload::new(&response)
3002 .deserialize::<CreateDiscovererResponse, _>()?;
3003
3004 Ok(result)
3005 } else {
3006 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3007 Err(CreateDiscovererError::from_response(response))
3008 }
3009 }
3010
3011 #[allow(unused_mut)]
3013 async fn create_registry(
3014 &self,
3015 input: CreateRegistryRequest,
3016 ) -> Result<CreateRegistryResponse, RusotoError<CreateRegistryError>> {
3017 let request_uri = format!(
3018 "/v1/registries/name/{registry_name}",
3019 registry_name = input.registry_name
3020 );
3021
3022 let mut request = SignedRequest::new("POST", "schemas", &self.region, &request_uri);
3023 request.set_content_type("application/x-amz-json-1.1".to_owned());
3024
3025 let encoded = Some(serde_json::to_vec(&input).unwrap());
3026 request.set_payload(encoded);
3027
3028 let mut response = self
3029 .client
3030 .sign_and_dispatch(request)
3031 .await
3032 .map_err(RusotoError::from)?;
3033 if response.status.as_u16() == 201 {
3034 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3035 let result = proto::json::ResponsePayload::new(&response)
3036 .deserialize::<CreateRegistryResponse, _>()?;
3037
3038 Ok(result)
3039 } else {
3040 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3041 Err(CreateRegistryError::from_response(response))
3042 }
3043 }
3044
3045 #[allow(unused_mut)]
3047 async fn create_schema(
3048 &self,
3049 input: CreateSchemaRequest,
3050 ) -> Result<CreateSchemaResponse, RusotoError<CreateSchemaError>> {
3051 let request_uri = format!(
3052 "/v1/registries/name/{registry_name}/schemas/name/{schema_name}",
3053 registry_name = input.registry_name,
3054 schema_name = input.schema_name
3055 );
3056
3057 let mut request = SignedRequest::new("POST", "schemas", &self.region, &request_uri);
3058 request.set_content_type("application/x-amz-json-1.1".to_owned());
3059
3060 let encoded = Some(serde_json::to_vec(&input).unwrap());
3061 request.set_payload(encoded);
3062
3063 let mut response = self
3064 .client
3065 .sign_and_dispatch(request)
3066 .await
3067 .map_err(RusotoError::from)?;
3068 if response.status.as_u16() == 201 {
3069 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3070 let result = proto::json::ResponsePayload::new(&response)
3071 .deserialize::<CreateSchemaResponse, _>()?;
3072
3073 Ok(result)
3074 } else {
3075 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3076 Err(CreateSchemaError::from_response(response))
3077 }
3078 }
3079
3080 #[allow(unused_mut)]
3082 async fn delete_discoverer(
3083 &self,
3084 input: DeleteDiscovererRequest,
3085 ) -> Result<(), RusotoError<DeleteDiscovererError>> {
3086 let request_uri = format!(
3087 "/v1/discoverers/id/{discoverer_id}",
3088 discoverer_id = input.discoverer_id
3089 );
3090
3091 let mut request = SignedRequest::new("DELETE", "schemas", &self.region, &request_uri);
3092 request.set_content_type("application/x-amz-json-1.1".to_owned());
3093
3094 let mut response = self
3095 .client
3096 .sign_and_dispatch(request)
3097 .await
3098 .map_err(RusotoError::from)?;
3099 if response.status.as_u16() == 204 {
3100 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3101 let result = ::std::mem::drop(response);
3102
3103 Ok(result)
3104 } else {
3105 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3106 Err(DeleteDiscovererError::from_response(response))
3107 }
3108 }
3109
3110 #[allow(unused_mut)]
3112 async fn delete_registry(
3113 &self,
3114 input: DeleteRegistryRequest,
3115 ) -> Result<(), RusotoError<DeleteRegistryError>> {
3116 let request_uri = format!(
3117 "/v1/registries/name/{registry_name}",
3118 registry_name = input.registry_name
3119 );
3120
3121 let mut request = SignedRequest::new("DELETE", "schemas", &self.region, &request_uri);
3122 request.set_content_type("application/x-amz-json-1.1".to_owned());
3123
3124 let mut response = self
3125 .client
3126 .sign_and_dispatch(request)
3127 .await
3128 .map_err(RusotoError::from)?;
3129 if response.status.as_u16() == 204 {
3130 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3131 let result = ::std::mem::drop(response);
3132
3133 Ok(result)
3134 } else {
3135 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3136 Err(DeleteRegistryError::from_response(response))
3137 }
3138 }
3139
3140 #[allow(unused_mut)]
3142 async fn delete_resource_policy(
3143 &self,
3144 input: DeleteResourcePolicyRequest,
3145 ) -> Result<(), RusotoError<DeleteResourcePolicyError>> {
3146 let request_uri = "/v1/policy";
3147
3148 let mut request = SignedRequest::new("DELETE", "schemas", &self.region, &request_uri);
3149 request.set_content_type("application/x-amz-json-1.1".to_owned());
3150
3151 let mut params = Params::new();
3152 if let Some(ref x) = input.registry_name {
3153 params.put("registryName", x);
3154 }
3155 request.set_params(params);
3156
3157 let mut response = self
3158 .client
3159 .sign_and_dispatch(request)
3160 .await
3161 .map_err(RusotoError::from)?;
3162 if response.status.as_u16() == 204 {
3163 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3164 let result = ::std::mem::drop(response);
3165
3166 Ok(result)
3167 } else {
3168 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3169 Err(DeleteResourcePolicyError::from_response(response))
3170 }
3171 }
3172
3173 #[allow(unused_mut)]
3175 async fn delete_schema(
3176 &self,
3177 input: DeleteSchemaRequest,
3178 ) -> Result<(), RusotoError<DeleteSchemaError>> {
3179 let request_uri = format!(
3180 "/v1/registries/name/{registry_name}/schemas/name/{schema_name}",
3181 registry_name = input.registry_name,
3182 schema_name = input.schema_name
3183 );
3184
3185 let mut request = SignedRequest::new("DELETE", "schemas", &self.region, &request_uri);
3186 request.set_content_type("application/x-amz-json-1.1".to_owned());
3187
3188 let mut response = self
3189 .client
3190 .sign_and_dispatch(request)
3191 .await
3192 .map_err(RusotoError::from)?;
3193 if response.status.as_u16() == 204 {
3194 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3195 let result = ::std::mem::drop(response);
3196
3197 Ok(result)
3198 } else {
3199 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3200 Err(DeleteSchemaError::from_response(response))
3201 }
3202 }
3203
3204 #[allow(unused_mut)]
3206 async fn delete_schema_version(
3207 &self,
3208 input: DeleteSchemaVersionRequest,
3209 ) -> Result<(), RusotoError<DeleteSchemaVersionError>> {
3210 let request_uri = format!("/v1/registries/name/{registry_name}/schemas/name/{schema_name}/version/{schema_version}", registry_name = input.registry_name, schema_name = input.schema_name, schema_version = input.schema_version);
3211
3212 let mut request = SignedRequest::new("DELETE", "schemas", &self.region, &request_uri);
3213 request.set_content_type("application/x-amz-json-1.1".to_owned());
3214
3215 let mut response = self
3216 .client
3217 .sign_and_dispatch(request)
3218 .await
3219 .map_err(RusotoError::from)?;
3220 if response.status.as_u16() == 204 {
3221 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3222 let result = ::std::mem::drop(response);
3223
3224 Ok(result)
3225 } else {
3226 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3227 Err(DeleteSchemaVersionError::from_response(response))
3228 }
3229 }
3230
3231 #[allow(unused_mut)]
3233 async fn describe_code_binding(
3234 &self,
3235 input: DescribeCodeBindingRequest,
3236 ) -> Result<DescribeCodeBindingResponse, RusotoError<DescribeCodeBindingError>> {
3237 let request_uri = format!(
3238 "/v1/registries/name/{registry_name}/schemas/name/{schema_name}/language/{language}",
3239 language = input.language,
3240 registry_name = input.registry_name,
3241 schema_name = input.schema_name
3242 );
3243
3244 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3245 request.set_content_type("application/x-amz-json-1.1".to_owned());
3246
3247 let mut params = Params::new();
3248 if let Some(ref x) = input.schema_version {
3249 params.put("schemaVersion", x);
3250 }
3251 request.set_params(params);
3252
3253 let mut response = self
3254 .client
3255 .sign_and_dispatch(request)
3256 .await
3257 .map_err(RusotoError::from)?;
3258 if response.status.as_u16() == 200 {
3259 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3260 let result = proto::json::ResponsePayload::new(&response)
3261 .deserialize::<DescribeCodeBindingResponse, _>()?;
3262
3263 Ok(result)
3264 } else {
3265 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3266 Err(DescribeCodeBindingError::from_response(response))
3267 }
3268 }
3269
3270 #[allow(unused_mut)]
3272 async fn describe_discoverer(
3273 &self,
3274 input: DescribeDiscovererRequest,
3275 ) -> Result<DescribeDiscovererResponse, RusotoError<DescribeDiscovererError>> {
3276 let request_uri = format!(
3277 "/v1/discoverers/id/{discoverer_id}",
3278 discoverer_id = input.discoverer_id
3279 );
3280
3281 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3282 request.set_content_type("application/x-amz-json-1.1".to_owned());
3283
3284 let mut response = self
3285 .client
3286 .sign_and_dispatch(request)
3287 .await
3288 .map_err(RusotoError::from)?;
3289 if response.status.as_u16() == 200 {
3290 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3291 let result = proto::json::ResponsePayload::new(&response)
3292 .deserialize::<DescribeDiscovererResponse, _>()?;
3293
3294 Ok(result)
3295 } else {
3296 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3297 Err(DescribeDiscovererError::from_response(response))
3298 }
3299 }
3300
3301 #[allow(unused_mut)]
3303 async fn describe_registry(
3304 &self,
3305 input: DescribeRegistryRequest,
3306 ) -> Result<DescribeRegistryResponse, RusotoError<DescribeRegistryError>> {
3307 let request_uri = format!(
3308 "/v1/registries/name/{registry_name}",
3309 registry_name = input.registry_name
3310 );
3311
3312 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3313 request.set_content_type("application/x-amz-json-1.1".to_owned());
3314
3315 let mut response = self
3316 .client
3317 .sign_and_dispatch(request)
3318 .await
3319 .map_err(RusotoError::from)?;
3320 if response.status.as_u16() == 200 {
3321 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3322 let result = proto::json::ResponsePayload::new(&response)
3323 .deserialize::<DescribeRegistryResponse, _>()?;
3324
3325 Ok(result)
3326 } else {
3327 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3328 Err(DescribeRegistryError::from_response(response))
3329 }
3330 }
3331
3332 #[allow(unused_mut)]
3334 async fn describe_schema(
3335 &self,
3336 input: DescribeSchemaRequest,
3337 ) -> Result<DescribeSchemaResponse, RusotoError<DescribeSchemaError>> {
3338 let request_uri = format!(
3339 "/v1/registries/name/{registry_name}/schemas/name/{schema_name}",
3340 registry_name = input.registry_name,
3341 schema_name = input.schema_name
3342 );
3343
3344 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3345 request.set_content_type("application/x-amz-json-1.1".to_owned());
3346
3347 let mut params = Params::new();
3348 if let Some(ref x) = input.schema_version {
3349 params.put("schemaVersion", x);
3350 }
3351 request.set_params(params);
3352
3353 let mut response = self
3354 .client
3355 .sign_and_dispatch(request)
3356 .await
3357 .map_err(RusotoError::from)?;
3358 if response.status.as_u16() == 200 {
3359 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3360 let result = proto::json::ResponsePayload::new(&response)
3361 .deserialize::<DescribeSchemaResponse, _>()?;
3362
3363 Ok(result)
3364 } else {
3365 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3366 Err(DescribeSchemaError::from_response(response))
3367 }
3368 }
3369
3370 #[allow(unused_mut)]
3372 async fn get_code_binding_source(
3373 &self,
3374 input: GetCodeBindingSourceRequest,
3375 ) -> Result<GetCodeBindingSourceResponse, RusotoError<GetCodeBindingSourceError>> {
3376 let request_uri = format!("/v1/registries/name/{registry_name}/schemas/name/{schema_name}/language/{language}/source", language = input.language, registry_name = input.registry_name, schema_name = input.schema_name);
3377
3378 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3379 request.set_content_type("application/x-amz-json-1.1".to_owned());
3380
3381 let mut params = Params::new();
3382 if let Some(ref x) = input.schema_version {
3383 params.put("schemaVersion", x);
3384 }
3385 request.set_params(params);
3386
3387 let mut response = self
3388 .client
3389 .sign_and_dispatch(request)
3390 .await
3391 .map_err(RusotoError::from)?;
3392 if response.status.as_u16() == 200 {
3393 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3394
3395 let mut result = GetCodeBindingSourceResponse::default();
3396 result.body = Some(response.body);
3397
3398 Ok(result)
3399 } else {
3400 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3401 Err(GetCodeBindingSourceError::from_response(response))
3402 }
3403 }
3404
3405 #[allow(unused_mut)]
3407 async fn get_discovered_schema(
3408 &self,
3409 input: GetDiscoveredSchemaRequest,
3410 ) -> Result<GetDiscoveredSchemaResponse, RusotoError<GetDiscoveredSchemaError>> {
3411 let request_uri = "/v1/discover";
3412
3413 let mut request = SignedRequest::new("POST", "schemas", &self.region, &request_uri);
3414 request.set_content_type("application/x-amz-json-1.1".to_owned());
3415
3416 let encoded = Some(serde_json::to_vec(&input).unwrap());
3417 request.set_payload(encoded);
3418
3419 let mut response = self
3420 .client
3421 .sign_and_dispatch(request)
3422 .await
3423 .map_err(RusotoError::from)?;
3424 if response.status.as_u16() == 200 {
3425 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3426 let result = proto::json::ResponsePayload::new(&response)
3427 .deserialize::<GetDiscoveredSchemaResponse, _>()?;
3428
3429 Ok(result)
3430 } else {
3431 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3432 Err(GetDiscoveredSchemaError::from_response(response))
3433 }
3434 }
3435
3436 #[allow(unused_mut)]
3438 async fn get_resource_policy(
3439 &self,
3440 input: GetResourcePolicyRequest,
3441 ) -> Result<GetResourcePolicyResponse, RusotoError<GetResourcePolicyError>> {
3442 let request_uri = "/v1/policy";
3443
3444 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3445 request.set_content_type("application/x-amz-json-1.1".to_owned());
3446
3447 let mut params = Params::new();
3448 if let Some(ref x) = input.registry_name {
3449 params.put("registryName", x);
3450 }
3451 request.set_params(params);
3452
3453 let mut response = self
3454 .client
3455 .sign_and_dispatch(request)
3456 .await
3457 .map_err(RusotoError::from)?;
3458 if response.status.as_u16() == 200 {
3459 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3460 let result = proto::json::ResponsePayload::new(&response)
3461 .deserialize::<GetResourcePolicyResponse, _>()?;
3462
3463 Ok(result)
3464 } else {
3465 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3466 Err(GetResourcePolicyError::from_response(response))
3467 }
3468 }
3469
3470 #[allow(unused_mut)]
3472 async fn list_discoverers(
3473 &self,
3474 input: ListDiscoverersRequest,
3475 ) -> Result<ListDiscoverersResponse, RusotoError<ListDiscoverersError>> {
3476 let request_uri = "/v1/discoverers";
3477
3478 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3479 request.set_content_type("application/x-amz-json-1.1".to_owned());
3480
3481 let mut params = Params::new();
3482 if let Some(ref x) = input.discoverer_id_prefix {
3483 params.put("discovererIdPrefix", x);
3484 }
3485 if let Some(ref x) = input.limit {
3486 params.put("limit", x);
3487 }
3488 if let Some(ref x) = input.next_token {
3489 params.put("nextToken", x);
3490 }
3491 if let Some(ref x) = input.source_arn_prefix {
3492 params.put("sourceArnPrefix", x);
3493 }
3494 request.set_params(params);
3495
3496 let mut response = self
3497 .client
3498 .sign_and_dispatch(request)
3499 .await
3500 .map_err(RusotoError::from)?;
3501 if response.status.as_u16() == 200 {
3502 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3503 let result = proto::json::ResponsePayload::new(&response)
3504 .deserialize::<ListDiscoverersResponse, _>()?;
3505
3506 Ok(result)
3507 } else {
3508 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3509 Err(ListDiscoverersError::from_response(response))
3510 }
3511 }
3512
3513 #[allow(unused_mut)]
3515 async fn list_registries(
3516 &self,
3517 input: ListRegistriesRequest,
3518 ) -> Result<ListRegistriesResponse, RusotoError<ListRegistriesError>> {
3519 let request_uri = "/v1/registries";
3520
3521 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3522 request.set_content_type("application/x-amz-json-1.1".to_owned());
3523
3524 let mut params = Params::new();
3525 if let Some(ref x) = input.limit {
3526 params.put("limit", x);
3527 }
3528 if let Some(ref x) = input.next_token {
3529 params.put("nextToken", x);
3530 }
3531 if let Some(ref x) = input.registry_name_prefix {
3532 params.put("registryNamePrefix", x);
3533 }
3534 if let Some(ref x) = input.scope {
3535 params.put("scope", x);
3536 }
3537 request.set_params(params);
3538
3539 let mut response = self
3540 .client
3541 .sign_and_dispatch(request)
3542 .await
3543 .map_err(RusotoError::from)?;
3544 if response.status.as_u16() == 200 {
3545 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3546 let result = proto::json::ResponsePayload::new(&response)
3547 .deserialize::<ListRegistriesResponse, _>()?;
3548
3549 Ok(result)
3550 } else {
3551 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3552 Err(ListRegistriesError::from_response(response))
3553 }
3554 }
3555
3556 #[allow(unused_mut)]
3558 async fn list_schema_versions(
3559 &self,
3560 input: ListSchemaVersionsRequest,
3561 ) -> Result<ListSchemaVersionsResponse, RusotoError<ListSchemaVersionsError>> {
3562 let request_uri = format!(
3563 "/v1/registries/name/{registry_name}/schemas/name/{schema_name}/versions",
3564 registry_name = input.registry_name,
3565 schema_name = input.schema_name
3566 );
3567
3568 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3569 request.set_content_type("application/x-amz-json-1.1".to_owned());
3570
3571 let mut params = Params::new();
3572 if let Some(ref x) = input.limit {
3573 params.put("limit", x);
3574 }
3575 if let Some(ref x) = input.next_token {
3576 params.put("nextToken", x);
3577 }
3578 request.set_params(params);
3579
3580 let mut response = self
3581 .client
3582 .sign_and_dispatch(request)
3583 .await
3584 .map_err(RusotoError::from)?;
3585 if response.status.as_u16() == 200 {
3586 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3587 let result = proto::json::ResponsePayload::new(&response)
3588 .deserialize::<ListSchemaVersionsResponse, _>()?;
3589
3590 Ok(result)
3591 } else {
3592 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3593 Err(ListSchemaVersionsError::from_response(response))
3594 }
3595 }
3596
3597 #[allow(unused_mut)]
3599 async fn list_schemas(
3600 &self,
3601 input: ListSchemasRequest,
3602 ) -> Result<ListSchemasResponse, RusotoError<ListSchemasError>> {
3603 let request_uri = format!(
3604 "/v1/registries/name/{registry_name}/schemas",
3605 registry_name = input.registry_name
3606 );
3607
3608 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3609 request.set_content_type("application/x-amz-json-1.1".to_owned());
3610
3611 let mut params = Params::new();
3612 if let Some(ref x) = input.limit {
3613 params.put("limit", x);
3614 }
3615 if let Some(ref x) = input.next_token {
3616 params.put("nextToken", x);
3617 }
3618 if let Some(ref x) = input.schema_name_prefix {
3619 params.put("schemaNamePrefix", x);
3620 }
3621 request.set_params(params);
3622
3623 let mut response = self
3624 .client
3625 .sign_and_dispatch(request)
3626 .await
3627 .map_err(RusotoError::from)?;
3628 if response.status.as_u16() == 200 {
3629 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3630 let result = proto::json::ResponsePayload::new(&response)
3631 .deserialize::<ListSchemasResponse, _>()?;
3632
3633 Ok(result)
3634 } else {
3635 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3636 Err(ListSchemasError::from_response(response))
3637 }
3638 }
3639
3640 #[allow(unused_mut)]
3642 async fn list_tags_for_resource(
3643 &self,
3644 input: ListTagsForResourceRequest,
3645 ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
3646 let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
3647
3648 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3649 request.set_content_type("application/x-amz-json-1.1".to_owned());
3650
3651 let mut response = self
3652 .client
3653 .sign_and_dispatch(request)
3654 .await
3655 .map_err(RusotoError::from)?;
3656 if response.status.as_u16() == 200 {
3657 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3658 let result = proto::json::ResponsePayload::new(&response)
3659 .deserialize::<ListTagsForResourceResponse, _>()?;
3660
3661 Ok(result)
3662 } else {
3663 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3664 Err(ListTagsForResourceError::from_response(response))
3665 }
3666 }
3667
3668 #[allow(unused_mut)]
3670 async fn put_code_binding(
3671 &self,
3672 input: PutCodeBindingRequest,
3673 ) -> Result<PutCodeBindingResponse, RusotoError<PutCodeBindingError>> {
3674 let request_uri = format!(
3675 "/v1/registries/name/{registry_name}/schemas/name/{schema_name}/language/{language}",
3676 language = input.language,
3677 registry_name = input.registry_name,
3678 schema_name = input.schema_name
3679 );
3680
3681 let mut request = SignedRequest::new("POST", "schemas", &self.region, &request_uri);
3682 request.set_content_type("application/x-amz-json-1.1".to_owned());
3683
3684 let mut params = Params::new();
3685 if let Some(ref x) = input.schema_version {
3686 params.put("schemaVersion", x);
3687 }
3688 request.set_params(params);
3689
3690 let mut response = self
3691 .client
3692 .sign_and_dispatch(request)
3693 .await
3694 .map_err(RusotoError::from)?;
3695 if response.status.as_u16() == 202 {
3696 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3697 let result = proto::json::ResponsePayload::new(&response)
3698 .deserialize::<PutCodeBindingResponse, _>()?;
3699
3700 Ok(result)
3701 } else {
3702 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3703 Err(PutCodeBindingError::from_response(response))
3704 }
3705 }
3706
3707 #[allow(unused_mut)]
3709 async fn put_resource_policy(
3710 &self,
3711 input: PutResourcePolicyRequest,
3712 ) -> Result<PutResourcePolicyResponse, RusotoError<PutResourcePolicyError>> {
3713 let request_uri = "/v1/policy";
3714
3715 let mut request = SignedRequest::new("PUT", "schemas", &self.region, &request_uri);
3716 request.set_content_type("application/x-amz-json-1.1".to_owned());
3717
3718 let encoded = Some(serde_json::to_vec(&input).unwrap());
3719 request.set_payload(encoded);
3720
3721 let mut params = Params::new();
3722 if let Some(ref x) = input.registry_name {
3723 params.put("registryName", x);
3724 }
3725 request.set_params(params);
3726
3727 let mut response = self
3728 .client
3729 .sign_and_dispatch(request)
3730 .await
3731 .map_err(RusotoError::from)?;
3732 if response.status.as_u16() == 200 {
3733 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3734 let result = proto::json::ResponsePayload::new(&response)
3735 .deserialize::<PutResourcePolicyResponse, _>()?;
3736
3737 Ok(result)
3738 } else {
3739 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3740 Err(PutResourcePolicyError::from_response(response))
3741 }
3742 }
3743
3744 #[allow(unused_mut)]
3746 async fn search_schemas(
3747 &self,
3748 input: SearchSchemasRequest,
3749 ) -> Result<SearchSchemasResponse, RusotoError<SearchSchemasError>> {
3750 let request_uri = format!(
3751 "/v1/registries/name/{registry_name}/schemas/search",
3752 registry_name = input.registry_name
3753 );
3754
3755 let mut request = SignedRequest::new("GET", "schemas", &self.region, &request_uri);
3756 request.set_content_type("application/x-amz-json-1.1".to_owned());
3757
3758 let mut params = Params::new();
3759 params.put("keywords", &input.keywords);
3760 if let Some(ref x) = input.limit {
3761 params.put("limit", x);
3762 }
3763 if let Some(ref x) = input.next_token {
3764 params.put("nextToken", x);
3765 }
3766 request.set_params(params);
3767
3768 let mut response = self
3769 .client
3770 .sign_and_dispatch(request)
3771 .await
3772 .map_err(RusotoError::from)?;
3773 if response.status.as_u16() == 200 {
3774 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3775 let result = proto::json::ResponsePayload::new(&response)
3776 .deserialize::<SearchSchemasResponse, _>()?;
3777
3778 Ok(result)
3779 } else {
3780 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3781 Err(SearchSchemasError::from_response(response))
3782 }
3783 }
3784
3785 #[allow(unused_mut)]
3787 async fn start_discoverer(
3788 &self,
3789 input: StartDiscovererRequest,
3790 ) -> Result<StartDiscovererResponse, RusotoError<StartDiscovererError>> {
3791 let request_uri = format!(
3792 "/v1/discoverers/id/{discoverer_id}/start",
3793 discoverer_id = input.discoverer_id
3794 );
3795
3796 let mut request = SignedRequest::new("POST", "schemas", &self.region, &request_uri);
3797 request.set_content_type("application/x-amz-json-1.1".to_owned());
3798
3799 let mut response = self
3800 .client
3801 .sign_and_dispatch(request)
3802 .await
3803 .map_err(RusotoError::from)?;
3804 if response.status.as_u16() == 200 {
3805 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3806 let result = proto::json::ResponsePayload::new(&response)
3807 .deserialize::<StartDiscovererResponse, _>()?;
3808
3809 Ok(result)
3810 } else {
3811 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3812 Err(StartDiscovererError::from_response(response))
3813 }
3814 }
3815
3816 #[allow(unused_mut)]
3818 async fn stop_discoverer(
3819 &self,
3820 input: StopDiscovererRequest,
3821 ) -> Result<StopDiscovererResponse, RusotoError<StopDiscovererError>> {
3822 let request_uri = format!(
3823 "/v1/discoverers/id/{discoverer_id}/stop",
3824 discoverer_id = input.discoverer_id
3825 );
3826
3827 let mut request = SignedRequest::new("POST", "schemas", &self.region, &request_uri);
3828 request.set_content_type("application/x-amz-json-1.1".to_owned());
3829
3830 let mut response = self
3831 .client
3832 .sign_and_dispatch(request)
3833 .await
3834 .map_err(RusotoError::from)?;
3835 if response.status.as_u16() == 200 {
3836 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3837 let result = proto::json::ResponsePayload::new(&response)
3838 .deserialize::<StopDiscovererResponse, _>()?;
3839
3840 Ok(result)
3841 } else {
3842 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3843 Err(StopDiscovererError::from_response(response))
3844 }
3845 }
3846
3847 #[allow(unused_mut)]
3849 async fn tag_resource(
3850 &self,
3851 input: TagResourceRequest,
3852 ) -> Result<(), RusotoError<TagResourceError>> {
3853 let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
3854
3855 let mut request = SignedRequest::new("POST", "schemas", &self.region, &request_uri);
3856 request.set_content_type("application/x-amz-json-1.1".to_owned());
3857
3858 let encoded = Some(serde_json::to_vec(&input).unwrap());
3859 request.set_payload(encoded);
3860
3861 let mut response = self
3862 .client
3863 .sign_and_dispatch(request)
3864 .await
3865 .map_err(RusotoError::from)?;
3866 if response.status.as_u16() == 204 {
3867 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3868 let result = ::std::mem::drop(response);
3869
3870 Ok(result)
3871 } else {
3872 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3873 Err(TagResourceError::from_response(response))
3874 }
3875 }
3876
3877 #[allow(unused_mut)]
3879 async fn untag_resource(
3880 &self,
3881 input: UntagResourceRequest,
3882 ) -> Result<(), RusotoError<UntagResourceError>> {
3883 let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
3884
3885 let mut request = SignedRequest::new("DELETE", "schemas", &self.region, &request_uri);
3886 request.set_content_type("application/x-amz-json-1.1".to_owned());
3887
3888 let mut params = Params::new();
3889 for item in input.tag_keys.iter() {
3890 params.put("tagKeys", item);
3891 }
3892 request.set_params(params);
3893
3894 let mut response = self
3895 .client
3896 .sign_and_dispatch(request)
3897 .await
3898 .map_err(RusotoError::from)?;
3899 if response.status.as_u16() == 204 {
3900 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3901 let result = ::std::mem::drop(response);
3902
3903 Ok(result)
3904 } else {
3905 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3906 Err(UntagResourceError::from_response(response))
3907 }
3908 }
3909
3910 #[allow(unused_mut)]
3912 async fn update_discoverer(
3913 &self,
3914 input: UpdateDiscovererRequest,
3915 ) -> Result<UpdateDiscovererResponse, RusotoError<UpdateDiscovererError>> {
3916 let request_uri = format!(
3917 "/v1/discoverers/id/{discoverer_id}",
3918 discoverer_id = input.discoverer_id
3919 );
3920
3921 let mut request = SignedRequest::new("PUT", "schemas", &self.region, &request_uri);
3922 request.set_content_type("application/x-amz-json-1.1".to_owned());
3923
3924 let encoded = Some(serde_json::to_vec(&input).unwrap());
3925 request.set_payload(encoded);
3926
3927 let mut response = self
3928 .client
3929 .sign_and_dispatch(request)
3930 .await
3931 .map_err(RusotoError::from)?;
3932 if response.status.as_u16() == 200 {
3933 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3934 let result = proto::json::ResponsePayload::new(&response)
3935 .deserialize::<UpdateDiscovererResponse, _>()?;
3936
3937 Ok(result)
3938 } else {
3939 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3940 Err(UpdateDiscovererError::from_response(response))
3941 }
3942 }
3943
3944 #[allow(unused_mut)]
3946 async fn update_registry(
3947 &self,
3948 input: UpdateRegistryRequest,
3949 ) -> Result<UpdateRegistryResponse, RusotoError<UpdateRegistryError>> {
3950 let request_uri = format!(
3951 "/v1/registries/name/{registry_name}",
3952 registry_name = input.registry_name
3953 );
3954
3955 let mut request = SignedRequest::new("PUT", "schemas", &self.region, &request_uri);
3956 request.set_content_type("application/x-amz-json-1.1".to_owned());
3957
3958 let encoded = Some(serde_json::to_vec(&input).unwrap());
3959 request.set_payload(encoded);
3960
3961 let mut response = self
3962 .client
3963 .sign_and_dispatch(request)
3964 .await
3965 .map_err(RusotoError::from)?;
3966 if response.status.as_u16() == 200 {
3967 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3968 let result = proto::json::ResponsePayload::new(&response)
3969 .deserialize::<UpdateRegistryResponse, _>()?;
3970
3971 Ok(result)
3972 } else {
3973 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3974 Err(UpdateRegistryError::from_response(response))
3975 }
3976 }
3977
3978 #[allow(unused_mut)]
3980 async fn update_schema(
3981 &self,
3982 input: UpdateSchemaRequest,
3983 ) -> Result<UpdateSchemaResponse, RusotoError<UpdateSchemaError>> {
3984 let request_uri = format!(
3985 "/v1/registries/name/{registry_name}/schemas/name/{schema_name}",
3986 registry_name = input.registry_name,
3987 schema_name = input.schema_name
3988 );
3989
3990 let mut request = SignedRequest::new("PUT", "schemas", &self.region, &request_uri);
3991 request.set_content_type("application/x-amz-json-1.1".to_owned());
3992
3993 let encoded = Some(serde_json::to_vec(&input).unwrap());
3994 request.set_payload(encoded);
3995
3996 let mut response = self
3997 .client
3998 .sign_and_dispatch(request)
3999 .await
4000 .map_err(RusotoError::from)?;
4001 if response.status.as_u16() == 200 {
4002 let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4003 let result = proto::json::ResponsePayload::new(&response)
4004 .deserialize::<UpdateSchemaResponse, _>()?;
4005
4006 Ok(result)
4007 } else {
4008 let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4009 Err(UpdateSchemaError::from_response(response))
4010 }
4011 }
4012}