#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SendApiAssetOutput {
pub body: ::std::option::Option<::std::string::String>,
pub response_headers: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl SendApiAssetOutput {
pub fn body(&self) -> ::std::option::Option<&str> {
self.body.as_deref()
}
pub fn response_headers(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.response_headers.as_ref()
}
}
impl ::aws_types::request_id::RequestId for SendApiAssetOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl SendApiAssetOutput {
pub fn builder() -> crate::operation::send_api_asset::builders::SendApiAssetOutputBuilder {
crate::operation::send_api_asset::builders::SendApiAssetOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SendApiAssetOutputBuilder {
pub(crate) body: ::std::option::Option<::std::string::String>,
pub(crate) response_headers: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl SendApiAssetOutputBuilder {
pub fn body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.body = ::std::option::Option::Some(input.into());
self
}
pub fn set_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.body = input;
self
}
pub fn get_body(&self) -> &::std::option::Option<::std::string::String> {
&self.body
}
pub fn response_headers(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.response_headers.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.response_headers = ::std::option::Option::Some(hash_map);
self
}
pub fn set_response_headers(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.response_headers = input;
self
}
pub fn get_response_headers(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.response_headers
}
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) -> crate::operation::send_api_asset::SendApiAssetOutput {
crate::operation::send_api_asset::SendApiAssetOutput {
body: self.body,
response_headers: self.response_headers,
_request_id: self._request_id,
}
}
}