1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct GetSessionEndpoint;
6impl GetSessionEndpoint {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::get_session_endpoint::GetSessionEndpointInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::get_session_endpoint::GetSessionEndpointOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::get_session_endpoint::GetSessionEndpointInput,
18 ) -> ::std::result::Result<
19 crate::operation::get_session_endpoint::GetSessionEndpointOutput,
20 ::aws_smithy_runtime_api::client::result::SdkError<
21 crate::operation::get_session_endpoint::GetSessionEndpointError,
22 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
23 >,
24 > {
25 let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
26 ::aws_smithy_runtime_api::client::interceptors::context::Error,
27 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
28 >| {
29 err.map_service_error(|err| {
30 err.downcast::<crate::operation::get_session_endpoint::GetSessionEndpointError>()
31 .expect("correct error type")
32 })
33 };
34 let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
35 .await
36 .map_err(map_err)?;
37 let output = context.finalize().map_err(map_err)?;
38 ::std::result::Result::Ok(
39 output
40 .downcast::<crate::operation::get_session_endpoint::GetSessionEndpointOutput>()
41 .expect("correct output type"),
42 )
43 }
44
45 pub(crate) async fn orchestrate_with_stop_point(
46 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
47 input: crate::operation::get_session_endpoint::GetSessionEndpointInput,
48 stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
49 ) -> ::std::result::Result<
50 ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
51 ::aws_smithy_runtime_api::client::result::SdkError<
52 ::aws_smithy_runtime_api::client::interceptors::context::Error,
53 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
54 >,
55 > {
56 let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
57 use ::tracing::Instrument;
58 ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("Glue", "GetSessionEndpoint", input, runtime_plugins, stop_point)
59 .instrument(::tracing::debug_span!(
62 "Glue.GetSessionEndpoint",
63 "rpc.service" = "Glue",
64 "rpc.method" = "GetSessionEndpoint",
65 "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
66 "rpc.system" = "aws-api",
67 ))
68 .await
69 }
70
71 pub(crate) fn operation_runtime_plugins(
72 client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
73 client_config: &crate::config::Config,
74 config_override: ::std::option::Option<crate::config::Builder>,
75 ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
76 let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
77
78 if let ::std::option::Option::Some(config_override) = config_override {
79 for plugin in config_override.runtime_plugins.iter().cloned() {
80 runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
81 }
82 runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
83 config_override,
84 client_config.config.clone(),
85 &client_config.runtime_components,
86 ));
87 }
88 runtime_plugins
89 }
90}
91pub(crate) mod error_registry {
100 pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
101 ::aws_smithy_schema::registry::TypeRegistry::builder()
102 .insert_error_shape(
103 crate::types::error::AccessDeniedException::SCHEMA,
104 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
105 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::AccessDeniedException::deserialize(d)?))
106 },
107 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
108 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::AccessDeniedException::deserialize(d)?))
109 },
110 )
111.insert_error_shape(
112 crate::types::error::EntityNotFoundException::SCHEMA,
113 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
114 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
115 },
116 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
117 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::EntityNotFoundException::deserialize(d)?))
118 },
119 )
120.insert_error_shape(
121 crate::types::error::IllegalSessionStateException::SCHEMA,
122 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
123 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::IllegalSessionStateException::deserialize(d)?))
124 },
125 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
126 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::IllegalSessionStateException::deserialize(d)?))
127 },
128 )
129.insert_error_shape(
130 crate::types::error::InternalServiceException::SCHEMA,
131 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
132 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServiceException::deserialize(d)?))
133 },
134 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
135 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServiceException::deserialize(d)?))
136 },
137 )
138.insert_error_shape(
139 crate::types::error::InvalidInputException::SCHEMA,
140 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
141 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InvalidInputException::deserialize(d)?))
142 },
143 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
144 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InvalidInputException::deserialize(d)?))
145 },
146 )
147.insert_error_shape(
148 crate::types::error::OperationNotSupportedException::SCHEMA,
149 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
150 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationNotSupportedException::deserialize(d)?))
151 },
152 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
153 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationNotSupportedException::deserialize(d)?))
154 },
155 )
156.insert_error_shape(
157 crate::types::error::OperationTimeoutException::SCHEMA,
158 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
159 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
160 },
161 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
162 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::OperationTimeoutException::deserialize(d)?))
163 },
164 )
165 .build()
166 });
167}
168impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for GetSessionEndpoint {
169 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
170 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("GetSessionEndpoint");
171
172 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
173 GetSessionEndpointRequestSerializer,
174 ));
175 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
176 GetSessionEndpointResponseDeserializer,
177 ));
178
179 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
180 crate::config::auth::Params::builder()
181 .operation_name("GetSessionEndpoint")
182 .build()
183 .expect("required fields set"),
184 ));
185
186 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::SensitiveOutput);
187 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
188 "GetSessionEndpoint",
189 "Glue",
190 ));
191 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
192 signing_options.double_uri_encode = true;
193 signing_options.content_sha256_header = false;
194 signing_options.normalize_uri_path = true;
195 signing_options.payload_override = None;
196
197 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
198 signing_options,
199 ..::std::default::Default::default()
200 });
201
202 ::std::option::Option::Some(cfg.freeze())
203 }
204
205 fn runtime_components(
206 &self,
207 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
208 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
209 #[allow(unused_mut)]
210 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("GetSessionEndpoint")
211 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
212 GetSessionEndpointTelemetryInputCaptureInterceptor,
213 ))
214 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
215 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
216 ))
217 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
218 GetSessionEndpointEndpointParamsInterceptor,
219 ))
220 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
221 crate::operation::get_session_endpoint::GetSessionEndpointError,
222 >::new())
223 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
224 crate::operation::get_session_endpoint::GetSessionEndpointError,
225 >::new())
226 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
227 crate::operation::get_session_endpoint::GetSessionEndpointError,
228 >::new())
229 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
230 crate::operation::get_session_endpoint::GetSessionEndpointError,
231 >::new());
232
233 ::std::borrow::Cow::Owned(rcb)
234 }
235}
236
237#[derive(Debug)]
238struct GetSessionEndpointTelemetryInputCaptureInterceptor;
239
240#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
241impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetSessionEndpointTelemetryInputCaptureInterceptor {
242 fn name(&self) -> &'static str {
243 "GetSessionEndpointTelemetryInputCaptureInterceptor"
244 }
245
246 fn read_before_execution(
247 &self,
248 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
249 '_,
250 ::aws_smithy_runtime_api::client::interceptors::context::Input,
251 ::aws_smithy_runtime_api::client::interceptors::context::Output,
252 ::aws_smithy_runtime_api::client::interceptors::context::Error,
253 >,
254 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
255 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
256 let ::std::option::Option::Some(requested) = cfg
258 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
259 .filter(|r| !r.is_empty())
260 else {
261 return ::std::result::Result::Ok(());
262 };
263
264 let ::std::option::Option::Some(input) = context.input().downcast_ref::<GetSessionEndpointInput>() else {
265 return ::std::result::Result::Ok(());
267 };
268
269 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
270 if requested.should_capture("SessionId") {
271 if let ::std::option::Option::Some(value) = input.session_id.as_deref() {
272 captured.insert("SessionId", value);
273 }
274 }
275
276 cfg.interceptor_state().store_put(captured);
277 ::std::result::Result::Ok(())
278 }
279}
280#[derive(Debug)]
281struct GetSessionEndpointResponseDeserializer;
282impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for GetSessionEndpointResponseDeserializer {
283 fn deserialize_nonstreaming_with_config(
284 &self,
285 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
286 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
287 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
288 let (success, status) = (response.status().is_success(), response.status().as_u16());
289 #[allow(unused_variables)]
294 let body = response.body().bytes().expect("body loaded");
295 let headers = response.headers();
296 #[allow(unused_mut)]
297 let mut force_error = false;
298 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
299 if !success && status != 200 || force_error {
300 let protocol = _cfg
301 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
302 .expect("a SharedClientProtocol is required");
303 #[allow(unused_mut)]
304 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
305 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
306 })?;
307 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
308 let generic = generic_builder.build();
309 let error_code = match generic.code() {
310 ::std::option::Option::Some(code) => code,
311 ::std::option::Option::None => {
312 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
313 ::aws_smithy_runtime_api::box_error::BoxError::from(
314 crate::operation::get_session_endpoint::GetSessionEndpointError::unhandled(generic),
315 ),
316 ))
317 }
318 };
319 let _error_message = generic.message().map(|msg| msg.to_owned());
320 let err = match error_code {
321 "AccessDeniedException" => crate::operation::get_session_endpoint::GetSessionEndpointError::AccessDeniedException({
322 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
323 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
324 e,
325 ))
326 })?;
327 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
328 tmp.deserialize_members(&mut *deser).map_err(|e| {
329 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
330 e,
331 ))
332 })?;
333 if tmp.message.is_none() {
334 tmp.message = _error_message;
335 }
336 let tmp = tmp.meta(generic);
337 tmp.build()
338 }),
339 "EntityNotFoundException" => crate::operation::get_session_endpoint::GetSessionEndpointError::EntityNotFoundException({
340 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
341 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
342 e,
343 ))
344 })?;
345 let mut tmp = <crate::types::error::builders::EntityNotFoundExceptionBuilder>::default();
346 tmp.deserialize_members(&mut *deser).map_err(|e| {
347 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
348 e,
349 ))
350 })?;
351 if tmp.message.is_none() {
352 tmp.message = _error_message;
353 }
354 let tmp = tmp.meta(generic);
355 tmp.build()
356 }),
357 "IllegalSessionStateException" => crate::operation::get_session_endpoint::GetSessionEndpointError::IllegalSessionStateException({
358 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
359 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
360 e,
361 ))
362 })?;
363 let mut tmp = <crate::types::error::builders::IllegalSessionStateExceptionBuilder>::default();
364 tmp.deserialize_members(&mut *deser).map_err(|e| {
365 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
366 e,
367 ))
368 })?;
369 if tmp.message.is_none() {
370 tmp.message = _error_message;
371 }
372 let tmp = tmp.meta(generic);
373 tmp.build()
374 }),
375 "InternalServiceException" => crate::operation::get_session_endpoint::GetSessionEndpointError::InternalServiceException({
376 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
377 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
378 e,
379 ))
380 })?;
381 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
382 tmp.deserialize_members(&mut *deser).map_err(|e| {
383 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
384 e,
385 ))
386 })?;
387 if tmp.message.is_none() {
388 tmp.message = _error_message;
389 }
390 let tmp = tmp.meta(generic);
391 tmp.build()
392 }),
393 "InvalidInputException" => crate::operation::get_session_endpoint::GetSessionEndpointError::InvalidInputException({
394 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
395 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
396 e,
397 ))
398 })?;
399 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
400 tmp.deserialize_members(&mut *deser).map_err(|e| {
401 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
402 e,
403 ))
404 })?;
405 if tmp.message.is_none() {
406 tmp.message = _error_message;
407 }
408 let tmp = tmp.meta(generic);
409 tmp.build()
410 }),
411 "OperationNotSupportedException" => {
412 crate::operation::get_session_endpoint::GetSessionEndpointError::OperationNotSupportedException({
413 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
414 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
415 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
416 )
417 })?;
418 let mut tmp = <crate::types::error::builders::OperationNotSupportedExceptionBuilder>::default();
419 tmp.deserialize_members(&mut *deser).map_err(|e| {
420 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
421 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
422 )
423 })?;
424 if tmp.message.is_none() {
425 tmp.message = _error_message;
426 }
427 let tmp = tmp.meta(generic);
428 tmp.build()
429 })
430 }
431 "OperationTimeoutException" => crate::operation::get_session_endpoint::GetSessionEndpointError::OperationTimeoutException({
432 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
433 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
434 e,
435 ))
436 })?;
437 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
438 tmp.deserialize_members(&mut *deser).map_err(|e| {
439 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
440 e,
441 ))
442 })?;
443 if tmp.message.is_none() {
444 tmp.message = _error_message;
445 }
446 let tmp = tmp.meta(generic);
447 tmp.build()
448 }),
449 _ => {
450 match protocol
458 .deserialize_error_response(response, _cfg)
459 .ok()
460 .and_then(|mut deser| {
461 ::aws_smithy_schema::registry::reify_error(
462 crate::operation::get_session_endpoint::error_registry::REGISTRY
463 .or(&crate::error_type_registry::REGISTRY),
464 error_code,
465 &mut *deser,
466 )
467 }) {
468 ::std::option::Option::Some(source) => <crate::operation::get_session_endpoint::GetSessionEndpointError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
469 ::std::option::Option::None => crate::operation::get_session_endpoint::GetSessionEndpointError::generic(generic),
470 }
471 }
472 };
473 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
474 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
475 ))
476 } else {
477 let protocol = _cfg
478 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
479 .expect("a SharedClientProtocol is required");
480 let mut deser = protocol
481 .deserialize_response(response, GetSessionEndpoint::OUTPUT_SCHEMA, _cfg)
482 .map_err(|e| {
483 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
484 })?;
485 let _response_headers = headers;
489 #[allow(unused_mut)]
493 let mut output = <crate::operation::get_session_endpoint::builders::GetSessionEndpointOutputBuilder>::default();
494 output.deserialize_members(&mut *deser).map_err(|e| {
495 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
496 })?;
497 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
498 let output = crate::serde_util::get_session_endpoint_output_output_correct_errors(output).build();
499 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
500 }
501 }
502}
503#[derive(Debug)]
504struct GetSessionEndpointRequestSerializer;
505impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for GetSessionEndpointRequestSerializer {
506 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
507 fn serialize_input(
508 &self,
509 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
510 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
511 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
512 let input = input
513 .downcast::<crate::operation::get_session_endpoint::GetSessionEndpointInput>()
514 .expect("correct type");
515
516 let protocol = _cfg
517 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
518 .expect("a SharedClientProtocol is required");
519 let mut request = protocol
520 .serialize_request(&input, GetSessionEndpoint::INPUT_SCHEMA, "/", _cfg)
521 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
522
523 return ::std::result::Result::Ok(request);
524 }
525}
526#[derive(Debug)]
527struct GetSessionEndpointEndpointParamsInterceptor;
528
529#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
530impl ::aws_smithy_runtime_api::client::interceptors::Intercept for GetSessionEndpointEndpointParamsInterceptor {
531 fn name(&self) -> &'static str {
532 "GetSessionEndpointEndpointParamsInterceptor"
533 }
534
535 fn read_before_execution(
536 &self,
537 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
538 '_,
539 ::aws_smithy_runtime_api::client::interceptors::context::Input,
540 ::aws_smithy_runtime_api::client::interceptors::context::Output,
541 ::aws_smithy_runtime_api::client::interceptors::context::Error,
542 >,
543 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
544 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
545 let _input = context
546 .input()
547 .downcast_ref::<GetSessionEndpointInput>()
548 .ok_or("failed to downcast to GetSessionEndpointInput")?;
549
550 let params = crate::config::endpoint::Params::builder()
551 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
552 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
553 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
554 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
555 .build()
556 .map_err(|err| {
557 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
558 })?;
559 cfg.interceptor_state()
560 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
561 ::std::result::Result::Ok(())
562 }
563}
564
565#[non_exhaustive]
570#[derive(::std::fmt::Debug)]
571pub enum GetSessionEndpointError {
572 AccessDeniedException(crate::types::error::AccessDeniedException),
574 EntityNotFoundException(crate::types::error::EntityNotFoundException),
576 IllegalSessionStateException(crate::types::error::IllegalSessionStateException),
578 InternalServiceException(crate::types::error::InternalServiceException),
580 InvalidInputException(crate::types::error::InvalidInputException),
582 OperationNotSupportedException(crate::types::error::OperationNotSupportedException),
584 OperationTimeoutException(crate::types::error::OperationTimeoutException),
586 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
588 variable wildcard pattern and check `.code()`:
589 \
590 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
591 \
592 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-GetSessionEndpointError) for what information is available for the error.")]
593 Unhandled(crate::error::sealed_unhandled::Unhandled),
594}
595impl GetSessionEndpointError {
596 pub fn unhandled(
598 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
599 ) -> Self {
600 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
601 source: err.into(),
602 meta: ::std::default::Default::default(),
603 })
604 }
605
606 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
608 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
609 source: err.clone().into(),
610 meta: err,
611 })
612 }
613 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
618 match self {
619 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
620 Self::EntityNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
621 Self::IllegalSessionStateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
622 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
623 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
624 Self::OperationNotSupportedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
625 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
626 Self::Unhandled(e) => &e.meta,
627 }
628 }
629 pub fn is_access_denied_exception(&self) -> bool {
631 matches!(self, Self::AccessDeniedException(_))
632 }
633 pub fn is_entity_not_found_exception(&self) -> bool {
635 matches!(self, Self::EntityNotFoundException(_))
636 }
637 pub fn is_illegal_session_state_exception(&self) -> bool {
639 matches!(self, Self::IllegalSessionStateException(_))
640 }
641 pub fn is_internal_service_exception(&self) -> bool {
643 matches!(self, Self::InternalServiceException(_))
644 }
645 pub fn is_invalid_input_exception(&self) -> bool {
647 matches!(self, Self::InvalidInputException(_))
648 }
649 pub fn is_operation_not_supported_exception(&self) -> bool {
651 matches!(self, Self::OperationNotSupportedException(_))
652 }
653 pub fn is_operation_timeout_exception(&self) -> bool {
655 matches!(self, Self::OperationTimeoutException(_))
656 }
657}
658impl ::std::error::Error for GetSessionEndpointError {
659 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
660 match self {
661 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
662 Self::EntityNotFoundException(_inner) => ::std::option::Option::Some(_inner),
663 Self::IllegalSessionStateException(_inner) => ::std::option::Option::Some(_inner),
664 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
665 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
666 Self::OperationNotSupportedException(_inner) => ::std::option::Option::Some(_inner),
667 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
668 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
669 }
670 }
671}
672impl ::std::fmt::Display for GetSessionEndpointError {
673 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
674 match self {
675 Self::AccessDeniedException(_inner) => _inner.fmt(f),
676 Self::EntityNotFoundException(_inner) => _inner.fmt(f),
677 Self::IllegalSessionStateException(_inner) => _inner.fmt(f),
678 Self::InternalServiceException(_inner) => _inner.fmt(f),
679 Self::InvalidInputException(_inner) => _inner.fmt(f),
680 Self::OperationNotSupportedException(_inner) => _inner.fmt(f),
681 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
682 Self::Unhandled(_inner) => {
683 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
684 write!(f, "unhandled error ({code})")
685 } else {
686 f.write_str("unhandled error")
687 }
688 }
689 }
690 }
691}
692impl ::aws_smithy_types::retry::ProvideErrorKind for GetSessionEndpointError {
693 fn code(&self) -> ::std::option::Option<&str> {
694 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
695 }
696 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
697 ::std::option::Option::None
698 }
699}
700impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for GetSessionEndpointError {
701 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
702 match self {
703 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
704 Self::EntityNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
705 Self::IllegalSessionStateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
706 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
707 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
708 Self::OperationNotSupportedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
709 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
710 Self::Unhandled(_inner) => &_inner.meta,
711 }
712 }
713}
714impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for GetSessionEndpointError {
715 fn create_unhandled_error(
716 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
717 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
718 ) -> Self {
719 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
720 source,
721 meta: meta.unwrap_or_default(),
722 })
723 }
724}
725impl ::aws_types::request_id::RequestId for crate::operation::get_session_endpoint::GetSessionEndpointError {
726 fn request_id(&self) -> Option<&str> {
727 self.meta().request_id()
728 }
729}
730
731pub use crate::operation::get_session_endpoint::_get_session_endpoint_input::GetSessionEndpointInput;
732
733pub use crate::operation::get_session_endpoint::_get_session_endpoint_output::GetSessionEndpointOutput;
734
735mod _get_session_endpoint_input;
736
737mod _get_session_endpoint_output;
738
739pub mod builders;