aws_sdk_qldb/operation/get_revision/
_get_revision_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetRevisionOutput {
6    /// <p>The proof object in Amazon Ion format returned by a <code>GetRevision</code> request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.</p>
7    pub proof: ::std::option::Option<crate::types::ValueHolder>,
8    /// <p>The document revision data object in Amazon Ion format.</p>
9    pub revision: ::std::option::Option<crate::types::ValueHolder>,
10    _request_id: Option<String>,
11}
12impl GetRevisionOutput {
13    /// <p>The proof object in Amazon Ion format returned by a <code>GetRevision</code> request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.</p>
14    pub fn proof(&self) -> ::std::option::Option<&crate::types::ValueHolder> {
15        self.proof.as_ref()
16    }
17    /// <p>The document revision data object in Amazon Ion format.</p>
18    pub fn revision(&self) -> ::std::option::Option<&crate::types::ValueHolder> {
19        self.revision.as_ref()
20    }
21}
22impl ::std::fmt::Debug for GetRevisionOutput {
23    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24        let mut formatter = f.debug_struct("GetRevisionOutput");
25        formatter.field("proof", &"*** Sensitive Data Redacted ***");
26        formatter.field("revision", &"*** Sensitive Data Redacted ***");
27        formatter.field("_request_id", &self._request_id);
28        formatter.finish()
29    }
30}
31impl ::aws_types::request_id::RequestId for GetRevisionOutput {
32    fn request_id(&self) -> Option<&str> {
33        self._request_id.as_deref()
34    }
35}
36impl GetRevisionOutput {
37    /// Creates a new builder-style object to manufacture [`GetRevisionOutput`](crate::operation::get_revision::GetRevisionOutput).
38    pub fn builder() -> crate::operation::get_revision::builders::GetRevisionOutputBuilder {
39        crate::operation::get_revision::builders::GetRevisionOutputBuilder::default()
40    }
41}
42
43/// A builder for [`GetRevisionOutput`](crate::operation::get_revision::GetRevisionOutput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct GetRevisionOutputBuilder {
47    pub(crate) proof: ::std::option::Option<crate::types::ValueHolder>,
48    pub(crate) revision: ::std::option::Option<crate::types::ValueHolder>,
49    _request_id: Option<String>,
50}
51impl GetRevisionOutputBuilder {
52    /// <p>The proof object in Amazon Ion format returned by a <code>GetRevision</code> request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.</p>
53    pub fn proof(mut self, input: crate::types::ValueHolder) -> Self {
54        self.proof = ::std::option::Option::Some(input);
55        self
56    }
57    /// <p>The proof object in Amazon Ion format returned by a <code>GetRevision</code> request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.</p>
58    pub fn set_proof(mut self, input: ::std::option::Option<crate::types::ValueHolder>) -> Self {
59        self.proof = input;
60        self
61    }
62    /// <p>The proof object in Amazon Ion format returned by a <code>GetRevision</code> request. A proof contains the list of hash values that are required to recalculate the specified digest using a Merkle tree, starting with the specified document revision.</p>
63    pub fn get_proof(&self) -> &::std::option::Option<crate::types::ValueHolder> {
64        &self.proof
65    }
66    /// <p>The document revision data object in Amazon Ion format.</p>
67    /// This field is required.
68    pub fn revision(mut self, input: crate::types::ValueHolder) -> Self {
69        self.revision = ::std::option::Option::Some(input);
70        self
71    }
72    /// <p>The document revision data object in Amazon Ion format.</p>
73    pub fn set_revision(mut self, input: ::std::option::Option<crate::types::ValueHolder>) -> Self {
74        self.revision = input;
75        self
76    }
77    /// <p>The document revision data object in Amazon Ion format.</p>
78    pub fn get_revision(&self) -> &::std::option::Option<crate::types::ValueHolder> {
79        &self.revision
80    }
81    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
82        self._request_id = Some(request_id.into());
83        self
84    }
85
86    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
87        self._request_id = request_id;
88        self
89    }
90    /// Consumes the builder and constructs a [`GetRevisionOutput`](crate::operation::get_revision::GetRevisionOutput).
91    pub fn build(self) -> crate::operation::get_revision::GetRevisionOutput {
92        crate::operation::get_revision::GetRevisionOutput {
93            proof: self.proof,
94            revision: self.revision,
95            _request_id: self._request_id,
96        }
97    }
98}
99impl ::std::fmt::Debug for GetRevisionOutputBuilder {
100    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
101        let mut formatter = f.debug_struct("GetRevisionOutputBuilder");
102        formatter.field("proof", &"*** Sensitive Data Redacted ***");
103        formatter.field("revision", &"*** Sensitive Data Redacted ***");
104        formatter.field("_request_id", &self._request_id);
105        formatter.finish()
106    }
107}