#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct SampleOutput {
pub content_type: ::std::option::Option<::std::string::String>,
pub body: ::aws_smithy_types::Blob,
_request_id: Option<String>,
}
impl SampleOutput {
pub fn content_type(&self) -> ::std::option::Option<&str> {
self.content_type.as_deref()
}
pub fn body(&self) -> &::aws_smithy_types::Blob {
&self.body
}
}
impl ::std::fmt::Debug for SampleOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SampleOutput");
formatter.field("content_type", &self.content_type);
formatter.field("body", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for SampleOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl SampleOutput {
pub fn builder() -> crate::operation::sample::builders::SampleOutputBuilder {
crate::operation::sample::builders::SampleOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct SampleOutputBuilder {
pub(crate) content_type: ::std::option::Option<::std::string::String>,
pub(crate) body: ::std::option::Option<::aws_smithy_types::Blob>,
_request_id: Option<String>,
}
impl SampleOutputBuilder {
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 body(mut self, input: ::aws_smithy_types::Blob) -> Self {
self.body = ::std::option::Option::Some(input);
self
}
pub fn set_body(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
self.body = input;
self
}
pub fn get_body(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
&self.body
}
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::sample::SampleOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::sample::SampleOutput {
content_type: self.content_type,
body: self.body.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"body",
"body was not specified but it is required when building SampleOutput",
)
})?,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for SampleOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("SampleOutputBuilder");
formatter.field("content_type", &self.content_type);
formatter.field("body", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}