aws_sdk_kms/
protocol_serde.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub(crate) fn type_erase_result<O, E>(
3    result: ::std::result::Result<O, E>,
4) -> ::std::result::Result<
5    ::aws_smithy_runtime_api::client::interceptors::context::Output,
6    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError<::aws_smithy_runtime_api::client::interceptors::context::Error>,
7>
8where
9    O: ::std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
10    E: ::std::error::Error + std::fmt::Debug + ::std::marker::Send + ::std::marker::Sync + 'static,
11{
12    result
13        .map(|output| ::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
14        .map_err(|error| ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(error))
15        .map_err(::std::convert::Into::into)
16}
17
18pub fn parse_http_error_metadata(
19    _response_status: u16,
20    response_headers: &::aws_smithy_runtime_api::http::Headers,
21    response_body: &[u8],
22) -> Result<::aws_smithy_types::error::metadata::Builder, ::aws_smithy_json::deserialize::error::DeserializeError> {
23    crate::json_errors::parse_error_metadata(response_body, response_headers)
24}
25
26pub(crate) mod shape_cancel_key_deletion;
27
28pub(crate) mod shape_connect_custom_key_store;
29
30pub(crate) mod shape_create_alias;
31
32pub(crate) mod shape_create_custom_key_store;
33
34pub(crate) mod shape_create_grant;
35
36pub(crate) mod shape_create_key;
37
38pub(crate) mod shape_decrypt;
39
40pub(crate) mod shape_delete_alias;
41
42pub(crate) mod shape_delete_custom_key_store;
43
44pub(crate) mod shape_delete_imported_key_material;
45
46pub(crate) mod shape_derive_shared_secret;
47
48pub(crate) mod shape_describe_custom_key_stores;
49
50pub(crate) mod shape_describe_key;
51
52pub(crate) mod shape_disable_key;
53
54pub(crate) mod shape_disable_key_rotation;
55
56pub(crate) mod shape_disconnect_custom_key_store;
57
58pub(crate) mod shape_enable_key;
59
60pub(crate) mod shape_enable_key_rotation;
61
62pub(crate) mod shape_encrypt;
63
64pub(crate) mod shape_generate_data_key;
65
66pub(crate) mod shape_generate_data_key_pair;
67
68pub(crate) mod shape_generate_data_key_pair_without_plaintext;
69
70pub(crate) mod shape_generate_data_key_without_plaintext;
71
72pub(crate) mod shape_generate_mac;
73
74pub(crate) mod shape_generate_random;
75
76pub(crate) mod shape_get_key_policy;
77
78pub(crate) mod shape_get_key_rotation_status;
79
80pub(crate) mod shape_get_parameters_for_import;
81
82pub(crate) mod shape_get_public_key;
83
84pub(crate) mod shape_import_key_material;
85
86pub(crate) mod shape_list_aliases;
87
88pub(crate) mod shape_list_grants;
89
90pub(crate) mod shape_list_key_policies;
91
92pub(crate) mod shape_list_key_rotations;
93
94pub(crate) mod shape_list_keys;
95
96pub(crate) mod shape_list_resource_tags;
97
98pub(crate) mod shape_list_retirable_grants;
99
100pub(crate) mod shape_put_key_policy;
101
102pub(crate) mod shape_re_encrypt;
103
104pub(crate) mod shape_replicate_key;
105
106pub(crate) mod shape_retire_grant;
107
108pub(crate) mod shape_revoke_grant;
109
110pub(crate) mod shape_rotate_key_on_demand;
111
112pub(crate) mod shape_schedule_key_deletion;
113
114pub(crate) mod shape_sign;
115
116pub(crate) mod shape_tag_resource;
117
118pub(crate) mod shape_untag_resource;
119
120pub(crate) mod shape_update_alias;
121
122pub(crate) mod shape_update_custom_key_store;
123
124pub(crate) mod shape_update_key_description;
125
126pub(crate) mod shape_update_primary_region;
127
128pub(crate) mod shape_verify;
129
130pub(crate) mod shape_verify_mac;
131
132pub(crate) fn or_empty_doc(data: &[u8]) -> &[u8] {
133    if data.is_empty() {
134        b"{}"
135    } else {
136        data
137    }
138}
139
140pub(crate) mod shape_already_exists_exception;
141
142pub(crate) mod shape_cancel_key_deletion_input;
143
144pub(crate) mod shape_cloud_hsm_cluster_in_use_exception;
145
146pub(crate) mod shape_cloud_hsm_cluster_invalid_configuration_exception;
147
148pub(crate) mod shape_cloud_hsm_cluster_not_active_exception;
149
150pub(crate) mod shape_cloud_hsm_cluster_not_found_exception;
151
152pub(crate) mod shape_cloud_hsm_cluster_not_related_exception;
153
154pub(crate) mod shape_conflict_exception;
155
156pub(crate) mod shape_connect_custom_key_store_input;
157
158pub(crate) mod shape_create_alias_input;
159
160pub(crate) mod shape_create_custom_key_store_input;
161
162pub(crate) mod shape_create_grant_input;
163
164pub(crate) mod shape_create_key_input;
165
166pub(crate) mod shape_custom_key_store_has_cmks_exception;
167
168pub(crate) mod shape_custom_key_store_invalid_state_exception;
169
170pub(crate) mod shape_custom_key_store_name_in_use_exception;
171
172pub(crate) mod shape_custom_key_store_not_found_exception;
173
174pub(crate) mod shape_decrypt_input;
175
176pub(crate) mod shape_delete_alias_input;
177
178pub(crate) mod shape_delete_custom_key_store_input;
179
180pub(crate) mod shape_delete_imported_key_material_input;
181
182pub(crate) mod shape_dependency_timeout_exception;
183
184pub(crate) mod shape_derive_shared_secret_input;
185
186pub(crate) mod shape_describe_custom_key_stores_input;
187
188pub(crate) mod shape_describe_key_input;
189
190pub(crate) mod shape_disable_key_input;
191
192pub(crate) mod shape_disable_key_rotation_input;
193
194pub(crate) mod shape_disabled_exception;
195
196pub(crate) mod shape_disconnect_custom_key_store_input;
197
198pub(crate) mod shape_dry_run_operation_exception;
199
200pub(crate) mod shape_enable_key_input;
201
202pub(crate) mod shape_enable_key_rotation_input;
203
204pub(crate) mod shape_encrypt_input;
205
206pub(crate) mod shape_expired_import_token_exception;
207
208pub(crate) mod shape_generate_data_key_input;
209
210pub(crate) mod shape_generate_data_key_pair_input;
211
212pub(crate) mod shape_generate_data_key_pair_without_plaintext_input;
213
214pub(crate) mod shape_generate_data_key_without_plaintext_input;
215
216pub(crate) mod shape_generate_mac_input;
217
218pub(crate) mod shape_generate_random_input;
219
220pub(crate) mod shape_get_key_policy_input;
221
222pub(crate) mod shape_get_key_rotation_status_input;
223
224pub(crate) mod shape_get_parameters_for_import_input;
225
226pub(crate) mod shape_get_public_key_input;
227
228pub(crate) mod shape_import_key_material_input;
229
230pub(crate) mod shape_incorrect_key_exception;
231
232pub(crate) mod shape_incorrect_key_material_exception;
233
234pub(crate) mod shape_incorrect_trust_anchor_exception;
235
236pub(crate) mod shape_invalid_alias_name_exception;
237
238pub(crate) mod shape_invalid_arn_exception;
239
240pub(crate) mod shape_invalid_ciphertext_exception;
241
242pub(crate) mod shape_invalid_grant_id_exception;
243
244pub(crate) mod shape_invalid_grant_token_exception;
245
246pub(crate) mod shape_invalid_import_token_exception;
247
248pub(crate) mod shape_invalid_key_usage_exception;
249
250pub(crate) mod shape_invalid_marker_exception;
251
252pub(crate) mod shape_key_unavailable_exception;
253
254pub(crate) mod shape_kms_internal_exception;
255
256pub(crate) mod shape_kms_invalid_mac_exception;
257
258pub(crate) mod shape_kms_invalid_signature_exception;
259
260pub(crate) mod shape_kms_invalid_state_exception;
261
262pub(crate) mod shape_limit_exceeded_exception;
263
264pub(crate) mod shape_list_aliases_input;
265
266pub(crate) mod shape_list_grants_input;
267
268pub(crate) mod shape_list_key_policies_input;
269
270pub(crate) mod shape_list_key_rotations_input;
271
272pub(crate) mod shape_list_keys_input;
273
274pub(crate) mod shape_list_resource_tags_input;
275
276pub(crate) mod shape_list_retirable_grants_input;
277
278pub(crate) mod shape_malformed_policy_document_exception;
279
280pub(crate) mod shape_not_found_exception;
281
282pub(crate) mod shape_put_key_policy_input;
283
284pub(crate) mod shape_re_encrypt_input;
285
286pub(crate) mod shape_replicate_key_input;
287
288pub(crate) mod shape_retire_grant_input;
289
290pub(crate) mod shape_revoke_grant_input;
291
292pub(crate) mod shape_rotate_key_on_demand_input;
293
294pub(crate) mod shape_schedule_key_deletion_input;
295
296pub(crate) mod shape_sign_input;
297
298pub(crate) mod shape_tag_exception;
299
300pub(crate) mod shape_tag_resource_input;
301
302pub(crate) mod shape_unsupported_operation_exception;
303
304pub(crate) mod shape_untag_resource_input;
305
306pub(crate) mod shape_update_alias_input;
307
308pub(crate) mod shape_update_custom_key_store_input;
309
310pub(crate) mod shape_update_key_description_input;
311
312pub(crate) mod shape_update_primary_region_input;
313
314pub(crate) mod shape_verify_input;
315
316pub(crate) mod shape_verify_mac_input;
317
318pub(crate) mod shape_xks_key_already_in_use_exception;
319
320pub(crate) mod shape_xks_key_invalid_configuration_exception;
321
322pub(crate) mod shape_xks_key_not_found_exception;
323
324pub(crate) mod shape_xks_proxy_incorrect_authentication_credential_exception;
325
326pub(crate) mod shape_xks_proxy_invalid_configuration_exception;
327
328pub(crate) mod shape_xks_proxy_invalid_response_exception;
329
330pub(crate) mod shape_xks_proxy_uri_endpoint_in_use_exception;
331
332pub(crate) mod shape_xks_proxy_uri_in_use_exception;
333
334pub(crate) mod shape_xks_proxy_uri_unreachable_exception;
335
336pub(crate) mod shape_xks_proxy_vpc_endpoint_service_in_use_exception;
337
338pub(crate) mod shape_xks_proxy_vpc_endpoint_service_invalid_configuration_exception;
339
340pub(crate) mod shape_xks_proxy_vpc_endpoint_service_not_found_exception;
341
342pub(crate) mod shape_alias_list;
343
344pub(crate) mod shape_custom_key_stores_list;
345
346pub(crate) mod shape_encryption_algorithm_spec_list;
347
348pub(crate) mod shape_grant_constraints;
349
350pub(crate) mod shape_grant_list;
351
352pub(crate) mod shape_key_agreement_algorithm_spec_list;
353
354pub(crate) mod shape_key_list;
355
356pub(crate) mod shape_key_metadata;
357
358pub(crate) mod shape_policy_name_list;
359
360pub(crate) mod shape_recipient_info;
361
362pub(crate) mod shape_rotations_list;
363
364pub(crate) mod shape_signing_algorithm_spec_list;
365
366pub(crate) mod shape_tag;
367
368pub(crate) mod shape_tag_list;
369
370pub(crate) mod shape_xks_proxy_authentication_credential_type;
371
372pub(crate) mod shape_alias_list_entry;
373
374pub(crate) mod shape_custom_key_stores_list_entry;
375
376pub(crate) mod shape_grant_list_entry;
377
378pub(crate) mod shape_key_list_entry;
379
380pub(crate) mod shape_mac_algorithm_spec_list;
381
382pub(crate) mod shape_multi_region_configuration;
383
384pub(crate) mod shape_rotations_list_entry;
385
386pub(crate) mod shape_xks_key_configuration_type;
387
388pub(crate) mod shape_grant_operation_list;
389
390pub(crate) mod shape_multi_region_key;
391
392pub(crate) mod shape_multi_region_key_list;
393
394pub(crate) mod shape_xks_proxy_configuration_type;
395
396pub(crate) mod shape_encryption_context_type;