#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetEvidenceContentOutput {
pub content: ::aws_smithy_types::Blob,
pub content_type: ::std::string::String,
pub title: ::std::string::String,
pub checksum: ::std::option::Option<::std::string::String>,
pub version: i32,
_request_id: Option<String>,
}
impl GetEvidenceContentOutput {
pub fn content(&self) -> &::aws_smithy_types::Blob {
&self.content
}
pub fn content_type(&self) -> &str {
use std::ops::Deref;
self.content_type.deref()
}
pub fn title(&self) -> &str {
use std::ops::Deref;
self.title.deref()
}
pub fn checksum(&self) -> ::std::option::Option<&str> {
self.checksum.as_deref()
}
pub fn version(&self) -> i32 {
self.version
}
}
impl ::std::fmt::Debug for GetEvidenceContentOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetEvidenceContentOutput");
formatter.field("content", &"*** Sensitive Data Redacted ***");
formatter.field("content_type", &self.content_type);
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("checksum", &self.checksum);
formatter.field("version", &self.version);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetEvidenceContentOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetEvidenceContentOutput {
pub fn builder() -> crate::operation::get_evidence_content::builders::GetEvidenceContentOutputBuilder {
crate::operation::get_evidence_content::builders::GetEvidenceContentOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetEvidenceContentOutputBuilder {
pub(crate) content: ::std::option::Option<::aws_smithy_types::Blob>,
pub(crate) content_type: ::std::option::Option<::std::string::String>,
pub(crate) title: ::std::option::Option<::std::string::String>,
pub(crate) checksum: ::std::option::Option<::std::string::String>,
pub(crate) version: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl GetEvidenceContentOutputBuilder {
pub fn content(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.content = ::std::option::Option::Some(input);
self
}
pub fn set_content(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.content = input;
self
}
pub fn get_content(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.content
}
pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.content_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content_type = input;
self
}
pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
&self.content_type
}
pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.title = ::std::option::Option::Some(input.into());
self
}
pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.title = input;
self
}
pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
&self.title
}
pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.checksum = ::std::option::Option::Some(input.into());
self
}
pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.checksum = input;
self
}
pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
&self.checksum
}
pub fn version(mut self, input: i32) -> Self {
self.version = ::std::option::Option::Some(input);
self
}
pub fn set_version(mut self, input: ::std::option::Option<i32>) -> Self {
self.version = input;
self
}
pub fn get_version(&self) -> &::std::option::Option<i32> {
&self.version
}
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_evidence_content::GetEvidenceContentOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_evidence_content::GetEvidenceContentOutput {
content: self.content.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"content",
"content was not specified but it is required when building GetEvidenceContentOutput",
)
})?,
content_type: self.content_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"content_type",
"content_type was not specified but it is required when building GetEvidenceContentOutput",
)
})?,
title: self.title.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"title",
"title was not specified but it is required when building GetEvidenceContentOutput",
)
})?,
checksum: self.checksum,
version: self.version.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"version",
"version was not specified but it is required when building GetEvidenceContentOutput",
)
})?,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetEvidenceContentOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetEvidenceContentOutputBuilder");
formatter.field("content", &"*** Sensitive Data Redacted ***");
formatter.field("content_type", &self.content_type);
formatter.field("title", &"*** Sensitive Data Redacted ***");
formatter.field("checksum", &self.checksum);
formatter.field("version", &self.version);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}