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