263 263 | struct CreateSourceRepositoryBranchEndpointParamsInterceptor;
|
264 264 |
|
265 265 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateSourceRepositoryBranchEndpointParamsInterceptor {
|
266 266 | fn name(&self) -> &'static str {
|
267 267 | "CreateSourceRepositoryBranchEndpointParamsInterceptor"
|
268 268 | }
|
269 269 |
|
270 270 | fn read_before_execution(
|
271 271 | &self,
|
272 272 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
273 273 | '_,
|
274 274 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
275 275 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
276 276 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
277 277 | >,
|
278 278 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
279 279 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
280 280 | let _input = context
|
281 281 | .input()
|
282 282 | .downcast_ref::<CreateSourceRepositoryBranchInput>()
|
283 283 | .ok_or("failed to downcast to CreateSourceRepositoryBranchInput")?;
|
284 284 |
|
285 285 | let params = crate::config::endpoint::Params::builder()
|
286 286 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
287 287 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
288 288 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
289 289 | .build()
|
290 290 | .map_err(|err| {
|
291 291 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
292 292 | })?;
|
293 + |
|
293 294 | cfg.interceptor_state()
|
294 295 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
296 + |
|
295 297 | ::std::result::Result::Ok(())
|
296 298 | }
|
297 299 | }
|
298 300 |
|
299 301 | // The get_* functions below are generated from JMESPath expressions in the
|
300 302 | // operationContextParams trait. They target the operation's input shape.
|
301 303 |
|
302 304 | /// Error type for the `CreateSourceRepositoryBranchError` operation.
|
303 305 | #[non_exhaustive]
|
304 306 | #[derive(::std::fmt::Debug)]
|
305 307 | pub enum CreateSourceRepositoryBranchError {
|
306 308 | /// <p>The request was denied because you don't have sufficient access to perform this action. Verify that you are a member of a role that allows this action.</p>
|
307 309 | AccessDeniedException(crate::types::error::AccessDeniedException),
|
308 310 | /// <p>The request was denied because the requested operation would cause a conflict with the current state of a service resource associated with the request. Another user might have updated the resource. Reload, make sure you have the latest data, and then try again.</p>
|
309 311 | ConflictException(crate::types::error::ConflictException),
|
310 312 | /// <p>The request was denied because the specified resource was not found. Verify that the spelling is correct and that you have access to the resource.</p>
|
311 313 | ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
|
312 314 | /// <p>The request was denied because one or more resources has reached its limits for the tier the space belongs to. Either reduce the number of resources, or change the tier if applicable.</p>
|
313 315 | ServiceQuotaExceededException(crate::types::error::ServiceQuotaExceededException),
|
314 316 | /// <p>The request was denied due to request throttling.</p>
|
315 317 | ThrottlingException(crate::types::error::ThrottlingException),
|
316 318 | /// <p>The request was denied because an input failed to satisfy the constraints specified by the service. Check the spelling and input requirements, and then try again.</p>
|
317 319 | ValidationException(crate::types::error::ValidationException),
|
318 320 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
319 321 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
320 322 | variable wildcard pattern and check `.code()`:
|
321 323 | \
|
322 324 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
323 325 | \
|
324 326 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-CreateSourceRepositoryBranchError) for what information is available for the error.")]
|