Skip to main content

aws_sdk_codecommit/operation/
merge_branches_by_squash.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Orchestration and serialization glue logic for `MergeBranchesBySquash`.
3#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
4#[non_exhaustive]
5pub struct MergeBranchesBySquash;
6impl MergeBranchesBySquash {
7    /// Creates a new `MergeBranchesBySquash`
8    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::merge_branches_by_squash::MergeBranchesBySquashInput,
14    ) -> ::std::result::Result<
15        crate::operation::merge_branches_by_squash::MergeBranchesBySquashOutput,
16        ::aws_smithy_runtime_api::client::result::SdkError<
17            crate::operation::merge_branches_by_squash::MergeBranchesBySquashError,
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::merge_branches_by_squash::MergeBranchesBySquashError>()
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::merge_branches_by_squash::MergeBranchesBySquashOutput>()
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::merge_branches_by_squash::MergeBranchesBySquashInput,
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("CodeCommit", "MergeBranchesBySquash", input, runtime_plugins, stop_point)
55            // Create a parent span for the entire operation. Includes a random, internal-only,
56            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
57            .instrument(::tracing::debug_span!(
58                "CodeCommit.MergeBranchesBySquash",
59                "rpc.service" = "CodeCommit",
60                "rpc.method" = "MergeBranchesBySquash",
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 MergeBranchesBySquash {
88    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
89        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("MergeBranchesBySquash");
90
91        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
92            MergeBranchesBySquashRequestSerializer,
93        ));
94        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
95            MergeBranchesBySquashResponseDeserializer,
96        ));
97
98        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
99            crate::config::auth::Params::builder()
100                .operation_name("MergeBranchesBySquash")
101                .build()
102                .expect("required fields set"),
103        ));
104
105        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
106            "MergeBranchesBySquash",
107            "CodeCommit",
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("MergeBranchesBySquash")
129            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
130                MergeBranchesBySquashTelemetryInputCaptureInterceptor,
131            ))
132            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
133                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
134            ))
135            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
136                MergeBranchesBySquashEndpointParamsInterceptor,
137            ))
138            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
139                crate::operation::merge_branches_by_squash::MergeBranchesBySquashError,
140            >::new())
141            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
142                crate::operation::merge_branches_by_squash::MergeBranchesBySquashError,
143            >::new())
144            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
145                crate::operation::merge_branches_by_squash::MergeBranchesBySquashError,
146            >::new())
147            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
148                crate::operation::merge_branches_by_squash::MergeBranchesBySquashError,
149            >::new());
150
151        ::std::borrow::Cow::Owned(rcb)
152    }
153}
154
155#[derive(Debug)]
156struct MergeBranchesBySquashTelemetryInputCaptureInterceptor;
157
158#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
159impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MergeBranchesBySquashTelemetryInputCaptureInterceptor {
160    fn name(&self) -> &'static str {
161        "MergeBranchesBySquashTelemetryInputCaptureInterceptor"
162    }
163
164    fn read_before_execution(
165        &self,
166        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
167            '_,
168            ::aws_smithy_runtime_api::client::interceptors::context::Input,
169            ::aws_smithy_runtime_api::client::interceptors::context::Output,
170            ::aws_smithy_runtime_api::client::interceptors::context::Error,
171        >,
172        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
173    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
174        // Nothing to do unless the customer opted in by naming members to record.
175        let ::std::option::Option::Some(requested) = cfg
176            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
177            .filter(|r| !r.is_empty())
178        else {
179            return ::std::result::Result::Ok(());
180        };
181
182        let ::std::option::Option::Some(input) = context.input().downcast_ref::<MergeBranchesBySquashInput>() else {
183            // A mismatched input is not this interceptor's concern; skip quietly.
184            return ::std::result::Result::Ok(());
185        };
186
187        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
188        if requested.should_capture("repositoryName") {
189            if let ::std::option::Option::Some(value) = input.repository_name.as_deref() {
190                captured.insert("repositoryName", value);
191            }
192        }
193        if requested.should_capture("sourceCommitSpecifier") {
194            if let ::std::option::Option::Some(value) = input.source_commit_specifier.as_deref() {
195                captured.insert("sourceCommitSpecifier", value);
196            }
197        }
198        if requested.should_capture("destinationCommitSpecifier") {
199            if let ::std::option::Option::Some(value) = input.destination_commit_specifier.as_deref() {
200                captured.insert("destinationCommitSpecifier", value);
201            }
202        }
203        if requested.should_capture("targetBranch") {
204            if let ::std::option::Option::Some(value) = input.target_branch.as_deref() {
205                captured.insert("targetBranch", value);
206            }
207        }
208        if requested.should_capture("authorName") {
209            if let ::std::option::Option::Some(value) = input.author_name.as_deref() {
210                captured.insert("authorName", value);
211            }
212        }
213        if requested.should_capture("email") {
214            if let ::std::option::Option::Some(value) = input.email.as_deref() {
215                captured.insert("email", value);
216            }
217        }
218        if requested.should_capture("commitMessage") {
219            if let ::std::option::Option::Some(value) = input.commit_message.as_deref() {
220                captured.insert("commitMessage", value);
221            }
222        }
223
224        cfg.interceptor_state().store_put(captured);
225        ::std::result::Result::Ok(())
226    }
227}
228#[derive(Debug)]
229struct MergeBranchesBySquashResponseDeserializer;
230impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for MergeBranchesBySquashResponseDeserializer {
231    fn deserialize_nonstreaming_with_config(
232        &self,
233        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
234        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
235    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
236        let (success, status) = (response.status().is_success(), response.status().as_u16());
237        let headers = response.headers();
238        let body = response.body().bytes().expect("body loaded");
239        #[allow(unused_mut)]
240        let mut force_error = false;
241        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
242        let parse_result = if !success && status != 200 || force_error {
243            crate::protocol_serde::shape_merge_branches_by_squash::de_merge_branches_by_squash_http_error(status, headers, body)
244        } else {
245            crate::protocol_serde::shape_merge_branches_by_squash::de_merge_branches_by_squash_http_response(status, headers, body)
246        };
247        crate::protocol_serde::type_erase_result(parse_result)
248    }
249}
250#[derive(Debug)]
251struct MergeBranchesBySquashRequestSerializer;
252impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for MergeBranchesBySquashRequestSerializer {
253    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
254    fn serialize_input(
255        &self,
256        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
257        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
258    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
259        let input = input
260            .downcast::<crate::operation::merge_branches_by_squash::MergeBranchesBySquashInput>()
261            .expect("correct type");
262        let _header_serialization_settings = _cfg
263            .load::<crate::serialization_settings::HeaderSerializationSettings>()
264            .cloned()
265            .unwrap_or_default();
266        let mut request_builder = {
267            #[allow(clippy::uninlined_format_args)]
268            fn uri_base(
269                _input: &crate::operation::merge_branches_by_squash::MergeBranchesBySquashInput,
270                output: &mut ::std::string::String,
271            ) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::BuildError> {
272                use ::std::fmt::Write as _;
273                ::std::write!(output, "/").expect("formatting should succeed");
274                ::std::result::Result::Ok(())
275            }
276            #[allow(clippy::unnecessary_wraps)]
277            fn update_http_builder(
278                input: &crate::operation::merge_branches_by_squash::MergeBranchesBySquashInput,
279                builder: ::http_1x::request::Builder,
280            ) -> ::std::result::Result<::http_1x::request::Builder, ::aws_smithy_types::error::operation::BuildError> {
281                let mut uri = ::std::string::String::new();
282                uri_base(input, &mut uri)?;
283                ::std::result::Result::Ok(builder.method("POST").uri(uri))
284            }
285            let mut builder = update_http_builder(&input, ::http_1x::request::Builder::new())?;
286            builder = _header_serialization_settings.set_default_header(builder, ::http_1x::header::CONTENT_TYPE, "application/x-amz-json-1.1");
287            builder = _header_serialization_settings.set_default_header(
288                builder,
289                ::http_1x::header::HeaderName::from_static("x-amz-target"),
290                "CodeCommit_20150413.MergeBranchesBySquash",
291            );
292            builder
293        };
294        let body = ::aws_smithy_types::body::SdkBody::from(
295            crate::protocol_serde::shape_merge_branches_by_squash::ser_merge_branches_by_squash_input(&input)?,
296        );
297        if let Some(content_length) = body.content_length() {
298            let content_length = content_length.to_string();
299            request_builder = _header_serialization_settings.set_default_header(request_builder, ::http_1x::header::CONTENT_LENGTH, &content_length);
300        }
301        ::std::result::Result::Ok(request_builder.body(body).expect("valid request").try_into().unwrap())
302    }
303}
304#[derive(Debug)]
305struct MergeBranchesBySquashEndpointParamsInterceptor;
306
307#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
308impl ::aws_smithy_runtime_api::client::interceptors::Intercept for MergeBranchesBySquashEndpointParamsInterceptor {
309    fn name(&self) -> &'static str {
310        "MergeBranchesBySquashEndpointParamsInterceptor"
311    }
312
313    fn read_before_execution(
314        &self,
315        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
316            '_,
317            ::aws_smithy_runtime_api::client::interceptors::context::Input,
318            ::aws_smithy_runtime_api::client::interceptors::context::Output,
319            ::aws_smithy_runtime_api::client::interceptors::context::Error,
320        >,
321        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
322    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
323        let _input = context
324            .input()
325            .downcast_ref::<MergeBranchesBySquashInput>()
326            .ok_or("failed to downcast to MergeBranchesBySquashInput")?;
327
328        let params = crate::config::endpoint::Params::builder()
329            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
330            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
331            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
332            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
333            .build()
334            .map_err(|err| {
335                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
336            })?;
337        cfg.interceptor_state()
338            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
339        ::std::result::Result::Ok(())
340    }
341}
342
343// The get_* functions below are generated from JMESPath expressions in the
344// operationContextParams trait. They target the operation's input shape.
345
346/// Error type for the `MergeBranchesBySquashError` operation.
347#[non_exhaustive]
348#[derive(::std::fmt::Debug)]
349pub enum MergeBranchesBySquashError {
350    /// <p>The specified branch does not exist.</p>
351    BranchDoesNotExistException(crate::types::error::BranchDoesNotExistException),
352    /// <p>The specified branch name is not valid because it is a tag name. Enter the name of a branch in the repository. For a list of valid branch names, use <code>ListBranches</code>.</p>
353    BranchNameIsTagNameException(crate::types::error::BranchNameIsTagNameException),
354    /// <p>A branch name is required, but was not specified.</p>
355    BranchNameRequiredException(crate::types::error::BranchNameRequiredException),
356    /// <p>The specified commit does not exist or no commit was specified, and the specified repository has no default branch.</p>
357    CommitDoesNotExistException(crate::types::error::CommitDoesNotExistException),
358    /// <p>The commit message is too long. Provide a shorter string.</p>
359    CommitMessageLengthExceededException(crate::types::error::CommitMessageLengthExceededException),
360    /// <p>A commit was not specified.</p>
361    CommitRequiredException(crate::types::error::CommitRequiredException),
362    /// <p>The merge cannot be completed because the target branch has been modified. Another user might have modified the target branch while the merge was in progress. Wait a few minutes, and then try again.</p>
363    ConcurrentReferenceUpdateException(crate::types::error::ConcurrentReferenceUpdateException),
364    /// <p>An encryption integrity check failed.</p>
365    EncryptionIntegrityChecksFailedException(crate::types::error::EncryptionIntegrityChecksFailedException),
366    /// <p>An encryption key could not be accessed.</p>
367    EncryptionKeyAccessDeniedException(crate::types::error::EncryptionKeyAccessDeniedException),
368    /// <p>The encryption key is disabled.</p>
369    EncryptionKeyDisabledException(crate::types::error::EncryptionKeyDisabledException),
370    /// <p>No encryption key was found.</p>
371    EncryptionKeyNotFoundException(crate::types::error::EncryptionKeyNotFoundException),
372    /// <p>The encryption key is not available.</p>
373    EncryptionKeyUnavailableException(crate::types::error::EncryptionKeyUnavailableException),
374    /// <p>The file cannot be added because it is too large. The maximum file size is 6 MB, and the combined file content change size is 7 MB. Consider making these changes using a Git client.</p>
375    FileContentSizeLimitExceededException(crate::types::error::FileContentSizeLimitExceededException),
376    /// <p>The commit cannot be created because no file mode has been specified. A file mode is required to update mode permissions for a file.</p>
377    FileModeRequiredException(crate::types::error::FileModeRequiredException),
378    /// <p>The commit cannot be created because at least one of the overall changes in the commit results in a folder whose contents exceed the limit of 6 MB. Either reduce the number and size of your changes, or split the changes across multiple folders.</p>
379    FolderContentSizeLimitExceededException(crate::types::error::FolderContentSizeLimitExceededException),
380    /// <p>The specified reference name is not valid.</p>
381    InvalidBranchNameException(crate::types::error::InvalidBranchNameException),
382    /// <p>The specified commit is not valid.</p>
383    InvalidCommitException(crate::types::error::InvalidCommitException),
384    /// <p>The specified conflict detail level is not valid.</p>
385    InvalidConflictDetailLevelException(crate::types::error::InvalidConflictDetailLevelException),
386    /// <p>The specified conflict resolution list is not valid.</p>
387    InvalidConflictResolutionException(crate::types::error::InvalidConflictResolutionException),
388    /// <p>The specified conflict resolution strategy is not valid.</p>
389    InvalidConflictResolutionStrategyException(crate::types::error::InvalidConflictResolutionStrategyException),
390    /// <p>The specified email address either contains one or more characters that are not allowed, or it exceeds the maximum number of characters allowed for an email address.</p>
391    InvalidEmailException(crate::types::error::InvalidEmailException),
392    /// <p>The specified file mode permission is not valid. For a list of valid file mode permissions, see <code>PutFile</code>.</p>
393    InvalidFileModeException(crate::types::error::InvalidFileModeException),
394    /// <p>The specified path is not valid.</p>
395    InvalidPathException(crate::types::error::InvalidPathException),
396    /// <p>Automerge was specified for resolving the conflict, but the replacement type is not valid or content is missing.</p>
397    InvalidReplacementContentException(crate::types::error::InvalidReplacementContentException),
398    /// <p>Automerge was specified for resolving the conflict, but the specified replacement type is not valid.</p>
399    InvalidReplacementTypeException(crate::types::error::InvalidReplacementTypeException),
400    /// <p>A specified repository name is not valid.</p><note>
401    /// <p>This exception occurs only when a specified repository name is not valid. Other exceptions occur when a required repository parameter is missing, or when a specified repository does not exist.</p>
402    /// </note>
403    InvalidRepositoryNameException(crate::types::error::InvalidRepositoryNameException),
404    /// <p>The specified target branch is not valid.</p>
405    InvalidTargetBranchException(crate::types::error::InvalidTargetBranchException),
406    /// <p>The pull request cannot be merged automatically into the destination branch. You must manually merge the branches and resolve any conflicts.</p>
407    ManualMergeRequiredException(crate::types::error::ManualMergeRequiredException),
408    /// <p>The number of allowed conflict resolution entries was exceeded.</p>
409    MaximumConflictResolutionEntriesExceededException(crate::types::error::MaximumConflictResolutionEntriesExceededException),
410    /// <p>The number of files to load exceeds the allowed limit.</p>
411    MaximumFileContentToLoadExceededException(crate::types::error::MaximumFileContentToLoadExceededException),
412    /// <p>The number of items to compare between the source or destination branches and the merge base has exceeded the maximum allowed.</p>
413    MaximumItemsToCompareExceededException(crate::types::error::MaximumItemsToCompareExceededException),
414    /// <p>More than one conflict resolution entries exists for the conflict. A conflict can have only one conflict resolution entry.</p>
415    MultipleConflictResolutionEntriesException(crate::types::error::MultipleConflictResolutionEntriesException),
416    /// <p>The user name is not valid because it has exceeded the character limit for author names.</p>
417    NameLengthExceededException(crate::types::error::NameLengthExceededException),
418    /// <p>The folderPath for a location cannot be null.</p>
419    PathRequiredException(crate::types::error::PathRequiredException),
420    /// <p>USE_NEW_CONTENT was specified, but no replacement content has been provided.</p>
421    ReplacementContentRequiredException(crate::types::error::ReplacementContentRequiredException),
422    /// <p>A replacement type is required.</p>
423    ReplacementTypeRequiredException(crate::types::error::ReplacementTypeRequiredException),
424    /// <p>The specified repository does not exist.</p>
425    RepositoryDoesNotExistException(crate::types::error::RepositoryDoesNotExistException),
426    /// <p>A repository name is required, but was not specified.</p>
427    RepositoryNameRequiredException(crate::types::error::RepositoryNameRequiredException),
428    /// <p>The divergence between the tips of the provided commit specifiers is too great to determine whether there might be any merge conflicts. Locally compare the specifiers using <code>git diff</code> or a diff tool.</p>
429    TipsDivergenceExceededException(crate::types::error::TipsDivergenceExceededException),
430    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
431    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
432    variable wildcard pattern and check `.code()`:
433     \
434    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
435     \
436    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-MergeBranchesBySquashError) for what information is available for the error.")]
437    Unhandled(crate::error::sealed_unhandled::Unhandled),
438}
439impl MergeBranchesBySquashError {
440    /// Creates the `MergeBranchesBySquashError::Unhandled` variant from any error type.
441    pub fn unhandled(
442        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
443    ) -> Self {
444        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
445            source: err.into(),
446            meta: ::std::default::Default::default(),
447        })
448    }
449
450    /// Creates the `MergeBranchesBySquashError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
451    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
452        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
453            source: err.clone().into(),
454            meta: err,
455        })
456    }
457    ///
458    /// Returns error metadata, which includes the error code, message,
459    /// request ID, and potentially additional information.
460    ///
461    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
462        match self {
463            Self::BranchDoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
464            Self::BranchNameIsTagNameException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
465            Self::BranchNameRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
466            Self::CommitDoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
467            Self::CommitMessageLengthExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
468            Self::CommitRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
469            Self::ConcurrentReferenceUpdateException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
470            Self::EncryptionIntegrityChecksFailedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
471            Self::EncryptionKeyAccessDeniedException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
472            Self::EncryptionKeyDisabledException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
473            Self::EncryptionKeyNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
474            Self::EncryptionKeyUnavailableException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
475            Self::FileContentSizeLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
476            Self::FileModeRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
477            Self::FolderContentSizeLimitExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
478            Self::InvalidBranchNameException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
479            Self::InvalidCommitException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
480            Self::InvalidConflictDetailLevelException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
481            Self::InvalidConflictResolutionException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
482            Self::InvalidConflictResolutionStrategyException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
483            Self::InvalidEmailException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
484            Self::InvalidFileModeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
485            Self::InvalidPathException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
486            Self::InvalidReplacementContentException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
487            Self::InvalidReplacementTypeException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
488            Self::InvalidRepositoryNameException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
489            Self::InvalidTargetBranchException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
490            Self::ManualMergeRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
491            Self::MaximumConflictResolutionEntriesExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
492            Self::MaximumFileContentToLoadExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
493            Self::MaximumItemsToCompareExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
494            Self::MultipleConflictResolutionEntriesException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
495            Self::NameLengthExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
496            Self::PathRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
497            Self::ReplacementContentRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
498            Self::ReplacementTypeRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
499            Self::RepositoryDoesNotExistException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
500            Self::RepositoryNameRequiredException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
501            Self::TipsDivergenceExceededException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
502            Self::Unhandled(e) => &e.meta,
503        }
504    }
505    /// Returns `true` if the error kind is `MergeBranchesBySquashError::BranchDoesNotExistException`.
506    pub fn is_branch_does_not_exist_exception(&self) -> bool {
507        matches!(self, Self::BranchDoesNotExistException(_))
508    }
509    /// Returns `true` if the error kind is `MergeBranchesBySquashError::BranchNameIsTagNameException`.
510    pub fn is_branch_name_is_tag_name_exception(&self) -> bool {
511        matches!(self, Self::BranchNameIsTagNameException(_))
512    }
513    /// Returns `true` if the error kind is `MergeBranchesBySquashError::BranchNameRequiredException`.
514    pub fn is_branch_name_required_exception(&self) -> bool {
515        matches!(self, Self::BranchNameRequiredException(_))
516    }
517    /// Returns `true` if the error kind is `MergeBranchesBySquashError::CommitDoesNotExistException`.
518    pub fn is_commit_does_not_exist_exception(&self) -> bool {
519        matches!(self, Self::CommitDoesNotExistException(_))
520    }
521    /// Returns `true` if the error kind is `MergeBranchesBySquashError::CommitMessageLengthExceededException`.
522    pub fn is_commit_message_length_exceeded_exception(&self) -> bool {
523        matches!(self, Self::CommitMessageLengthExceededException(_))
524    }
525    /// Returns `true` if the error kind is `MergeBranchesBySquashError::CommitRequiredException`.
526    pub fn is_commit_required_exception(&self) -> bool {
527        matches!(self, Self::CommitRequiredException(_))
528    }
529    /// Returns `true` if the error kind is `MergeBranchesBySquashError::ConcurrentReferenceUpdateException`.
530    pub fn is_concurrent_reference_update_exception(&self) -> bool {
531        matches!(self, Self::ConcurrentReferenceUpdateException(_))
532    }
533    /// Returns `true` if the error kind is `MergeBranchesBySquashError::EncryptionIntegrityChecksFailedException`.
534    pub fn is_encryption_integrity_checks_failed_exception(&self) -> bool {
535        matches!(self, Self::EncryptionIntegrityChecksFailedException(_))
536    }
537    /// Returns `true` if the error kind is `MergeBranchesBySquashError::EncryptionKeyAccessDeniedException`.
538    pub fn is_encryption_key_access_denied_exception(&self) -> bool {
539        matches!(self, Self::EncryptionKeyAccessDeniedException(_))
540    }
541    /// Returns `true` if the error kind is `MergeBranchesBySquashError::EncryptionKeyDisabledException`.
542    pub fn is_encryption_key_disabled_exception(&self) -> bool {
543        matches!(self, Self::EncryptionKeyDisabledException(_))
544    }
545    /// Returns `true` if the error kind is `MergeBranchesBySquashError::EncryptionKeyNotFoundException`.
546    pub fn is_encryption_key_not_found_exception(&self) -> bool {
547        matches!(self, Self::EncryptionKeyNotFoundException(_))
548    }
549    /// Returns `true` if the error kind is `MergeBranchesBySquashError::EncryptionKeyUnavailableException`.
550    pub fn is_encryption_key_unavailable_exception(&self) -> bool {
551        matches!(self, Self::EncryptionKeyUnavailableException(_))
552    }
553    /// Returns `true` if the error kind is `MergeBranchesBySquashError::FileContentSizeLimitExceededException`.
554    pub fn is_file_content_size_limit_exceeded_exception(&self) -> bool {
555        matches!(self, Self::FileContentSizeLimitExceededException(_))
556    }
557    /// Returns `true` if the error kind is `MergeBranchesBySquashError::FileModeRequiredException`.
558    pub fn is_file_mode_required_exception(&self) -> bool {
559        matches!(self, Self::FileModeRequiredException(_))
560    }
561    /// Returns `true` if the error kind is `MergeBranchesBySquashError::FolderContentSizeLimitExceededException`.
562    pub fn is_folder_content_size_limit_exceeded_exception(&self) -> bool {
563        matches!(self, Self::FolderContentSizeLimitExceededException(_))
564    }
565    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidBranchNameException`.
566    pub fn is_invalid_branch_name_exception(&self) -> bool {
567        matches!(self, Self::InvalidBranchNameException(_))
568    }
569    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidCommitException`.
570    pub fn is_invalid_commit_exception(&self) -> bool {
571        matches!(self, Self::InvalidCommitException(_))
572    }
573    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidConflictDetailLevelException`.
574    pub fn is_invalid_conflict_detail_level_exception(&self) -> bool {
575        matches!(self, Self::InvalidConflictDetailLevelException(_))
576    }
577    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidConflictResolutionException`.
578    pub fn is_invalid_conflict_resolution_exception(&self) -> bool {
579        matches!(self, Self::InvalidConflictResolutionException(_))
580    }
581    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidConflictResolutionStrategyException`.
582    pub fn is_invalid_conflict_resolution_strategy_exception(&self) -> bool {
583        matches!(self, Self::InvalidConflictResolutionStrategyException(_))
584    }
585    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidEmailException`.
586    pub fn is_invalid_email_exception(&self) -> bool {
587        matches!(self, Self::InvalidEmailException(_))
588    }
589    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidFileModeException`.
590    pub fn is_invalid_file_mode_exception(&self) -> bool {
591        matches!(self, Self::InvalidFileModeException(_))
592    }
593    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidPathException`.
594    pub fn is_invalid_path_exception(&self) -> bool {
595        matches!(self, Self::InvalidPathException(_))
596    }
597    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidReplacementContentException`.
598    pub fn is_invalid_replacement_content_exception(&self) -> bool {
599        matches!(self, Self::InvalidReplacementContentException(_))
600    }
601    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidReplacementTypeException`.
602    pub fn is_invalid_replacement_type_exception(&self) -> bool {
603        matches!(self, Self::InvalidReplacementTypeException(_))
604    }
605    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidRepositoryNameException`.
606    pub fn is_invalid_repository_name_exception(&self) -> bool {
607        matches!(self, Self::InvalidRepositoryNameException(_))
608    }
609    /// Returns `true` if the error kind is `MergeBranchesBySquashError::InvalidTargetBranchException`.
610    pub fn is_invalid_target_branch_exception(&self) -> bool {
611        matches!(self, Self::InvalidTargetBranchException(_))
612    }
613    /// Returns `true` if the error kind is `MergeBranchesBySquashError::ManualMergeRequiredException`.
614    pub fn is_manual_merge_required_exception(&self) -> bool {
615        matches!(self, Self::ManualMergeRequiredException(_))
616    }
617    /// Returns `true` if the error kind is `MergeBranchesBySquashError::MaximumConflictResolutionEntriesExceededException`.
618    pub fn is_maximum_conflict_resolution_entries_exceeded_exception(&self) -> bool {
619        matches!(self, Self::MaximumConflictResolutionEntriesExceededException(_))
620    }
621    /// Returns `true` if the error kind is `MergeBranchesBySquashError::MaximumFileContentToLoadExceededException`.
622    pub fn is_maximum_file_content_to_load_exceeded_exception(&self) -> bool {
623        matches!(self, Self::MaximumFileContentToLoadExceededException(_))
624    }
625    /// Returns `true` if the error kind is `MergeBranchesBySquashError::MaximumItemsToCompareExceededException`.
626    pub fn is_maximum_items_to_compare_exceeded_exception(&self) -> bool {
627        matches!(self, Self::MaximumItemsToCompareExceededException(_))
628    }
629    /// Returns `true` if the error kind is `MergeBranchesBySquashError::MultipleConflictResolutionEntriesException`.
630    pub fn is_multiple_conflict_resolution_entries_exception(&self) -> bool {
631        matches!(self, Self::MultipleConflictResolutionEntriesException(_))
632    }
633    /// Returns `true` if the error kind is `MergeBranchesBySquashError::NameLengthExceededException`.
634    pub fn is_name_length_exceeded_exception(&self) -> bool {
635        matches!(self, Self::NameLengthExceededException(_))
636    }
637    /// Returns `true` if the error kind is `MergeBranchesBySquashError::PathRequiredException`.
638    pub fn is_path_required_exception(&self) -> bool {
639        matches!(self, Self::PathRequiredException(_))
640    }
641    /// Returns `true` if the error kind is `MergeBranchesBySquashError::ReplacementContentRequiredException`.
642    pub fn is_replacement_content_required_exception(&self) -> bool {
643        matches!(self, Self::ReplacementContentRequiredException(_))
644    }
645    /// Returns `true` if the error kind is `MergeBranchesBySquashError::ReplacementTypeRequiredException`.
646    pub fn is_replacement_type_required_exception(&self) -> bool {
647        matches!(self, Self::ReplacementTypeRequiredException(_))
648    }
649    /// Returns `true` if the error kind is `MergeBranchesBySquashError::RepositoryDoesNotExistException`.
650    pub fn is_repository_does_not_exist_exception(&self) -> bool {
651        matches!(self, Self::RepositoryDoesNotExistException(_))
652    }
653    /// Returns `true` if the error kind is `MergeBranchesBySquashError::RepositoryNameRequiredException`.
654    pub fn is_repository_name_required_exception(&self) -> bool {
655        matches!(self, Self::RepositoryNameRequiredException(_))
656    }
657    /// Returns `true` if the error kind is `MergeBranchesBySquashError::TipsDivergenceExceededException`.
658    pub fn is_tips_divergence_exceeded_exception(&self) -> bool {
659        matches!(self, Self::TipsDivergenceExceededException(_))
660    }
661}
662impl ::std::error::Error for MergeBranchesBySquashError {
663    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
664        match self {
665            Self::BranchDoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
666            Self::BranchNameIsTagNameException(_inner) => ::std::option::Option::Some(_inner),
667            Self::BranchNameRequiredException(_inner) => ::std::option::Option::Some(_inner),
668            Self::CommitDoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
669            Self::CommitMessageLengthExceededException(_inner) => ::std::option::Option::Some(_inner),
670            Self::CommitRequiredException(_inner) => ::std::option::Option::Some(_inner),
671            Self::ConcurrentReferenceUpdateException(_inner) => ::std::option::Option::Some(_inner),
672            Self::EncryptionIntegrityChecksFailedException(_inner) => ::std::option::Option::Some(_inner),
673            Self::EncryptionKeyAccessDeniedException(_inner) => ::std::option::Option::Some(_inner),
674            Self::EncryptionKeyDisabledException(_inner) => ::std::option::Option::Some(_inner),
675            Self::EncryptionKeyNotFoundException(_inner) => ::std::option::Option::Some(_inner),
676            Self::EncryptionKeyUnavailableException(_inner) => ::std::option::Option::Some(_inner),
677            Self::FileContentSizeLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
678            Self::FileModeRequiredException(_inner) => ::std::option::Option::Some(_inner),
679            Self::FolderContentSizeLimitExceededException(_inner) => ::std::option::Option::Some(_inner),
680            Self::InvalidBranchNameException(_inner) => ::std::option::Option::Some(_inner),
681            Self::InvalidCommitException(_inner) => ::std::option::Option::Some(_inner),
682            Self::InvalidConflictDetailLevelException(_inner) => ::std::option::Option::Some(_inner),
683            Self::InvalidConflictResolutionException(_inner) => ::std::option::Option::Some(_inner),
684            Self::InvalidConflictResolutionStrategyException(_inner) => ::std::option::Option::Some(_inner),
685            Self::InvalidEmailException(_inner) => ::std::option::Option::Some(_inner),
686            Self::InvalidFileModeException(_inner) => ::std::option::Option::Some(_inner),
687            Self::InvalidPathException(_inner) => ::std::option::Option::Some(_inner),
688            Self::InvalidReplacementContentException(_inner) => ::std::option::Option::Some(_inner),
689            Self::InvalidReplacementTypeException(_inner) => ::std::option::Option::Some(_inner),
690            Self::InvalidRepositoryNameException(_inner) => ::std::option::Option::Some(_inner),
691            Self::InvalidTargetBranchException(_inner) => ::std::option::Option::Some(_inner),
692            Self::ManualMergeRequiredException(_inner) => ::std::option::Option::Some(_inner),
693            Self::MaximumConflictResolutionEntriesExceededException(_inner) => ::std::option::Option::Some(_inner),
694            Self::MaximumFileContentToLoadExceededException(_inner) => ::std::option::Option::Some(_inner),
695            Self::MaximumItemsToCompareExceededException(_inner) => ::std::option::Option::Some(_inner),
696            Self::MultipleConflictResolutionEntriesException(_inner) => ::std::option::Option::Some(_inner),
697            Self::NameLengthExceededException(_inner) => ::std::option::Option::Some(_inner),
698            Self::PathRequiredException(_inner) => ::std::option::Option::Some(_inner),
699            Self::ReplacementContentRequiredException(_inner) => ::std::option::Option::Some(_inner),
700            Self::ReplacementTypeRequiredException(_inner) => ::std::option::Option::Some(_inner),
701            Self::RepositoryDoesNotExistException(_inner) => ::std::option::Option::Some(_inner),
702            Self::RepositoryNameRequiredException(_inner) => ::std::option::Option::Some(_inner),
703            Self::TipsDivergenceExceededException(_inner) => ::std::option::Option::Some(_inner),
704            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
705        }
706    }
707}
708impl ::std::fmt::Display for MergeBranchesBySquashError {
709    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
710        match self {
711            Self::BranchDoesNotExistException(_inner) => _inner.fmt(f),
712            Self::BranchNameIsTagNameException(_inner) => _inner.fmt(f),
713            Self::BranchNameRequiredException(_inner) => _inner.fmt(f),
714            Self::CommitDoesNotExistException(_inner) => _inner.fmt(f),
715            Self::CommitMessageLengthExceededException(_inner) => _inner.fmt(f),
716            Self::CommitRequiredException(_inner) => _inner.fmt(f),
717            Self::ConcurrentReferenceUpdateException(_inner) => _inner.fmt(f),
718            Self::EncryptionIntegrityChecksFailedException(_inner) => _inner.fmt(f),
719            Self::EncryptionKeyAccessDeniedException(_inner) => _inner.fmt(f),
720            Self::EncryptionKeyDisabledException(_inner) => _inner.fmt(f),
721            Self::EncryptionKeyNotFoundException(_inner) => _inner.fmt(f),
722            Self::EncryptionKeyUnavailableException(_inner) => _inner.fmt(f),
723            Self::FileContentSizeLimitExceededException(_inner) => _inner.fmt(f),
724            Self::FileModeRequiredException(_inner) => _inner.fmt(f),
725            Self::FolderContentSizeLimitExceededException(_inner) => _inner.fmt(f),
726            Self::InvalidBranchNameException(_inner) => _inner.fmt(f),
727            Self::InvalidCommitException(_inner) => _inner.fmt(f),
728            Self::InvalidConflictDetailLevelException(_inner) => _inner.fmt(f),
729            Self::InvalidConflictResolutionException(_inner) => _inner.fmt(f),
730            Self::InvalidConflictResolutionStrategyException(_inner) => _inner.fmt(f),
731            Self::InvalidEmailException(_inner) => _inner.fmt(f),
732            Self::InvalidFileModeException(_inner) => _inner.fmt(f),
733            Self::InvalidPathException(_inner) => _inner.fmt(f),
734            Self::InvalidReplacementContentException(_inner) => _inner.fmt(f),
735            Self::InvalidReplacementTypeException(_inner) => _inner.fmt(f),
736            Self::InvalidRepositoryNameException(_inner) => _inner.fmt(f),
737            Self::InvalidTargetBranchException(_inner) => _inner.fmt(f),
738            Self::ManualMergeRequiredException(_inner) => _inner.fmt(f),
739            Self::MaximumConflictResolutionEntriesExceededException(_inner) => _inner.fmt(f),
740            Self::MaximumFileContentToLoadExceededException(_inner) => _inner.fmt(f),
741            Self::MaximumItemsToCompareExceededException(_inner) => _inner.fmt(f),
742            Self::MultipleConflictResolutionEntriesException(_inner) => _inner.fmt(f),
743            Self::NameLengthExceededException(_inner) => _inner.fmt(f),
744            Self::PathRequiredException(_inner) => _inner.fmt(f),
745            Self::ReplacementContentRequiredException(_inner) => _inner.fmt(f),
746            Self::ReplacementTypeRequiredException(_inner) => _inner.fmt(f),
747            Self::RepositoryDoesNotExistException(_inner) => _inner.fmt(f),
748            Self::RepositoryNameRequiredException(_inner) => _inner.fmt(f),
749            Self::TipsDivergenceExceededException(_inner) => _inner.fmt(f),
750            Self::Unhandled(_inner) => {
751                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
752                    write!(f, "unhandled error ({code})")
753                } else {
754                    f.write_str("unhandled error")
755                }
756            }
757        }
758    }
759}
760impl ::aws_smithy_types::retry::ProvideErrorKind for MergeBranchesBySquashError {
761    fn code(&self) -> ::std::option::Option<&str> {
762        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
763    }
764    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
765        ::std::option::Option::None
766    }
767}
768impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for MergeBranchesBySquashError {
769    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
770        match self {
771            Self::BranchDoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
772            Self::BranchNameIsTagNameException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
773            Self::BranchNameRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
774            Self::CommitDoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
775            Self::CommitMessageLengthExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
776            Self::CommitRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
777            Self::ConcurrentReferenceUpdateException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
778            Self::EncryptionIntegrityChecksFailedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
779            Self::EncryptionKeyAccessDeniedException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
780            Self::EncryptionKeyDisabledException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
781            Self::EncryptionKeyNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
782            Self::EncryptionKeyUnavailableException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
783            Self::FileContentSizeLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
784            Self::FileModeRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
785            Self::FolderContentSizeLimitExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
786            Self::InvalidBranchNameException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
787            Self::InvalidCommitException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
788            Self::InvalidConflictDetailLevelException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
789            Self::InvalidConflictResolutionException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
790            Self::InvalidConflictResolutionStrategyException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
791            Self::InvalidEmailException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
792            Self::InvalidFileModeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
793            Self::InvalidPathException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
794            Self::InvalidReplacementContentException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
795            Self::InvalidReplacementTypeException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
796            Self::InvalidRepositoryNameException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
797            Self::InvalidTargetBranchException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
798            Self::ManualMergeRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
799            Self::MaximumConflictResolutionEntriesExceededException(_inner) => {
800                ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner)
801            }
802            Self::MaximumFileContentToLoadExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
803            Self::MaximumItemsToCompareExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
804            Self::MultipleConflictResolutionEntriesException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
805            Self::NameLengthExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
806            Self::PathRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
807            Self::ReplacementContentRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
808            Self::ReplacementTypeRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
809            Self::RepositoryDoesNotExistException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
810            Self::RepositoryNameRequiredException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
811            Self::TipsDivergenceExceededException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
812            Self::Unhandled(_inner) => &_inner.meta,
813        }
814    }
815}
816impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for MergeBranchesBySquashError {
817    fn create_unhandled_error(
818        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
819        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
820    ) -> Self {
821        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
822            source,
823            meta: meta.unwrap_or_default(),
824        })
825    }
826}
827impl ::aws_types::request_id::RequestId for crate::operation::merge_branches_by_squash::MergeBranchesBySquashError {
828    fn request_id(&self) -> Option<&str> {
829        self.meta().request_id()
830    }
831}
832
833pub use crate::operation::merge_branches_by_squash::_merge_branches_by_squash_input::MergeBranchesBySquashInput;
834
835pub use crate::operation::merge_branches_by_squash::_merge_branches_by_squash_output::MergeBranchesBySquashOutput;
836
837mod _merge_branches_by_squash_input;
838
839mod _merge_branches_by_squash_output;
840
841/// Builders
842pub mod builders;