aws-sdk-codecommit 1.99.0

AWS SDK for AWS CodeCommit
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetMergeCommitInput {
    /// <p>The name of the repository that contains the merge commit about which you want to get information.</p>
    pub repository_name: ::std::option::Option<::std::string::String>,
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    pub source_commit_specifier: ::std::option::Option<::std::string::String>,
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    pub destination_commit_specifier: ::std::option::Option<::std::string::String>,
    /// <p>The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.</p>
    pub conflict_detail_level: ::std::option::Option<crate::types::ConflictDetailLevelTypeEnum>,
    /// <p>Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.</p>
    pub conflict_resolution_strategy: ::std::option::Option<crate::types::ConflictResolutionStrategyTypeEnum>,
}
impl GetMergeCommitInput {
    /// <p>The name of the repository that contains the merge commit about which you want to get information.</p>
    pub fn repository_name(&self) -> ::std::option::Option<&str> {
        self.repository_name.as_deref()
    }
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    pub fn source_commit_specifier(&self) -> ::std::option::Option<&str> {
        self.source_commit_specifier.as_deref()
    }
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    pub fn destination_commit_specifier(&self) -> ::std::option::Option<&str> {
        self.destination_commit_specifier.as_deref()
    }
    /// <p>The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.</p>
    pub fn conflict_detail_level(&self) -> ::std::option::Option<&crate::types::ConflictDetailLevelTypeEnum> {
        self.conflict_detail_level.as_ref()
    }
    /// <p>Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.</p>
    pub fn conflict_resolution_strategy(&self) -> ::std::option::Option<&crate::types::ConflictResolutionStrategyTypeEnum> {
        self.conflict_resolution_strategy.as_ref()
    }
}
impl GetMergeCommitInput {
    /// Creates a new builder-style object to manufacture [`GetMergeCommitInput`](crate::operation::get_merge_commit::GetMergeCommitInput).
    pub fn builder() -> crate::operation::get_merge_commit::builders::GetMergeCommitInputBuilder {
        crate::operation::get_merge_commit::builders::GetMergeCommitInputBuilder::default()
    }
}

/// A builder for [`GetMergeCommitInput`](crate::operation::get_merge_commit::GetMergeCommitInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetMergeCommitInputBuilder {
    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
    pub(crate) source_commit_specifier: ::std::option::Option<::std::string::String>,
    pub(crate) destination_commit_specifier: ::std::option::Option<::std::string::String>,
    pub(crate) conflict_detail_level: ::std::option::Option<crate::types::ConflictDetailLevelTypeEnum>,
    pub(crate) conflict_resolution_strategy: ::std::option::Option<crate::types::ConflictResolutionStrategyTypeEnum>,
}
impl GetMergeCommitInputBuilder {
    /// <p>The name of the repository that contains the merge commit about which you want to get information.</p>
    /// This field is required.
    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the repository that contains the merge commit about which you want to get information.</p>
    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository_name = input;
        self
    }
    /// <p>The name of the repository that contains the merge commit about which you want to get information.</p>
    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_name
    }
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    /// This field is required.
    pub fn source_commit_specifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_commit_specifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    pub fn set_source_commit_specifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_commit_specifier = input;
        self
    }
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    pub fn get_source_commit_specifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_commit_specifier
    }
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    /// This field is required.
    pub fn destination_commit_specifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.destination_commit_specifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    pub fn set_destination_commit_specifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.destination_commit_specifier = input;
        self
    }
    /// <p>The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).</p>
    pub fn get_destination_commit_specifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.destination_commit_specifier
    }
    /// <p>The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.</p>
    pub fn conflict_detail_level(mut self, input: crate::types::ConflictDetailLevelTypeEnum) -> Self {
        self.conflict_detail_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.</p>
    pub fn set_conflict_detail_level(mut self, input: ::std::option::Option<crate::types::ConflictDetailLevelTypeEnum>) -> Self {
        self.conflict_detail_level = input;
        self
    }
    /// <p>The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.</p>
    pub fn get_conflict_detail_level(&self) -> &::std::option::Option<crate::types::ConflictDetailLevelTypeEnum> {
        &self.conflict_detail_level
    }
    /// <p>Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.</p>
    pub fn conflict_resolution_strategy(mut self, input: crate::types::ConflictResolutionStrategyTypeEnum) -> Self {
        self.conflict_resolution_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.</p>
    pub fn set_conflict_resolution_strategy(mut self, input: ::std::option::Option<crate::types::ConflictResolutionStrategyTypeEnum>) -> Self {
        self.conflict_resolution_strategy = input;
        self
    }
    /// <p>Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.</p>
    pub fn get_conflict_resolution_strategy(&self) -> &::std::option::Option<crate::types::ConflictResolutionStrategyTypeEnum> {
        &self.conflict_resolution_strategy
    }
    /// Consumes the builder and constructs a [`GetMergeCommitInput`](crate::operation::get_merge_commit::GetMergeCommitInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_merge_commit::GetMergeCommitInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_merge_commit::GetMergeCommitInput {
            repository_name: self.repository_name,
            source_commit_specifier: self.source_commit_specifier,
            destination_commit_specifier: self.destination_commit_specifier,
            conflict_detail_level: self.conflict_detail_level,
            conflict_resolution_strategy: self.conflict_resolution_strategy,
        })
    }
}