47 47 | );
|
48 48 | impl InvalidChangeBatch {
|
49 49 | /// The schema for this shape.
|
50 50 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &INVALIDCHANGEBATCH_SCHEMA;
|
51 51 | }
|
52 52 | impl ::aws_smithy_schema::serde::SerializableStruct for InvalidChangeBatch {
|
53 53 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
54 54 | fn serialize_members(
|
55 55 | &self,
|
56 56 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
57 57 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
58 58 | if let Some(ref val) = self.messages {
|
59 59 | ser.write_list(
|
60 60 | &INVALIDCHANGEBATCH_MEMBER_MESSAGES,
|
61 61 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
62 62 | for item in val {
|
63 63 | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
64 64 | }
|
65 65 | Ok(())
|
66 66 | },
|
67 67 | )?;
|
68 68 | }
|
69 69 | if let Some(ref val) = self.message {
|
70 70 | ser.write_string(&INVALIDCHANGEBATCH_MEMBER_MESSAGE, val)?;
|
71 71 | }
|
72 72 | Ok(())
|
73 73 | }
|
74 74 | }
|
75 75 | impl InvalidChangeBatch {
|
76 76 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
77 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
78 - | deserializer: &mut D,
|
77 + | pub fn deserialize(
|
78 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
79 79 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
80 80 | #[allow(unused_variables, unused_mut)]
|
81 81 | let mut builder = Self::builder();
|
82 82 | #[allow(
|
83 83 | unused_variables,
|
84 84 | unreachable_code,
|
85 85 | clippy::single_match,
|
86 86 | clippy::match_single_binding,
|
87 87 | clippy::diverging_sub_expression
|
88 88 | )]
|
89 - | deserializer.read_struct(&INVALIDCHANGEBATCH_SCHEMA, (), |_, member, deser| {
|
89 + | deserializer.read_struct(&INVALIDCHANGEBATCH_SCHEMA, &mut |member, deser| {
|
90 90 | match member.member_index() {
|
91 91 | Some(0) => {
|
92 - | builder.messages = Some({
|
93 - | let container = if let Some(cap) = deser.container_size() {
|
94 - | Vec::with_capacity(cap)
|
95 - | } else {
|
96 - | Vec::new()
|
97 - | };
|
98 - | deser.read_list(member, container, |mut list, deser| {
|
99 - | list.push(deser.read_string(member)?);
|
100 - | Ok(list)
|
101 - | })?
|
102 - | });
|
92 + | builder.messages = Some(deser.read_string_list(member)?);
|
103 93 | }
|
104 94 | Some(1) => {
|
105 95 | builder.message = Some(deser.read_string(member)?);
|
106 96 | }
|
107 97 | _ => {}
|
108 98 | }
|
109 99 | Ok(())
|
110 100 | })?;
|
111 101 | Ok(builder.build())
|
112 102 | }
|
113 103 | }
|
104 + | impl InvalidChangeBatch {
|
105 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
106 + | pub fn deserialize_with_response(
|
107 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
108 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
109 + | _status: u16,
|
110 + | _body: &[u8],
|
111 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
112 + | Self::deserialize(deserializer)
|
113 + | }
|
114 + | }
|
114 115 | impl InvalidChangeBatch {
|
115 116 | /// Returns the error message.
|
116 117 | pub fn message(&self) -> ::std::option::Option<&str> {
|
117 118 | self.message.as_deref()
|
118 119 | }
|
119 120 | }
|
120 121 | impl ::std::fmt::Display for InvalidChangeBatch {
|
121 122 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
122 123 | ::std::write!(f, "InvalidChangeBatch")?;
|
123 124 | if let ::std::option::Option::Some(inner_1) = &self.message {
|
124 125 | {
|
125 126 | ::std::write!(f, ": {inner_1}")?;
|
126 127 | }
|
127 128 | }
|
128 129 | Ok(())
|
129 130 | }
|
130 131 | }
|
131 132 | impl ::std::error::Error for InvalidChangeBatch {}
|
132 133 | impl ::aws_types::request_id::RequestId for crate::types::error::InvalidChangeBatch {
|
133 134 | fn request_id(&self) -> Option<&str> {
|
134 135 | use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
|
135 136 | self.meta().request_id()
|
136 137 | }
|
137 138 | }
|
138 139 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for InvalidChangeBatch {
|
139 140 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
140 141 | &self.meta
|
141 142 | }
|
142 143 | }
|
143 144 | impl InvalidChangeBatch {
|