#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetDocumentContentOutput {
pub mime_type: ::std::string::String,
pub presigned_url: ::std::string::String,
pub document_content_length: ::std::option::Option<i64>,
_request_id: Option<String>,
}
impl GetDocumentContentOutput {
pub fn mime_type(&self) -> &str {
use std::ops::Deref;
self.mime_type.deref()
}
pub fn presigned_url(&self) -> &str {
use std::ops::Deref;
self.presigned_url.deref()
}
pub fn document_content_length(&self) -> ::std::option::Option<i64> {
self.document_content_length
}
}
impl ::std::fmt::Debug for GetDocumentContentOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetDocumentContentOutput");
formatter.field("mime_type", &self.mime_type);
formatter.field("presigned_url", &"*** Sensitive Data Redacted ***");
formatter.field("document_content_length", &self.document_content_length);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetDocumentContentOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetDocumentContentOutput {
pub fn builder() -> crate::operation::get_document_content::builders::GetDocumentContentOutputBuilder {
crate::operation::get_document_content::builders::GetDocumentContentOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetDocumentContentOutputBuilder {
pub(crate) mime_type: ::std::option::Option<::std::string::String>,
pub(crate) presigned_url: ::std::option::Option<::std::string::String>,
pub(crate) document_content_length: ::std::option::Option<i64>,
_request_id: Option<String>,
}
impl GetDocumentContentOutputBuilder {
pub fn mime_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.mime_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_mime_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.mime_type = input;
self
}
pub fn get_mime_type(&self) -> &::std::option::Option<::std::string::String> {
&self.mime_type
}
pub fn presigned_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.presigned_url = ::std::option::Option::Some(input.into());
self
}
pub fn set_presigned_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.presigned_url = input;
self
}
pub fn get_presigned_url(&self) -> &::std::option::Option<::std::string::String> {
&self.presigned_url
}
pub fn document_content_length(mut self, input: i64) -> Self {
self.document_content_length = ::std::option::Option::Some(input);
self
}
pub fn set_document_content_length(mut self, input: ::std::option::Option<i64>) -> Self {
self.document_content_length = input;
self
}
pub fn get_document_content_length(&self) -> &::std::option::Option<i64> {
&self.document_content_length
}
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_document_content::GetDocumentContentOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_document_content::GetDocumentContentOutput {
mime_type: self.mime_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"mime_type",
"mime_type was not specified but it is required when building GetDocumentContentOutput",
)
})?,
presigned_url: self.presigned_url.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"presigned_url",
"presigned_url was not specified but it is required when building GetDocumentContentOutput",
)
})?,
document_content_length: self.document_content_length,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetDocumentContentOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetDocumentContentOutputBuilder");
formatter.field("mime_type", &self.mime_type);
formatter.field("presigned_url", &"*** Sensitive Data Redacted ***");
formatter.field("document_content_length", &self.document_content_length);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}