1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// 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,
}
}
}