1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | /* RustType.kt:516 */
|
2 3 | #[allow(clippy::unnecessary_wraps)]
|
4 + | /* ProtocolParserGenerator.kt:99 */
|
3 5 | pub fn de_start_snapshot_http_error(
|
4 6 | _response_status: u16,
|
5 7 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
6 8 | _response_body: &[u8],
|
7 9 | ) -> std::result::Result<crate::operation::start_snapshot::StartSnapshotOutput, crate::operation::start_snapshot::StartSnapshotError> {
|
10 + | /* RustType.kt:516 */
|
8 11 | #[allow(unused_mut)]
|
12 + | /* ProtocolParserGenerator.kt:106 */
|
9 13 | let mut generic_builder = crate::protocol_serde::parse_http_error_metadata(_response_status, _response_headers, _response_body)
|
10 14 | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
15 + | /* ProtocolParserGenerator.kt:120 */
|
11 16 | let generic = generic_builder.build();
|
17 + | /* ProtocolParserGenerator.kt:122 */
|
12 18 | let error_code = match generic.code() {
|
13 19 | Some(code) => code,
|
14 20 | None => return Err(crate::operation::start_snapshot::StartSnapshotError::unhandled(generic)),
|
15 21 | };
|
16 22 |
|
17 23 | let _error_message = generic.message().map(|msg| msg.to_owned());
|
24 + | /* ProtocolParserGenerator.kt:133 */
|
18 25 | Err(match error_code {
|
26 + | /* ProtocolParserGenerator.kt:139 */
|
19 27 | "AccessDeniedException" => crate::operation::start_snapshot::StartSnapshotError::AccessDeniedError({
|
28 + | /* RustType.kt:516 */
|
20 29 | #[allow(unused_mut)]
|
21 - | let mut tmp = {
|
22 - | #[allow(unused_mut)]
|
23 - | let mut output = crate::types::error::builders::AccessDeniedErrorBuilder::default();
|
24 - | output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output)
|
25 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
26 - | let output = output.meta(generic);
|
27 - | crate::serde_util::access_denied_exception_correct_errors(output)
|
28 - | .build()
|
29 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?
|
30 - | };
|
30 + | /* ProtocolParserGenerator.kt:145 */let mut tmp =
|
31 + | /* ProtocolParserGenerator.kt:146 */ {
|
32 + | /* RustType.kt:516 */#[allow(unused_mut)]
|
33 + | /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::AccessDeniedErrorBuilder::default();
|
34 + | /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_access_denied_exception::de_access_denied_exception_json_err(_response_body, output).map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
35 + | /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
|
36 + | /* ClientBuilderInstantiator.kt:46 */crate::serde_util::access_denied_exception_correct_errors(output).build().map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?
|
37 + | /* ProtocolParserGenerator.kt:146 */}
|
38 + | /* ProtocolParserGenerator.kt:145 */;
|
39 + | /* ProtocolParserGenerator.kt:170 */
|
31 40 | if tmp.message.is_none() {
|
32 41 | tmp.message = _error_message;
|
33 42 | }
|
43 + | /* ProtocolParserGenerator.kt:179 */
|
34 44 | tmp
|
45 + | /* ProtocolParserGenerator.kt:139 */
|
35 46 | }),
|
47 + | /* ProtocolParserGenerator.kt:139 */
|
36 48 | "ConcurrentLimitExceededException" => crate::operation::start_snapshot::StartSnapshotError::ConcurrentLimitExceededError({
|
49 + | /* RustType.kt:516 */
|
37 50 | #[allow(unused_mut)]
|
38 - | let mut tmp = {
|
39 - | #[allow(unused_mut)]
|
40 - | let mut output = crate::types::error::builders::ConcurrentLimitExceededErrorBuilder::default();
|
41 - | output = crate::protocol_serde::shape_concurrent_limit_exceeded_exception::de_concurrent_limit_exceeded_exception_json_err(
|
42 - | _response_body,
|
43 - | output,
|
44 - | )
|
45 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
46 - | let output = output.meta(generic);
|
47 - | output.build()
|
48 - | };
|
51 + | /* ProtocolParserGenerator.kt:145 */let mut tmp =
|
52 + | /* ProtocolParserGenerator.kt:146 */ {
|
53 + | /* RustType.kt:516 */#[allow(unused_mut)]
|
54 + | /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ConcurrentLimitExceededErrorBuilder::default();
|
55 + | /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_concurrent_limit_exceeded_exception::de_concurrent_limit_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
56 + | /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
|
57 + | /* ClientBuilderInstantiator.kt:56 */output.build()
|
58 + | /* ProtocolParserGenerator.kt:146 */}
|
59 + | /* ProtocolParserGenerator.kt:145 */;
|
60 + | /* ProtocolParserGenerator.kt:170 */
|
49 61 | if tmp.message.is_none() {
|
50 62 | tmp.message = _error_message;
|
51 63 | }
|
64 + | /* ProtocolParserGenerator.kt:179 */
|
52 65 | tmp
|
66 + | /* ProtocolParserGenerator.kt:139 */
|
53 67 | }),
|
68 + | /* ProtocolParserGenerator.kt:139 */
|
54 69 | "ConflictException" => crate::operation::start_snapshot::StartSnapshotError::ConflictError({
|
70 + | /* RustType.kt:516 */
|
55 71 | #[allow(unused_mut)]
|
56 - | let mut tmp = {
|
57 - | #[allow(unused_mut)]
|
58 - | let mut output = crate::types::error::builders::ConflictErrorBuilder::default();
|
59 - | output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output)
|
60 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
61 - | let output = output.meta(generic);
|
62 - | output.build()
|
63 - | };
|
72 + | /* ProtocolParserGenerator.kt:145 */let mut tmp =
|
73 + | /* ProtocolParserGenerator.kt:146 */ {
|
74 + | /* RustType.kt:516 */#[allow(unused_mut)]
|
75 + | /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ConflictErrorBuilder::default();
|
76 + | /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_conflict_exception::de_conflict_exception_json_err(_response_body, output).map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
77 + | /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
|
78 + | /* ClientBuilderInstantiator.kt:56 */output.build()
|
79 + | /* ProtocolParserGenerator.kt:146 */}
|
80 + | /* ProtocolParserGenerator.kt:145 */;
|
81 + | /* ProtocolParserGenerator.kt:170 */
|
64 82 | if tmp.message.is_none() {
|
65 83 | tmp.message = _error_message;
|
66 84 | }
|
85 + | /* ProtocolParserGenerator.kt:179 */
|
67 86 | tmp
|
87 + | /* ProtocolParserGenerator.kt:139 */
|
68 88 | }),
|
89 + | /* ProtocolParserGenerator.kt:139 */
|
69 90 | "InternalServerException" => crate::operation::start_snapshot::StartSnapshotError::InternalServerError({
|
91 + | /* RustType.kt:516 */
|
70 92 | #[allow(unused_mut)]
|
71 - | let mut tmp = {
|
72 - | #[allow(unused_mut)]
|
73 - | let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
|
74 - | output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output)
|
75 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
76 - | let output = output.meta(generic);
|
77 - | output.build()
|
78 - | };
|
93 + | /* ProtocolParserGenerator.kt:145 */let mut tmp =
|
94 + | /* ProtocolParserGenerator.kt:146 */ {
|
95 + | /* RustType.kt:516 */#[allow(unused_mut)]
|
96 + | /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::InternalServerErrorBuilder::default();
|
97 + | /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_internal_server_exception::de_internal_server_exception_json_err(_response_body, output).map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
98 + | /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
|
99 + | /* ClientBuilderInstantiator.kt:56 */output.build()
|
100 + | /* ProtocolParserGenerator.kt:146 */}
|
101 + | /* ProtocolParserGenerator.kt:145 */;
|
102 + | /* ProtocolParserGenerator.kt:170 */
|
79 103 | if tmp.message.is_none() {
|
80 104 | tmp.message = _error_message;
|
81 105 | }
|
106 + | /* ProtocolParserGenerator.kt:179 */
|
82 107 | tmp
|
108 + | /* ProtocolParserGenerator.kt:139 */
|
83 109 | }),
|
110 + | /* ProtocolParserGenerator.kt:139 */
|
84 111 | "RequestThrottledException" => crate::operation::start_snapshot::StartSnapshotError::RequestThrottledError({
|
112 + | /* RustType.kt:516 */
|
85 113 | #[allow(unused_mut)]
|
86 - | let mut tmp = {
|
87 - | #[allow(unused_mut)]
|
88 - | let mut output = crate::types::error::builders::RequestThrottledErrorBuilder::default();
|
89 - | output = crate::protocol_serde::shape_request_throttled_exception::de_request_throttled_exception_json_err(_response_body, output)
|
90 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
91 - | let output = output.meta(generic);
|
92 - | output.build()
|
93 - | };
|
114 + | /* ProtocolParserGenerator.kt:145 */let mut tmp =
|
115 + | /* ProtocolParserGenerator.kt:146 */ {
|
116 + | /* RustType.kt:516 */#[allow(unused_mut)]
|
117 + | /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::RequestThrottledErrorBuilder::default();
|
118 + | /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_request_throttled_exception::de_request_throttled_exception_json_err(_response_body, output).map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
119 + | /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
|
120 + | /* ClientBuilderInstantiator.kt:56 */output.build()
|
121 + | /* ProtocolParserGenerator.kt:146 */}
|
122 + | /* ProtocolParserGenerator.kt:145 */;
|
123 + | /* ProtocolParserGenerator.kt:170 */
|
94 124 | if tmp.message.is_none() {
|
95 125 | tmp.message = _error_message;
|
96 126 | }
|
127 + | /* ProtocolParserGenerator.kt:179 */
|
97 128 | tmp
|
129 + | /* ProtocolParserGenerator.kt:139 */
|
98 130 | }),
|
131 + | /* ProtocolParserGenerator.kt:139 */
|
99 132 | "ResourceNotFoundException" => crate::operation::start_snapshot::StartSnapshotError::ResourceNotFoundError({
|
133 + | /* RustType.kt:516 */
|
100 134 | #[allow(unused_mut)]
|
101 - | let mut tmp = {
|
102 - | #[allow(unused_mut)]
|
103 - | let mut output = crate::types::error::builders::ResourceNotFoundErrorBuilder::default();
|
104 - | output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output)
|
105 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
106 - | let output = output.meta(generic);
|
107 - | output.build()
|
108 - | };
|
135 + | /* ProtocolParserGenerator.kt:145 */let mut tmp =
|
136 + | /* ProtocolParserGenerator.kt:146 */ {
|
137 + | /* RustType.kt:516 */#[allow(unused_mut)]
|
138 + | /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ResourceNotFoundErrorBuilder::default();
|
139 + | /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_resource_not_found_exception::de_resource_not_found_exception_json_err(_response_body, output).map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
140 + | /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
|
141 + | /* ClientBuilderInstantiator.kt:56 */output.build()
|
142 + | /* ProtocolParserGenerator.kt:146 */}
|
143 + | /* ProtocolParserGenerator.kt:145 */;
|
144 + | /* ProtocolParserGenerator.kt:170 */
|
109 145 | if tmp.message.is_none() {
|
110 146 | tmp.message = _error_message;
|
111 147 | }
|
148 + | /* ProtocolParserGenerator.kt:179 */
|
112 149 | tmp
|
150 + | /* ProtocolParserGenerator.kt:139 */
|
113 151 | }),
|
152 + | /* ProtocolParserGenerator.kt:139 */
|
114 153 | "ServiceQuotaExceededException" => crate::operation::start_snapshot::StartSnapshotError::ServiceQuotaExceededError({
|
154 + | /* RustType.kt:516 */
|
115 155 | #[allow(unused_mut)]
|
116 - | let mut tmp = {
|
117 - | #[allow(unused_mut)]
|
118 - | let mut output = crate::types::error::builders::ServiceQuotaExceededErrorBuilder::default();
|
119 - | output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(
|
120 - | _response_body,
|
121 - | output,
|
122 - | )
|
123 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
124 - | let output = output.meta(generic);
|
125 - | output.build()
|
126 - | };
|
156 + | /* ProtocolParserGenerator.kt:145 */let mut tmp =
|
157 + | /* ProtocolParserGenerator.kt:146 */ {
|
158 + | /* RustType.kt:516 */#[allow(unused_mut)]
|
159 + | /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ServiceQuotaExceededErrorBuilder::default();
|
160 + | /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_service_quota_exceeded_exception::de_service_quota_exceeded_exception_json_err(_response_body, output).map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
161 + | /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
|
162 + | /* ClientBuilderInstantiator.kt:56 */output.build()
|
163 + | /* ProtocolParserGenerator.kt:146 */}
|
164 + | /* ProtocolParserGenerator.kt:145 */;
|
165 + | /* ProtocolParserGenerator.kt:170 */
|
127 166 | if tmp.message.is_none() {
|
128 167 | tmp.message = _error_message;
|
129 168 | }
|
169 + | /* ProtocolParserGenerator.kt:179 */
|
130 170 | tmp
|
171 + | /* ProtocolParserGenerator.kt:139 */
|
131 172 | }),
|
173 + | /* ProtocolParserGenerator.kt:139 */
|
132 174 | "ValidationException" => crate::operation::start_snapshot::StartSnapshotError::ValidationError({
|
175 + | /* RustType.kt:516 */
|
133 176 | #[allow(unused_mut)]
|
134 - | let mut tmp = {
|
135 - | #[allow(unused_mut)]
|
136 - | let mut output = crate::types::error::builders::ValidationErrorBuilder::default();
|
137 - | output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output)
|
138 - | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
139 - | let output = output.meta(generic);
|
140 - | output.build()
|
141 - | };
|
177 + | /* ProtocolParserGenerator.kt:145 */let mut tmp =
|
178 + | /* ProtocolParserGenerator.kt:146 */ {
|
179 + | /* RustType.kt:516 */#[allow(unused_mut)]
|
180 + | /* ProtocolParserGenerator.kt:240 */let mut output = crate::types::error::builders::ValidationErrorBuilder::default();
|
181 + | /* ProtocolParserGenerator.kt:257 */output = crate::protocol_serde::shape_validation_exception::de_validation_exception_json_err(_response_body, output).map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
182 + | /* ProtocolParserGenerator.kt:157 */let output = output.meta(generic);
|
183 + | /* ClientBuilderInstantiator.kt:56 */output.build()
|
184 + | /* ProtocolParserGenerator.kt:146 */}
|
185 + | /* ProtocolParserGenerator.kt:145 */;
|
186 + | /* ProtocolParserGenerator.kt:170 */
|
142 187 | if tmp.message.is_none() {
|
143 188 | tmp.message = _error_message;
|
144 189 | }
|
190 + | /* ProtocolParserGenerator.kt:179 */
|
145 191 | tmp
|
192 + | /* ProtocolParserGenerator.kt:139 */
|
146 193 | }),
|
147 - | _ => crate::operation::start_snapshot::StartSnapshotError::generic(generic),
|
194 + | /* ProtocolParserGenerator.kt:182 */
|
195 + | _ => crate::operation::start_snapshot::StartSnapshotError::generic(generic), /* ProtocolParserGenerator.kt:133 */
|
148 196 | })
|
197 + | /* ProtocolParserGenerator.kt:99 */
|
149 198 | }
|
150 199 |
|
200 + | /* RustType.kt:516 */
|
151 201 | #[allow(clippy::unnecessary_wraps)]
|
202 + | /* ProtocolParserGenerator.kt:71 */
|
152 203 | pub fn de_start_snapshot_http_response(
|
153 204 | _response_status: u16,
|
154 205 | _response_headers: &::aws_smithy_runtime_api::http::Headers,
|
155 206 | _response_body: &[u8],
|
156 207 | ) -> std::result::Result<crate::operation::start_snapshot::StartSnapshotOutput, crate::operation::start_snapshot::StartSnapshotError> {
|
208 + | /* ProtocolParserGenerator.kt:77 */
|
157 209 | Ok({
|
210 + | /* RustType.kt:516 */
|
158 211 | #[allow(unused_mut)]
|
212 + | /* ProtocolParserGenerator.kt:240 */
|
159 213 | let mut output = crate::operation::start_snapshot::builders::StartSnapshotOutputBuilder::default();
|
214 + | /* ProtocolParserGenerator.kt:247 */
|
160 215 | output = crate::protocol_serde::shape_start_snapshot::de_start_snapshot(_response_body, output)
|
161 216 | .map_err(crate::operation::start_snapshot::StartSnapshotError::unhandled)?;
|
217 + | /* ClientBuilderInstantiator.kt:56 */
|
162 218 | output.build()
|
219 + | /* ProtocolParserGenerator.kt:77 */
|
163 220 | })
|
221 + | /* ProtocolParserGenerator.kt:71 */
|
164 222 | }
|
165 223 |
|
224 + | /* JsonSerializerGenerator.kt:287 */
|
166 225 | pub fn ser_start_snapshot_input(
|
167 226 | input: &crate::operation::start_snapshot::StartSnapshotInput,
|
168 227 | ) -> ::std::result::Result<::aws_smithy_types::body::SdkBody, ::aws_smithy_types::error::operation::SerializationError> {
|
228 + | /* JsonSerializerGenerator.kt:291 */
|
169 229 | let mut out = String::new();
|
230 + | /* JsonSerializerGenerator.kt:292 */
|
170 231 | let mut object = ::aws_smithy_json::serialize::JsonObjectWriter::new(&mut out);
|
232 + | /* JsonSerializerGenerator.kt:375 */
|
171 233 | crate::protocol_serde::shape_start_snapshot_input::ser_start_snapshot_input_input(&mut object, input)?;
|
234 + | /* JsonSerializerGenerator.kt:295 */
|
172 235 | object.finish();
|
236 + | /* JsonSerializerGenerator.kt:296 */
|
173 237 | Ok(::aws_smithy_types::body::SdkBody::from(out))
|
238 + | /* JsonSerializerGenerator.kt:287 */
|
174 239 | }
|
175 240 |
|
241 + | /* JsonParserGenerator.kt:148 */
|
176 242 | pub(crate) fn de_start_snapshot(
|
177 243 | value: &[u8],
|
178 244 | mut builder: crate::operation::start_snapshot::builders::StartSnapshotOutputBuilder,
|
179 245 | ) -> ::std::result::Result<
|
180 246 | crate::operation::start_snapshot::builders::StartSnapshotOutputBuilder,
|
181 247 | ::aws_smithy_json::deserialize::error::DeserializeError,
|
182 248 | > {
|
249 + | /* JsonParserGenerator.kt:153 */
|
183 250 | let mut tokens_owned = ::aws_smithy_json::deserialize::json_token_iter(crate::protocol_serde::or_empty_doc(value)).peekable();
|
184 251 | let tokens = &mut tokens_owned;
|
185 252 | ::aws_smithy_json::deserialize::token::expect_start_object(tokens.next())?;
|
253 + | /* JsonParserGenerator.kt:684 */
|
186 254 | loop {
|
255 + | /* JsonParserGenerator.kt:685 */
|
187 256 | match tokens.next().transpose()? {
|
188 - | Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
|
189 - | Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => match key.to_unescaped()?.as_ref() {
|
190 - | "BlockSize" => {
|
191 - | builder = builder.set_block_size(
|
192 - | ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
|
193 - | .map(i32::try_from)
|
194 - | .transpose()?,
|
195 - | );
|
257 + | /* JsonParserGenerator.kt:686 */ Some(::aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
|
258 + | Some(::aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
|
259 + | /* JsonParserGenerator.kt:260 */
|
260 + | match key.to_unescaped()?.as_ref() {
|
261 + | /* JsonParserGenerator.kt:262 */
|
262 + | "BlockSize" => {
|
263 + | /* JsonParserGenerator.kt:265 */
|
264 + | builder = builder.set_block_size(
|
265 + | /* JsonParserGenerator.kt:365 */
|
266 + | ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
|
267 + | .map(i32::try_from)
|
268 + | .transpose()?, /* JsonParserGenerator.kt:265 */
|
269 + | );
|
270 + | /* JsonParserGenerator.kt:262 */
|
271 + | }
|
272 + | /* JsonParserGenerator.kt:262 */
|
273 + | "Description" => {
|
274 + | /* JsonParserGenerator.kt:265 */
|
275 + | builder = builder.set_description(
|
276 + | /* JsonParserGenerator.kt:354 */
|
277 + | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
278 + | .map(|s|
|
279 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
280 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
281 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
282 + | .transpose()?, /* JsonParserGenerator.kt:265 */
|
283 + | );
|
284 + | /* JsonParserGenerator.kt:262 */
|
285 + | }
|
286 + | /* JsonParserGenerator.kt:262 */
|
287 + | "KmsKeyArn" => {
|
288 + | /* JsonParserGenerator.kt:265 */
|
289 + | builder = builder.set_kms_key_arn(
|
290 + | /* JsonParserGenerator.kt:354 */
|
291 + | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
292 + | .map(|s|
|
293 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
294 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
295 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
296 + | .transpose()?, /* JsonParserGenerator.kt:265 */
|
297 + | );
|
298 + | /* JsonParserGenerator.kt:262 */
|
299 + | }
|
300 + | /* JsonParserGenerator.kt:262 */
|
301 + | "OwnerId" => {
|
302 + | /* JsonParserGenerator.kt:265 */
|
303 + | builder = builder.set_owner_id(
|
304 + | /* JsonParserGenerator.kt:354 */
|
305 + | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
306 + | .map(|s|
|
307 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
308 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
309 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
310 + | .transpose()?, /* JsonParserGenerator.kt:265 */
|
311 + | );
|
312 + | /* JsonParserGenerator.kt:262 */
|
313 + | }
|
314 + | /* JsonParserGenerator.kt:262 */
|
315 + | "ParentSnapshotId" => {
|
316 + | /* JsonParserGenerator.kt:265 */
|
317 + | builder = builder.set_parent_snapshot_id(
|
318 + | /* JsonParserGenerator.kt:354 */
|
319 + | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
320 + | .map(|s|
|
321 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
322 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
323 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
324 + | .transpose()?, /* JsonParserGenerator.kt:265 */
|
325 + | );
|
326 + | /* JsonParserGenerator.kt:262 */
|
327 + | }
|
328 + | /* JsonParserGenerator.kt:262 */
|
329 + | "SnapshotId" => {
|
330 + | /* JsonParserGenerator.kt:265 */
|
331 + | builder = builder.set_snapshot_id(
|
332 + | /* JsonParserGenerator.kt:354 */
|
333 + | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
334 + | .map(|s|
|
335 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
336 + | /* JsonParserGenerator.kt:348 */u.into_owned()
|
337 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
338 + | .transpose()?, /* JsonParserGenerator.kt:265 */
|
339 + | );
|
340 + | /* JsonParserGenerator.kt:262 */
|
341 + | }
|
342 + | /* JsonParserGenerator.kt:262 */
|
343 + | "StartTime" => {
|
344 + | /* JsonParserGenerator.kt:265 */
|
345 + | builder = builder.set_start_time(
|
346 + | /* JsonParserGenerator.kt:384 */
|
347 + | ::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
|
348 + | tokens.next(),
|
349 + | ::aws_smithy_types::date_time::Format::EpochSeconds,
|
350 + | )?, /* JsonParserGenerator.kt:265 */
|
351 + | );
|
352 + | /* JsonParserGenerator.kt:262 */
|
353 + | }
|
354 + | /* JsonParserGenerator.kt:262 */
|
355 + | "Status" => {
|
356 + | /* JsonParserGenerator.kt:265 */
|
357 + | builder = builder.set_status(
|
358 + | /* JsonParserGenerator.kt:354 */
|
359 + | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
360 + | .map(|s|
|
361 + | /* JsonParserGenerator.kt:339 */s.to_unescaped().map(|u|
|
362 + | /* JsonParserGenerator.kt:345 */crate::types::Status::from(u.as_ref())
|
363 + | /* JsonParserGenerator.kt:339 */) /* JsonParserGenerator.kt:354 */)
|
364 + | .transpose()?, /* JsonParserGenerator.kt:265 */
|
365 + | );
|
366 + | /* JsonParserGenerator.kt:262 */
|
367 + | }
|
368 + | /* JsonParserGenerator.kt:262 */
|
369 + | "Tags" => {
|
370 + | /* JsonParserGenerator.kt:265 */
|
371 + | builder = builder.set_tags(
|
372 + | /* JsonParserGenerator.kt:451 */
|
373 + | crate::protocol_serde::shape_tags::de_tags(tokens)?, /* JsonParserGenerator.kt:265 */
|
374 + | );
|
375 + | /* JsonParserGenerator.kt:262 */
|
376 + | }
|
377 + | /* JsonParserGenerator.kt:262 */
|
378 + | "VolumeSize" => {
|
379 + | /* JsonParserGenerator.kt:265 */
|
380 + | builder = builder.set_volume_size(
|
381 + | /* JsonParserGenerator.kt:365 */
|
382 + | ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
|
383 + | .map(i64::try_from)
|
384 + | .transpose()?, /* JsonParserGenerator.kt:265 */
|
385 + | );
|
386 + | /* JsonParserGenerator.kt:262 */
|
387 + | }
|
388 + | /* JsonParserGenerator.kt:290 */
|
389 + | _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?, /* JsonParserGenerator.kt:260 */
|
196 390 | }
|
197 - | "Description" => {
|
198 - | builder = builder.set_description(
|
199 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
200 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
201 - | .transpose()?,
|
202 - | );
|
203 - | }
|
204 - | "KmsKeyArn" => {
|
205 - | builder = builder.set_kms_key_arn(
|
206 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
207 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
208 - | .transpose()?,
|
209 - | );
|
210 - | }
|
211 - | "OwnerId" => {
|
212 - | builder = builder.set_owner_id(
|
213 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
214 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
215 - | .transpose()?,
|
216 - | );
|
217 - | }
|
218 - | "ParentSnapshotId" => {
|
219 - | builder = builder.set_parent_snapshot_id(
|
220 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
221 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
222 - | .transpose()?,
|
223 - | );
|
224 - | }
|
225 - | "SnapshotId" => {
|
226 - | builder = builder.set_snapshot_id(
|
227 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
228 - | .map(|s| s.to_unescaped().map(|u| u.into_owned()))
|
229 - | .transpose()?,
|
230 - | );
|
231 - | }
|
232 - | "StartTime" => {
|
233 - | builder = builder.set_start_time(::aws_smithy_json::deserialize::token::expect_timestamp_or_null(
|
234 - | tokens.next(),
|
235 - | ::aws_smithy_types::date_time::Format::EpochSeconds,
|
236 - | )?);
|
237 - | }
|
238 - | "Status" => {
|
239 - | builder = builder.set_status(
|
240 - | ::aws_smithy_json::deserialize::token::expect_string_or_null(tokens.next())?
|
241 - | .map(|s| s.to_unescaped().map(|u| crate::types::Status::from(u.as_ref())))
|
242 - | .transpose()?,
|
243 - | );
|
244 - | }
|
245 - | "Tags" => {
|
246 - | builder = builder.set_tags(crate::protocol_serde::shape_tags::de_tags(tokens)?);
|
247 - | }
|
248 - | "VolumeSize" => {
|
249 - | builder = builder.set_volume_size(
|
250 - | ::aws_smithy_json::deserialize::token::expect_number_or_null(tokens.next())?
|
251 - | .map(i64::try_from)
|
252 - | .transpose()?,
|
253 - | );
|
254 - | }
|
255 - | _ => ::aws_smithy_json::deserialize::token::skip_value(tokens)?,
|
256 - | },
|
391 + | /* JsonParserGenerator.kt:686 */
|
392 + | }
|
393 + | /* JsonParserGenerator.kt:695 */
|
257 394 | other => {
|
258 395 | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
|
259 396 | "expected object key or end object, found: {:?}",
|
260 397 | other
|
261 398 | )))
|
262 - | }
|
399 + | } /* JsonParserGenerator.kt:685 */
|
263 400 | }
|
401 + | /* JsonParserGenerator.kt:684 */
|
264 402 | }
|
403 + | /* JsonParserGenerator.kt:250 */
|
265 404 | if tokens.next().is_some() {
|
405 + | /* JsonParserGenerator.kt:251 */
|
266 406 | return Err(::aws_smithy_json::deserialize::error::DeserializeError::custom(
|
267 407 | "found more JSON tokens after completing parsing",
|
268 408 | ));
|
409 + | /* JsonParserGenerator.kt:250 */
|
269 410 | }
|
411 + | /* JsonParserGenerator.kt:163 */
|
270 412 | Ok(builder)
|
413 + | /* JsonParserGenerator.kt:148 */
|
271 414 | }
|