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.

/// <p>Returns information about a set of differences for a commit specifier.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Difference {
    /// <p>Information about a <code>beforeBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub before_blob: ::std::option::Option<crate::types::BlobMetadata>,
    /// <p>Information about an <code>afterBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub after_blob: ::std::option::Option<crate::types::BlobMetadata>,
    /// <p>Whether the change type of the difference is an addition (A), deletion (D), or modification (M).</p>
    pub change_type: ::std::option::Option<crate::types::ChangeTypeEnum>,
}
impl Difference {
    /// <p>Information about a <code>beforeBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub fn before_blob(&self) -> ::std::option::Option<&crate::types::BlobMetadata> {
        self.before_blob.as_ref()
    }
    /// <p>Information about an <code>afterBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub fn after_blob(&self) -> ::std::option::Option<&crate::types::BlobMetadata> {
        self.after_blob.as_ref()
    }
    /// <p>Whether the change type of the difference is an addition (A), deletion (D), or modification (M).</p>
    pub fn change_type(&self) -> ::std::option::Option<&crate::types::ChangeTypeEnum> {
        self.change_type.as_ref()
    }
}
impl Difference {
    /// Creates a new builder-style object to manufacture [`Difference`](crate::types::Difference).
    pub fn builder() -> crate::types::builders::DifferenceBuilder {
        crate::types::builders::DifferenceBuilder::default()
    }
}

/// A builder for [`Difference`](crate::types::Difference).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DifferenceBuilder {
    pub(crate) before_blob: ::std::option::Option<crate::types::BlobMetadata>,
    pub(crate) after_blob: ::std::option::Option<crate::types::BlobMetadata>,
    pub(crate) change_type: ::std::option::Option<crate::types::ChangeTypeEnum>,
}
impl DifferenceBuilder {
    /// <p>Information about a <code>beforeBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub fn before_blob(mut self, input: crate::types::BlobMetadata) -> Self {
        self.before_blob = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about a <code>beforeBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub fn set_before_blob(mut self, input: ::std::option::Option<crate::types::BlobMetadata>) -> Self {
        self.before_blob = input;
        self
    }
    /// <p>Information about a <code>beforeBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub fn get_before_blob(&self) -> &::std::option::Option<crate::types::BlobMetadata> {
        &self.before_blob
    }
    /// <p>Information about an <code>afterBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub fn after_blob(mut self, input: crate::types::BlobMetadata) -> Self {
        self.after_blob = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about an <code>afterBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub fn set_after_blob(mut self, input: ::std::option::Option<crate::types::BlobMetadata>) -> Self {
        self.after_blob = input;
        self
    }
    /// <p>Information about an <code>afterBlob</code> data type object, including the ID, the file mode permission code, and the path.</p>
    pub fn get_after_blob(&self) -> &::std::option::Option<crate::types::BlobMetadata> {
        &self.after_blob
    }
    /// <p>Whether the change type of the difference is an addition (A), deletion (D), or modification (M).</p>
    pub fn change_type(mut self, input: crate::types::ChangeTypeEnum) -> Self {
        self.change_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether the change type of the difference is an addition (A), deletion (D), or modification (M).</p>
    pub fn set_change_type(mut self, input: ::std::option::Option<crate::types::ChangeTypeEnum>) -> Self {
        self.change_type = input;
        self
    }
    /// <p>Whether the change type of the difference is an addition (A), deletion (D), or modification (M).</p>
    pub fn get_change_type(&self) -> &::std::option::Option<crate::types::ChangeTypeEnum> {
        &self.change_type
    }
    /// Consumes the builder and constructs a [`Difference`](crate::types::Difference).
    pub fn build(self) -> crate::types::Difference {
        crate::types::Difference {
            before_blob: self.before_blob,
            after_blob: self.after_blob,
            change_type: self.change_type,
        }
    }
}