77 86 | runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
|
78 87 | }
|
79 88 | runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
|
80 89 | config_override,
|
81 90 | client_config.config.clone(),
|
82 91 | &client_config.runtime_components,
|
83 92 | ));
|
84 93 | }
|
85 94 | runtime_plugins
|
86 95 | }
|
96 + | /* OperationGenerator.kt:85 */
|
87 97 | }
|
98 + | /* OperationRuntimePluginGenerator.kt:55 */
|
88 99 | impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for MalformedList {
|
89 100 | fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
|
90 101 | let mut cfg = ::aws_smithy_types::config_bag::Layer::new("MalformedList");
|
91 102 |
|
92 103 | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
|
93 104 | MalformedListRequestSerializer,
|
94 105 | ));
|
95 106 | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
|
96 107 | MalformedListResponseDeserializer,
|
97 108 | ));
|
98 109 |
|
99 110 | cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
|
100 111 | ::aws_smithy_runtime_api::client::auth::static_resolver::StaticAuthSchemeOptionResolverParams::new(),
|
101 112 | ));
|
102 113 |
|
103 114 | cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
|
104 115 | "MalformedList",
|
105 116 | "Rest Json Protocol",
|
106 117 | ));
|
107 118 |
|
108 119 | ::std::option::Option::Some(cfg.freeze())
|
109 120 | }
|
110 121 |
|
111 122 | fn runtime_components(
|
112 123 | &self,
|
113 124 | _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
|
114 125 | ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
|
115 126 | #[allow(unused_mut)]
|
116 127 | let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("MalformedList")
|
117 128 | .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
|
118 129 | .with_interceptor(MalformedListEndpointParamsInterceptor)
|
119 130 | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
|
120 131 | crate::operation::malformed_list::MalformedListError,
|
121 132 | >::new())
|
122 133 | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
|
123 134 | crate::operation::malformed_list::MalformedListError,
|
124 135 | >::new());
|
125 136 |
|
126 137 | ::std::borrow::Cow::Owned(rcb)
|
127 138 | }
|
128 139 | }
|
129 140 |
|
141 + | /* ResponseDeserializerGenerator.kt:64 */
|
130 142 | #[derive(Debug)]
|
131 143 | struct MalformedListResponseDeserializer;
|
132 144 | impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedListResponseDeserializer {
|
133 145 | fn deserialize_nonstreaming(
|
134 146 | &self,
|
135 147 | response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
136 148 | ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
|
137 149 | let (success, status) = (response.status().is_success(), response.status().as_u16());
|
138 150 | let headers = response.headers();
|
139 151 | let body = response.body().bytes().expect("body loaded");
|
140 152 | #[allow(unused_mut)]
|
141 153 | let mut force_error = false;
|
142 154 |
|
143 155 | let parse_result = if !success && status != 200 || force_error {
|
144 156 | crate::protocol_serde::shape_malformed_list::de_malformed_list_http_error(status, headers, body)
|
145 157 | } else {
|
146 158 | crate::protocol_serde::shape_malformed_list::de_malformed_list_http_response(status, headers, body)
|
147 159 | };
|
148 160 | crate::protocol_serde::type_erase_result(parse_result)
|
149 161 | }
|
150 162 | }
|
163 + | /* RequestSerializerGenerator.kt:67 */
|
151 164 | #[derive(Debug)]
|
152 165 | struct MalformedListRequestSerializer;
|
153 166 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedListRequestSerializer {
|
154 167 | #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
|
155 168 | fn serialize_input(
|
156 169 | &self,
|
157 170 | input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
158 171 | _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
159 172 | ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
|
160 173 | let input = input
|
161 174 | .downcast::<crate::operation::malformed_list::MalformedListInput>()
|
162 175 | .expect("correct type");
|
163 176 | let _header_serialization_settings = _cfg
|
164 177 | .load::<crate::serialization_settings::HeaderSerializationSettings>()
|
165 178 | .cloned()
|
166 179 | .unwrap_or_default();
|
167 180 | let mut request_builder = {
|
168 181 | fn uri_base(
|
169 182 | _input: &crate::operation::malformed_list::MalformedListInput,
|
170 183 | output: &mut ::std::string::String,
|
171 184 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
172 185 | use ::std::fmt::Write as _;
|
173 186 | ::std::write!(output, "/MalformedList").expect("formatting should succeed");
|
174 187 | ::std::result::Result::Ok(())
|
175 188 | }
|
176 189 | #[allow(clippy::unnecessary_wraps)]
|
177 190 | fn update_http_builder(
|
178 191 | input: &crate::operation::malformed_list::MalformedListInput,
|
179 192 | builder: ::http::request::Builder,
|
180 193 | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
181 194 | let mut uri = ::std::string::String::new();
|
182 195 | uri_base(input, &mut uri)?;
|
183 196 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
184 197 | }
|
185 198 | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
186 199 | builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
|
187 200 | builder
|
188 201 | };
|
189 202 | let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_malformed_list::ser_malformed_list_input(&input)?);
|
190 203 | if let Some(content_length) = body.content_length() {
|
191 204 | let content_length = content_length.to_string();
|
192 205 | request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
|
193 206 | }
|
194 207 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
195 208 | }
|
196 209 | }
|
210 + | /* EndpointParamsInterceptorGenerator.kt:86 */
|
197 211 | #[derive(Debug)]
|
198 212 | struct MalformedListEndpointParamsInterceptor;
|
199 213 |
|
200 214 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedListEndpointParamsInterceptor {
|
201 215 | fn name(&self) -> &'static str {
|
202 216 | "MalformedListEndpointParamsInterceptor"
|
203 217 | }
|
204 218 |
|
205 219 | fn read_before_execution(
|
206 220 | &self,
|
207 221 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
208 222 | '_,
|
209 223 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
210 224 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
211 225 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
212 226 | >,
|
213 227 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
214 228 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
215 229 | let _input = context
|
216 230 | .input()
|
217 231 | .downcast_ref::<MalformedListInput>()
|
218 232 | .ok_or("failed to downcast to MalformedListInput")?;
|
219 233 |
|
220 234 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
221 235 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
222 236 | })?;
|
223 237 | cfg.interceptor_state()
|
224 238 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
225 239 | ::std::result::Result::Ok(())
|
226 240 | }
|
227 241 | }
|
228 242 |
|
229 243 | // The get_* functions below are generated from JMESPath expressions in the
|
230 244 | // operationContextParams trait. They target the operation's input shape.
|
231 245 |
|
246 + | /* OperationErrorGenerator.kt:79 */
|
232 247 | /// Error type for the `MalformedListError` operation.
|
248 + | /* RustType.kt:516 */
|
233 249 | #[non_exhaustive]
|
250 + | /* RustType.kt:516 */
|
234 251 | #[derive(::std::fmt::Debug)]
|
235 - | pub enum MalformedListError {
|
252 + | pub /* OperationErrorGenerator.kt:81 */ enum MalformedListError {
|
253 + | /* OperationErrorGenerator.kt:88 */
|
236 254 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
237 255 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
238 256 | variable wildcard pattern and check `.code()`:
|
239 257 | \
|
240 258 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
241 259 | \
|
242 260 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MalformedListError) for what information is available for the error.")]
|
243 261 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
262 + | /* OperationErrorGenerator.kt:81 */
|
244 263 | }
|
264 + | /* OperationErrorGenerator.kt:218 */
|
245 265 | impl MalformedListError {
|
266 + | /* OperationErrorGenerator.kt:219 */
|
246 267 | /// Creates the `MalformedListError::Unhandled` variant from any error type.
|
247 268 | pub fn unhandled(
|
248 269 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
249 270 | ) -> Self {
|
250 271 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
251 272 | source: err.into(),
|
252 273 | meta: ::std::default::Default::default(),
|
253 274 | })
|
254 275 | }
|
255 276 |
|
256 277 | /// Creates the `MalformedListError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
257 278 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
258 279 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
259 280 | source: err.clone().into(),
|
260 281 | meta: err,
|
261 282 | })
|
262 283 | }
|
263 - | ///
|
284 + | /// /* OperationErrorGenerator.kt:236 */
|
264 285 | /// Returns error metadata, which includes the error code, message,
|
265 286 | /// request ID, and potentially additional information.
|
266 287 | ///
|
288 + | /* OperationErrorGenerator.kt:242 */
|
267 289 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
290 + | /* OperationErrorGenerator.kt:243 */
|
268 291 | match self {
|
269 - | Self::Unhandled(e) => &e.meta,
|
292 + | /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
|
293 + | /* OperationErrorGenerator.kt:243 */
|
270 294 | }
|
295 + | /* OperationErrorGenerator.kt:242 */
|
271 296 | }
|
297 + | /* OperationErrorGenerator.kt:218 */
|
272 298 | }
|
299 + | /* OperationErrorGenerator.kt:269 */
|
273 300 | impl ::std::error::Error for MalformedListError {
|
301 + | /* OperationErrorGenerator.kt:270 */
|
274 302 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
303 + | /* OperationErrorGenerator.kt:318 */
|
275 304 | match self {
|
276 - | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
305 + | /* OperationErrorGenerator.kt:326 */
|
306 + | Self::Unhandled(_inner) => {
|
307 + | /* OperationErrorGenerator.kt:279 */
|
308 + | ::std::option::Option::Some(&*_inner.source)
|
309 + | /* OperationErrorGenerator.kt:326 */
|
310 + | } /* OperationErrorGenerator.kt:318 */
|
277 311 | }
|
312 + | /* OperationErrorGenerator.kt:270 */
|
278 313 | }
|
314 + | /* OperationErrorGenerator.kt:269 */
|
279 315 | }
|
316 + | /* OperationErrorGenerator.kt:133 */
|
280 317 | impl ::std::fmt::Display for MalformedListError {
|
318 + | /* OperationErrorGenerator.kt:134 */
|
281 319 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
320 + | /* OperationErrorGenerator.kt:318 */
|
282 321 | match self {
|
322 + | /* OperationErrorGenerator.kt:326 */
|
283 323 | Self::Unhandled(_inner) => {
|
324 + | /* OperationErrorGenerator.kt:139 */
|
284 325 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
285 326 | write!(f, "unhandled error ({code})")
|
286 327 | } else {
|
287 328 | f.write_str("unhandled error")
|
288 329 | }
|
289 - | }
|
330 + | /* OperationErrorGenerator.kt:326 */
|
331 + | } /* OperationErrorGenerator.kt:318 */
|
290 332 | }
|
333 + | /* OperationErrorGenerator.kt:134 */
|
291 334 | }
|
335 + | /* OperationErrorGenerator.kt:133 */
|
292 336 | }
|
337 + | /* OperationErrorGenerator.kt:182 */
|
293 338 | impl ::aws_smithy_types::retry::ProvideErrorKind for MalformedListError {
|
339 + | /* OperationErrorGenerator.kt:186 */
|
294 340 | fn code(&self) -> ::std::option::Option<&str> {
|
341 + | /* OperationErrorGenerator.kt:187 */
|
295 342 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
343 + | /* OperationErrorGenerator.kt:186 */
|
296 344 | }
|
345 + | /* OperationErrorGenerator.kt:190 */
|
297 346 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
347 + | /* OperationErrorGenerator.kt:197 */
|
298 348 | ::std::option::Option::None
|
349 + | /* OperationErrorGenerator.kt:190 */
|
299 350 | }
|
351 + | /* OperationErrorGenerator.kt:182 */
|
300 352 | }
|
353 + | /* OperationErrorGenerator.kt:163 */
|
301 354 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MalformedListError {
|
355 + | /* OperationErrorGenerator.kt:164 */
|
302 356 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
357 + | /* OperationErrorGenerator.kt:318 */
|
303 358 | match self {
|
304 - | Self::Unhandled(_inner) => &_inner.meta,
|
359 + | /* OperationErrorGenerator.kt:326 */
|
360 + | Self::Unhandled(_inner) => {
|
361 + | /* OperationErrorGenerator.kt:168 */
|
362 + | &_inner.meta
|
363 + | /* OperationErrorGenerator.kt:326 */
|
364 + | } /* OperationErrorGenerator.kt:318 */
|
305 365 | }
|
366 + | /* OperationErrorGenerator.kt:164 */
|
306 367 | }
|
368 + | /* OperationErrorGenerator.kt:163 */
|
307 369 | }
|
370 + | /* OperationErrorGenerator.kt:109 */
|
308 371 | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MalformedListError {
|
372 + | /* OperationErrorGenerator.kt:110 */
|
309 373 | fn create_unhandled_error(
|
310 374 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
311 375 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
312 376 | ) -> Self {
|
377 + | /* OperationErrorGenerator.kt:121 */
|
313 378 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
314 379 | source,
|
315 380 | meta: meta.unwrap_or_default(),
|
316 381 | })
|
382 + | /* OperationErrorGenerator.kt:110 */
|
317 383 | }
|
384 + | /* OperationErrorGenerator.kt:109 */
|
318 385 | }
|
319 386 |
|
387 + | /* CodegenDelegator.kt:255 */
|
320 388 | pub use crate::operation::malformed_list::_malformed_list_output::MalformedListOutput;
|
321 389 |
|
390 + | /* CodegenDelegator.kt:255 */
|
322 391 | pub use crate::operation::malformed_list::_malformed_list_input::MalformedListInput;
|
323 392 |
|
393 + | /* RustModule.kt:172 */
|
324 394 | mod _malformed_list_input;
|
325 395 |
|
396 + | /* RustModule.kt:172 */
|
326 397 | mod _malformed_list_output;
|
327 398 |
|
328 - | /// Builders
|
399 + | /// /* CodegenDelegator.kt:51 */Builders
|
329 400 | pub mod builders;
|