1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct PostContent;
6impl PostContent {
7 pub fn new() -> Self {
9 Self
10 }
11 pub(crate) async fn orchestrate(
12 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
13 input: crate::operation::post_content::PostContentInput,
14 ) -> ::std::result::Result<
15 crate::operation::post_content::PostContentOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::post_content::PostContentError,
18 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
19 >,
20 > {
21 let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
22 ::aws_smithy_runtime_api::client::interceptors::context::Error,
23 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
24 >| {
25 err.map_service_error(|err| {
26 err.downcast::<crate::operation::post_content::PostContentError>()
27 .expect("correct error type")
28 })
29 };
30 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
31 .await
32 .map_err(map_err)?;
33 let output = context.finalize().map_err(map_err)?;
34 ::std::result::Result::Ok(
35 output
36 .downcast::<crate::operation::post_content::PostContentOutput>()
37 .expect("correct output type"),
38 )
39 }
40
41 pub(crate) async fn orchestrate_with_stop_point(
42 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
43 input: crate::operation::post_content::PostContentInput,
44 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
45 ) -> ::std::result::Result<
46 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
47 ::aws_smithy_runtime_api::client::result::SdkError<
48 ::aws_smithy_runtime_api::client::interceptors::context::Error,
49 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
50 >,
51 > {
52 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
53 use ::tracing::Instrument;
54 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Lex Runtime Service", "PostContent", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "Lex Runtime Service.PostContent",
59 "rpc.service" = "Lex Runtime Service",
60 "rpc.method" = "PostContent",
61 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
62 "rpc.system" = "aws-api",
63 ))
64 .await
65 }
66
67 pub(crate) fn operation_runtime_plugins(
68 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
69 client_config: &crate::config::Config,
70 config_override: ::std::option::Option<crate::config::Builder>,
71 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
72 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
73
74 if let ::std::option::Option::Some(config_override) = config_override {
75 for plugin in config_override.runtime_plugins.iter().cloned() {
76 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
77 }
78 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
79 config_override,
80 client_config.config.clone(),
81 &client_config.runtime_components,
82 ));
83 }
84 runtime_plugins
85 }
86}
87impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for PostContent {
88 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("PostContent");
90
91 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92 PostContentRequestSerializer,
93 ));
94 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95 PostContentResponseDeserializer,
96 ));
97
98 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99 crate::config::auth::Params::builder()
100 .operation_name("PostContent")
101 .build()
102 .expect("required fields set"),
103 ));
104
105 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
106 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
107 "PostContent",
108 "Lex Runtime Service",
109 ));
110 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
111 signing_options.double_uri_encode = true;
112 signing_options.content_sha256_header = true;
113 signing_options.normalize_uri_path = true;
114 signing_options.payload_override = Some(::aws_sigv4::http_request::SignableBody::UnsignedPayload);
115
116 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
117 signing_options,
118 ..::std::default::Default::default()
119 });
120
121 ::std::option::Option::Some(cfg.freeze())
122 }
123
124 fn runtime_components(
125 &self,
126 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
127 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
128 #[allow(unused_mut)]
129 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("PostContent")
130 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
131 PostContentTelemetryInputCaptureInterceptor,
132 ))
133 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
134 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
135 ))
136 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
137 PostContentEndpointParamsInterceptor,
138 ))
139 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
140 crate::operation::post_content::PostContentError,
141 >::new())
142 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
143 crate::operation::post_content::PostContentError,
144 >::new())
145 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
146 crate::operation::post_content::PostContentError,
147 >::new());
148
149 ::std::borrow::Cow::Owned(rcb)
150 }
151}
152
153#[derive(Debug)]
154struct PostContentTelemetryInputCaptureInterceptor;
155
156#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
157impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PostContentTelemetryInputCaptureInterceptor {
158 fn name(&self) -> &'static str {
159 "PostContentTelemetryInputCaptureInterceptor"
160 }
161
162 fn read_before_execution(
163 &self,
164 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
165 '_,
166 ::aws_smithy_runtime_api::client::interceptors::context::Input,
167 ::aws_smithy_runtime_api::client::interceptors::context::Output,
168 ::aws_smithy_runtime_api::client::interceptors::context::Error,
169 >,
170 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
171 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
172 let ::std::option::Option::Some(requested) = cfg
174 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
175 .filter(|r| !r.is_empty())
176 else {
177 return ::std::result::Result::Ok(());
178 };
179
180 let ::std::option::Option::Some(input) = context.input().downcast_ref::<PostContentInput>() else {
181 return ::std::result::Result::Ok(());
183 };
184
185 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
186 if requested.should_capture("botName") {
187 if let ::std::option::Option::Some(value) = input.bot_name.as_deref() {
188 captured.insert("botName", value);
189 }
190 }
191 if requested.should_capture("botAlias") {
192 if let ::std::option::Option::Some(value) = input.bot_alias.as_deref() {
193 captured.insert("botAlias", value);
194 }
195 }
196 if requested.should_capture("userId") {
197 if let ::std::option::Option::Some(value) = input.user_id.as_deref() {
198 captured.insert("userId", value);
199 }
200 }
201 if requested.should_capture("contentType") {
202 if let ::std::option::Option::Some(value) = input.content_type.as_deref() {
203 captured.insert("contentType", value);
204 }
205 }
206 if requested.should_capture("accept") {
207 if let ::std::option::Option::Some(value) = input.accept.as_deref() {
208 captured.insert("accept", value);
209 }
210 }
211
212 cfg.interceptor_state().store_put(captured);
213 ::std::result::Result::Ok(())
214 }
215}
216#[derive(Debug)]
217struct PostContentResponseDeserializer;
218impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for PostContentResponseDeserializer {
219 fn deserialize_streaming(
220 &self,
221 response: &mut ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
222 ) -> ::std::option::Option<::aws_smithy_runtime_api::client::interceptors::context::OutputOrError> {
223 #[allow(unused_mut)]
224 let mut force_error = false;
225 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
226
227 if (!response.status().is_success() && response.status().as_u16() != 200) || force_error {
229 return ::std::option::Option::None;
230 }
231 ::std::option::Option::Some(crate::protocol_serde::type_erase_result(
232 crate::protocol_serde::shape_post_content::de_post_content_http_response(response),
233 ))
234 }
235
236 fn deserialize_nonstreaming_with_config(
237 &self,
238 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
239 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
240 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
241 let body = response.body().bytes().expect("body loaded");
243 crate::protocol_serde::type_erase_result(crate::protocol_serde::shape_post_content::de_post_content_http_error(
244 response.status().as_u16(),
245 response.headers(),
246 body,
247 ))
248 }
249}
250#[derive(Debug)]
251struct PostContentRequestSerializer;
252impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for PostContentRequestSerializer {
253 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
254 fn serialize_input(
255 &self,
256 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
257 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
258 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
259 let input = input
260 .downcast::<crate::operation::post_content::PostContentInput>()
261 .expect("correct type");
262 let _header_serialization_settings = _cfg
263 .load::<crate::serialization_settings::HeaderSerializationSettings>()
264 .cloned()
265 .unwrap_or_default();
266 let mut request_builder = {
267 #[allow(clippy::uninlined_format_args)]
268 fn uri_base(
269 _input: &crate::operation::post_content::PostContentInput,
270 output: &mut ::std::string::String,
271 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
272 use ::std::fmt::Write as _;
273 let input_1 = &_input.bot_name;
274 let input_1 = input_1
275 .as_ref()
276 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bot_name", "cannot be empty or unset"))?;
277 let bot_name = ::aws_smithy_http::label::fmt_string(input_1, ::aws_smithy_http::label::EncodingStrategy::Default);
278 if bot_name.is_empty() {
279 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
280 "bot_name",
281 "cannot be empty or unset",
282 ));
283 }
284 let input_2 = &_input.bot_alias;
285 let input_2 = input_2
286 .as_ref()
287 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("bot_alias", "cannot be empty or unset"))?;
288 let bot_alias = ::aws_smithy_http::label::fmt_string(input_2, ::aws_smithy_http::label::EncodingStrategy::Default);
289 if bot_alias.is_empty() {
290 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
291 "bot_alias",
292 "cannot be empty or unset",
293 ));
294 }
295 let input_3 = &_input.user_id;
296 let input_3 = input_3
297 .as_ref()
298 .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("user_id", "cannot be empty or unset"))?;
299 let user_id = ::aws_smithy_http::label::fmt_string(input_3, ::aws_smithy_http::label::EncodingStrategy::Default);
300 if user_id.is_empty() {
301 return ::std::result::Result::Err(::aws_smithy_types::error::operation::BuildError::missing_field(
302 "user_id",
303 "cannot be empty or unset",
304 ));
305 }
306 ::std::write!(
307 output,
308 "/bot/{botName}/alias/{botAlias}/user/{userId}/content",
309 botName = bot_name,
310 botAlias = bot_alias,
311 userId = user_id
312 )
313 .expect("formatting should succeed");
314 ::std::result::Result::Ok(())
315 }
316 #[allow(clippy::unnecessary_wraps)]
317 fn update_http_builder(
318 input: &crate::operation::post_content::PostContentInput,
319 builder: ::http_1x::request::Builder,
320 ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
321 let mut uri = ::std::string::String::new();
322 uri_base(input, &mut uri)?;
323 let builder = crate::protocol_serde::shape_post_content::ser_post_content_headers(input, builder)?;
324 ::std::result::Result::Ok(builder.method("POST").uri(uri))
325 }
326 let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
327 builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/octet-stream");
328 builder
329 };
330 let body = crate::protocol_serde::shape_post_content_input::ser_input_stream_http_payload(input.input_stream)?.into_inner();
331 if let Some(content_length) = body.content_length() {
332 let content_length = content_length.to_string();
333 request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
334 }
335 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
336 }
337}
338#[derive(Debug)]
339struct PostContentEndpointParamsInterceptor;
340
341#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
342impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PostContentEndpointParamsInterceptor {
343 fn name(&self) -> &'static str {
344 "PostContentEndpointParamsInterceptor"
345 }
346
347 fn read_before_execution(
348 &self,
349 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
350 '_,
351 ::aws_smithy_runtime_api::client::interceptors::context::Input,
352 ::aws_smithy_runtime_api::client::interceptors::context::Output,
353 ::aws_smithy_runtime_api::client::interceptors::context::Error,
354 >,
355 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
356 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
357 let _input = context
358 .input()
359 .downcast_ref::<PostContentInput>()
360 .ok_or("failed to downcast to PostContentInput")?;
361
362 let params = crate::config::endpoint::Params::builder()
363 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
364 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
365 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
366 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
367 .build()
368 .map_err(|err| {
369 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
370 })?;
371 cfg.interceptor_state()
372 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
373 ::std::result::Result::Ok(())
374 }
375}
376
377#[non_exhaustive]
382#[derive(::std::fmt::Debug)]
383pub enum PostContentError {
384 BadGatewayException(crate::types::error::BadGatewayException),
386 BadRequestException(crate::types::error::BadRequestException),
388 ConflictException(crate::types::error::ConflictException),
390 DependencyFailedException(crate::types::error::DependencyFailedException),
400 InternalFailureException(crate::types::error::InternalFailureException),
402 LimitExceededException(crate::types::error::LimitExceededException),
404 LoopDetectedException(crate::types::error::LoopDetectedException),
406 NotAcceptableException(crate::types::error::NotAcceptableException),
408 NotFoundException(crate::types::error::NotFoundException),
410 RequestTimeoutException(crate::types::error::RequestTimeoutException),
412 UnsupportedMediaTypeException(crate::types::error::UnsupportedMediaTypeException),
414 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
416 variable wildcard pattern and check `.code()`:
417 \
418 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
419 \
420 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-PostContentError) for what information is available for the error.")]
421 Unhandled(crate::error::sealed_unhandled::Unhandled),
422}
423impl PostContentError {
424 pub fn unhandled(
426 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
427 ) -> Self {
428 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
429 source: err.into(),
430 meta: ::std::default::Default::default(),
431 })
432 }
433
434 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
436 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
437 source: err.clone().into(),
438 meta: err,
439 })
440 }
441 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
446 match self {
447 Self::BadGatewayException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
448 Self::BadRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
449 Self::ConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
450 Self::DependencyFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
451 Self::InternalFailureException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
452 Self::LimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
453 Self::LoopDetectedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
454 Self::NotAcceptableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
455 Self::NotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
456 Self::RequestTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
457 Self::UnsupportedMediaTypeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
458 Self::Unhandled(e) => &e.meta,
459 }
460 }
461 pub fn is_bad_gateway_exception(&self) -> bool {
463 matches!(self, Self::BadGatewayException(_))
464 }
465 pub fn is_bad_request_exception(&self) -> bool {
467 matches!(self, Self::BadRequestException(_))
468 }
469 pub fn is_conflict_exception(&self) -> bool {
471 matches!(self, Self::ConflictException(_))
472 }
473 pub fn is_dependency_failed_exception(&self) -> bool {
475 matches!(self, Self::DependencyFailedException(_))
476 }
477 pub fn is_internal_failure_exception(&self) -> bool {
479 matches!(self, Self::InternalFailureException(_))
480 }
481 pub fn is_limit_exceeded_exception(&self) -> bool {
483 matches!(self, Self::LimitExceededException(_))
484 }
485 pub fn is_loop_detected_exception(&self) -> bool {
487 matches!(self, Self::LoopDetectedException(_))
488 }
489 pub fn is_not_acceptable_exception(&self) -> bool {
491 matches!(self, Self::NotAcceptableException(_))
492 }
493 pub fn is_not_found_exception(&self) -> bool {
495 matches!(self, Self::NotFoundException(_))
496 }
497 pub fn is_request_timeout_exception(&self) -> bool {
499 matches!(self, Self::RequestTimeoutException(_))
500 }
501 pub fn is_unsupported_media_type_exception(&self) -> bool {
503 matches!(self, Self::UnsupportedMediaTypeException(_))
504 }
505}
506impl ::std::error::Error for PostContentError {
507 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
508 match self {
509 Self::BadGatewayException(_inner) => ::std::option::Option::Some(_inner),
510 Self::BadRequestException(_inner) => ::std::option::Option::Some(_inner),
511 Self::ConflictException(_inner) => ::std::option::Option::Some(_inner),
512 Self::DependencyFailedException(_inner) => ::std::option::Option::Some(_inner),
513 Self::InternalFailureException(_inner) => ::std::option::Option::Some(_inner),
514 Self::LimitExceededException(_inner) => ::std::option::Option::Some(_inner),
515 Self::LoopDetectedException(_inner) => ::std::option::Option::Some(_inner),
516 Self::NotAcceptableException(_inner) => ::std::option::Option::Some(_inner),
517 Self::NotFoundException(_inner) => ::std::option::Option::Some(_inner),
518 Self::RequestTimeoutException(_inner) => ::std::option::Option::Some(_inner),
519 Self::UnsupportedMediaTypeException(_inner) => ::std::option::Option::Some(_inner),
520 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
521 }
522 }
523}
524impl ::std::fmt::Display for PostContentError {
525 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
526 match self {
527 Self::BadGatewayException(_inner) => _inner.fmt(f),
528 Self::BadRequestException(_inner) => _inner.fmt(f),
529 Self::ConflictException(_inner) => _inner.fmt(f),
530 Self::DependencyFailedException(_inner) => _inner.fmt(f),
531 Self::InternalFailureException(_inner) => _inner.fmt(f),
532 Self::LimitExceededException(_inner) => _inner.fmt(f),
533 Self::LoopDetectedException(_inner) => _inner.fmt(f),
534 Self::NotAcceptableException(_inner) => _inner.fmt(f),
535 Self::NotFoundException(_inner) => _inner.fmt(f),
536 Self::RequestTimeoutException(_inner) => _inner.fmt(f),
537 Self::UnsupportedMediaTypeException(_inner) => _inner.fmt(f),
538 Self::Unhandled(_inner) => {
539 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
540 write!(f, "unhandled error ({code})")
541 } else {
542 f.write_str("unhandled error")
543 }
544 }
545 }
546 }
547}
548impl ::aws_smithy_types::retry::ProvideErrorKind for PostContentError {
549 fn code(&self) -> ::std::option::Option<&str> {
550 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
551 }
552 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
553 ::std::option::Option::None
554 }
555}
556impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for PostContentError {
557 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
558 match self {
559 Self::BadGatewayException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
560 Self::BadRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
561 Self::ConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
562 Self::DependencyFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
563 Self::InternalFailureException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
564 Self::LimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
565 Self::LoopDetectedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
566 Self::NotAcceptableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
567 Self::NotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
568 Self::RequestTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
569 Self::UnsupportedMediaTypeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
570 Self::Unhandled(_inner) => &_inner.meta,
571 }
572 }
573}
574impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for PostContentError {
575 fn create_unhandled_error(
576 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
577 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
578 ) -> Self {
579 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
580 source,
581 meta: meta.unwrap_or_default(),
582 })
583 }
584}
585impl ::aws_types::request_id::RequestId for crate::operation::post_content::PostContentError {
586 fn request_id(&self) -> Option<&str> {
587 self.meta().request_id()
588 }
589}
590
591pub use crate::operation::post_content::_post_content_input::PostContentInput;
592
593pub use crate::operation::post_content::_post_content_output::PostContentOutput;
594
595mod _post_content_input;
596
597mod _post_content_output;
598
599pub mod builders;