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