aws_esdk/deps/aws_cryptography_primitives/
validation.rs

1// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM(
5    input: &crate::deps::aws_cryptography_primitives::types::AesGcm,
6) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
7    validate_aws_Pcryptography_Pprimitives_HAES__GCM_DkeyLength(&input.r#key_length)?;
8    validate_aws_Pcryptography_Pprimitives_HAES__GCM_DtagLength(&input.r#tag_length)?;
9    validate_aws_Pcryptography_Pprimitives_HAES__GCM_DivLength(&input.r#iv_length)?;
10    Ok(())
11}
12pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DivLength(
13    input: &::std::option::Option<::std::primitive::i32>,
14) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
15    if input.is_none() {
16        return ::std::result::Result::Err(
17            ::aws_smithy_types::error::operation::BuildError::missing_field(
18                "iv_length",
19                "iv_length is required but was not specified",
20            ),
21        );
22    }
23    if input.is_none() {
24        return ::std::result::Result::Ok(());
25    }
26    let input = input.as_ref().unwrap();
27
28    if !(0..=255).contains(input) {
29        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
30        "iv_length",
31        "iv_length failed to satisfy constraint: Member must be between 0 and 255, inclusive",
32    ));
33    }
34    Ok(())
35}
36pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DkeyLength(
37    input: &::std::option::Option<::std::primitive::i32>,
38) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
39    if input.is_none() {
40        return ::std::result::Result::Err(
41            ::aws_smithy_types::error::operation::BuildError::missing_field(
42                "key_length",
43                "key_length is required but was not specified",
44            ),
45        );
46    }
47    if input.is_none() {
48        return ::std::result::Result::Ok(());
49    }
50    let input = input.as_ref().unwrap();
51
52    if !(1..=32).contains(input) {
53        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
54        "key_length",
55        "key_length failed to satisfy constraint: Member must be between 1 and 32, inclusive",
56    ));
57    }
58    Ok(())
59}
60pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAES__GCM_DtagLength(
61    input: &::std::option::Option<::std::primitive::i32>,
62) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
63    if input.is_none() {
64        return ::std::result::Result::Err(
65            ::aws_smithy_types::error::operation::BuildError::missing_field(
66                "tag_length",
67                "tag_length is required but was not specified",
68            ),
69        );
70    }
71    if input.is_none() {
72        return ::std::result::Result::Ok(());
73    }
74    let input = input.as_ref().unwrap();
75
76    if !(0..=32).contains(input) {
77        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
78        "tag_length",
79        "tag_length failed to satisfy constraint: Member must be between 0 and 32, inclusive",
80    ));
81    }
82    Ok(())
83}
84pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput(
85    input: &crate::deps::aws_cryptography_primitives::types::AesDecryptInput,
86) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
87    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DencAlg(&input.r#enc_alg)?;
88    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Dkey(&input.r#key)?;
89    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DcipherTxt(&input.r#cipher_txt)?;
90    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DauthTag(&input.r#auth_tag)?;
91    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Div(&input.r#iv)?;
92    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Daad(&input.r#aad)?;
93    Ok(())
94}
95pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_for_AwsCryptographicPrimitives_AESDecrypt(
96    input: &crate::deps::aws_cryptography_primitives::operation::aes_decrypt::AesDecryptInput,
97) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
98    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DencAlg(&input.r#enc_alg)?;
99    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Dkey(&input.r#key)?;
100    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DcipherTxt(&input.r#cipher_txt)?;
101    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DauthTag(&input.r#auth_tag)?;
102    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Div(&input.r#iv)?;
103    validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Daad(&input.r#aad)?;
104    Ok(())
105}
106pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Daad(
107    input: &::std::option::Option<::aws_smithy_types::Blob>,
108) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
109    if input.is_none() {
110        return ::std::result::Result::Err(
111            ::aws_smithy_types::error::operation::BuildError::missing_field(
112                "aad",
113                "aad is required but was not specified",
114            ),
115        );
116    }
117    if input.is_none() {
118        return ::std::result::Result::Ok(());
119    }
120    let input = input.as_ref().unwrap();
121
122    Ok(())
123}
124pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DauthTag(
125    input: &::std::option::Option<::aws_smithy_types::Blob>,
126) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
127    if input.is_none() {
128        return ::std::result::Result::Err(
129            ::aws_smithy_types::error::operation::BuildError::missing_field(
130                "auth_tag",
131                "auth_tag is required but was not specified",
132            ),
133        );
134    }
135    if input.is_none() {
136        return ::std::result::Result::Ok(());
137    }
138    let input = input.as_ref().unwrap();
139
140    Ok(())
141}
142pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DcipherTxt(
143    input: &::std::option::Option<::aws_smithy_types::Blob>,
144) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
145    if input.is_none() {
146        return ::std::result::Result::Err(
147            ::aws_smithy_types::error::operation::BuildError::missing_field(
148                "cipher_txt",
149                "cipher_txt is required but was not specified",
150            ),
151        );
152    }
153    if input.is_none() {
154        return ::std::result::Result::Ok(());
155    }
156    let input = input.as_ref().unwrap();
157
158    Ok(())
159}
160pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_DencAlg(
161    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::AesGcm>,
162) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
163    if input.is_none() {
164        return ::std::result::Result::Err(
165            ::aws_smithy_types::error::operation::BuildError::missing_field(
166                "enc_alg",
167                "enc_alg is required but was not specified",
168            ),
169        );
170    }
171    if input.is_none() {
172        return ::std::result::Result::Ok(());
173    }
174    let input = input.as_ref().unwrap();
175
176    validate_aws_Pcryptography_Pprimitives_HAES__GCM(input)?;
177    Ok(())
178}
179pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Div(
180    input: &::std::option::Option<::aws_smithy_types::Blob>,
181) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
182    if input.is_none() {
183        return ::std::result::Result::Err(
184            ::aws_smithy_types::error::operation::BuildError::missing_field(
185                "iv",
186                "iv is required but was not specified",
187            ),
188        );
189    }
190    if input.is_none() {
191        return ::std::result::Result::Ok(());
192    }
193    let input = input.as_ref().unwrap();
194
195    Ok(())
196}
197pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptInput_Dkey(
198    input: &::std::option::Option<::aws_smithy_types::Blob>,
199) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
200    if input.is_none() {
201        return ::std::result::Result::Err(
202            ::aws_smithy_types::error::operation::BuildError::missing_field(
203                "key",
204                "key is required but was not specified",
205            ),
206        );
207    }
208    if input.is_none() {
209        return ::std::result::Result::Ok(());
210    }
211    let input = input.as_ref().unwrap();
212
213    Ok(())
214}
215pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput(
216    input: &::aws_smithy_types::Blob,
217) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
218    validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput_Dplaintext(&Some(input.clone()))?;
219    Ok(())
220}
221pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput_for_AwsCryptographicPrimitives_AESDecrypt(
222    input: &::aws_smithy_types::Blob,
223) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
224    validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput_Dplaintext(&Some(input.clone()))?;
225    Ok(())
226}
227pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESDecryptOutput_Dplaintext(
228    input: &::std::option::Option<::aws_smithy_types::Blob>,
229) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
230    if input.is_none() {
231        return ::std::result::Result::Err(
232            ::aws_smithy_types::error::operation::BuildError::missing_field(
233                "plaintext",
234                "plaintext is required but was not specified",
235            ),
236        );
237    }
238    if input.is_none() {
239        return ::std::result::Result::Ok(());
240    }
241    let input = input.as_ref().unwrap();
242
243    Ok(())
244}
245pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput(
246    input: &crate::deps::aws_cryptography_primitives::types::AesEncryptInput,
247) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
248    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_DencAlg(&input.r#enc_alg)?;
249    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Div(&input.r#iv)?;
250    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dkey(&input.r#key)?;
251    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dmsg(&input.r#msg)?;
252    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Daad(&input.r#aad)?;
253    Ok(())
254}
255pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_for_AwsCryptographicPrimitives_AESEncrypt(
256    input: &crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptInput,
257) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
258    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_DencAlg(&input.r#enc_alg)?;
259    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Div(&input.r#iv)?;
260    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dkey(&input.r#key)?;
261    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dmsg(&input.r#msg)?;
262    validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Daad(&input.r#aad)?;
263    Ok(())
264}
265pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Daad(
266    input: &::std::option::Option<::aws_smithy_types::Blob>,
267) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
268    if input.is_none() {
269        return ::std::result::Result::Err(
270            ::aws_smithy_types::error::operation::BuildError::missing_field(
271                "aad",
272                "aad is required but was not specified",
273            ),
274        );
275    }
276    if input.is_none() {
277        return ::std::result::Result::Ok(());
278    }
279    let input = input.as_ref().unwrap();
280
281    Ok(())
282}
283pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_DencAlg(
284    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::AesGcm>,
285) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
286    if input.is_none() {
287        return ::std::result::Result::Err(
288            ::aws_smithy_types::error::operation::BuildError::missing_field(
289                "enc_alg",
290                "enc_alg is required but was not specified",
291            ),
292        );
293    }
294    if input.is_none() {
295        return ::std::result::Result::Ok(());
296    }
297    let input = input.as_ref().unwrap();
298
299    validate_aws_Pcryptography_Pprimitives_HAES__GCM(input)?;
300    Ok(())
301}
302pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Div(
303    input: &::std::option::Option<::aws_smithy_types::Blob>,
304) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
305    if input.is_none() {
306        return ::std::result::Result::Err(
307            ::aws_smithy_types::error::operation::BuildError::missing_field(
308                "iv",
309                "iv is required but was not specified",
310            ),
311        );
312    }
313    if input.is_none() {
314        return ::std::result::Result::Ok(());
315    }
316    let input = input.as_ref().unwrap();
317
318    Ok(())
319}
320pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dkey(
321    input: &::std::option::Option<::aws_smithy_types::Blob>,
322) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
323    if input.is_none() {
324        return ::std::result::Result::Err(
325            ::aws_smithy_types::error::operation::BuildError::missing_field(
326                "key",
327                "key is required but was not specified",
328            ),
329        );
330    }
331    if input.is_none() {
332        return ::std::result::Result::Ok(());
333    }
334    let input = input.as_ref().unwrap();
335
336    Ok(())
337}
338pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptInput_Dmsg(
339    input: &::std::option::Option<::aws_smithy_types::Blob>,
340) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
341    if input.is_none() {
342        return ::std::result::Result::Err(
343            ::aws_smithy_types::error::operation::BuildError::missing_field(
344                "msg",
345                "msg is required but was not specified",
346            ),
347        );
348    }
349    if input.is_none() {
350        return ::std::result::Result::Ok(());
351    }
352    let input = input.as_ref().unwrap();
353
354    Ok(())
355}
356pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput(
357    input: &crate::deps::aws_cryptography_primitives::types::AesEncryptOutput,
358) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
359    validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DcipherText(&input.r#cipher_text)?;
360    validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DauthTag(&input.r#auth_tag)?;
361    Ok(())
362}
363pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_for_AwsCryptographicPrimitives_AESEncrypt(
364    input: &crate::deps::aws_cryptography_primitives::operation::aes_encrypt::AesEncryptOutput,
365) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
366    validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DcipherText(&input.r#cipher_text)?;
367    validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DauthTag(&input.r#auth_tag)?;
368    Ok(())
369}
370pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DauthTag(
371    input: &::std::option::Option<::aws_smithy_types::Blob>,
372) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
373    if input.is_none() {
374        return ::std::result::Result::Err(
375            ::aws_smithy_types::error::operation::BuildError::missing_field(
376                "auth_tag",
377                "auth_tag is required but was not specified",
378            ),
379        );
380    }
381    if input.is_none() {
382        return ::std::result::Result::Ok(());
383    }
384    let input = input.as_ref().unwrap();
385
386    Ok(())
387}
388pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAESEncryptOutput_DcipherText(
389    input: &::std::option::Option<::aws_smithy_types::Blob>,
390) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
391    if input.is_none() {
392        return ::std::result::Result::Err(
393            ::aws_smithy_types::error::operation::BuildError::missing_field(
394                "cipher_text",
395                "cipher_text is required but was not specified",
396            ),
397        );
398    }
399    if input.is_none() {
400        return ::std::result::Result::Ok(());
401    }
402    let input = input.as_ref().unwrap();
403
404    Ok(())
405}
406pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput(
407    input: &crate::deps::aws_cryptography_primitives::types::AesKdfCtrInput,
408) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
409    validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dikm(&input.r#ikm)?;
410    validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_DexpectedLength(
411        &input.r#expected_length,
412    )?;
413    validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dnonce(&input.r#nonce)?;
414    Ok(())
415}
416pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_for_AwsCryptographicPrimitives_AesKdfCounterMode(
417    input: &crate::deps::aws_cryptography_primitives::operation::aes_kdf_counter_mode::AesKdfCtrInput,
418) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
419    validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dikm(&input.r#ikm)?;
420    validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_DexpectedLength(
421        &input.r#expected_length,
422    )?;
423    validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dnonce(&input.r#nonce)?;
424    Ok(())
425}
426pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_DexpectedLength(
427    input: &::std::option::Option<::std::primitive::i32>,
428) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
429    if input.is_none() {
430        return ::std::result::Result::Err(
431            ::aws_smithy_types::error::operation::BuildError::missing_field(
432                "expected_length",
433                "expected_length is required but was not specified",
434            ),
435        );
436    }
437    if input.is_none() {
438        return ::std::result::Result::Ok(());
439    }
440    let input = input.as_ref().unwrap();
441
442    if !(0..).contains(input) {
443        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
444        "expected_length",
445        "expected_length failed to satisfy constraint: Member must be greater than or equal to 0",
446    ));
447    }
448    Ok(())
449}
450pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dikm(
451    input: &::std::option::Option<::aws_smithy_types::Blob>,
452) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
453    if input.is_none() {
454        return ::std::result::Result::Err(
455            ::aws_smithy_types::error::operation::BuildError::missing_field(
456                "ikm",
457                "ikm is required but was not specified",
458            ),
459        );
460    }
461    if input.is_none() {
462        return ::std::result::Result::Ok(());
463    }
464    let input = input.as_ref().unwrap();
465
466    Ok(())
467}
468pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrInput_Dnonce(
469    input: &::std::option::Option<::aws_smithy_types::Blob>,
470) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
471    if input.is_none() {
472        return ::std::result::Result::Ok(());
473    }
474    let input = input.as_ref().unwrap();
475
476    Ok(())
477}
478pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput(
479    input: &::aws_smithy_types::Blob,
480) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
481    validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput_Dokm(&Some(input.clone()))?;
482    Ok(())
483}
484pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput_for_AwsCryptographicPrimitives_AesKdfCounterMode(
485    input: &::aws_smithy_types::Blob,
486) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
487    validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput_Dokm(&Some(input.clone()))?;
488    Ok(())
489}
490pub(crate) fn validate_aws_Pcryptography_Pprimitives_HAesKdfCtrOutput_Dokm(
491    input: &::std::option::Option<::aws_smithy_types::Blob>,
492) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
493    if input.is_none() {
494        return ::std::result::Result::Err(
495            ::aws_smithy_types::error::operation::BuildError::missing_field(
496                "okm",
497                "okm is required but was not specified",
498            ),
499        );
500    }
501    if input.is_none() {
502        return ::std::result::Result::Ok(());
503    }
504    let input = input.as_ref().unwrap();
505
506    Ok(())
507}
508pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput(
509    input: &crate::deps::aws_cryptography_primitives::types::CompressPublicKeyInput,
510) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
511    validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DpublicKey(&input.r#public_key)?;
512    validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DeccCurve(&input.r#ecc_curve)?;
513    Ok(())
514}
515pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_for_AwsCryptographicPrimitives_CompressPublicKey(
516    input: &crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyInput,
517) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
518    validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DpublicKey(&input.r#public_key)?;
519    validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DeccCurve(&input.r#ecc_curve)?;
520    Ok(())
521}
522pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DeccCurve(
523    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec>,
524) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
525    if input.is_none() {
526        return ::std::result::Result::Err(
527            ::aws_smithy_types::error::operation::BuildError::missing_field(
528                "ecc_curve",
529                "ecc_curve is required but was not specified",
530            ),
531        );
532    }
533    if input.is_none() {
534        return ::std::result::Result::Ok(());
535    }
536    let input = input.as_ref().unwrap();
537
538    Ok(())
539}
540pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyInput_DpublicKey(
541    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPublicKey>,
542) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
543    if input.is_none() {
544        return ::std::result::Result::Err(
545            ::aws_smithy_types::error::operation::BuildError::missing_field(
546                "public_key",
547                "public_key is required but was not specified",
548            ),
549        );
550    }
551    if input.is_none() {
552        return ::std::result::Result::Ok(());
553    }
554    let input = input.as_ref().unwrap();
555
556    validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?;
557    Ok(())
558}
559pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput(
560    input: &crate::deps::aws_cryptography_primitives::types::CompressPublicKeyOutput,
561) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
562    validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput_DcompressedPublicKey(
563        &input.r#compressed_public_key,
564    )?;
565    Ok(())
566}
567pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput_for_AwsCryptographicPrimitives_CompressPublicKey(
568    input: &crate::deps::aws_cryptography_primitives::operation::compress_public_key::CompressPublicKeyOutput,
569) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
570    validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput_DcompressedPublicKey(
571        &input.r#compressed_public_key,
572    )?;
573    Ok(())
574}
575pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCompressPublicKeyOutput_DcompressedPublicKey(
576    input: &::std::option::Option<::aws_smithy_types::Blob>,
577) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
578    if input.is_none() {
579        return ::std::result::Result::Err(
580            ::aws_smithy_types::error::operation::BuildError::missing_field(
581                "compressed_public_key",
582                "compressed_public_key is required but was not specified",
583            ),
584        );
585    }
586    if input.is_none() {
587        return ::std::result::Result::Ok(());
588    }
589    let input = input.as_ref().unwrap();
590
591    Ok(())
592}
593pub(crate) fn validate_aws_Pcryptography_Pprimitives_HCryptoConfig(
594    input: &crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig,
595) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
596    Ok(())
597}
598pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput(
599    input: &crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyInput,
600) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
601    validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DcompressedPublicKey(
602        &input.r#compressed_public_key,
603    )?;
604    validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DeccCurve(&input.r#ecc_curve)?;
605    Ok(())
606}
607pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_for_AwsCryptographicPrimitives_DecompressPublicKey(
608    input: &crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyInput,
609) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
610    validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DcompressedPublicKey(
611        &input.r#compressed_public_key,
612    )?;
613    validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DeccCurve(&input.r#ecc_curve)?;
614    Ok(())
615}
616pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DcompressedPublicKey(
617    input: &::std::option::Option<::aws_smithy_types::Blob>,
618) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
619    if input.is_none() {
620        return ::std::result::Result::Err(
621            ::aws_smithy_types::error::operation::BuildError::missing_field(
622                "compressed_public_key",
623                "compressed_public_key is required but was not specified",
624            ),
625        );
626    }
627    if input.is_none() {
628        return ::std::result::Result::Ok(());
629    }
630    let input = input.as_ref().unwrap();
631
632    Ok(())
633}
634pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyInput_DeccCurve(
635    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec>,
636) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
637    if input.is_none() {
638        return ::std::result::Result::Err(
639            ::aws_smithy_types::error::operation::BuildError::missing_field(
640                "ecc_curve",
641                "ecc_curve is required but was not specified",
642            ),
643        );
644    }
645    if input.is_none() {
646        return ::std::result::Result::Ok(());
647    }
648    let input = input.as_ref().unwrap();
649
650    Ok(())
651}
652pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput(
653    input: &crate::deps::aws_cryptography_primitives::types::DecompressPublicKeyOutput,
654) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
655    validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput_DpublicKey(
656        &input.r#public_key,
657    )?;
658    Ok(())
659}
660pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput_for_AwsCryptographicPrimitives_DecompressPublicKey(
661    input: &crate::deps::aws_cryptography_primitives::operation::decompress_public_key::DecompressPublicKeyOutput,
662) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
663    validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput_DpublicKey(
664        &input.r#public_key,
665    )?;
666    Ok(())
667}
668pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDecompressPublicKeyOutput_DpublicKey(
669    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPublicKey>,
670) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
671    if input.is_none() {
672        return ::std::result::Result::Err(
673            ::aws_smithy_types::error::operation::BuildError::missing_field(
674                "public_key",
675                "public_key is required but was not specified",
676            ),
677        );
678    }
679    if input.is_none() {
680        return ::std::result::Result::Ok(());
681    }
682    let input = input.as_ref().unwrap();
683
684    validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?;
685    Ok(())
686}
687pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput(
688    input: &crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretInput,
689) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
690    validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DeccCurve(&input.r#ecc_curve)?;
691    validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DprivateKey(
692        &input.r#private_key,
693    )?;
694    validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DpublicKey(
695        &input.r#public_key,
696    )?;
697    Ok(())
698}
699pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_for_AwsCryptographicPrimitives_DeriveSharedSecret(
700    input: &crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretInput,
701) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
702    validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DeccCurve(&input.r#ecc_curve)?;
703    validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DprivateKey(
704        &input.r#private_key,
705    )?;
706    validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DpublicKey(
707        &input.r#public_key,
708    )?;
709    Ok(())
710}
711pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DeccCurve(
712    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec>,
713) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
714    if input.is_none() {
715        return ::std::result::Result::Err(
716            ::aws_smithy_types::error::operation::BuildError::missing_field(
717                "ecc_curve",
718                "ecc_curve is required but was not specified",
719            ),
720        );
721    }
722    if input.is_none() {
723        return ::std::result::Result::Ok(());
724    }
725    let input = input.as_ref().unwrap();
726
727    Ok(())
728}
729pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DprivateKey(
730    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPrivateKey>,
731) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
732    if input.is_none() {
733        return ::std::result::Result::Err(
734            ::aws_smithy_types::error::operation::BuildError::missing_field(
735                "private_key",
736                "private_key is required but was not specified",
737            ),
738        );
739    }
740    if input.is_none() {
741        return ::std::result::Result::Ok(());
742    }
743    let input = input.as_ref().unwrap();
744
745    validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input)?;
746    Ok(())
747}
748pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretInput_DpublicKey(
749    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPublicKey>,
750) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
751    if input.is_none() {
752        return ::std::result::Result::Err(
753            ::aws_smithy_types::error::operation::BuildError::missing_field(
754                "public_key",
755                "public_key is required but was not specified",
756            ),
757        );
758    }
759    if input.is_none() {
760        return ::std::result::Result::Ok(());
761    }
762    let input = input.as_ref().unwrap();
763
764    validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?;
765    Ok(())
766}
767pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput(
768    input: &crate::deps::aws_cryptography_primitives::types::DeriveSharedSecretOutput,
769) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
770    validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput_DsharedSecret(
771        &input.r#shared_secret,
772    )?;
773    Ok(())
774}
775pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput_for_AwsCryptographicPrimitives_DeriveSharedSecret(
776    input: &crate::deps::aws_cryptography_primitives::operation::derive_shared_secret::DeriveSharedSecretOutput,
777) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
778    validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput_DsharedSecret(
779        &input.r#shared_secret,
780    )?;
781    Ok(())
782}
783pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDeriveSharedSecretOutput_DsharedSecret(
784    input: &::std::option::Option<::aws_smithy_types::Blob>,
785) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
786    if input.is_none() {
787        return ::std::result::Result::Err(
788            ::aws_smithy_types::error::operation::BuildError::missing_field(
789                "shared_secret",
790                "shared_secret is required but was not specified",
791            ),
792        );
793    }
794    if input.is_none() {
795        return ::std::result::Result::Ok(());
796    }
797    let input = input.as_ref().unwrap();
798
799    Ok(())
800}
801pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestInput(
802    input: &crate::deps::aws_cryptography_primitives::types::DigestInput,
803) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
804    validate_aws_Pcryptography_Pprimitives_HDigestInput_DdigestAlgorithm(
805        &input.r#digest_algorithm,
806    )?;
807    validate_aws_Pcryptography_Pprimitives_HDigestInput_Dmessage(&input.r#message)?;
808    Ok(())
809}
810pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestInput_for_AwsCryptographicPrimitives_Digest(
811    input: &crate::deps::aws_cryptography_primitives::operation::digest::DigestInput,
812) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
813    validate_aws_Pcryptography_Pprimitives_HDigestInput_DdigestAlgorithm(
814        &input.r#digest_algorithm,
815    )?;
816    validate_aws_Pcryptography_Pprimitives_HDigestInput_Dmessage(&input.r#message)?;
817    Ok(())
818}
819pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestInput_DdigestAlgorithm(
820    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::DigestAlgorithm>,
821) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
822    if input.is_none() {
823        return ::std::result::Result::Err(
824            ::aws_smithy_types::error::operation::BuildError::missing_field(
825                "digest_algorithm",
826                "digest_algorithm is required but was not specified",
827            ),
828        );
829    }
830    if input.is_none() {
831        return ::std::result::Result::Ok(());
832    }
833    let input = input.as_ref().unwrap();
834
835    Ok(())
836}
837pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestInput_Dmessage(
838    input: &::std::option::Option<::aws_smithy_types::Blob>,
839) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
840    if input.is_none() {
841        return ::std::result::Result::Err(
842            ::aws_smithy_types::error::operation::BuildError::missing_field(
843                "message",
844                "message is required but was not specified",
845            ),
846        );
847    }
848    if input.is_none() {
849        return ::std::result::Result::Ok(());
850    }
851    let input = input.as_ref().unwrap();
852
853    Ok(())
854}
855pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestOutput(
856    input: &::aws_smithy_types::Blob,
857) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
858    validate_aws_Pcryptography_Pprimitives_HDigestOutput_Ddigest(&Some(input.clone()))?;
859    Ok(())
860}
861pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestOutput_for_AwsCryptographicPrimitives_Digest(
862    input: &::aws_smithy_types::Blob,
863) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
864    validate_aws_Pcryptography_Pprimitives_HDigestOutput_Ddigest(&Some(input.clone()))?;
865    Ok(())
866}
867pub(crate) fn validate_aws_Pcryptography_Pprimitives_HDigestOutput_Ddigest(
868    input: &::std::option::Option<::aws_smithy_types::Blob>,
869) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
870    if input.is_none() {
871        return ::std::result::Result::Err(
872            ::aws_smithy_types::error::operation::BuildError::missing_field(
873                "digest",
874                "digest is required but was not specified",
875            ),
876        );
877    }
878    if input.is_none() {
879        return ::std::result::Result::Ok(());
880    }
881    let input = input.as_ref().unwrap();
882
883    Ok(())
884}
885pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(
886    input: &crate::deps::aws_cryptography_primitives::types::EccPrivateKey,
887) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
888    validate_aws_Pcryptography_Pprimitives_HECCPrivateKey_Dpem(&input.r#pem)?;
889    Ok(())
890}
891pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECCPrivateKey_Dpem(
892    input: &::std::option::Option<::aws_smithy_types::Blob>,
893) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
894    if input.is_none() {
895        return ::std::result::Result::Err(
896            ::aws_smithy_types::error::operation::BuildError::missing_field(
897                "pem",
898                "pem is required but was not specified",
899            ),
900        );
901    }
902    if input.is_none() {
903        return ::std::result::Result::Ok(());
904    }
905    let input = input.as_ref().unwrap();
906
907    Ok(())
908}
909pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECCPublicKey(
910    input: &crate::deps::aws_cryptography_primitives::types::EccPublicKey,
911) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
912    validate_aws_Pcryptography_Pprimitives_HECCPublicKey_Dder(&input.r#der)?;
913    Ok(())
914}
915pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECCPublicKey_Dder(
916    input: &::std::option::Option<::aws_smithy_types::Blob>,
917) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
918    if input.is_none() {
919        return ::std::result::Result::Err(
920            ::aws_smithy_types::error::operation::BuildError::missing_field(
921                "der",
922                "der is required but was not specified",
923            ),
924        );
925    }
926    if input.is_none() {
927        return ::std::result::Result::Ok(());
928    }
929    let input = input.as_ref().unwrap();
930
931    Ok(())
932}
933pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput(
934    input: &crate::deps::aws_cryptography_primitives::types::EcdsaSignInput,
935) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
936    validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsignatureAlgorithm(
937        &input.r#signature_algorithm,
938    )?;
939    validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsigningKey(&input.r#signing_key)?;
940    validate_aws_Pcryptography_Pprimitives_HECDSASignInput_Dmessage(&input.r#message)?;
941    Ok(())
942}
943pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput_for_AwsCryptographicPrimitives_ECDSASign(
944    input: &crate::deps::aws_cryptography_primitives::operation::ecdsa_sign::EcdsaSignInput,
945) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
946    validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsignatureAlgorithm(
947        &input.r#signature_algorithm,
948    )?;
949    validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsigningKey(&input.r#signing_key)?;
950    validate_aws_Pcryptography_Pprimitives_HECDSASignInput_Dmessage(&input.r#message)?;
951    Ok(())
952}
953pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput_Dmessage(
954    input: &::std::option::Option<::aws_smithy_types::Blob>,
955) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
956    if input.is_none() {
957        return ::std::result::Result::Err(
958            ::aws_smithy_types::error::operation::BuildError::missing_field(
959                "message",
960                "message is required but was not specified",
961            ),
962        );
963    }
964    if input.is_none() {
965        return ::std::result::Result::Ok(());
966    }
967    let input = input.as_ref().unwrap();
968
969    Ok(())
970}
971pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsignatureAlgorithm(
972    input: &::std::option::Option<
973        crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm,
974    >,
975) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
976    if input.is_none() {
977        return ::std::result::Result::Err(
978            ::aws_smithy_types::error::operation::BuildError::missing_field(
979                "signature_algorithm",
980                "signature_algorithm is required but was not specified",
981            ),
982        );
983    }
984    if input.is_none() {
985        return ::std::result::Result::Ok(());
986    }
987    let input = input.as_ref().unwrap();
988
989    Ok(())
990}
991pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignInput_DsigningKey(
992    input: &::std::option::Option<::aws_smithy_types::Blob>,
993) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
994    if input.is_none() {
995        return ::std::result::Result::Err(
996            ::aws_smithy_types::error::operation::BuildError::missing_field(
997                "signing_key",
998                "signing_key is required but was not specified",
999            ),
1000        );
1001    }
1002    if input.is_none() {
1003        return ::std::result::Result::Ok(());
1004    }
1005    let input = input.as_ref().unwrap();
1006
1007    Ok(())
1008}
1009pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignOutput(
1010    input: &::aws_smithy_types::Blob,
1011) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1012    validate_aws_Pcryptography_Pprimitives_HECDSASignOutput_Dsignature(&Some(input.clone()))?;
1013    Ok(())
1014}
1015pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignOutput_for_AwsCryptographicPrimitives_ECDSASign(
1016    input: &::aws_smithy_types::Blob,
1017) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1018    validate_aws_Pcryptography_Pprimitives_HECDSASignOutput_Dsignature(&Some(input.clone()))?;
1019    Ok(())
1020}
1021pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSASignOutput_Dsignature(
1022    input: &::std::option::Option<::aws_smithy_types::Blob>,
1023) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1024    if input.is_none() {
1025        return ::std::result::Result::Err(
1026            ::aws_smithy_types::error::operation::BuildError::missing_field(
1027                "signature",
1028                "signature is required but was not specified",
1029            ),
1030        );
1031    }
1032    if input.is_none() {
1033        return ::std::result::Result::Ok(());
1034    }
1035    let input = input.as_ref().unwrap();
1036
1037    Ok(())
1038}
1039pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput(
1040    input: &crate::deps::aws_cryptography_primitives::types::EcdsaVerifyInput,
1041) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1042    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DsignatureAlgorithm(
1043        &input.r#signature_algorithm,
1044    )?;
1045    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DverificationKey(
1046        &input.r#verification_key,
1047    )?;
1048    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dmessage(&input.r#message)?;
1049    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dsignature(&input.r#signature)?;
1050    Ok(())
1051}
1052pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_for_AwsCryptographicPrimitives_ECDSAVerify(
1053    input: &crate::deps::aws_cryptography_primitives::operation::ecdsa_verify::EcdsaVerifyInput,
1054) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1055    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DsignatureAlgorithm(
1056        &input.r#signature_algorithm,
1057    )?;
1058    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DverificationKey(
1059        &input.r#verification_key,
1060    )?;
1061    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dmessage(&input.r#message)?;
1062    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dsignature(&input.r#signature)?;
1063    Ok(())
1064}
1065pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dmessage(
1066    input: &::std::option::Option<::aws_smithy_types::Blob>,
1067) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1068    if input.is_none() {
1069        return ::std::result::Result::Err(
1070            ::aws_smithy_types::error::operation::BuildError::missing_field(
1071                "message",
1072                "message is required but was not specified",
1073            ),
1074        );
1075    }
1076    if input.is_none() {
1077        return ::std::result::Result::Ok(());
1078    }
1079    let input = input.as_ref().unwrap();
1080
1081    Ok(())
1082}
1083pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_Dsignature(
1084    input: &::std::option::Option<::aws_smithy_types::Blob>,
1085) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1086    if input.is_none() {
1087        return ::std::result::Result::Err(
1088            ::aws_smithy_types::error::operation::BuildError::missing_field(
1089                "signature",
1090                "signature is required but was not specified",
1091            ),
1092        );
1093    }
1094    if input.is_none() {
1095        return ::std::result::Result::Ok(());
1096    }
1097    let input = input.as_ref().unwrap();
1098
1099    Ok(())
1100}
1101pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DsignatureAlgorithm(
1102    input: &::std::option::Option<
1103        crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm,
1104    >,
1105) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1106    if input.is_none() {
1107        return ::std::result::Result::Err(
1108            ::aws_smithy_types::error::operation::BuildError::missing_field(
1109                "signature_algorithm",
1110                "signature_algorithm is required but was not specified",
1111            ),
1112        );
1113    }
1114    if input.is_none() {
1115        return ::std::result::Result::Ok(());
1116    }
1117    let input = input.as_ref().unwrap();
1118
1119    Ok(())
1120}
1121pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyInput_DverificationKey(
1122    input: &::std::option::Option<::aws_smithy_types::Blob>,
1123) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1124    if input.is_none() {
1125        return ::std::result::Result::Err(
1126            ::aws_smithy_types::error::operation::BuildError::missing_field(
1127                "verification_key",
1128                "verification_key is required but was not specified",
1129            ),
1130        );
1131    }
1132    if input.is_none() {
1133        return ::std::result::Result::Ok(());
1134    }
1135    let input = input.as_ref().unwrap();
1136
1137    Ok(())
1138}
1139pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput(
1140    input: &::std::primitive::bool,
1141) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1142    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput_Dsuccess(&Some(input.clone()))?;
1143    Ok(())
1144}
1145pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput_for_AwsCryptographicPrimitives_ECDSAVerify(
1146    input: &::std::primitive::bool,
1147) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1148    validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput_Dsuccess(&Some(input.clone()))?;
1149    Ok(())
1150}
1151pub(crate) fn validate_aws_Pcryptography_Pprimitives_HECDSAVerifyOutput_Dsuccess(
1152    input: &::std::option::Option<::std::primitive::bool>,
1153) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1154    if input.is_none() {
1155        return ::std::result::Result::Err(
1156            ::aws_smithy_types::error::operation::BuildError::missing_field(
1157                "success",
1158                "success is required but was not specified",
1159            ),
1160        );
1161    }
1162    if input.is_none() {
1163        return ::std::result::Result::Ok(());
1164    }
1165    let input = input.as_ref().unwrap();
1166
1167    Ok(())
1168}
1169pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput(
1170    input: &crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairInput,
1171) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1172    validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_DeccCurve(&input.r#ecc_curve)?;
1173    Ok(())
1174}
1175pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_for_AwsCryptographicPrimitives_GenerateECCKeyPair(
1176    input: &crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairInput,
1177) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1178    validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_DeccCurve(&input.r#ecc_curve)?;
1179    Ok(())
1180}
1181pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairInput_DeccCurve(
1182    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec>,
1183) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1184    if input.is_none() {
1185        return ::std::result::Result::Err(
1186            ::aws_smithy_types::error::operation::BuildError::missing_field(
1187                "ecc_curve",
1188                "ecc_curve is required but was not specified",
1189            ),
1190        );
1191    }
1192    if input.is_none() {
1193        return ::std::result::Result::Ok(());
1194    }
1195    let input = input.as_ref().unwrap();
1196
1197    Ok(())
1198}
1199pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput(
1200    input: &crate::deps::aws_cryptography_primitives::types::GenerateEccKeyPairOutput,
1201) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1202    validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DeccCurve(&input.r#ecc_curve)?;
1203    validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DprivateKey(
1204        &input.r#private_key,
1205    )?;
1206    validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DpublicKey(
1207        &input.r#public_key,
1208    )?;
1209    Ok(())
1210}
1211pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_for_AwsCryptographicPrimitives_GenerateECCKeyPair(
1212    input: &crate::deps::aws_cryptography_primitives::operation::generate_ecc_key_pair::GenerateEccKeyPairOutput,
1213) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1214    validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DeccCurve(&input.r#ecc_curve)?;
1215    validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DprivateKey(
1216        &input.r#private_key,
1217    )?;
1218    validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DpublicKey(
1219        &input.r#public_key,
1220    )?;
1221    Ok(())
1222}
1223pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DeccCurve(
1224    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec>,
1225) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1226    if input.is_none() {
1227        return ::std::result::Result::Err(
1228            ::aws_smithy_types::error::operation::BuildError::missing_field(
1229                "ecc_curve",
1230                "ecc_curve is required but was not specified",
1231            ),
1232        );
1233    }
1234    if input.is_none() {
1235        return ::std::result::Result::Ok(());
1236    }
1237    let input = input.as_ref().unwrap();
1238
1239    Ok(())
1240}
1241pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DprivateKey(
1242    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPrivateKey>,
1243) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1244    if input.is_none() {
1245        return ::std::result::Result::Err(
1246            ::aws_smithy_types::error::operation::BuildError::missing_field(
1247                "private_key",
1248                "private_key is required but was not specified",
1249            ),
1250        );
1251    }
1252    if input.is_none() {
1253        return ::std::result::Result::Ok(());
1254    }
1255    let input = input.as_ref().unwrap();
1256
1257    validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input)?;
1258    Ok(())
1259}
1260pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECCKeyPairOutput_DpublicKey(
1261    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPublicKey>,
1262) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1263    if input.is_none() {
1264        return ::std::result::Result::Err(
1265            ::aws_smithy_types::error::operation::BuildError::missing_field(
1266                "public_key",
1267                "public_key is required but was not specified",
1268            ),
1269        );
1270    }
1271    if input.is_none() {
1272        return ::std::result::Result::Ok(());
1273    }
1274    let input = input.as_ref().unwrap();
1275
1276    validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?;
1277    Ok(())
1278}
1279pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput(
1280    input: &crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyInput,
1281) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1282    validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_DsignatureAlgorithm(
1283        &input.r#signature_algorithm,
1284    )?;
1285    Ok(())
1286}
1287pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_for_AwsCryptographicPrimitives_GenerateECDSASignatureKey(
1288    input: &crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyInput,
1289) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1290    validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_DsignatureAlgorithm(
1291        &input.r#signature_algorithm,
1292    )?;
1293    Ok(())
1294}
1295pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyInput_DsignatureAlgorithm(
1296    input: &::std::option::Option<
1297        crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm,
1298    >,
1299) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1300    if input.is_none() {
1301        return ::std::result::Result::Err(
1302            ::aws_smithy_types::error::operation::BuildError::missing_field(
1303                "signature_algorithm",
1304                "signature_algorithm is required but was not specified",
1305            ),
1306        );
1307    }
1308    if input.is_none() {
1309        return ::std::result::Result::Ok(());
1310    }
1311    let input = input.as_ref().unwrap();
1312
1313    Ok(())
1314}
1315pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput(
1316    input: &crate::deps::aws_cryptography_primitives::types::GenerateEcdsaSignatureKeyOutput,
1317) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1318    validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsignatureAlgorithm(
1319        &input.r#signature_algorithm,
1320    )?;
1321    validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DverificationKey(
1322        &input.r#verification_key,
1323    )?;
1324    validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsigningKey(
1325        &input.r#signing_key,
1326    )?;
1327    Ok(())
1328}
1329pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_for_AwsCryptographicPrimitives_GenerateECDSASignatureKey(
1330    input: &crate::deps::aws_cryptography_primitives::operation::generate_ecdsa_signature_key::GenerateEcdsaSignatureKeyOutput,
1331) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1332    validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsignatureAlgorithm(
1333        &input.r#signature_algorithm,
1334    )?;
1335    validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DverificationKey(
1336        &input.r#verification_key,
1337    )?;
1338    validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsigningKey(
1339        &input.r#signing_key,
1340    )?;
1341    Ok(())
1342}
1343pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsignatureAlgorithm(
1344    input: &::std::option::Option<
1345        crate::deps::aws_cryptography_primitives::types::EcdsaSignatureAlgorithm,
1346    >,
1347) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1348    if input.is_none() {
1349        return ::std::result::Result::Err(
1350            ::aws_smithy_types::error::operation::BuildError::missing_field(
1351                "signature_algorithm",
1352                "signature_algorithm is required but was not specified",
1353            ),
1354        );
1355    }
1356    if input.is_none() {
1357        return ::std::result::Result::Ok(());
1358    }
1359    let input = input.as_ref().unwrap();
1360
1361    Ok(())
1362}
1363pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DsigningKey(
1364    input: &::std::option::Option<::aws_smithy_types::Blob>,
1365) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1366    if input.is_none() {
1367        return ::std::result::Result::Err(
1368            ::aws_smithy_types::error::operation::BuildError::missing_field(
1369                "signing_key",
1370                "signing_key is required but was not specified",
1371            ),
1372        );
1373    }
1374    if input.is_none() {
1375        return ::std::result::Result::Ok(());
1376    }
1377    let input = input.as_ref().unwrap();
1378
1379    Ok(())
1380}
1381pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateECDSASignatureKeyOutput_DverificationKey(
1382    input: &::std::option::Option<::aws_smithy_types::Blob>,
1383) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1384    if input.is_none() {
1385        return ::std::result::Result::Err(
1386            ::aws_smithy_types::error::operation::BuildError::missing_field(
1387                "verification_key",
1388                "verification_key is required but was not specified",
1389            ),
1390        );
1391    }
1392    if input.is_none() {
1393        return ::std::result::Result::Ok(());
1394    }
1395    let input = input.as_ref().unwrap();
1396
1397    Ok(())
1398}
1399pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput(
1400    input: &crate::deps::aws_cryptography_primitives::types::GenerateRandomBytesInput,
1401) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1402    validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_Dlength(&input.r#length)?;
1403    Ok(())
1404}
1405pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_for_AwsCryptographicPrimitives_GenerateRandomBytes(
1406    input: &crate::deps::aws_cryptography_primitives::operation::generate_random_bytes::GenerateRandomBytesInput,
1407) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1408    validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_Dlength(&input.r#length)?;
1409    Ok(())
1410}
1411pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesInput_Dlength(
1412    input: &::std::option::Option<::std::primitive::i32>,
1413) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1414    if input.is_none() {
1415        return ::std::result::Result::Err(
1416            ::aws_smithy_types::error::operation::BuildError::missing_field(
1417                "length",
1418                "length is required but was not specified",
1419            ),
1420        );
1421    }
1422    if input.is_none() {
1423        return ::std::result::Result::Ok(());
1424    }
1425    let input = input.as_ref().unwrap();
1426
1427    if !(0..).contains(input) {
1428        return ::std::result::Result::Err(
1429            ::aws_smithy_types::error::operation::BuildError::invalid_field(
1430                "length",
1431                "length failed to satisfy constraint: Member must be greater than or equal to 0",
1432            ),
1433        );
1434    }
1435    Ok(())
1436}
1437pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput(
1438    input: &::aws_smithy_types::Blob,
1439) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1440    validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput_Ddata(&Some(input.clone()))?;
1441    Ok(())
1442}
1443pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput_for_AwsCryptographicPrimitives_GenerateRandomBytes(
1444    input: &::aws_smithy_types::Blob,
1445) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1446    validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput_Ddata(&Some(input.clone()))?;
1447    Ok(())
1448}
1449pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRandomBytesOutput_Ddata(
1450    input: &::std::option::Option<::aws_smithy_types::Blob>,
1451) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1452    if input.is_none() {
1453        return ::std::result::Result::Err(
1454            ::aws_smithy_types::error::operation::BuildError::missing_field(
1455                "data",
1456                "data is required but was not specified",
1457            ),
1458        );
1459    }
1460    if input.is_none() {
1461        return ::std::result::Result::Ok(());
1462    }
1463    let input = input.as_ref().unwrap();
1464
1465    Ok(())
1466}
1467pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput(
1468    input: &crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairInput,
1469) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1470    validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_DlengthBits(
1471        &input.r#length_bits,
1472    )?;
1473    Ok(())
1474}
1475pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_for_AwsCryptographicPrimitives_GenerateRSAKeyPair(
1476    input: &crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairInput,
1477) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1478    validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_DlengthBits(
1479        &input.r#length_bits,
1480    )?;
1481    Ok(())
1482}
1483pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairInput_DlengthBits(
1484    input: &::std::option::Option<::std::primitive::i32>,
1485) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1486    if input.is_none() {
1487        return ::std::result::Result::Err(
1488            ::aws_smithy_types::error::operation::BuildError::missing_field(
1489                "length_bits",
1490                "length_bits is required but was not specified",
1491            ),
1492        );
1493    }
1494    if input.is_none() {
1495        return ::std::result::Result::Ok(());
1496    }
1497    let input = input.as_ref().unwrap();
1498
1499    if !(81..=4096).contains(input) {
1500        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
1501        "length_bits",
1502        "length_bits failed to satisfy constraint: Member must be between 81 and 4096, inclusive",
1503    ));
1504    }
1505    Ok(())
1506}
1507pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput(
1508    input: &crate::deps::aws_cryptography_primitives::types::GenerateRsaKeyPairOutput,
1509) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1510    validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DpublicKey(
1511        &input.r#public_key,
1512    )?;
1513    validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DprivateKey(
1514        &input.r#private_key,
1515    )?;
1516    Ok(())
1517}
1518pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_for_AwsCryptographicPrimitives_GenerateRSAKeyPair(
1519    input: &crate::deps::aws_cryptography_primitives::operation::generate_rsa_key_pair::GenerateRsaKeyPairOutput,
1520) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1521    validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DpublicKey(
1522        &input.r#public_key,
1523    )?;
1524    validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DprivateKey(
1525        &input.r#private_key,
1526    )?;
1527    Ok(())
1528}
1529pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DprivateKey(
1530    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::RsaPrivateKey>,
1531) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1532    if input.is_none() {
1533        return ::std::result::Result::Err(
1534            ::aws_smithy_types::error::operation::BuildError::missing_field(
1535                "private_key",
1536                "private_key is required but was not specified",
1537            ),
1538        );
1539    }
1540    if input.is_none() {
1541        return ::std::result::Result::Ok(());
1542    }
1543    let input = input.as_ref().unwrap();
1544
1545    validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey(input)?;
1546    Ok(())
1547}
1548pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGenerateRSAKeyPairOutput_DpublicKey(
1549    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::RsaPublicKey>,
1550) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1551    if input.is_none() {
1552        return ::std::result::Result::Err(
1553            ::aws_smithy_types::error::operation::BuildError::missing_field(
1554                "public_key",
1555                "public_key is required but was not specified",
1556            ),
1557        );
1558    }
1559    if input.is_none() {
1560        return ::std::result::Result::Ok(());
1561    }
1562    let input = input.as_ref().unwrap();
1563
1564    validate_aws_Pcryptography_Pprimitives_HRSAPublicKey(input)?;
1565    Ok(())
1566}
1567pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput(
1568    input: &crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyInput,
1569) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1570    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DeccCurve(
1571        &input.r#ecc_curve,
1572    )?;
1573    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DprivateKey(
1574        &input.r#private_key,
1575    )?;
1576    Ok(())
1577}
1578pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_for_AwsCryptographicPrimitives_GetPublicKeyFromPrivateKey(
1579    input: &crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyInput,
1580) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1581    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DeccCurve(
1582        &input.r#ecc_curve,
1583    )?;
1584    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DprivateKey(
1585        &input.r#private_key,
1586    )?;
1587    Ok(())
1588}
1589pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DeccCurve(
1590    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec>,
1591) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1592    if input.is_none() {
1593        return ::std::result::Result::Err(
1594            ::aws_smithy_types::error::operation::BuildError::missing_field(
1595                "ecc_curve",
1596                "ecc_curve is required but was not specified",
1597            ),
1598        );
1599    }
1600    if input.is_none() {
1601        return ::std::result::Result::Ok(());
1602    }
1603    let input = input.as_ref().unwrap();
1604
1605    Ok(())
1606}
1607pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyInput_DprivateKey(
1608    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPrivateKey>,
1609) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1610    if input.is_none() {
1611        return ::std::result::Result::Err(
1612            ::aws_smithy_types::error::operation::BuildError::missing_field(
1613                "private_key",
1614                "private_key is required but was not specified",
1615            ),
1616        );
1617    }
1618    if input.is_none() {
1619        return ::std::result::Result::Ok(());
1620    }
1621    let input = input.as_ref().unwrap();
1622
1623    validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input)?;
1624    Ok(())
1625}
1626pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput(
1627    input: &crate::deps::aws_cryptography_primitives::types::GetPublicKeyFromPrivateKeyOutput,
1628) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1629    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DeccCurve(
1630        &input.r#ecc_curve,
1631    )?;
1632    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DprivateKey(
1633        &input.r#private_key,
1634    )?;
1635    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DpublicKey(
1636        &input.r#public_key,
1637    )?;
1638    Ok(())
1639}
1640pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_for_AwsCryptographicPrimitives_GetPublicKeyFromPrivateKey(
1641    input: &crate::deps::aws_cryptography_primitives::operation::get_public_key_from_private_key::GetPublicKeyFromPrivateKeyOutput,
1642) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1643    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DeccCurve(
1644        &input.r#ecc_curve,
1645    )?;
1646    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DprivateKey(
1647        &input.r#private_key,
1648    )?;
1649    validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DpublicKey(
1650        &input.r#public_key,
1651    )?;
1652    Ok(())
1653}
1654pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DeccCurve(
1655    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec>,
1656) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1657    if input.is_none() {
1658        return ::std::result::Result::Err(
1659            ::aws_smithy_types::error::operation::BuildError::missing_field(
1660                "ecc_curve",
1661                "ecc_curve is required but was not specified",
1662            ),
1663        );
1664    }
1665    if input.is_none() {
1666        return ::std::result::Result::Ok(());
1667    }
1668    let input = input.as_ref().unwrap();
1669
1670    Ok(())
1671}
1672pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DprivateKey(
1673    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPrivateKey>,
1674) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1675    if input.is_none() {
1676        return ::std::result::Result::Err(
1677            ::aws_smithy_types::error::operation::BuildError::missing_field(
1678                "private_key",
1679                "private_key is required but was not specified",
1680            ),
1681        );
1682    }
1683    if input.is_none() {
1684        return ::std::result::Result::Ok(());
1685    }
1686    let input = input.as_ref().unwrap();
1687
1688    validate_aws_Pcryptography_Pprimitives_HECCPrivateKey(input)?;
1689    Ok(())
1690}
1691pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetPublicKeyFromPrivateKeyOutput_DpublicKey(
1692    input: &::std::option::Option<::aws_smithy_types::Blob>,
1693) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1694    if input.is_none() {
1695        return ::std::result::Result::Err(
1696            ::aws_smithy_types::error::operation::BuildError::missing_field(
1697                "public_key",
1698                "public_key is required but was not specified",
1699            ),
1700        );
1701    }
1702    if input.is_none() {
1703        return ::std::result::Result::Ok(());
1704    }
1705    let input = input.as_ref().unwrap();
1706
1707    Ok(())
1708}
1709pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput(
1710    input: &crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthInput,
1711) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1712    validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_DpublicKey(
1713        &input.r#public_key,
1714    )?;
1715    Ok(())
1716}
1717pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_for_AwsCryptographicPrimitives_GetRSAKeyModulusLength(
1718    input: &crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthInput,
1719) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1720    validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_DpublicKey(
1721        &input.r#public_key,
1722    )?;
1723    Ok(())
1724}
1725pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthInput_DpublicKey(
1726    input: &::std::option::Option<::aws_smithy_types::Blob>,
1727) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1728    if input.is_none() {
1729        return ::std::result::Result::Err(
1730            ::aws_smithy_types::error::operation::BuildError::missing_field(
1731                "public_key",
1732                "public_key is required but was not specified",
1733            ),
1734        );
1735    }
1736    if input.is_none() {
1737        return ::std::result::Result::Ok(());
1738    }
1739    let input = input.as_ref().unwrap();
1740
1741    Ok(())
1742}
1743pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput(
1744    input: &crate::deps::aws_cryptography_primitives::types::GetRsaKeyModulusLengthOutput,
1745) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1746    validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput_Dlength(&input.r#length)?;
1747    Ok(())
1748}
1749pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput_for_AwsCryptographicPrimitives_GetRSAKeyModulusLength(
1750    input: &crate::deps::aws_cryptography_primitives::operation::get_rsa_key_modulus_length::GetRsaKeyModulusLengthOutput,
1751) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1752    validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput_Dlength(&input.r#length)?;
1753    Ok(())
1754}
1755pub(crate) fn validate_aws_Pcryptography_Pprimitives_HGetRSAKeyModulusLengthOutput_Dlength(
1756    input: &::std::option::Option<::std::primitive::i32>,
1757) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1758    if input.is_none() {
1759        return ::std::result::Result::Err(
1760            ::aws_smithy_types::error::operation::BuildError::missing_field(
1761                "length",
1762                "length is required but was not specified",
1763            ),
1764        );
1765    }
1766    if input.is_none() {
1767        return ::std::result::Result::Ok(());
1768    }
1769    let input = input.as_ref().unwrap();
1770
1771    if !(81..).contains(input) {
1772        return ::std::result::Result::Err(
1773            ::aws_smithy_types::error::operation::BuildError::invalid_field(
1774                "length",
1775                "length failed to satisfy constraint: Member must be greater than or equal to 81",
1776            ),
1777        );
1778    }
1779    Ok(())
1780}
1781pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput(
1782    input: &crate::deps::aws_cryptography_primitives::types::HkdfExpandInput,
1783) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1784    validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DdigestAlgorithm(
1785        &input.r#digest_algorithm,
1786    )?;
1787    validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dprk(&input.r#prk)?;
1788    validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dinfo(&input.r#info)?;
1789    validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DexpectedLength(
1790        &input.r#expected_length,
1791    )?;
1792    Ok(())
1793}
1794pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_for_AwsCryptographicPrimitives_HkdfExpand(
1795    input: &crate::deps::aws_cryptography_primitives::operation::hkdf_expand::HkdfExpandInput,
1796) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1797    validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DdigestAlgorithm(
1798        &input.r#digest_algorithm,
1799    )?;
1800    validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dprk(&input.r#prk)?;
1801    validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dinfo(&input.r#info)?;
1802    validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DexpectedLength(
1803        &input.r#expected_length,
1804    )?;
1805    Ok(())
1806}
1807pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DdigestAlgorithm(
1808    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::DigestAlgorithm>,
1809) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1810    if input.is_none() {
1811        return ::std::result::Result::Err(
1812            ::aws_smithy_types::error::operation::BuildError::missing_field(
1813                "digest_algorithm",
1814                "digest_algorithm is required but was not specified",
1815            ),
1816        );
1817    }
1818    if input.is_none() {
1819        return ::std::result::Result::Ok(());
1820    }
1821    let input = input.as_ref().unwrap();
1822
1823    Ok(())
1824}
1825pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_DexpectedLength(
1826    input: &::std::option::Option<::std::primitive::i32>,
1827) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1828    if input.is_none() {
1829        return ::std::result::Result::Err(
1830            ::aws_smithy_types::error::operation::BuildError::missing_field(
1831                "expected_length",
1832                "expected_length is required but was not specified",
1833            ),
1834        );
1835    }
1836    if input.is_none() {
1837        return ::std::result::Result::Ok(());
1838    }
1839    let input = input.as_ref().unwrap();
1840
1841    if !(0..).contains(input) {
1842        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
1843        "expected_length",
1844        "expected_length failed to satisfy constraint: Member must be greater than or equal to 0",
1845    ));
1846    }
1847    Ok(())
1848}
1849pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dinfo(
1850    input: &::std::option::Option<::aws_smithy_types::Blob>,
1851) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1852    if input.is_none() {
1853        return ::std::result::Result::Err(
1854            ::aws_smithy_types::error::operation::BuildError::missing_field(
1855                "info",
1856                "info is required but was not specified",
1857            ),
1858        );
1859    }
1860    if input.is_none() {
1861        return ::std::result::Result::Ok(());
1862    }
1863    let input = input.as_ref().unwrap();
1864
1865    Ok(())
1866}
1867pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandInput_Dprk(
1868    input: &::std::option::Option<::aws_smithy_types::Blob>,
1869) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1870    if input.is_none() {
1871        return ::std::result::Result::Err(
1872            ::aws_smithy_types::error::operation::BuildError::missing_field(
1873                "prk",
1874                "prk is required but was not specified",
1875            ),
1876        );
1877    }
1878    if input.is_none() {
1879        return ::std::result::Result::Ok(());
1880    }
1881    let input = input.as_ref().unwrap();
1882
1883    Ok(())
1884}
1885pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput(
1886    input: &::aws_smithy_types::Blob,
1887) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1888    validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput_Dokm(&Some(input.clone()))?;
1889    Ok(())
1890}
1891pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput_for_AwsCryptographicPrimitives_HkdfExpand(
1892    input: &::aws_smithy_types::Blob,
1893) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1894    validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput_Dokm(&Some(input.clone()))?;
1895    Ok(())
1896}
1897pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExpandOutput_Dokm(
1898    input: &::std::option::Option<::aws_smithy_types::Blob>,
1899) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1900    if input.is_none() {
1901        return ::std::result::Result::Err(
1902            ::aws_smithy_types::error::operation::BuildError::missing_field(
1903                "okm",
1904                "okm is required but was not specified",
1905            ),
1906        );
1907    }
1908    if input.is_none() {
1909        return ::std::result::Result::Ok(());
1910    }
1911    let input = input.as_ref().unwrap();
1912
1913    Ok(())
1914}
1915pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput(
1916    input: &crate::deps::aws_cryptography_primitives::types::HkdfExtractInput,
1917) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1918    validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_DdigestAlgorithm(
1919        &input.r#digest_algorithm,
1920    )?;
1921    validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dsalt(&input.r#salt)?;
1922    validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dikm(&input.r#ikm)?;
1923    Ok(())
1924}
1925pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_for_AwsCryptographicPrimitives_HkdfExtract(
1926    input: &crate::deps::aws_cryptography_primitives::operation::hkdf_extract::HkdfExtractInput,
1927) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1928    validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_DdigestAlgorithm(
1929        &input.r#digest_algorithm,
1930    )?;
1931    validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dsalt(&input.r#salt)?;
1932    validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dikm(&input.r#ikm)?;
1933    Ok(())
1934}
1935pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_DdigestAlgorithm(
1936    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::DigestAlgorithm>,
1937) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1938    if input.is_none() {
1939        return ::std::result::Result::Err(
1940            ::aws_smithy_types::error::operation::BuildError::missing_field(
1941                "digest_algorithm",
1942                "digest_algorithm is required but was not specified",
1943            ),
1944        );
1945    }
1946    if input.is_none() {
1947        return ::std::result::Result::Ok(());
1948    }
1949    let input = input.as_ref().unwrap();
1950
1951    Ok(())
1952}
1953pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dikm(
1954    input: &::std::option::Option<::aws_smithy_types::Blob>,
1955) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1956    if input.is_none() {
1957        return ::std::result::Result::Err(
1958            ::aws_smithy_types::error::operation::BuildError::missing_field(
1959                "ikm",
1960                "ikm is required but was not specified",
1961            ),
1962        );
1963    }
1964    if input.is_none() {
1965        return ::std::result::Result::Ok(());
1966    }
1967    let input = input.as_ref().unwrap();
1968
1969    Ok(())
1970}
1971pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractInput_Dsalt(
1972    input: &::std::option::Option<::aws_smithy_types::Blob>,
1973) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1974    if input.is_none() {
1975        return ::std::result::Result::Ok(());
1976    }
1977    let input = input.as_ref().unwrap();
1978
1979    Ok(())
1980}
1981pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput(
1982    input: &::aws_smithy_types::Blob,
1983) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1984    validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput_Dprk(&Some(input.clone()))?;
1985    Ok(())
1986}
1987pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput_for_AwsCryptographicPrimitives_HkdfExtract(
1988    input: &::aws_smithy_types::Blob,
1989) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1990    validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput_Dprk(&Some(input.clone()))?;
1991    Ok(())
1992}
1993pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfExtractOutput_Dprk(
1994    input: &::std::option::Option<::aws_smithy_types::Blob>,
1995) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
1996    if input.is_none() {
1997        return ::std::result::Result::Err(
1998            ::aws_smithy_types::error::operation::BuildError::missing_field(
1999                "prk",
2000                "prk is required but was not specified",
2001            ),
2002        );
2003    }
2004    if input.is_none() {
2005        return ::std::result::Result::Ok(());
2006    }
2007    let input = input.as_ref().unwrap();
2008
2009    Ok(())
2010}
2011pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput(
2012    input: &crate::deps::aws_cryptography_primitives::types::HkdfInput,
2013) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2014    validate_aws_Pcryptography_Pprimitives_HHkdfInput_DdigestAlgorithm(&input.r#digest_algorithm)?;
2015    validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dsalt(&input.r#salt)?;
2016    validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dikm(&input.r#ikm)?;
2017    validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dinfo(&input.r#info)?;
2018    validate_aws_Pcryptography_Pprimitives_HHkdfInput_DexpectedLength(&input.r#expected_length)?;
2019    Ok(())
2020}
2021pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_for_AwsCryptographicPrimitives_Hkdf(
2022    input: &crate::deps::aws_cryptography_primitives::operation::hkdf::HkdfInput,
2023) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2024    validate_aws_Pcryptography_Pprimitives_HHkdfInput_DdigestAlgorithm(&input.r#digest_algorithm)?;
2025    validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dsalt(&input.r#salt)?;
2026    validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dikm(&input.r#ikm)?;
2027    validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dinfo(&input.r#info)?;
2028    validate_aws_Pcryptography_Pprimitives_HHkdfInput_DexpectedLength(&input.r#expected_length)?;
2029    Ok(())
2030}
2031pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_DdigestAlgorithm(
2032    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::DigestAlgorithm>,
2033) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2034    if input.is_none() {
2035        return ::std::result::Result::Err(
2036            ::aws_smithy_types::error::operation::BuildError::missing_field(
2037                "digest_algorithm",
2038                "digest_algorithm is required but was not specified",
2039            ),
2040        );
2041    }
2042    if input.is_none() {
2043        return ::std::result::Result::Ok(());
2044    }
2045    let input = input.as_ref().unwrap();
2046
2047    Ok(())
2048}
2049pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_DexpectedLength(
2050    input: &::std::option::Option<::std::primitive::i32>,
2051) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2052    if input.is_none() {
2053        return ::std::result::Result::Err(
2054            ::aws_smithy_types::error::operation::BuildError::missing_field(
2055                "expected_length",
2056                "expected_length is required but was not specified",
2057            ),
2058        );
2059    }
2060    if input.is_none() {
2061        return ::std::result::Result::Ok(());
2062    }
2063    let input = input.as_ref().unwrap();
2064
2065    if !(0..).contains(input) {
2066        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
2067        "expected_length",
2068        "expected_length failed to satisfy constraint: Member must be greater than or equal to 0",
2069    ));
2070    }
2071    Ok(())
2072}
2073pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dikm(
2074    input: &::std::option::Option<::aws_smithy_types::Blob>,
2075) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2076    if input.is_none() {
2077        return ::std::result::Result::Err(
2078            ::aws_smithy_types::error::operation::BuildError::missing_field(
2079                "ikm",
2080                "ikm is required but was not specified",
2081            ),
2082        );
2083    }
2084    if input.is_none() {
2085        return ::std::result::Result::Ok(());
2086    }
2087    let input = input.as_ref().unwrap();
2088
2089    Ok(())
2090}
2091pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dinfo(
2092    input: &::std::option::Option<::aws_smithy_types::Blob>,
2093) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2094    if input.is_none() {
2095        return ::std::result::Result::Err(
2096            ::aws_smithy_types::error::operation::BuildError::missing_field(
2097                "info",
2098                "info is required but was not specified",
2099            ),
2100        );
2101    }
2102    if input.is_none() {
2103        return ::std::result::Result::Ok(());
2104    }
2105    let input = input.as_ref().unwrap();
2106
2107    Ok(())
2108}
2109pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfInput_Dsalt(
2110    input: &::std::option::Option<::aws_smithy_types::Blob>,
2111) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2112    if input.is_none() {
2113        return ::std::result::Result::Ok(());
2114    }
2115    let input = input.as_ref().unwrap();
2116
2117    Ok(())
2118}
2119pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfOutput(
2120    input: &::aws_smithy_types::Blob,
2121) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2122    validate_aws_Pcryptography_Pprimitives_HHkdfOutput_Dokm(&Some(input.clone()))?;
2123    Ok(())
2124}
2125pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfOutput_for_AwsCryptographicPrimitives_Hkdf(
2126    input: &::aws_smithy_types::Blob,
2127) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2128    validate_aws_Pcryptography_Pprimitives_HHkdfOutput_Dokm(&Some(input.clone()))?;
2129    Ok(())
2130}
2131pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHkdfOutput_Dokm(
2132    input: &::std::option::Option<::aws_smithy_types::Blob>,
2133) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2134    if input.is_none() {
2135        return ::std::result::Result::Err(
2136            ::aws_smithy_types::error::operation::BuildError::missing_field(
2137                "okm",
2138                "okm is required but was not specified",
2139            ),
2140        );
2141    }
2142    if input.is_none() {
2143        return ::std::result::Result::Ok(());
2144    }
2145    let input = input.as_ref().unwrap();
2146
2147    Ok(())
2148}
2149pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput(
2150    input: &crate::deps::aws_cryptography_primitives::types::HMacInput,
2151) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2152    validate_aws_Pcryptography_Pprimitives_HHMacInput_DdigestAlgorithm(&input.r#digest_algorithm)?;
2153    validate_aws_Pcryptography_Pprimitives_HHMacInput_Dkey(&input.r#key)?;
2154    validate_aws_Pcryptography_Pprimitives_HHMacInput_Dmessage(&input.r#message)?;
2155    Ok(())
2156}
2157pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput_for_AwsCryptographicPrimitives_HMac(
2158    input: &crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput,
2159) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2160    validate_aws_Pcryptography_Pprimitives_HHMacInput_DdigestAlgorithm(&input.r#digest_algorithm)?;
2161    validate_aws_Pcryptography_Pprimitives_HHMacInput_Dkey(&input.r#key)?;
2162    validate_aws_Pcryptography_Pprimitives_HHMacInput_Dmessage(&input.r#message)?;
2163    Ok(())
2164}
2165pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput_DdigestAlgorithm(
2166    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::DigestAlgorithm>,
2167) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2168    if input.is_none() {
2169        return ::std::result::Result::Err(
2170            ::aws_smithy_types::error::operation::BuildError::missing_field(
2171                "digest_algorithm",
2172                "digest_algorithm is required but was not specified",
2173            ),
2174        );
2175    }
2176    if input.is_none() {
2177        return ::std::result::Result::Ok(());
2178    }
2179    let input = input.as_ref().unwrap();
2180
2181    Ok(())
2182}
2183pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput_Dkey(
2184    input: &::std::option::Option<::aws_smithy_types::Blob>,
2185) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2186    if input.is_none() {
2187        return ::std::result::Result::Err(
2188            ::aws_smithy_types::error::operation::BuildError::missing_field(
2189                "key",
2190                "key is required but was not specified",
2191            ),
2192        );
2193    }
2194    if input.is_none() {
2195        return ::std::result::Result::Ok(());
2196    }
2197    let input = input.as_ref().unwrap();
2198
2199    Ok(())
2200}
2201pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacInput_Dmessage(
2202    input: &::std::option::Option<::aws_smithy_types::Blob>,
2203) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2204    if input.is_none() {
2205        return ::std::result::Result::Err(
2206            ::aws_smithy_types::error::operation::BuildError::missing_field(
2207                "message",
2208                "message is required but was not specified",
2209            ),
2210        );
2211    }
2212    if input.is_none() {
2213        return ::std::result::Result::Ok(());
2214    }
2215    let input = input.as_ref().unwrap();
2216
2217    Ok(())
2218}
2219pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacOutput(
2220    input: &::aws_smithy_types::Blob,
2221) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2222    validate_aws_Pcryptography_Pprimitives_HHMacOutput_Ddigest(&Some(input.clone()))?;
2223    Ok(())
2224}
2225pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacOutput_for_AwsCryptographicPrimitives_HMac(
2226    input: &::aws_smithy_types::Blob,
2227) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2228    validate_aws_Pcryptography_Pprimitives_HHMacOutput_Ddigest(&Some(input.clone()))?;
2229    Ok(())
2230}
2231pub(crate) fn validate_aws_Pcryptography_Pprimitives_HHMacOutput_Ddigest(
2232    input: &::std::option::Option<::aws_smithy_types::Blob>,
2233) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2234    if input.is_none() {
2235        return ::std::result::Result::Err(
2236            ::aws_smithy_types::error::operation::BuildError::missing_field(
2237                "digest",
2238                "digest is required but was not specified",
2239            ),
2240        );
2241    }
2242    if input.is_none() {
2243        return ::std::result::Result::Ok(());
2244    }
2245    let input = input.as_ref().unwrap();
2246
2247    Ok(())
2248}
2249pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput(
2250    input: &crate::deps::aws_cryptography_primitives::types::KdfCtrInput,
2251) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2252    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DdigestAlgorithm(
2253        &input.r#digest_algorithm,
2254    )?;
2255    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dikm(&input.r#ikm)?;
2256    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DexpectedLength(&input.r#expected_length)?;
2257    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dpurpose(&input.r#purpose)?;
2258    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dnonce(&input.r#nonce)?;
2259    Ok(())
2260}
2261pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_for_AwsCryptographicPrimitives_KdfCounterMode(
2262    input: &crate::deps::aws_cryptography_primitives::operation::kdf_counter_mode::KdfCtrInput,
2263) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2264    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DdigestAlgorithm(
2265        &input.r#digest_algorithm,
2266    )?;
2267    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dikm(&input.r#ikm)?;
2268    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DexpectedLength(&input.r#expected_length)?;
2269    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dpurpose(&input.r#purpose)?;
2270    validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dnonce(&input.r#nonce)?;
2271    Ok(())
2272}
2273pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DdigestAlgorithm(
2274    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::DigestAlgorithm>,
2275) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2276    if input.is_none() {
2277        return ::std::result::Result::Err(
2278            ::aws_smithy_types::error::operation::BuildError::missing_field(
2279                "digest_algorithm",
2280                "digest_algorithm is required but was not specified",
2281            ),
2282        );
2283    }
2284    if input.is_none() {
2285        return ::std::result::Result::Ok(());
2286    }
2287    let input = input.as_ref().unwrap();
2288
2289    Ok(())
2290}
2291pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_DexpectedLength(
2292    input: &::std::option::Option<::std::primitive::i32>,
2293) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2294    if input.is_none() {
2295        return ::std::result::Result::Err(
2296            ::aws_smithy_types::error::operation::BuildError::missing_field(
2297                "expected_length",
2298                "expected_length is required but was not specified",
2299            ),
2300        );
2301    }
2302    if input.is_none() {
2303        return ::std::result::Result::Ok(());
2304    }
2305    let input = input.as_ref().unwrap();
2306
2307    if !(0..).contains(input) {
2308        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
2309        "expected_length",
2310        "expected_length failed to satisfy constraint: Member must be greater than or equal to 0",
2311    ));
2312    }
2313    Ok(())
2314}
2315pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dikm(
2316    input: &::std::option::Option<::aws_smithy_types::Blob>,
2317) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2318    if input.is_none() {
2319        return ::std::result::Result::Err(
2320            ::aws_smithy_types::error::operation::BuildError::missing_field(
2321                "ikm",
2322                "ikm is required but was not specified",
2323            ),
2324        );
2325    }
2326    if input.is_none() {
2327        return ::std::result::Result::Ok(());
2328    }
2329    let input = input.as_ref().unwrap();
2330
2331    Ok(())
2332}
2333pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dnonce(
2334    input: &::std::option::Option<::aws_smithy_types::Blob>,
2335) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2336    if input.is_none() {
2337        return ::std::result::Result::Ok(());
2338    }
2339    let input = input.as_ref().unwrap();
2340
2341    Ok(())
2342}
2343pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrInput_Dpurpose(
2344    input: &::std::option::Option<::aws_smithy_types::Blob>,
2345) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2346    if input.is_none() {
2347        return ::std::result::Result::Ok(());
2348    }
2349    let input = input.as_ref().unwrap();
2350
2351    Ok(())
2352}
2353pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput(
2354    input: &::aws_smithy_types::Blob,
2355) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2356    validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput_Dokm(&Some(input.clone()))?;
2357    Ok(())
2358}
2359pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput_for_AwsCryptographicPrimitives_KdfCounterMode(
2360    input: &::aws_smithy_types::Blob,
2361) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2362    validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput_Dokm(&Some(input.clone()))?;
2363    Ok(())
2364}
2365pub(crate) fn validate_aws_Pcryptography_Pprimitives_HKdfCtrOutput_Dokm(
2366    input: &::std::option::Option<::aws_smithy_types::Blob>,
2367) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2368    if input.is_none() {
2369        return ::std::result::Result::Err(
2370            ::aws_smithy_types::error::operation::BuildError::missing_field(
2371                "okm",
2372                "okm is required but was not specified",
2373            ),
2374        );
2375    }
2376    if input.is_none() {
2377        return ::std::result::Result::Ok(());
2378    }
2379    let input = input.as_ref().unwrap();
2380
2381    Ok(())
2382}
2383pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput(
2384    input: &crate::deps::aws_cryptography_primitives::types::ParsePublicKeyInput,
2385) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2386    validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_DpublicKey(&input.r#public_key)?;
2387    Ok(())
2388}
2389pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_for_AwsCryptographicPrimitives_ParsePublicKey(
2390    input: &crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyInput,
2391) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2392    validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_DpublicKey(&input.r#public_key)?;
2393    Ok(())
2394}
2395pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyInput_DpublicKey(
2396    input: &::std::option::Option<::aws_smithy_types::Blob>,
2397) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2398    if input.is_none() {
2399        return ::std::result::Result::Err(
2400            ::aws_smithy_types::error::operation::BuildError::missing_field(
2401                "public_key",
2402                "public_key is required but was not specified",
2403            ),
2404        );
2405    }
2406    if input.is_none() {
2407        return ::std::result::Result::Ok(());
2408    }
2409    let input = input.as_ref().unwrap();
2410
2411    Ok(())
2412}
2413pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput(
2414    input: &crate::deps::aws_cryptography_primitives::types::ParsePublicKeyOutput,
2415) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2416    validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput_DpublicKey(&input.r#public_key)?;
2417    Ok(())
2418}
2419pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput_for_AwsCryptographicPrimitives_ParsePublicKey(
2420    input: &crate::deps::aws_cryptography_primitives::operation::parse_public_key::ParsePublicKeyOutput,
2421) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2422    validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput_DpublicKey(&input.r#public_key)?;
2423    Ok(())
2424}
2425pub(crate) fn validate_aws_Pcryptography_Pprimitives_HParsePublicKeyOutput_DpublicKey(
2426    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EccPublicKey>,
2427) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2428    if input.is_none() {
2429        return ::std::result::Result::Err(
2430            ::aws_smithy_types::error::operation::BuildError::missing_field(
2431                "public_key",
2432                "public_key is required but was not specified",
2433            ),
2434        );
2435    }
2436    if input.is_none() {
2437        return ::std::result::Result::Ok(());
2438    }
2439    let input = input.as_ref().unwrap();
2440
2441    validate_aws_Pcryptography_Pprimitives_HECCPublicKey(input)?;
2442    Ok(())
2443}
2444pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput(
2445    input: &crate::deps::aws_cryptography_primitives::types::RsaDecryptInput,
2446) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2447    validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_Dpadding(&input.r#padding)?;
2448    validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DprivateKey(&input.r#private_key)?;
2449    validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DcipherText(&input.r#cipher_text)?;
2450    Ok(())
2451}
2452pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_for_AwsCryptographicPrimitives_RSADecrypt(
2453    input: &crate::deps::aws_cryptography_primitives::operation::rsa_decrypt::RsaDecryptInput,
2454) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2455    validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_Dpadding(&input.r#padding)?;
2456    validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DprivateKey(&input.r#private_key)?;
2457    validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DcipherText(&input.r#cipher_text)?;
2458    Ok(())
2459}
2460pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DcipherText(
2461    input: &::std::option::Option<::aws_smithy_types::Blob>,
2462) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2463    if input.is_none() {
2464        return ::std::result::Result::Err(
2465            ::aws_smithy_types::error::operation::BuildError::missing_field(
2466                "cipher_text",
2467                "cipher_text is required but was not specified",
2468            ),
2469        );
2470    }
2471    if input.is_none() {
2472        return ::std::result::Result::Ok(());
2473    }
2474    let input = input.as_ref().unwrap();
2475
2476    Ok(())
2477}
2478pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_Dpadding(
2479    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::RsaPaddingMode>,
2480) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2481    if input.is_none() {
2482        return ::std::result::Result::Err(
2483            ::aws_smithy_types::error::operation::BuildError::missing_field(
2484                "padding",
2485                "padding is required but was not specified",
2486            ),
2487        );
2488    }
2489    if input.is_none() {
2490        return ::std::result::Result::Ok(());
2491    }
2492    let input = input.as_ref().unwrap();
2493
2494    Ok(())
2495}
2496pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptInput_DprivateKey(
2497    input: &::std::option::Option<::aws_smithy_types::Blob>,
2498) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2499    if input.is_none() {
2500        return ::std::result::Result::Err(
2501            ::aws_smithy_types::error::operation::BuildError::missing_field(
2502                "private_key",
2503                "private_key is required but was not specified",
2504            ),
2505        );
2506    }
2507    if input.is_none() {
2508        return ::std::result::Result::Ok(());
2509    }
2510    let input = input.as_ref().unwrap();
2511
2512    Ok(())
2513}
2514pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput(
2515    input: &::aws_smithy_types::Blob,
2516) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2517    validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput_Dplaintext(&Some(input.clone()))?;
2518    Ok(())
2519}
2520pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput_for_AwsCryptographicPrimitives_RSADecrypt(
2521    input: &::aws_smithy_types::Blob,
2522) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2523    validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput_Dplaintext(&Some(input.clone()))?;
2524    Ok(())
2525}
2526pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSADecryptOutput_Dplaintext(
2527    input: &::std::option::Option<::aws_smithy_types::Blob>,
2528) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2529    if input.is_none() {
2530        return ::std::result::Result::Err(
2531            ::aws_smithy_types::error::operation::BuildError::missing_field(
2532                "plaintext",
2533                "plaintext is required but was not specified",
2534            ),
2535        );
2536    }
2537    if input.is_none() {
2538        return ::std::result::Result::Ok(());
2539    }
2540    let input = input.as_ref().unwrap();
2541
2542    Ok(())
2543}
2544pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput(
2545    input: &crate::deps::aws_cryptography_primitives::types::RsaEncryptInput,
2546) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2547    validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dpadding(&input.r#padding)?;
2548    validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_DpublicKey(&input.r#public_key)?;
2549    validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dplaintext(&input.r#plaintext)?;
2550    Ok(())
2551}
2552pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_for_AwsCryptographicPrimitives_RSAEncrypt(
2553    input: &crate::deps::aws_cryptography_primitives::operation::rsa_encrypt::RsaEncryptInput,
2554) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2555    validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dpadding(&input.r#padding)?;
2556    validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_DpublicKey(&input.r#public_key)?;
2557    validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dplaintext(&input.r#plaintext)?;
2558    Ok(())
2559}
2560pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dpadding(
2561    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::RsaPaddingMode>,
2562) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2563    if input.is_none() {
2564        return ::std::result::Result::Err(
2565            ::aws_smithy_types::error::operation::BuildError::missing_field(
2566                "padding",
2567                "padding is required but was not specified",
2568            ),
2569        );
2570    }
2571    if input.is_none() {
2572        return ::std::result::Result::Ok(());
2573    }
2574    let input = input.as_ref().unwrap();
2575
2576    Ok(())
2577}
2578pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_Dplaintext(
2579    input: &::std::option::Option<::aws_smithy_types::Blob>,
2580) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2581    if input.is_none() {
2582        return ::std::result::Result::Err(
2583            ::aws_smithy_types::error::operation::BuildError::missing_field(
2584                "plaintext",
2585                "plaintext is required but was not specified",
2586            ),
2587        );
2588    }
2589    if input.is_none() {
2590        return ::std::result::Result::Ok(());
2591    }
2592    let input = input.as_ref().unwrap();
2593
2594    Ok(())
2595}
2596pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptInput_DpublicKey(
2597    input: &::std::option::Option<::aws_smithy_types::Blob>,
2598) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2599    if input.is_none() {
2600        return ::std::result::Result::Err(
2601            ::aws_smithy_types::error::operation::BuildError::missing_field(
2602                "public_key",
2603                "public_key is required but was not specified",
2604            ),
2605        );
2606    }
2607    if input.is_none() {
2608        return ::std::result::Result::Ok(());
2609    }
2610    let input = input.as_ref().unwrap();
2611
2612    Ok(())
2613}
2614pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput(
2615    input: &::aws_smithy_types::Blob,
2616) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2617    validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput_DcipherText(&Some(input.clone()))?;
2618    Ok(())
2619}
2620pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput_for_AwsCryptographicPrimitives_RSAEncrypt(
2621    input: &::aws_smithy_types::Blob,
2622) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2623    validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput_DcipherText(&Some(input.clone()))?;
2624    Ok(())
2625}
2626pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAEncryptOutput_DcipherText(
2627    input: &::std::option::Option<::aws_smithy_types::Blob>,
2628) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2629    if input.is_none() {
2630        return ::std::result::Result::Err(
2631            ::aws_smithy_types::error::operation::BuildError::missing_field(
2632                "cipher_text",
2633                "cipher_text is required but was not specified",
2634            ),
2635        );
2636    }
2637    if input.is_none() {
2638        return ::std::result::Result::Ok(());
2639    }
2640    let input = input.as_ref().unwrap();
2641
2642    Ok(())
2643}
2644pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey(
2645    input: &crate::deps::aws_cryptography_primitives::types::RsaPrivateKey,
2646) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2647    validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey_DlengthBits(&input.r#length_bits)?;
2648    validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey_Dpem(&input.r#pem)?;
2649    Ok(())
2650}
2651pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey_DlengthBits(
2652    input: &::std::option::Option<::std::primitive::i32>,
2653) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2654    if input.is_none() {
2655        return ::std::result::Result::Err(
2656            ::aws_smithy_types::error::operation::BuildError::missing_field(
2657                "length_bits",
2658                "length_bits is required but was not specified",
2659            ),
2660        );
2661    }
2662    if input.is_none() {
2663        return ::std::result::Result::Ok(());
2664    }
2665    let input = input.as_ref().unwrap();
2666
2667    if !(81..).contains(input) {
2668        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
2669        "length_bits",
2670        "length_bits failed to satisfy constraint: Member must be greater than or equal to 81",
2671    ));
2672    }
2673    Ok(())
2674}
2675pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPrivateKey_Dpem(
2676    input: &::std::option::Option<::aws_smithy_types::Blob>,
2677) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2678    if input.is_none() {
2679        return ::std::result::Result::Err(
2680            ::aws_smithy_types::error::operation::BuildError::missing_field(
2681                "pem",
2682                "pem is required but was not specified",
2683            ),
2684        );
2685    }
2686    if input.is_none() {
2687        return ::std::result::Result::Ok(());
2688    }
2689    let input = input.as_ref().unwrap();
2690
2691    Ok(())
2692}
2693pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPublicKey(
2694    input: &crate::deps::aws_cryptography_primitives::types::RsaPublicKey,
2695) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2696    validate_aws_Pcryptography_Pprimitives_HRSAPublicKey_DlengthBits(&input.r#length_bits)?;
2697    validate_aws_Pcryptography_Pprimitives_HRSAPublicKey_Dpem(&input.r#pem)?;
2698    Ok(())
2699}
2700pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPublicKey_DlengthBits(
2701    input: &::std::option::Option<::std::primitive::i32>,
2702) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2703    if input.is_none() {
2704        return ::std::result::Result::Err(
2705            ::aws_smithy_types::error::operation::BuildError::missing_field(
2706                "length_bits",
2707                "length_bits is required but was not specified",
2708            ),
2709        );
2710    }
2711    if input.is_none() {
2712        return ::std::result::Result::Ok(());
2713    }
2714    let input = input.as_ref().unwrap();
2715
2716    if !(81..).contains(input) {
2717        return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::invalid_field(
2718        "length_bits",
2719        "length_bits failed to satisfy constraint: Member must be greater than or equal to 81",
2720    ));
2721    }
2722    Ok(())
2723}
2724pub(crate) fn validate_aws_Pcryptography_Pprimitives_HRSAPublicKey_Dpem(
2725    input: &::std::option::Option<::aws_smithy_types::Blob>,
2726) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2727    if input.is_none() {
2728        return ::std::result::Result::Err(
2729            ::aws_smithy_types::error::operation::BuildError::missing_field(
2730                "pem",
2731                "pem is required but was not specified",
2732            ),
2733        );
2734    }
2735    if input.is_none() {
2736        return ::std::result::Result::Ok(());
2737    }
2738    let input = input.as_ref().unwrap();
2739
2740    Ok(())
2741}
2742pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput(
2743    input: &crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyInput,
2744) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2745    validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DeccCurve(&input.r#ecc_curve)?;
2746    validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DpublicKey(&input.r#public_key)?;
2747    Ok(())
2748}
2749pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_for_AwsCryptographicPrimitives_ValidatePublicKey(
2750    input: &crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyInput,
2751) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2752    validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DeccCurve(&input.r#ecc_curve)?;
2753    validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DpublicKey(&input.r#public_key)?;
2754    Ok(())
2755}
2756pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DeccCurve(
2757    input: &::std::option::Option<crate::deps::aws_cryptography_primitives::types::EcdhCurveSpec>,
2758) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2759    if input.is_none() {
2760        return ::std::result::Result::Err(
2761            ::aws_smithy_types::error::operation::BuildError::missing_field(
2762                "ecc_curve",
2763                "ecc_curve is required but was not specified",
2764            ),
2765        );
2766    }
2767    if input.is_none() {
2768        return ::std::result::Result::Ok(());
2769    }
2770    let input = input.as_ref().unwrap();
2771
2772    Ok(())
2773}
2774pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyInput_DpublicKey(
2775    input: &::std::option::Option<::aws_smithy_types::Blob>,
2776) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2777    if input.is_none() {
2778        return ::std::result::Result::Err(
2779            ::aws_smithy_types::error::operation::BuildError::missing_field(
2780                "public_key",
2781                "public_key is required but was not specified",
2782            ),
2783        );
2784    }
2785    if input.is_none() {
2786        return ::std::result::Result::Ok(());
2787    }
2788    let input = input.as_ref().unwrap();
2789
2790    Ok(())
2791}
2792pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput(
2793    input: &crate::deps::aws_cryptography_primitives::types::ValidatePublicKeyOutput,
2794) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2795    validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput_Dsuccess(&input.r#success)?;
2796    Ok(())
2797}
2798pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput_for_AwsCryptographicPrimitives_ValidatePublicKey(
2799    input: &crate::deps::aws_cryptography_primitives::operation::validate_public_key::ValidatePublicKeyOutput,
2800) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2801    validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput_Dsuccess(&input.r#success)?;
2802    Ok(())
2803}
2804pub(crate) fn validate_aws_Pcryptography_Pprimitives_HValidatePublicKeyOutput_Dsuccess(
2805    input: &::std::option::Option<::std::primitive::bool>,
2806) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
2807    if input.is_none() {
2808        return ::std::result::Result::Err(
2809            ::aws_smithy_types::error::operation::BuildError::missing_field(
2810                "success",
2811                "success is required but was not specified",
2812            ),
2813        );
2814    }
2815    if input.is_none() {
2816        return ::std::result::Result::Ok(());
2817    }
2818    let input = input.as_ref().unwrap();
2819
2820    Ok(())
2821}