28 28 | map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
|
29 29 | ::aws_smithy_schema::ShapeId::from_static("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
|
30 30 | ::aws_smithy_types::Document::String("{\"code\":\"KMSInvalidSignature\",\"httpResponseCode\":400}".to_string()),
|
31 31 | )));
|
32 32 | map
|
33 33 | });
|
34 34 | static KMSINVALIDSIGNATUREEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
35 35 | KMSINVALIDSIGNATUREEXCEPTION_SCHEMA_ID,
|
36 36 | ::aws_smithy_schema::ShapeType::Structure,
|
37 37 | &[&KMSINVALIDSIGNATUREEXCEPTION_MEMBER_MESSAGE],
|
38 38 | )
|
39 39 | .with_traits(&KMSINVALIDSIGNATUREEXCEPTION_TRAITS);
|
40 40 | impl KmsInvalidSignatureException {
|
41 41 | /// The schema for this shape.
|
42 42 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &KMSINVALIDSIGNATUREEXCEPTION_SCHEMA;
|
43 43 | }
|
44 44 | impl ::aws_smithy_schema::serde::SerializableStruct for KmsInvalidSignatureException {
|
45 45 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
46 46 | fn serialize_members(
|
47 47 | &self,
|
48 48 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
49 49 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
50 50 | if let Some(ref val) = self.message {
|
51 51 | ser.write_string(&KMSINVALIDSIGNATUREEXCEPTION_MEMBER_MESSAGE, val)?;
|
52 52 | }
|
53 53 | Ok(())
|
54 54 | }
|
55 55 | }
|
56 56 | impl KmsInvalidSignatureException {
|
57 57 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
58 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
59 - | deserializer: &mut D,
|
58 + | pub fn deserialize(
|
59 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
60 60 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
61 61 | #[allow(unused_variables, unused_mut)]
|
62 62 | let mut builder = Self::builder();
|
63 63 | #[allow(
|
64 64 | unused_variables,
|
65 65 | unreachable_code,
|
66 66 | clippy::single_match,
|
67 67 | clippy::match_single_binding,
|
68 68 | clippy::diverging_sub_expression
|
69 69 | )]
|
70 - | deserializer.read_struct(&KMSINVALIDSIGNATUREEXCEPTION_SCHEMA, (), |_, member, deser| {
|
70 + | deserializer.read_struct(&KMSINVALIDSIGNATUREEXCEPTION_SCHEMA, &mut |member, deser| {
|
71 71 | match member.member_index() {
|
72 72 | Some(0) => {
|
73 73 | builder.message = Some(deser.read_string(member)?);
|
74 74 | }
|
75 75 | _ => {}
|
76 76 | }
|
77 77 | Ok(())
|
78 78 | })?;
|
79 79 | Ok(builder.build())
|
80 80 | }
|
81 81 | }
|
82 + | impl KmsInvalidSignatureException {
|
83 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
84 + | pub fn deserialize_with_response(
|
85 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
86 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
87 + | _status: u16,
|
88 + | _body: &[u8],
|
89 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
90 + | Self::deserialize(deserializer)
|
91 + | }
|
92 + | }
|
82 93 | impl KmsInvalidSignatureException {
|
83 94 | /// Returns the error message.
|
84 95 | pub fn message(&self) -> ::std::option::Option<&str> {
|
85 96 | self.message.as_deref()
|
86 97 | }
|
87 98 | }
|
88 99 | impl ::std::fmt::Display for KmsInvalidSignatureException {
|
89 100 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
90 101 | ::std::write!(f, "KmsInvalidSignatureException [KMSInvalidSignatureException]")?;
|
91 102 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
92 103 | {
|
93 104 | ::std::write!(f, ": {inner_1}")?;
|
94 105 | }
|
95 106 | }
|
96 107 | Ok(())
|
97 108 | }
|
98 109 | }
|
99 110 | impl ::std::error::Error for KmsInvalidSignatureException {}
|
100 111 | impl ::aws_types::request_id::RequestId for crate::types::error::KmsInvalidSignatureException {
|
101 112 | fn request_id(&self) -> Option<&str> {
|
102 113 | use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
|
103 114 | self.meta().request_id()
|
104 115 | }
|
105 116 | }
|
106 117 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for KmsInvalidSignatureException {
|
107 118 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
108 119 | &self.meta
|
109 120 | }
|
110 121 | }
|
111 122 | impl KmsInvalidSignatureException {
|