aws_sdk_qldb/operation/get_digest/
_get_digest_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct GetDigestOutput {
6 pub digest: ::aws_smithy_types::Blob,
8 pub digest_tip_address: ::std::option::Option<crate::types::ValueHolder>,
10 _request_id: Option<String>,
11}
12impl GetDigestOutput {
13 pub fn digest(&self) -> &::aws_smithy_types::Blob {
15 &self.digest
16 }
17 pub fn digest_tip_address(&self) -> ::std::option::Option<&crate::types::ValueHolder> {
19 self.digest_tip_address.as_ref()
20 }
21}
22impl ::std::fmt::Debug for GetDigestOutput {
23 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24 let mut formatter = f.debug_struct("GetDigestOutput");
25 formatter.field("digest", &self.digest);
26 formatter.field("digest_tip_address", &"*** Sensitive Data Redacted ***");
27 formatter.field("_request_id", &self._request_id);
28 formatter.finish()
29 }
30}
31impl ::aws_types::request_id::RequestId for GetDigestOutput {
32 fn request_id(&self) -> Option<&str> {
33 self._request_id.as_deref()
34 }
35}
36impl GetDigestOutput {
37 pub fn builder() -> crate::operation::get_digest::builders::GetDigestOutputBuilder {
39 crate::operation::get_digest::builders::GetDigestOutputBuilder::default()
40 }
41}
42
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct GetDigestOutputBuilder {
47 pub(crate) digest: ::std::option::Option<::aws_smithy_types::Blob>,
48 pub(crate) digest_tip_address: ::std::option::Option<crate::types::ValueHolder>,
49 _request_id: Option<String>,
50}
51impl GetDigestOutputBuilder {
52 pub fn digest(mut self, input: ::aws_smithy_types::Blob) -> Self {
55 self.digest = ::std::option::Option::Some(input);
56 self
57 }
58 pub fn set_digest(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
60 self.digest = input;
61 self
62 }
63 pub fn get_digest(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
65 &self.digest
66 }
67 pub fn digest_tip_address(mut self, input: crate::types::ValueHolder) -> Self {
70 self.digest_tip_address = ::std::option::Option::Some(input);
71 self
72 }
73 pub fn set_digest_tip_address(mut self, input: ::std::option::Option<crate::types::ValueHolder>) -> Self {
75 self.digest_tip_address = input;
76 self
77 }
78 pub fn get_digest_tip_address(&self) -> &::std::option::Option<crate::types::ValueHolder> {
80 &self.digest_tip_address
81 }
82 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
83 self._request_id = Some(request_id.into());
84 self
85 }
86
87 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
88 self._request_id = request_id;
89 self
90 }
91 pub fn build(self) -> ::std::result::Result<crate::operation::get_digest::GetDigestOutput, ::aws_smithy_types::error::operation::BuildError> {
95 ::std::result::Result::Ok(crate::operation::get_digest::GetDigestOutput {
96 digest: self.digest.ok_or_else(|| {
97 ::aws_smithy_types::error::operation::BuildError::missing_field(
98 "digest",
99 "digest was not specified but it is required when building GetDigestOutput",
100 )
101 })?,
102 digest_tip_address: self.digest_tip_address,
103 _request_id: self._request_id,
104 })
105 }
106}
107impl ::std::fmt::Debug for GetDigestOutputBuilder {
108 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
109 let mut formatter = f.debug_struct("GetDigestOutputBuilder");
110 formatter.field("digest", &self.digest);
111 formatter.field("digest_tip_address", &"*** Sensitive Data Redacted ***");
112 formatter.field("_request_id", &self._request_id);
113 formatter.finish()
114 }
115}