#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetDigestOutput {
pub digest: ::aws_smithy_types::Blob,
pub digest_tip_address: ::std::option::Option<crate::types::ValueHolder>,
_request_id: Option<String>,
}
impl GetDigestOutput {
pub fn digest(&self) -> &::aws_smithy_types::Blob {
&self.digest
}
pub fn digest_tip_address(&self) -> ::std::option::Option<&crate::types::ValueHolder> {
self.digest_tip_address.as_ref()
}
}
impl ::std::fmt::Debug for GetDigestOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetDigestOutput");
formatter.field("digest", &self.digest);
formatter.field("digest_tip_address", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetDigestOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetDigestOutput {
pub fn builder() -> crate::operation::get_digest::builders::GetDigestOutputBuilder {
crate::operation::get_digest::builders::GetDigestOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct GetDigestOutputBuilder {
pub(crate) digest: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) digest_tip_address: ::std::option::Option<crate::types::ValueHolder>,
_request_id: Option<String>,
}
impl GetDigestOutputBuilder {
pub fn digest(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.digest = ::std::option::Option::Some(input);
self
}
pub fn set_digest(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.digest = input;
self
}
pub fn get_digest(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.digest
}
pub fn digest_tip_address(mut self, input: crate::types::ValueHolder) -> Self {
self.digest_tip_address = ::std::option::Option::Some(input);
self
}
pub fn set_digest_tip_address(mut self, input: ::std::option::Option<crate::types::ValueHolder>) -> Self {
self.digest_tip_address = input;
self
}
pub fn get_digest_tip_address(&self) -> &::std::option::Option<crate::types::ValueHolder> {
&self.digest_tip_address
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> ::std::result::Result<crate::operation::get_digest::GetDigestOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_digest::GetDigestOutput {
digest: self.digest.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"digest",
"digest was not specified but it is required when building GetDigestOutput",
)
})?,
digest_tip_address: self.digest_tip_address,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetDigestOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetDigestOutputBuilder");
formatter.field("digest", &self.digest);
formatter.field("digest_tip_address", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}