1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct CreateDevEndpoint;
6impl CreateDevEndpoint {
7 pub fn new() -> Self {
9 Self
10 }
11 pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::create_dev_endpoint::CreateDevEndpointInput::SCHEMA;
13 pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = crate::operation::create_dev_endpoint::CreateDevEndpointOutput::SCHEMA;
15 pub(crate) async fn orchestrate(
16 runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
17 input: crate::operation::create_dev_endpoint::CreateDevEndpointInput,
18 ) -> ::std::result::Result<
19 crate::operation::create_dev_endpoint::CreateDevEndpointOutput,
20 ::aws_smithy_runtime_api::client::result::SdkError<
21 crate::operation::create_dev_endpoint::CreateDevEndpointError,
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::create_dev_endpoint::CreateDevEndpointError>()
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::create_dev_endpoint::CreateDevEndpointOutput>()
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::create_dev_endpoint::CreateDevEndpointInput,
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", "CreateDevEndpoint", input, runtime_plugins, stop_point)
59 .instrument(::tracing::debug_span!(
62 "Glue.CreateDevEndpoint",
63 "rpc.service" = "Glue",
64 "rpc.method" = "CreateDevEndpoint",
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::AlreadyExistsException::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::AlreadyExistsException::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::AlreadyExistsException::deserialize(d)?))
118 },
119 )
120.insert_error_shape(
121 crate::types::error::IdempotentParameterMismatchException::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::IdempotentParameterMismatchException::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::IdempotentParameterMismatchException::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::OperationTimeoutException::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::OperationTimeoutException::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::OperationTimeoutException::deserialize(d)?))
154 },
155 )
156.insert_error_shape(
157 crate::types::error::ResourceNumberLimitExceededException::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::ResourceNumberLimitExceededException::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::ResourceNumberLimitExceededException::deserialize(d)?))
163 },
164 )
165.insert_error_shape(
166 crate::types::error::ValidationException::SCHEMA,
167 |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
168 ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ValidationException::deserialize(d)?))
169 },
170 |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> {
171 ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ValidationException::deserialize(d)?))
172 },
173 )
174 .build()
175 });
176}
177impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for CreateDevEndpoint {
178 fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
179 let mut cfg = ::aws_smithy_types::config_bag::Layer::new("CreateDevEndpoint");
180
181 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
182 CreateDevEndpointRequestSerializer,
183 ));
184 cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
185 CreateDevEndpointResponseDeserializer,
186 ));
187
188 cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
189 crate::config::auth::Params::builder()
190 .operation_name("CreateDevEndpoint")
191 .build()
192 .expect("required fields set"),
193 ));
194
195 cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new("CreateDevEndpoint", "Glue"));
196 let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
197 signing_options.double_uri_encode = true;
198 signing_options.content_sha256_header = false;
199 signing_options.normalize_uri_path = true;
200 signing_options.payload_override = None;
201
202 cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
203 signing_options,
204 ..::std::default::Default::default()
205 });
206
207 ::std::option::Option::Some(cfg.freeze())
208 }
209
210 fn runtime_components(
211 &self,
212 _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
213 ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
214 #[allow(unused_mut)]
215 let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("CreateDevEndpoint")
216 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
217 CreateDevEndpointTelemetryInputCaptureInterceptor,
218 ))
219 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
220 ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
221 ))
222 .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
223 CreateDevEndpointEndpointParamsInterceptor,
224 ))
225 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
226 crate::operation::create_dev_endpoint::CreateDevEndpointError,
227 >::new())
228 .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
229 crate::operation::create_dev_endpoint::CreateDevEndpointError,
230 >::new())
231 .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
232 crate::operation::create_dev_endpoint::CreateDevEndpointError,
233 >::new())
234 .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
235 crate::operation::create_dev_endpoint::CreateDevEndpointError,
236 >::new());
237
238 ::std::borrow::Cow::Owned(rcb)
239 }
240}
241
242#[derive(Debug)]
243struct CreateDevEndpointTelemetryInputCaptureInterceptor;
244
245#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
246impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDevEndpointTelemetryInputCaptureInterceptor {
247 fn name(&self) -> &'static str {
248 "CreateDevEndpointTelemetryInputCaptureInterceptor"
249 }
250
251 fn read_before_execution(
252 &self,
253 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
254 '_,
255 ::aws_smithy_runtime_api::client::interceptors::context::Input,
256 ::aws_smithy_runtime_api::client::interceptors::context::Output,
257 ::aws_smithy_runtime_api::client::interceptors::context::Error,
258 >,
259 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
260 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
261 let ::std::option::Option::Some(requested) = cfg
263 .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
264 .filter(|r| !r.is_empty())
265 else {
266 return ::std::result::Result::Ok(());
267 };
268
269 let ::std::option::Option::Some(input) = context.input().downcast_ref::<CreateDevEndpointInput>() else {
270 return ::std::result::Result::Ok(());
272 };
273
274 let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
275 if requested.should_capture("EndpointName") {
276 if let ::std::option::Option::Some(value) = input.endpoint_name.as_deref() {
277 captured.insert("EndpointName", value);
278 }
279 }
280 if requested.should_capture("RoleArn") {
281 if let ::std::option::Option::Some(value) = input.role_arn.as_deref() {
282 captured.insert("RoleArn", value);
283 }
284 }
285 if requested.should_capture("SubnetId") {
286 if let ::std::option::Option::Some(value) = input.subnet_id.as_deref() {
287 captured.insert("SubnetId", value);
288 }
289 }
290 if requested.should_capture("PublicKey") {
291 if let ::std::option::Option::Some(value) = input.public_key.as_deref() {
292 captured.insert("PublicKey", value);
293 }
294 }
295 if requested.should_capture("GlueVersion") {
296 if let ::std::option::Option::Some(value) = input.glue_version.as_deref() {
297 captured.insert("GlueVersion", value);
298 }
299 }
300 if requested.should_capture("ExtraPythonLibsS3Path") {
301 if let ::std::option::Option::Some(value) = input.extra_python_libs_s3_path.as_deref() {
302 captured.insert("ExtraPythonLibsS3Path", value);
303 }
304 }
305 if requested.should_capture("ExtraJarsS3Path") {
306 if let ::std::option::Option::Some(value) = input.extra_jars_s3_path.as_deref() {
307 captured.insert("ExtraJarsS3Path", value);
308 }
309 }
310 if requested.should_capture("SecurityConfiguration") {
311 if let ::std::option::Option::Some(value) = input.security_configuration.as_deref() {
312 captured.insert("SecurityConfiguration", value);
313 }
314 }
315
316 cfg.interceptor_state().store_put(captured);
317 ::std::result::Result::Ok(())
318 }
319}
320#[derive(Debug)]
321struct CreateDevEndpointResponseDeserializer;
322impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for CreateDevEndpointResponseDeserializer {
323 fn deserialize_nonstreaming_with_config(
324 &self,
325 response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
326 _cfg: &::aws_smithy_types::config_bag::ConfigBag,
327 ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
328 let (success, status) = (response.status().is_success(), response.status().as_u16());
329 #[allow(unused_variables)]
334 let body = response.body().bytes().expect("body loaded");
335 let headers = response.headers();
336 #[allow(unused_mut)]
337 let mut force_error = false;
338 ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
339 if !success && status != 200 || force_error {
340 let protocol = _cfg
341 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
342 .expect("a SharedClientProtocol is required");
343 #[allow(unused_mut)]
344 let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
345 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
346 })?;
347 generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
348 let generic = generic_builder.build();
349 let error_code = match generic.code() {
350 ::std::option::Option::Some(code) => code,
351 ::std::option::Option::None => {
352 return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
353 ::aws_smithy_runtime_api::box_error::BoxError::from(
354 crate::operation::create_dev_endpoint::CreateDevEndpointError::unhandled(generic),
355 ),
356 ))
357 }
358 };
359 let _error_message = generic.message().map(|msg| msg.to_owned());
360 let err = match error_code {
361 "AccessDeniedException" => crate::operation::create_dev_endpoint::CreateDevEndpointError::AccessDeniedException({
362 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
363 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
364 e,
365 ))
366 })?;
367 let mut tmp = <crate::types::error::builders::AccessDeniedExceptionBuilder>::default();
368 tmp.deserialize_members(&mut *deser).map_err(|e| {
369 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
370 e,
371 ))
372 })?;
373 if tmp.message.is_none() {
374 tmp.message = _error_message;
375 }
376 let tmp = tmp.meta(generic);
377 tmp.build()
378 }),
379 "AlreadyExistsException" => crate::operation::create_dev_endpoint::CreateDevEndpointError::AlreadyExistsException({
380 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
381 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
382 e,
383 ))
384 })?;
385 let mut tmp = <crate::types::error::builders::AlreadyExistsExceptionBuilder>::default();
386 tmp.deserialize_members(&mut *deser).map_err(|e| {
387 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
388 e,
389 ))
390 })?;
391 if tmp.message.is_none() {
392 tmp.message = _error_message;
393 }
394 let tmp = tmp.meta(generic);
395 tmp.build()
396 }),
397 "IdempotentParameterMismatchException" => {
398 crate::operation::create_dev_endpoint::CreateDevEndpointError::IdempotentParameterMismatchException({
399 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
400 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
401 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
402 )
403 })?;
404 let mut tmp = <crate::types::error::builders::IdempotentParameterMismatchExceptionBuilder>::default();
405 tmp.deserialize_members(&mut *deser).map_err(|e| {
406 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
407 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
408 )
409 })?;
410 if tmp.message.is_none() {
411 tmp.message = _error_message;
412 }
413 let tmp = tmp.meta(generic);
414 tmp.build()
415 })
416 }
417 "InternalServiceException" => crate::operation::create_dev_endpoint::CreateDevEndpointError::InternalServiceException({
418 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
419 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
420 e,
421 ))
422 })?;
423 let mut tmp = <crate::types::error::builders::InternalServiceExceptionBuilder>::default();
424 tmp.deserialize_members(&mut *deser).map_err(|e| {
425 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
426 e,
427 ))
428 })?;
429 if tmp.message.is_none() {
430 tmp.message = _error_message;
431 }
432 let tmp = tmp.meta(generic);
433 tmp.build()
434 }),
435 "InvalidInputException" => crate::operation::create_dev_endpoint::CreateDevEndpointError::InvalidInputException({
436 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
437 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
438 e,
439 ))
440 })?;
441 let mut tmp = <crate::types::error::builders::InvalidInputExceptionBuilder>::default();
442 tmp.deserialize_members(&mut *deser).map_err(|e| {
443 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
444 e,
445 ))
446 })?;
447 if tmp.message.is_none() {
448 tmp.message = _error_message;
449 }
450 let tmp = tmp.meta(generic);
451 tmp.build()
452 }),
453 "OperationTimeoutException" => crate::operation::create_dev_endpoint::CreateDevEndpointError::OperationTimeoutException({
454 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
455 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
456 e,
457 ))
458 })?;
459 let mut tmp = <crate::types::error::builders::OperationTimeoutExceptionBuilder>::default();
460 tmp.deserialize_members(&mut *deser).map_err(|e| {
461 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
462 e,
463 ))
464 })?;
465 if tmp.message.is_none() {
466 tmp.message = _error_message;
467 }
468 let tmp = tmp.meta(generic);
469 tmp.build()
470 }),
471 "ResourceNumberLimitExceededException" => {
472 crate::operation::create_dev_endpoint::CreateDevEndpointError::ResourceNumberLimitExceededException({
473 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
474 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
475 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
476 )
477 })?;
478 let mut tmp = <crate::types::error::builders::ResourceNumberLimitExceededExceptionBuilder>::default();
479 tmp.deserialize_members(&mut *deser).map_err(|e| {
480 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
481 ::aws_smithy_runtime_api::box_error::BoxError::from(e),
482 )
483 })?;
484 if tmp.message.is_none() {
485 tmp.message = _error_message;
486 }
487 let tmp = tmp.meta(generic);
488 tmp.build()
489 })
490 }
491 "ValidationException" => crate::operation::create_dev_endpoint::CreateDevEndpointError::ValidationException({
492 let mut deser = protocol.deserialize_error_response(response, _cfg).map_err(|e| {
493 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
494 e,
495 ))
496 })?;
497 let mut tmp = <crate::types::error::builders::ValidationExceptionBuilder>::default();
498 tmp.deserialize_members(&mut *deser).map_err(|e| {
499 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(
500 e,
501 ))
502 })?;
503 if tmp.message.is_none() {
504 tmp.message = _error_message;
505 }
506 let tmp = tmp.meta(generic);
507 tmp.build()
508 }),
509 _ => {
510 match protocol
518 .deserialize_error_response(response, _cfg)
519 .ok()
520 .and_then(|mut deser| {
521 ::aws_smithy_schema::registry::reify_error(
522 crate::operation::create_dev_endpoint::error_registry::REGISTRY
523 .or(&crate::error_type_registry::REGISTRY),
524 error_code,
525 &mut *deser,
526 )
527 }) {
528 ::std::option::Option::Some(source) => <crate::operation::create_dev_endpoint::CreateDevEndpointError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
529 ::std::option::Option::None => crate::operation::create_dev_endpoint::CreateDevEndpointError::generic(generic),
530 }
531 }
532 };
533 ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
534 ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
535 ))
536 } else {
537 let protocol = _cfg
538 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
539 .expect("a SharedClientProtocol is required");
540 let mut deser = protocol
541 .deserialize_response(response, CreateDevEndpoint::OUTPUT_SCHEMA, _cfg)
542 .map_err(|e| {
543 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
544 })?;
545 let _response_headers = headers;
549 #[allow(unused_mut)]
553 let mut output = <crate::operation::create_dev_endpoint::builders::CreateDevEndpointOutputBuilder>::default();
554 output.deserialize_members(&mut *deser).map_err(|e| {
555 ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
556 })?;
557 output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
558 let output = output.build();
559 ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
560 }
561 }
562}
563#[derive(Debug)]
564struct CreateDevEndpointRequestSerializer;
565impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for CreateDevEndpointRequestSerializer {
566 #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
567 fn serialize_input(
568 &self,
569 input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
570 _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
571 ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
572 let input = input
573 .downcast::<crate::operation::create_dev_endpoint::CreateDevEndpointInput>()
574 .expect("correct type");
575
576 let protocol = _cfg
577 .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
578 .expect("a SharedClientProtocol is required");
579 let mut request = protocol
580 .serialize_request(&input, CreateDevEndpoint::INPUT_SCHEMA, "/", _cfg)
581 .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
582
583 return ::std::result::Result::Ok(request);
584 }
585}
586#[derive(Debug)]
587struct CreateDevEndpointEndpointParamsInterceptor;
588
589#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
590impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateDevEndpointEndpointParamsInterceptor {
591 fn name(&self) -> &'static str {
592 "CreateDevEndpointEndpointParamsInterceptor"
593 }
594
595 fn read_before_execution(
596 &self,
597 context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
598 '_,
599 ::aws_smithy_runtime_api::client::interceptors::context::Input,
600 ::aws_smithy_runtime_api::client::interceptors::context::Output,
601 ::aws_smithy_runtime_api::client::interceptors::context::Error,
602 >,
603 cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
604 ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
605 let _input = context
606 .input()
607 .downcast_ref::<CreateDevEndpointInput>()
608 .ok_or("failed to downcast to CreateDevEndpointInput")?;
609
610 let params = crate::config::endpoint::Params::builder()
611 .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
612 .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
613 .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
614 .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
615 .build()
616 .map_err(|err| {
617 ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
618 })?;
619 cfg.interceptor_state()
620 .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
621 ::std::result::Result::Ok(())
622 }
623}
624
625#[non_exhaustive]
630#[derive(::std::fmt::Debug)]
631pub enum CreateDevEndpointError {
632 AccessDeniedException(crate::types::error::AccessDeniedException),
634 AlreadyExistsException(crate::types::error::AlreadyExistsException),
636 IdempotentParameterMismatchException(crate::types::error::IdempotentParameterMismatchException),
638 InternalServiceException(crate::types::error::InternalServiceException),
640 InvalidInputException(crate::types::error::InvalidInputException),
642 OperationTimeoutException(crate::types::error::OperationTimeoutException),
644 ResourceNumberLimitExceededException(crate::types::error::ResourceNumberLimitExceededException),
646 ValidationException(crate::types::error::ValidationException),
648 #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
650 variable wildcard pattern and check `.code()`:
651 \
652 `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
653 \
654 See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateDevEndpointError) for what information is available for the error.")]
655 Unhandled(crate::error::sealed_unhandled::Unhandled),
656}
657impl CreateDevEndpointError {
658 pub fn unhandled(
660 err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
661 ) -> Self {
662 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
663 source: err.into(),
664 meta: ::std::default::Default::default(),
665 })
666 }
667
668 pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
670 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
671 source: err.clone().into(),
672 meta: err,
673 })
674 }
675 pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
680 match self {
681 Self::AccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
682 Self::AlreadyExistsException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
683 Self::IdempotentParameterMismatchException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
684 Self::InternalServiceException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
685 Self::InvalidInputException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
686 Self::OperationTimeoutException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
687 Self::ResourceNumberLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
688 Self::ValidationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
689 Self::Unhandled(e) => &e.meta,
690 }
691 }
692 pub fn is_access_denied_exception(&self) -> bool {
694 matches!(self, Self::AccessDeniedException(_))
695 }
696 pub fn is_already_exists_exception(&self) -> bool {
698 matches!(self, Self::AlreadyExistsException(_))
699 }
700 pub fn is_idempotent_parameter_mismatch_exception(&self) -> bool {
702 matches!(self, Self::IdempotentParameterMismatchException(_))
703 }
704 pub fn is_internal_service_exception(&self) -> bool {
706 matches!(self, Self::InternalServiceException(_))
707 }
708 pub fn is_invalid_input_exception(&self) -> bool {
710 matches!(self, Self::InvalidInputException(_))
711 }
712 pub fn is_operation_timeout_exception(&self) -> bool {
714 matches!(self, Self::OperationTimeoutException(_))
715 }
716 pub fn is_resource_number_limit_exceeded_exception(&self) -> bool {
718 matches!(self, Self::ResourceNumberLimitExceededException(_))
719 }
720 pub fn is_validation_exception(&self) -> bool {
722 matches!(self, Self::ValidationException(_))
723 }
724}
725impl ::std::error::Error for CreateDevEndpointError {
726 fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
727 match self {
728 Self::AccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
729 Self::AlreadyExistsException(_inner) => ::std::option::Option::Some(_inner),
730 Self::IdempotentParameterMismatchException(_inner) => ::std::option::Option::Some(_inner),
731 Self::InternalServiceException(_inner) => ::std::option::Option::Some(_inner),
732 Self::InvalidInputException(_inner) => ::std::option::Option::Some(_inner),
733 Self::OperationTimeoutException(_inner) => ::std::option::Option::Some(_inner),
734 Self::ResourceNumberLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
735 Self::ValidationException(_inner) => ::std::option::Option::Some(_inner),
736 Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
737 }
738 }
739}
740impl ::std::fmt::Display for CreateDevEndpointError {
741 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
742 match self {
743 Self::AccessDeniedException(_inner) => _inner.fmt(f),
744 Self::AlreadyExistsException(_inner) => _inner.fmt(f),
745 Self::IdempotentParameterMismatchException(_inner) => _inner.fmt(f),
746 Self::InternalServiceException(_inner) => _inner.fmt(f),
747 Self::InvalidInputException(_inner) => _inner.fmt(f),
748 Self::OperationTimeoutException(_inner) => _inner.fmt(f),
749 Self::ResourceNumberLimitExceededException(_inner) => _inner.fmt(f),
750 Self::ValidationException(_inner) => _inner.fmt(f),
751 Self::Unhandled(_inner) => {
752 if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
753 write!(f, "unhandled error ({code})")
754 } else {
755 f.write_str("unhandled error")
756 }
757 }
758 }
759 }
760}
761impl ::aws_smithy_types::retry::ProvideErrorKind for CreateDevEndpointError {
762 fn code(&self) -> ::std::option::Option<&str> {
763 ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
764 }
765 fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
766 ::std::option::Option::None
767 }
768}
769impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for CreateDevEndpointError {
770 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
771 match self {
772 Self::AccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
773 Self::AlreadyExistsException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
774 Self::IdempotentParameterMismatchException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
775 Self::InternalServiceException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
776 Self::InvalidInputException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
777 Self::OperationTimeoutException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
778 Self::ResourceNumberLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
779 Self::ValidationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
780 Self::Unhandled(_inner) => &_inner.meta,
781 }
782 }
783}
784impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for CreateDevEndpointError {
785 fn create_unhandled_error(
786 source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
787 meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
788 ) -> Self {
789 Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
790 source,
791 meta: meta.unwrap_or_default(),
792 })
793 }
794}
795impl ::aws_types::request_id::RequestId for crate::operation::create_dev_endpoint::CreateDevEndpointError {
796 fn request_id(&self) -> Option<&str> {
797 self.meta().request_id()
798 }
799}
800
801pub use crate::operation::create_dev_endpoint::_create_dev_endpoint_input::CreateDevEndpointInput;
802
803pub use crate::operation::create_dev_endpoint::_create_dev_endpoint_output::CreateDevEndpointOutput;
804
805mod _create_dev_endpoint_input;
806
807mod _create_dev_endpoint_output;
808
809pub mod builders;