64 64 | "com.amazonaws.s3",
|
65 65 | "GetObjectAttributesParts",
|
66 66 | );
|
67 67 | static GETOBJECTATTRIBUTESPARTS_MEMBER_TOTAL_PARTS_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
68 68 | ::aws_smithy_schema::ShapeId::from_static(
|
69 69 | "com.amazonaws.s3#GetObjectAttributesParts$TotalPartsCount",
|
70 70 | "com.amazonaws.s3",
|
71 71 | "GetObjectAttributesParts",
|
72 72 | ),
|
73 73 | ::aws_smithy_schema::ShapeType::Integer,
|
74 - | "total_parts_count",
|
74 + | "TotalPartsCount",
|
75 75 | 0,
|
76 76 | )
|
77 77 | .with_xml_name("PartsCount");
|
78 78 | static GETOBJECTATTRIBUTESPARTS_MEMBER_PART_NUMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
79 79 | ::aws_smithy_schema::ShapeId::from_static(
|
80 80 | "com.amazonaws.s3#GetObjectAttributesParts$PartNumberMarker",
|
81 81 | "com.amazonaws.s3",
|
82 82 | "GetObjectAttributesParts",
|
83 83 | ),
|
84 84 | ::aws_smithy_schema::ShapeType::String,
|
85 - | "part_number_marker",
|
85 + | "PartNumberMarker",
|
86 86 | 1,
|
87 87 | );
|
88 88 | static GETOBJECTATTRIBUTESPARTS_MEMBER_NEXT_PART_NUMBER_MARKER: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
89 89 | ::aws_smithy_schema::ShapeId::from_static(
|
90 90 | "com.amazonaws.s3#GetObjectAttributesParts$NextPartNumberMarker",
|
91 91 | "com.amazonaws.s3",
|
92 92 | "GetObjectAttributesParts",
|
93 93 | ),
|
94 94 | ::aws_smithy_schema::ShapeType::String,
|
95 - | "next_part_number_marker",
|
95 + | "NextPartNumberMarker",
|
96 96 | 2,
|
97 97 | );
|
98 98 | static GETOBJECTATTRIBUTESPARTS_MEMBER_MAX_PARTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
99 99 | ::aws_smithy_schema::ShapeId::from_static(
|
100 100 | "com.amazonaws.s3#GetObjectAttributesParts$MaxParts",
|
101 101 | "com.amazonaws.s3",
|
102 102 | "GetObjectAttributesParts",
|
103 103 | ),
|
104 104 | ::aws_smithy_schema::ShapeType::Integer,
|
105 - | "max_parts",
|
105 + | "MaxParts",
|
106 106 | 3,
|
107 107 | );
|
108 108 | static GETOBJECTATTRIBUTESPARTS_MEMBER_IS_TRUNCATED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
109 109 | ::aws_smithy_schema::ShapeId::from_static(
|
110 110 | "com.amazonaws.s3#GetObjectAttributesParts$IsTruncated",
|
111 111 | "com.amazonaws.s3",
|
112 112 | "GetObjectAttributesParts",
|
113 113 | ),
|
114 114 | ::aws_smithy_schema::ShapeType::Boolean,
|
115 - | "is_truncated",
|
115 + | "IsTruncated",
|
116 116 | 4,
|
117 117 | );
|
118 118 | static GETOBJECTATTRIBUTESPARTS_MEMBER_PARTS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
119 119 | ::aws_smithy_schema::ShapeId::from_static(
|
120 120 | "com.amazonaws.s3#GetObjectAttributesParts$Parts",
|
121 121 | "com.amazonaws.s3",
|
122 122 | "GetObjectAttributesParts",
|
123 123 | ),
|
124 124 | ::aws_smithy_schema::ShapeType::List,
|
125 - | "parts",
|
125 + | "Parts",
|
126 126 | 5,
|
127 127 | )
|
128 128 | .with_xml_name("Part")
|
129 129 | .with_xml_flattened();
|
130 130 | static GETOBJECTATTRIBUTESPARTS_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
131 131 | GETOBJECTATTRIBUTESPARTS_SCHEMA_ID,
|
132 132 | ::aws_smithy_schema::ShapeType::Structure,
|
133 133 | &[
|
134 134 | &GETOBJECTATTRIBUTESPARTS_MEMBER_TOTAL_PARTS_COUNT,
|
135 135 | &GETOBJECTATTRIBUTESPARTS_MEMBER_PART_NUMBER_MARKER,
|
136 136 | &GETOBJECTATTRIBUTESPARTS_MEMBER_NEXT_PART_NUMBER_MARKER,
|
137 137 | &GETOBJECTATTRIBUTESPARTS_MEMBER_MAX_PARTS,
|
138 138 | &GETOBJECTATTRIBUTESPARTS_MEMBER_IS_TRUNCATED,
|
139 139 | &GETOBJECTATTRIBUTESPARTS_MEMBER_PARTS,
|
140 140 | ],
|
141 141 | );
|
142 142 | impl GetObjectAttributesParts {
|
143 143 | /// The schema for this shape.
|
144 144 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &GETOBJECTATTRIBUTESPARTS_SCHEMA;
|
145 145 | }
|
146 146 | impl ::aws_smithy_schema::serde::SerializableStruct for GetObjectAttributesParts {
|
147 147 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
148 148 | fn serialize_members(
|
149 149 | &self,
|
150 150 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
151 151 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
152 152 | if let Some(ref val) = self.total_parts_count {
|
153 153 | ser.write_integer(&GETOBJECTATTRIBUTESPARTS_MEMBER_TOTAL_PARTS_COUNT, *val)?;
|
154 154 | }
|
155 155 | if let Some(ref val) = self.part_number_marker {
|
156 156 | ser.write_string(&GETOBJECTATTRIBUTESPARTS_MEMBER_PART_NUMBER_MARKER, val)?;
|
157 157 | }
|
158 158 | if let Some(ref val) = self.next_part_number_marker {
|
159 159 | ser.write_string(&GETOBJECTATTRIBUTESPARTS_MEMBER_NEXT_PART_NUMBER_MARKER, val)?;
|
160 160 | }
|
161 161 | if let Some(ref val) = self.max_parts {
|
162 162 | ser.write_integer(&GETOBJECTATTRIBUTESPARTS_MEMBER_MAX_PARTS, *val)?;
|
163 163 | }
|
164 164 | if let Some(ref val) = self.is_truncated {
|
165 165 | ser.write_boolean(&GETOBJECTATTRIBUTESPARTS_MEMBER_IS_TRUNCATED, *val)?;
|
166 166 | }
|
167 167 | if let Some(ref val) = self.parts {
|
168 168 | ser.write_list(
|
169 169 | &GETOBJECTATTRIBUTESPARTS_MEMBER_PARTS,
|
170 170 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
171 171 | for item in val {
|
172 172 | ser.write_struct(crate::types::ObjectPart::SCHEMA, item)?;
|
173 173 | }
|
174 174 | Ok(())
|
175 175 | },
|
176 176 | )?;
|
177 177 | }
|
178 178 | Ok(())
|
179 179 | }
|
180 180 | }
|
181 181 | impl GetObjectAttributesParts {
|
182 182 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
183 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
184 - | deserializer: &mut D,
|
183 + | pub fn deserialize(
|
184 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
185 185 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
186 186 | #[allow(unused_variables, unused_mut)]
|
187 187 | let mut builder = Self::builder();
|
188 188 | #[allow(
|
189 189 | unused_variables,
|
190 190 | unreachable_code,
|
191 191 | clippy::single_match,
|
192 192 | clippy::match_single_binding,
|
193 193 | clippy::diverging_sub_expression
|
194 194 | )]
|
195 - | deserializer.read_struct(&GETOBJECTATTRIBUTESPARTS_SCHEMA, (), |_, member, deser| {
|
195 + | deserializer.read_struct(&GETOBJECTATTRIBUTESPARTS_SCHEMA, &mut |member, deser| {
|
196 196 | match member.member_index() {
|
197 197 | Some(0) => {
|
198 198 | builder.total_parts_count = Some(deser.read_integer(member)?);
|
199 199 | }
|
200 200 | Some(1) => {
|
201 201 | builder.part_number_marker = Some(deser.read_string(member)?);
|
202 202 | }
|
203 203 | Some(2) => {
|
204 204 | builder.next_part_number_marker = Some(deser.read_string(member)?);
|
205 205 | }
|
206 206 | Some(3) => {
|
207 207 | builder.max_parts = Some(deser.read_integer(member)?);
|
208 208 | }
|
209 209 | Some(4) => {
|
210 210 | builder.is_truncated = Some(deser.read_boolean(member)?);
|
211 211 | }
|
212 212 | Some(5) => {
|
213 213 | builder.parts = Some({
|
214 - | let container = if let Some(cap) = deser.container_size() {
|
215 - | Vec::with_capacity(cap)
|
216 - | } else {
|
217 - | Vec::new()
|
218 - | };
|
219 - | deser.read_list(member, container, |mut list, deser| {
|
220 - | list.push(crate::types::ObjectPart::deserialize(deser)?);
|
221 - | Ok(list)
|
222 - | })?
|
214 + | let mut container = Vec::new();
|
215 + | deser.read_list(member, &mut |deser| {
|
216 + | container.push(crate::types::ObjectPart::deserialize(deser)?);
|
217 + | Ok(())
|
218 + | })?;
|
219 + | container
|
223 220 | });
|
224 221 | }
|
225 222 | _ => {}
|
226 223 | }
|
227 224 | Ok(())
|
228 225 | })?;
|
229 226 | Ok(builder.build())
|
230 227 | }
|
231 228 | }
|
229 + | impl GetObjectAttributesParts {
|
230 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
231 + | pub fn deserialize_with_response(
|
232 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
233 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
234 + | _status: u16,
|
235 + | _body: &[u8],
|
236 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
237 + | Self::deserialize(deserializer)
|
238 + | }
|
239 + | }
|
232 240 | impl GetObjectAttributesParts {
|
233 241 | /// Creates a new builder-style object to manufacture [`GetObjectAttributesParts`](crate::types::GetObjectAttributesParts).
|
234 242 | pub fn builder() -> crate::types::builders::GetObjectAttributesPartsBuilder {
|
235 243 | crate::types::builders::GetObjectAttributesPartsBuilder::default()
|
236 244 | }
|
237 245 | }
|
238 246 |
|
239 247 | /// A builder for [`GetObjectAttributesParts`](crate::types::GetObjectAttributesParts).
|
240 248 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
241 249 | #[non_exhaustive]
|