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>The entity tag (ETag) is a hash of the object representing its semantic content.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ETag {
    /// <p>The algorithm used to calculate the read set’s ETag(s).</p>
    pub algorithm: ::std::option::Option<crate::types::ETagAlgorithm>,
    /// <p>The ETag hash calculated on Source1 of the read set.</p>
    pub source1: ::std::option::Option<::std::string::String>,
    /// <p>The ETag hash calculated on Source2 of the read set.</p>
    pub source2: ::std::option::Option<::std::string::String>,
}
impl ETag {
    /// <p>The algorithm used to calculate the read set’s ETag(s).</p>
    pub fn algorithm(&self) -> ::std::option::Option<&crate::types::ETagAlgorithm> {
        self.algorithm.as_ref()
    }
    /// <p>The ETag hash calculated on Source1 of the read set.</p>
    pub fn source1(&self) -> ::std::option::Option<&str> {
        self.source1.as_deref()
    }
    /// <p>The ETag hash calculated on Source2 of the read set.</p>
    pub fn source2(&self) -> ::std::option::Option<&str> {
        self.source2.as_deref()
    }
}
impl ETag {
    /// Creates a new builder-style object to manufacture [`ETag`](crate::types::ETag).
    pub fn builder() -> crate::types::builders::ETagBuilder {
        crate::types::builders::ETagBuilder::default()
    }
}

/// A builder for [`ETag`](crate::types::ETag).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ETagBuilder {
    pub(crate) algorithm: ::std::option::Option<crate::types::ETagAlgorithm>,
    pub(crate) source1: ::std::option::Option<::std::string::String>,
    pub(crate) source2: ::std::option::Option<::std::string::String>,
}
impl ETagBuilder {
    /// <p>The algorithm used to calculate the read set’s ETag(s).</p>
    pub fn algorithm(mut self, input: crate::types::ETagAlgorithm) -> Self {
        self.algorithm = ::std::option::Option::Some(input);
        self
    }
    /// <p>The algorithm used to calculate the read set’s ETag(s).</p>
    pub fn set_algorithm(mut self, input: ::std::option::Option<crate::types::ETagAlgorithm>) -> Self {
        self.algorithm = input;
        self
    }
    /// <p>The algorithm used to calculate the read set’s ETag(s).</p>
    pub fn get_algorithm(&self) -> &::std::option::Option<crate::types::ETagAlgorithm> {
        &self.algorithm
    }
    /// <p>The ETag hash calculated on Source1 of the read set.</p>
    pub fn source1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source1 = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ETag hash calculated on Source1 of the read set.</p>
    pub fn set_source1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source1 = input;
        self
    }
    /// <p>The ETag hash calculated on Source1 of the read set.</p>
    pub fn get_source1(&self) -> &::std::option::Option<::std::string::String> {
        &self.source1
    }
    /// <p>The ETag hash calculated on Source2 of the read set.</p>
    pub fn source2(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source2 = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ETag hash calculated on Source2 of the read set.</p>
    pub fn set_source2(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source2 = input;
        self
    }
    /// <p>The ETag hash calculated on Source2 of the read set.</p>
    pub fn get_source2(&self) -> &::std::option::Option<::std::string::String> {
        &self.source2
    }
    /// Consumes the builder and constructs a [`ETag`](crate::types::ETag).
    pub fn build(self) -> crate::types::ETag {
        crate::types::ETag {
            algorithm: self.algorithm,
            source1: self.source1,
            source2: self.source2,
        }
    }
}