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 MalformedTimestampQueryDefault {
|
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("MalformedTimestampQueryDefault");
|
97 108 |
|
98 109 | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
|
99 110 | MalformedTimestampQueryDefaultRequestSerializer,
|
100 111 | ));
|
101 112 | cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
|
102 113 | MalformedTimestampQueryDefaultResponseDeserializer,
|
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 | "MalformedTimestampQueryDefault",
|
111 122 | "Rest Json Protocol",
|
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("MalformedTimestampQueryDefault")
|
123 134 | .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
|
124 135 | .with_interceptor(MalformedTimestampQueryDefaultEndpointParamsInterceptor)
|
125 136 | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
|
126 137 | crate::operation::malformed_timestamp_query_default::MalformedTimestampQueryDefaultError,
|
127 138 | >::new())
|
128 139 | .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
|
129 140 | crate::operation::malformed_timestamp_query_default::MalformedTimestampQueryDefaultError,
|
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 MalformedTimestampQueryDefaultResponseDeserializer;
|
138 150 | impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MalformedTimestampQueryDefaultResponseDeserializer {
|
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_malformed_timestamp_query_default::de_malformed_timestamp_query_default_http_error(status, headers, body)
|
151 163 | } else {
|
152 164 | crate::protocol_serde::shape_malformed_timestamp_query_default::de_malformed_timestamp_query_default_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 MalformedTimestampQueryDefaultRequestSerializer;
|
159 172 | impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MalformedTimestampQueryDefaultRequestSerializer {
|
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::malformed_timestamp_query_default::MalformedTimestampQueryDefaultInput>()
|
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::malformed_timestamp_query_default::MalformedTimestampQueryDefaultInput,
|
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, "/MalformedTimestampQueryDefault").expect("formatting should succeed");
|
180 193 | ::std::result::Result::Ok(())
|
181 194 | }
|
182 195 | fn uri_query(
|
183 196 | _input: &crate::operation::malformed_timestamp_query_default::MalformedTimestampQueryDefaultInput,
|
184 197 | mut output: &mut ::std::string::String,
|
185 198 | ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
|
186 199 | let mut query = ::aws_smithy_http::query::Writer::new(output);
|
187 200 | let inner_1 = &_input.timestamp;
|
188 201 | let inner_1 = inner_1
|
189 202 | .as_ref()
|
190 203 | .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("timestamp", "cannot be empty or unset"))?;
|
191 204 | query.push_kv(
|
192 205 | "timestamp",
|
193 206 | &::aws_smithy_http::query::fmt_timestamp(inner_1, ::aws_smithy_types::date_time::Format::DateTime)?,
|
194 207 | );
|
195 208 | ::std::result::Result::Ok(())
|
196 209 | }
|
197 210 | #[allow(clippy::unnecessary_wraps)]
|
198 211 | fn update_http_builder(
|
199 212 | input: &crate::operation::malformed_timestamp_query_default::MalformedTimestampQueryDefaultInput,
|
200 213 | builder: ::http::request::Builder,
|
201 214 | ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
|
202 215 | let mut uri = ::std::string::String::new();
|
203 216 | uri_base(input, &mut uri)?;
|
204 217 | uri_query(input, &mut uri)?;
|
205 218 | ::std::result::Result::Ok(builder.method("POST").uri(uri))
|
206 219 | }
|
207 220 | let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
|
208 221 | builder
|
209 222 | };
|
210 223 | let body = ::aws_smithy_types::body::SdkBody::from("");
|
211 224 |
|
212 225 | ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
|
213 226 | }
|
214 227 | }
|
228 + | /* EndpointParamsInterceptorGenerator.kt:86 */
|
215 229 | #[derive(Debug)]
|
216 230 | struct MalformedTimestampQueryDefaultEndpointParamsInterceptor;
|
217 231 |
|
218 232 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MalformedTimestampQueryDefaultEndpointParamsInterceptor {
|
219 233 | fn name(&self) -> &'static str {
|
220 234 | "MalformedTimestampQueryDefaultEndpointParamsInterceptor"
|
221 235 | }
|
222 236 |
|
223 237 | fn read_before_execution(
|
224 238 | &self,
|
225 239 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
226 240 | '_,
|
227 241 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
228 242 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
229 243 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
230 244 | >,
|
231 245 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
232 246 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
233 247 | let _input = context
|
234 248 | .input()
|
235 249 | .downcast_ref::<MalformedTimestampQueryDefaultInput>()
|
236 250 | .ok_or("failed to downcast to MalformedTimestampQueryDefaultInput")?;
|
237 251 |
|
238 252 | let params = crate::config::endpoint::Params::builder().build().map_err(|err| {
|
239 253 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
240 254 | })?;
|
241 255 | cfg.interceptor_state()
|
242 256 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
243 257 | ::std::result::Result::Ok(())
|
244 258 | }
|
245 259 | }
|
246 260 |
|
247 261 | // The get_* functions below are generated from JMESPath expressions in the
|
248 262 | // operationContextParams trait. They target the operation's input shape.
|
249 263 |
|
264 + | /* OperationErrorGenerator.kt:79 */
|
250 265 | /// Error type for the `MalformedTimestampQueryDefaultError` operation.
|
266 + | /* RustType.kt:516 */
|
251 267 | #[non_exhaustive]
|
268 + | /* RustType.kt:516 */
|
252 269 | #[derive(::std::fmt::Debug)]
|
253 - | pub enum MalformedTimestampQueryDefaultError {
|
270 + | pub /* OperationErrorGenerator.kt:81 */ enum MalformedTimestampQueryDefaultError {
|
271 + | /* OperationErrorGenerator.kt:88 */
|
254 272 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
255 273 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
256 274 | variable wildcard pattern and check `.code()`:
|
257 275 | \
|
258 276 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
259 277 | \
|
260 278 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MalformedTimestampQueryDefaultError) for what information is available for the error.")]
|
261 279 | Unhandled(crate::error::sealed_unhandled::Unhandled),
|
280 + | /* OperationErrorGenerator.kt:81 */
|
262 281 | }
|
282 + | /* OperationErrorGenerator.kt:218 */
|
263 283 | impl MalformedTimestampQueryDefaultError {
|
284 + | /* OperationErrorGenerator.kt:219 */
|
264 285 | /// Creates the `MalformedTimestampQueryDefaultError::Unhandled` variant from any error type.
|
265 286 | pub fn unhandled(
|
266 287 | err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
|
267 288 | ) -> Self {
|
268 289 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
269 290 | source: err.into(),
|
270 291 | meta: ::std::default::Default::default(),
|
271 292 | })
|
272 293 | }
|
273 294 |
|
274 295 | /// Creates the `MalformedTimestampQueryDefaultError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
|
275 296 | pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
276 297 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
277 298 | source: err.clone().into(),
|
278 299 | meta: err,
|
279 300 | })
|
280 301 | }
|
281 - | ///
|
302 + | /// /* OperationErrorGenerator.kt:236 */
|
282 303 | /// Returns error metadata, which includes the error code, message,
|
283 304 | /// request ID, and potentially additional information.
|
284 305 | ///
|
306 + | /* OperationErrorGenerator.kt:242 */
|
285 307 | pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
308 + | /* OperationErrorGenerator.kt:243 */
|
286 309 | match self {
|
287 - | Self::Unhandled(e) => &e.meta,
|
310 + | /* OperationErrorGenerator.kt:251 */ Self::Unhandled(e) => &e.meta,
|
311 + | /* OperationErrorGenerator.kt:243 */
|
288 312 | }
|
313 + | /* OperationErrorGenerator.kt:242 */
|
289 314 | }
|
315 + | /* OperationErrorGenerator.kt:218 */
|
290 316 | }
|
317 + | /* OperationErrorGenerator.kt:269 */
|
291 318 | impl ::std::error::Error for MalformedTimestampQueryDefaultError {
|
319 + | /* OperationErrorGenerator.kt:270 */
|
292 320 | fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
|
321 + | /* OperationErrorGenerator.kt:318 */
|
293 322 | match self {
|
294 - | Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
|
323 + | /* OperationErrorGenerator.kt:326 */
|
324 + | Self::Unhandled(_inner) => {
|
325 + | /* OperationErrorGenerator.kt:279 */
|
326 + | ::std::option::Option::Some(&*_inner.source)
|
327 + | /* OperationErrorGenerator.kt:326 */
|
328 + | } /* OperationErrorGenerator.kt:318 */
|
295 329 | }
|
330 + | /* OperationErrorGenerator.kt:270 */
|
296 331 | }
|
332 + | /* OperationErrorGenerator.kt:269 */
|
297 333 | }
|
334 + | /* OperationErrorGenerator.kt:133 */
|
298 335 | impl ::std::fmt::Display for MalformedTimestampQueryDefaultError {
|
336 + | /* OperationErrorGenerator.kt:134 */
|
299 337 | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
338 + | /* OperationErrorGenerator.kt:318 */
|
300 339 | match self {
|
340 + | /* OperationErrorGenerator.kt:326 */
|
301 341 | Self::Unhandled(_inner) => {
|
342 + | /* OperationErrorGenerator.kt:139 */
|
302 343 | if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
|
303 344 | write!(f, "unhandled error ({code})")
|
304 345 | } else {
|
305 346 | f.write_str("unhandled error")
|
306 347 | }
|
348 + | /* OperationErrorGenerator.kt:326 */
|
349 + | } /* OperationErrorGenerator.kt:318 */
|
307 350 | }
|
351 + | /* OperationErrorGenerator.kt:134 */
|
308 352 | }
|
309 - | }
|
353 + | /* OperationErrorGenerator.kt:133 */
|
310 354 | }
|
355 + | /* OperationErrorGenerator.kt:182 */
|
311 356 | impl ::aws_smithy_types::retry::ProvideErrorKind for MalformedTimestampQueryDefaultError {
|
357 + | /* OperationErrorGenerator.kt:186 */
|
312 358 | fn code(&self) -> ::std::option::Option<&str> {
|
359 + | /* OperationErrorGenerator.kt:187 */
|
313 360 | ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
|
361 + | /* OperationErrorGenerator.kt:186 */
|
314 362 | }
|
363 + | /* OperationErrorGenerator.kt:190 */
|
315 364 | fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
|
365 + | /* OperationErrorGenerator.kt:197 */
|
316 366 | ::std::option::Option::None
|
367 + | /* OperationErrorGenerator.kt:190 */
|
317 368 | }
|
369 + | /* OperationErrorGenerator.kt:182 */
|
318 370 | }
|
371 + | /* OperationErrorGenerator.kt:163 */
|
319 372 | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MalformedTimestampQueryDefaultError {
|
373 + | /* OperationErrorGenerator.kt:164 */
|
320 374 | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
375 + | /* OperationErrorGenerator.kt:318 */
|
321 376 | match self {
|
322 - | Self::Unhandled(_inner) => &_inner.meta,
|
377 + | /* OperationErrorGenerator.kt:326 */
|
378 + | Self::Unhandled(_inner) => {
|
379 + | /* OperationErrorGenerator.kt:168 */
|
380 + | &_inner.meta
|
381 + | /* OperationErrorGenerator.kt:326 */
|
382 + | } /* OperationErrorGenerator.kt:318 */
|
323 383 | }
|
384 + | /* OperationErrorGenerator.kt:164 */
|
324 385 | }
|
386 + | /* OperationErrorGenerator.kt:163 */
|
325 387 | }
|
388 + | /* OperationErrorGenerator.kt:109 */
|
326 389 | impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MalformedTimestampQueryDefaultError {
|
390 + | /* OperationErrorGenerator.kt:110 */
|
327 391 | fn create_unhandled_error(
|
328 392 | source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
|
329 393 | meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
330 394 | ) -> Self {
|
395 + | /* OperationErrorGenerator.kt:121 */
|
331 396 | Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
|
332 397 | source,
|
333 398 | meta: meta.unwrap_or_default(),
|
334 399 | })
|
400 + | /* OperationErrorGenerator.kt:110 */
|
335 401 | }
|
402 + | /* OperationErrorGenerator.kt:109 */
|
336 403 | }
|
337 404 |
|
405 + | /* CodegenDelegator.kt:255 */
|
338 406 | pub use crate::operation::malformed_timestamp_query_default::_malformed_timestamp_query_default_output::MalformedTimestampQueryDefaultOutput;
|
339 407 |
|
408 + | /* CodegenDelegator.kt:255 */
|
340 409 | pub use crate::operation::malformed_timestamp_query_default::_malformed_timestamp_query_default_input::MalformedTimestampQueryDefaultInput;
|
341 410 |
|
411 + | /* RustModule.kt:172 */
|
342 412 | mod _malformed_timestamp_query_default_input;
|
343 413 |
|
414 + | /* RustModule.kt:172 */
|
344 415 | mod _malformed_timestamp_query_default_output;
|
345 416 |
|
346 - | /// Builders
|
417 + | /// /* CodegenDelegator.kt:51 */Builders
|
347 418 | pub mod builders;
|