aws_sdk_qldb/operation/get_revision/
_get_revision_input.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 GetRevisionInput {
6    /// <p>The name of the ledger.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
9    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
10    pub block_address: ::std::option::Option<crate::types::ValueHolder>,
11    /// <p>The UUID (represented in Base62-encoded text) of the document to be verified.</p>
12    pub document_id: ::std::option::Option<::std::string::String>,
13    /// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
14    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
15    pub digest_tip_address: ::std::option::Option<crate::types::ValueHolder>,
16}
17impl GetRevisionInput {
18    /// <p>The name of the ledger.</p>
19    pub fn name(&self) -> ::std::option::Option<&str> {
20        self.name.as_deref()
21    }
22    /// <p>The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
23    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
24    pub fn block_address(&self) -> ::std::option::Option<&crate::types::ValueHolder> {
25        self.block_address.as_ref()
26    }
27    /// <p>The UUID (represented in Base62-encoded text) of the document to be verified.</p>
28    pub fn document_id(&self) -> ::std::option::Option<&str> {
29        self.document_id.as_deref()
30    }
31    /// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
32    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
33    pub fn digest_tip_address(&self) -> ::std::option::Option<&crate::types::ValueHolder> {
34        self.digest_tip_address.as_ref()
35    }
36}
37impl ::std::fmt::Debug for GetRevisionInput {
38    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
39        let mut formatter = f.debug_struct("GetRevisionInput");
40        formatter.field("name", &self.name);
41        formatter.field("block_address", &"*** Sensitive Data Redacted ***");
42        formatter.field("document_id", &self.document_id);
43        formatter.field("digest_tip_address", &"*** Sensitive Data Redacted ***");
44        formatter.finish()
45    }
46}
47impl GetRevisionInput {
48    /// Creates a new builder-style object to manufacture [`GetRevisionInput`](crate::operation::get_revision::GetRevisionInput).
49    pub fn builder() -> crate::operation::get_revision::builders::GetRevisionInputBuilder {
50        crate::operation::get_revision::builders::GetRevisionInputBuilder::default()
51    }
52}
53
54/// A builder for [`GetRevisionInput`](crate::operation::get_revision::GetRevisionInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
56#[non_exhaustive]
57pub struct GetRevisionInputBuilder {
58    pub(crate) name: ::std::option::Option<::std::string::String>,
59    pub(crate) block_address: ::std::option::Option<crate::types::ValueHolder>,
60    pub(crate) document_id: ::std::option::Option<::std::string::String>,
61    pub(crate) digest_tip_address: ::std::option::Option<crate::types::ValueHolder>,
62}
63impl GetRevisionInputBuilder {
64    /// <p>The name of the ledger.</p>
65    /// This field is required.
66    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.name = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The name of the ledger.</p>
71    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.name = input;
73        self
74    }
75    /// <p>The name of the ledger.</p>
76    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.name
78    }
79    /// <p>The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
80    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
81    /// This field is required.
82    pub fn block_address(mut self, input: crate::types::ValueHolder) -> Self {
83        self.block_address = ::std::option::Option::Some(input);
84        self
85    }
86    /// <p>The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
87    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
88    pub fn set_block_address(mut self, input: ::std::option::Option<crate::types::ValueHolder>) -> Self {
89        self.block_address = input;
90        self
91    }
92    /// <p>The block location of the document revision to be verified. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
93    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:14}</code>.</p>
94    pub fn get_block_address(&self) -> &::std::option::Option<crate::types::ValueHolder> {
95        &self.block_address
96    }
97    /// <p>The UUID (represented in Base62-encoded text) of the document to be verified.</p>
98    /// This field is required.
99    pub fn document_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100        self.document_id = ::std::option::Option::Some(input.into());
101        self
102    }
103    /// <p>The UUID (represented in Base62-encoded text) of the document to be verified.</p>
104    pub fn set_document_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.document_id = input;
106        self
107    }
108    /// <p>The UUID (represented in Base62-encoded text) of the document to be verified.</p>
109    pub fn get_document_id(&self) -> &::std::option::Option<::std::string::String> {
110        &self.document_id
111    }
112    /// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
113    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
114    pub fn digest_tip_address(mut self, input: crate::types::ValueHolder) -> Self {
115        self.digest_tip_address = ::std::option::Option::Some(input);
116        self
117    }
118    /// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
119    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
120    pub fn set_digest_tip_address(mut self, input: ::std::option::Option<crate::types::ValueHolder>) -> Self {
121        self.digest_tip_address = input;
122        self
123    }
124    /// <p>The latest block location covered by the digest for which to request a proof. An address is an Amazon Ion structure that has two fields: <code>strandId</code> and <code>sequenceNo</code>.</p>
125    /// <p>For example: <code>{strandId:"BlFTjlSXze9BIh1KOszcE3",sequenceNo:49}</code>.</p>
126    pub fn get_digest_tip_address(&self) -> &::std::option::Option<crate::types::ValueHolder> {
127        &self.digest_tip_address
128    }
129    /// Consumes the builder and constructs a [`GetRevisionInput`](crate::operation::get_revision::GetRevisionInput).
130    pub fn build(self) -> ::std::result::Result<crate::operation::get_revision::GetRevisionInput, ::aws_smithy_types::error::operation::BuildError> {
131        ::std::result::Result::Ok(crate::operation::get_revision::GetRevisionInput {
132            name: self.name,
133            block_address: self.block_address,
134            document_id: self.document_id,
135            digest_tip_address: self.digest_tip_address,
136        })
137    }
138}
139impl ::std::fmt::Debug for GetRevisionInputBuilder {
140    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
141        let mut formatter = f.debug_struct("GetRevisionInputBuilder");
142        formatter.field("name", &self.name);
143        formatter.field("block_address", &"*** Sensitive Data Redacted ***");
144        formatter.field("document_id", &self.document_id);
145        formatter.field("digest_tip_address", &"*** Sensitive Data Redacted ***");
146        formatter.finish()
147    }
148}