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 GetMergeCommitOutput {
    /// <p>The commit ID of the source commit specifier that was used in the merge evaluation.</p>
    pub source_commit_id: ::std::option::Option<::std::string::String>,
    /// <p>The commit ID of the destination commit specifier that was used in the merge evaluation.</p>
    pub destination_commit_id: ::std::option::Option<::std::string::String>,
    /// <p>The commit ID of the merge base.</p>
    pub base_commit_id: ::std::option::Option<::std::string::String>,
    /// <p>The commit ID for the merge commit created when the source branch was merged into the destination branch. If the fast-forward merge strategy was used, there is no merge commit.</p>
    pub merged_commit_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetMergeCommitOutput {
    /// <p>The commit ID of the source commit specifier that was used in the merge evaluation.</p>
    pub fn source_commit_id(&self) -> ::std::option::Option<&str> {
        self.source_commit_id.as_deref()
    }
    /// <p>The commit ID of the destination commit specifier that was used in the merge evaluation.</p>
    pub fn destination_commit_id(&self) -> ::std::option::Option<&str> {
        self.destination_commit_id.as_deref()
    }
    /// <p>The commit ID of the merge base.</p>
    pub fn base_commit_id(&self) -> ::std::option::Option<&str> {
        self.base_commit_id.as_deref()
    }
    /// <p>The commit ID for the merge commit created when the source branch was merged into the destination branch. If the fast-forward merge strategy was used, there is no merge commit.</p>
    pub fn merged_commit_id(&self) -> ::std::option::Option<&str> {
        self.merged_commit_id.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetMergeCommitOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetMergeCommitOutput {
    /// Creates a new builder-style object to manufacture [`GetMergeCommitOutput`](crate::operation::get_merge_commit::GetMergeCommitOutput).
    pub fn builder() -> crate::operation::get_merge_commit::builders::GetMergeCommitOutputBuilder {
        crate::operation::get_merge_commit::builders::GetMergeCommitOutputBuilder::default()
    }
}

/// A builder for [`GetMergeCommitOutput`](crate::operation::get_merge_commit::GetMergeCommitOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetMergeCommitOutputBuilder {
    pub(crate) source_commit_id: ::std::option::Option<::std::string::String>,
    pub(crate) destination_commit_id: ::std::option::Option<::std::string::String>,
    pub(crate) base_commit_id: ::std::option::Option<::std::string::String>,
    pub(crate) merged_commit_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetMergeCommitOutputBuilder {
    /// <p>The commit ID of the source commit specifier that was used in the merge evaluation.</p>
    pub fn source_commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_commit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The commit ID of the source commit specifier that was used in the merge evaluation.</p>
    pub fn set_source_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_commit_id = input;
        self
    }
    /// <p>The commit ID of the source commit specifier that was used in the merge evaluation.</p>
    pub fn get_source_commit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_commit_id
    }
    /// <p>The commit ID of the destination commit specifier that was used in the merge evaluation.</p>
    pub fn destination_commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.destination_commit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The commit ID of the destination commit specifier that was used in the merge evaluation.</p>
    pub fn set_destination_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.destination_commit_id = input;
        self
    }
    /// <p>The commit ID of the destination commit specifier that was used in the merge evaluation.</p>
    pub fn get_destination_commit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.destination_commit_id
    }
    /// <p>The commit ID of the merge base.</p>
    pub fn base_commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.base_commit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The commit ID of the merge base.</p>
    pub fn set_base_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.base_commit_id = input;
        self
    }
    /// <p>The commit ID of the merge base.</p>
    pub fn get_base_commit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.base_commit_id
    }
    /// <p>The commit ID for the merge commit created when the source branch was merged into the destination branch. If the fast-forward merge strategy was used, there is no merge commit.</p>
    pub fn merged_commit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.merged_commit_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The commit ID for the merge commit created when the source branch was merged into the destination branch. If the fast-forward merge strategy was used, there is no merge commit.</p>
    pub fn set_merged_commit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.merged_commit_id = input;
        self
    }
    /// <p>The commit ID for the merge commit created when the source branch was merged into the destination branch. If the fast-forward merge strategy was used, there is no merge commit.</p>
    pub fn get_merged_commit_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.merged_commit_id
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetMergeCommitOutput`](crate::operation::get_merge_commit::GetMergeCommitOutput).
    pub fn build(self) -> crate::operation::get_merge_commit::GetMergeCommitOutput {
        crate::operation::get_merge_commit::GetMergeCommitOutput {
            source_commit_id: self.source_commit_id,
            destination_commit_id: self.destination_commit_id,
            base_commit_id: self.base_commit_id,
            merged_commit_id: self.merged_commit_id,
            _request_id: self._request_id,
        }
    }
}