1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct ExecuteGremlinQuery;
6impl ExecuteGremlinQuery {
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::execute_gremlin_query::ExecuteGremlinQueryInput,
14 ) -> ::std::result::Result<
15 crate::operation::execute_gremlin_query::ExecuteGremlinQueryOutput,
16 ::aws_smithy_runtime_api::client::result::SdkError<
17 crate::operation::execute_gremlin_query::ExecuteGremlinQueryError,
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::execute_gremlin_query::ExecuteGremlinQueryError>()
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::execute_gremlin_query::ExecuteGremlinQueryOutput>()
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::execute_gremlin_query::ExecuteGremlinQueryInput,
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("neptunedata", "ExecuteGremlinQuery", input, runtime_plugins, stop_point)
55 .instrument(::tracing::debug_span!(
58 "neptunedata.ExecuteGremlinQuery",
59 "rpc.service" = "neptunedata",
60 "rpc.method" = "ExecuteGremlinQuery",
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 ExecuteGremlinQuery {
88 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("ExecuteGremlinQuery");
90
91 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92 ExecuteGremlinQueryRequestSerializer,
93 ));
94 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95 ExecuteGremlinQueryResponseDeserializer,
96 ));
97
98 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99 crate::config::auth::Params::builder()
100 .operation_name("ExecuteGremlinQuery")
101 .build()
102 .expect("required fields set"),
103 ));
104
105 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
106 "ExecuteGremlinQuery",
107 "neptunedata",
108 ));
109 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
110 signing_options.double_uri_encode = true;
111 signing_options.content_sha256_header = false;
112 signing_options.normalize_uri_path = true;
113 signing_options.payload_override = None;
114
115 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
116 signing_options,
117 ..::std::default::Default::default()
118 });
119
120 ::std::option::Option::Some(cfg.freeze())
121 }
122
123 fn runtime_components(
124 &self,
125 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
126 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
127 #[allow(unused_mut)]
128 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("ExecuteGremlinQuery")
129 .with_interceptor(::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default())
130 .with_interceptor(ExecuteGremlinQueryEndpointParamsInterceptor)
131 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
132 crate::operation::execute_gremlin_query::ExecuteGremlinQueryError,
133 >::new())
134 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
135 crate::operation::execute_gremlin_query::ExecuteGremlinQueryError,
136 >::new())
137 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
138 crate::operation::execute_gremlin_query::ExecuteGremlinQueryError,
139 >::new());
140
141 ::std::borrow::Cow::Owned(rcb)
142 }
143}
144
145#[derive(Debug)]
146struct ExecuteGremlinQueryResponseDeserializer;
147impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for ExecuteGremlinQueryResponseDeserializer {
148 fn deserialize_nonstreaming(
149 &self,
150 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
151 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
152 let (success, status) = (response.status().is_success(), response.status().as_u16());
153 let headers = response.headers();
154 let body = response.body().bytes().expect("body loaded");
155 #[allow(unused_mut)]
156 let mut force_error = false;
157 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
158 let parse_result = if !success && status != 200 || force_error {
159 crate::protocol_serde::shape_execute_gremlin_query::de_execute_gremlin_query_http_error(status, headers, body)
160 } else {
161 crate::protocol_serde::shape_execute_gremlin_query::de_execute_gremlin_query_http_response(status, headers, body)
162 };
163 crate::protocol_serde::type_erase_result(parse_result)
164 }
165}
166#[derive(Debug)]
167struct ExecuteGremlinQueryRequestSerializer;
168impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for ExecuteGremlinQueryRequestSerializer {
169 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
170 fn serialize_input(
171 &self,
172 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
173 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
174 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
175 let input = input
176 .downcast::<crate::operation::execute_gremlin_query::ExecuteGremlinQueryInput>()
177 .expect("correct type");
178 let _header_serialization_settings = _cfg
179 .load::<crate::serialization_settings::HeaderSerializationSettings>()
180 .cloned()
181 .unwrap_or_default();
182 let mut request_builder = {
183 #[allow(clippy::uninlined_format_args)]
184 fn uri_base(
185 _input: &crate::operation::execute_gremlin_query::ExecuteGremlinQueryInput,
186 output: &mut ::std::string::String,
187 ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
188 use ::std::fmt::Write as _;
189 ::std::write!(output, "/gremlin").expect("formatting should succeed");
190 ::std::result::Result::Ok(())
191 }
192 #[allow(clippy::unnecessary_wraps)]
193 fn update_http_builder(
194 input: &crate::operation::execute_gremlin_query::ExecuteGremlinQueryInput,
195 builder: ::http::request::Builder,
196 ) -> ::std::result::Result<::http::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
197 let mut uri = ::std::string::String::new();
198 uri_base(input, &mut uri)?;
199 let builder = crate::protocol_serde::shape_execute_gremlin_query::ser_execute_gremlin_query_headers(input, builder)?;
200 ::std::result::Result::Ok(builder.method("POST").uri(uri))
201 }
202 let mut builder = update_http_builder(&input, ::http::request::Builder::new())?;
203 builder = _header_serialization_settings.set_default_header(builder, ::http::header::CONTENT_TYPE, "application/json");
204 builder
205 };
206 let body = ::aws_smithy_types::body::SdkBody::from(crate::protocol_serde::shape_execute_gremlin_query::ser_execute_gremlin_query_input(
207 &input,
208 )?);
209 if let Some(content_length) = body.content_length() {
210 let content_length = content_length.to_string();
211 request_builder = _header_serialization_settings.set_default_header(request_builder, ::http::header::CONTENT_LENGTH, &content_length);
212 }
213 ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
214 }
215}
216#[derive(Debug)]
217struct ExecuteGremlinQueryEndpointParamsInterceptor;
218
219impl ::aws_smithy_runtime_api::client::interceptors::Intercept for ExecuteGremlinQueryEndpointParamsInterceptor {
220 fn name(&self) -> &'static str {
221 "ExecuteGremlinQueryEndpointParamsInterceptor"
222 }
223
224 fn read_before_execution(
225 &self,
226 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
227 '_,
228 ::aws_smithy_runtime_api::client::interceptors::context::Input,
229 ::aws_smithy_runtime_api::client::interceptors::context::Output,
230 ::aws_smithy_runtime_api::client::interceptors::context::Error,
231 >,
232 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
233 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
234 let _input = context
235 .input()
236 .downcast_ref::<ExecuteGremlinQueryInput>()
237 .ok_or("failed to downcast to ExecuteGremlinQueryInput")?;
238
239 let params = crate::config::endpoint::Params::builder()
240 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
241 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
242 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
243 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
244 .build()
245 .map_err(|err| {
246 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
247 })?;
248 cfg.interceptor_state()
249 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
250 ::std::result::Result::Ok(())
251 }
252}
253
254#[non_exhaustive]
259#[derive(::std::fmt::Debug)]
260pub enum ExecuteGremlinQueryError {
261 BadRequestException(crate::types::error::BadRequestException),
263 CancelledByUserException(crate::types::error::CancelledByUserException),
265 ClientTimeoutException(crate::types::error::ClientTimeoutException),
267 ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
269 ConstraintViolationException(crate::types::error::ConstraintViolationException),
271 FailureByQueryException(crate::types::error::FailureByQueryException),
273 IllegalArgumentException(crate::types::error::IllegalArgumentException),
275 InvalidArgumentException(crate::types::error::InvalidArgumentException),
277 InvalidParameterException(crate::types::error::InvalidParameterException),
279 MalformedQueryException(crate::types::error::MalformedQueryException),
281 MemoryLimitExceededException(crate::types::error::MemoryLimitExceededException),
283 MissingParameterException(crate::types::error::MissingParameterException),
285 ParsingException(crate::types::error::ParsingException),
287 PreconditionsFailedException(crate::types::error::PreconditionsFailedException),
289 QueryLimitExceededException(crate::types::error::QueryLimitExceededException),
291 QueryLimitException(crate::types::error::QueryLimitException),
293 QueryTooLargeException(crate::types::error::QueryTooLargeException),
295 TimeLimitExceededException(crate::types::error::TimeLimitExceededException),
297 TooManyRequestsException(crate::types::error::TooManyRequestsException),
299 UnsupportedOperationException(crate::types::error::UnsupportedOperationException),
301 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
303 variable wildcard pattern and check `.code()`:
304 \
305 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
306 \
307 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-ExecuteGremlinQueryError) for what information is available for the error.")]
308 Unhandled(crate::error::sealed_unhandled::Unhandled),
309}
310impl ExecuteGremlinQueryError {
311 pub fn unhandled(
313 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
314 ) -> Self {
315 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
316 source: err.into(),
317 meta: ::std::default::Default::default(),
318 })
319 }
320
321 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
323 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
324 source: err.clone().into(),
325 meta: err,
326 })
327 }
328 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
333 match self {
334 Self::BadRequestException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
335 Self::CancelledByUserException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
336 Self::ClientTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
337 Self::ConcurrentModificationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
338 Self::ConstraintViolationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
339 Self::FailureByQueryException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
340 Self::IllegalArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
341 Self::InvalidArgumentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
342 Self::InvalidParameterException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
343 Self::MalformedQueryException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
344 Self::MemoryLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
345 Self::MissingParameterException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
346 Self::ParsingException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
347 Self::PreconditionsFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
348 Self::QueryLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
349 Self::QueryLimitException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
350 Self::QueryTooLargeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
351 Self::TimeLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
352 Self::TooManyRequestsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
353 Self::UnsupportedOperationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
354 Self::Unhandled(e) => &e.meta,
355 }
356 }
357 pub fn is_bad_request_exception(&self) -> bool {
359 matches!(self, Self::BadRequestException(_))
360 }
361 pub fn is_cancelled_by_user_exception(&self) -> bool {
363 matches!(self, Self::CancelledByUserException(_))
364 }
365 pub fn is_client_timeout_exception(&self) -> bool {
367 matches!(self, Self::ClientTimeoutException(_))
368 }
369 pub fn is_concurrent_modification_exception(&self) -> bool {
371 matches!(self, Self::ConcurrentModificationException(_))
372 }
373 pub fn is_constraint_violation_exception(&self) -> bool {
375 matches!(self, Self::ConstraintViolationException(_))
376 }
377 pub fn is_failure_by_query_exception(&self) -> bool {
379 matches!(self, Self::FailureByQueryException(_))
380 }
381 pub fn is_illegal_argument_exception(&self) -> bool {
383 matches!(self, Self::IllegalArgumentException(_))
384 }
385 pub fn is_invalid_argument_exception(&self) -> bool {
387 matches!(self, Self::InvalidArgumentException(_))
388 }
389 pub fn is_invalid_parameter_exception(&self) -> bool {
391 matches!(self, Self::InvalidParameterException(_))
392 }
393 pub fn is_malformed_query_exception(&self) -> bool {
395 matches!(self, Self::MalformedQueryException(_))
396 }
397 pub fn is_memory_limit_exceeded_exception(&self) -> bool {
399 matches!(self, Self::MemoryLimitExceededException(_))
400 }
401 pub fn is_missing_parameter_exception(&self) -> bool {
403 matches!(self, Self::MissingParameterException(_))
404 }
405 pub fn is_parsing_exception(&self) -> bool {
407 matches!(self, Self::ParsingException(_))
408 }
409 pub fn is_preconditions_failed_exception(&self) -> bool {
411 matches!(self, Self::PreconditionsFailedException(_))
412 }
413 pub fn is_query_limit_exceeded_exception(&self) -> bool {
415 matches!(self, Self::QueryLimitExceededException(_))
416 }
417 pub fn is_query_limit_exception(&self) -> bool {
419 matches!(self, Self::QueryLimitException(_))
420 }
421 pub fn is_query_too_large_exception(&self) -> bool {
423 matches!(self, Self::QueryTooLargeException(_))
424 }
425 pub fn is_time_limit_exceeded_exception(&self) -> bool {
427 matches!(self, Self::TimeLimitExceededException(_))
428 }
429 pub fn is_too_many_requests_exception(&self) -> bool {
431 matches!(self, Self::TooManyRequestsException(_))
432 }
433 pub fn is_unsupported_operation_exception(&self) -> bool {
435 matches!(self, Self::UnsupportedOperationException(_))
436 }
437}
438impl ::std::error::Error for ExecuteGremlinQueryError {
439 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
440 match self {
441 Self::BadRequestException(_inner) => ::std::option::Option::Some(_inner),
442 Self::CancelledByUserException(_inner) => ::std::option::Option::Some(_inner),
443 Self::ClientTimeoutException(_inner) => ::std::option::Option::Some(_inner),
444 Self::ConcurrentModificationException(_inner) => ::std::option::Option::Some(_inner),
445 Self::ConstraintViolationException(_inner) => ::std::option::Option::Some(_inner),
446 Self::FailureByQueryException(_inner) => ::std::option::Option::Some(_inner),
447 Self::IllegalArgumentException(_inner) => ::std::option::Option::Some(_inner),
448 Self::InvalidArgumentException(_inner) => ::std::option::Option::Some(_inner),
449 Self::InvalidParameterException(_inner) => ::std::option::Option::Some(_inner),
450 Self::MalformedQueryException(_inner) => ::std::option::Option::Some(_inner),
451 Self::MemoryLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
452 Self::MissingParameterException(_inner) => ::std::option::Option::Some(_inner),
453 Self::ParsingException(_inner) => ::std::option::Option::Some(_inner),
454 Self::PreconditionsFailedException(_inner) => ::std::option::Option::Some(_inner),
455 Self::QueryLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
456 Self::QueryLimitException(_inner) => ::std::option::Option::Some(_inner),
457 Self::QueryTooLargeException(_inner) => ::std::option::Option::Some(_inner),
458 Self::TimeLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
459 Self::TooManyRequestsException(_inner) => ::std::option::Option::Some(_inner),
460 Self::UnsupportedOperationException(_inner) => ::std::option::Option::Some(_inner),
461 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
462 }
463 }
464}
465impl ::std::fmt::Display for ExecuteGremlinQueryError {
466 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
467 match self {
468 Self::BadRequestException(_inner) => _inner.fmt(f),
469 Self::CancelledByUserException(_inner) => _inner.fmt(f),
470 Self::ClientTimeoutException(_inner) => _inner.fmt(f),
471 Self::ConcurrentModificationException(_inner) => _inner.fmt(f),
472 Self::ConstraintViolationException(_inner) => _inner.fmt(f),
473 Self::FailureByQueryException(_inner) => _inner.fmt(f),
474 Self::IllegalArgumentException(_inner) => _inner.fmt(f),
475 Self::InvalidArgumentException(_inner) => _inner.fmt(f),
476 Self::InvalidParameterException(_inner) => _inner.fmt(f),
477 Self::MalformedQueryException(_inner) => _inner.fmt(f),
478 Self::MemoryLimitExceededException(_inner) => _inner.fmt(f),
479 Self::MissingParameterException(_inner) => _inner.fmt(f),
480 Self::ParsingException(_inner) => _inner.fmt(f),
481 Self::PreconditionsFailedException(_inner) => _inner.fmt(f),
482 Self::QueryLimitExceededException(_inner) => _inner.fmt(f),
483 Self::QueryLimitException(_inner) => _inner.fmt(f),
484 Self::QueryTooLargeException(_inner) => _inner.fmt(f),
485 Self::TimeLimitExceededException(_inner) => _inner.fmt(f),
486 Self::TooManyRequestsException(_inner) => _inner.fmt(f),
487 Self::UnsupportedOperationException(_inner) => _inner.fmt(f),
488 Self::Unhandled(_inner) => {
489 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
490 write!(f, "unhandled error ({code})")
491 } else {
492 f.write_str("unhandled error")
493 }
494 }
495 }
496 }
497}
498impl ::aws_smithy_types::retry::ProvideErrorKind for ExecuteGremlinQueryError {
499 fn code(&self) -> ::std::option::Option<&str> {
500 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
501 }
502 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
503 match self {
504 Self::ClientTimeoutException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
505 Self::ConcurrentModificationException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
506 Self::ConstraintViolationException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
507 Self::FailureByQueryException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
508 Self::MemoryLimitExceededException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
509 Self::QueryLimitExceededException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
510 Self::TimeLimitExceededException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
511 Self::TooManyRequestsException(inner) => ::std::option::Option::Some(inner.retryable_error_kind()),
512 _ => ::std::option::Option::None,
513 }
514 }
515}
516impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ExecuteGremlinQueryError {
517 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
518 match self {
519 Self::BadRequestException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
520 Self::CancelledByUserException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
521 Self::ClientTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
522 Self::ConcurrentModificationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
523 Self::ConstraintViolationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
524 Self::FailureByQueryException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
525 Self::IllegalArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
526 Self::InvalidArgumentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
527 Self::InvalidParameterException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
528 Self::MalformedQueryException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
529 Self::MemoryLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
530 Self::MissingParameterException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
531 Self::ParsingException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
532 Self::PreconditionsFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
533 Self::QueryLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
534 Self::QueryLimitException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
535 Self::QueryTooLargeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
536 Self::TimeLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
537 Self::TooManyRequestsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
538 Self::UnsupportedOperationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
539 Self::Unhandled(_inner) => &_inner.meta,
540 }
541 }
542}
543impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for ExecuteGremlinQueryError {
544 fn create_unhandled_error(
545 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
546 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
547 ) -> Self {
548 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
549 source,
550 meta: meta.unwrap_or_default(),
551 })
552 }
553}
554impl ::aws_types::request_id::RequestId for crate::operation::execute_gremlin_query::ExecuteGremlinQueryError {
555 fn request_id(&self) -> Option<&str> {
556 self.meta().request_id()
557 }
558}
559
560pub use crate::operation::execute_gremlin_query::_execute_gremlin_query_output::ExecuteGremlinQueryOutput;
561
562pub use crate::operation::execute_gremlin_query::_execute_gremlin_query_input::ExecuteGremlinQueryInput;
563
564mod _execute_gremlin_query_input;
565
566mod _execute_gremlin_query_output;
567
568pub mod builders;