#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAssetContentOutput {
pub content: ::std::option::Option<crate::types::AssetZipContent>,
pub version: i32,
_request_id: Option<String>,
}
impl GetAssetContentOutput {
pub fn content(&self) -> ::std::option::Option<&crate::types::AssetZipContent> {
self.content.as_ref()
}
pub fn version(&self) -> i32 {
self.version
}
}
impl ::aws_types::request_id::RequestId for GetAssetContentOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetAssetContentOutput {
pub fn builder() -> crate::operation::get_asset_content::builders::GetAssetContentOutputBuilder {
crate::operation::get_asset_content::builders::GetAssetContentOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAssetContentOutputBuilder {
pub(crate) content: ::std::option::Option<crate::types::AssetZipContent>,
pub(crate) version: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl GetAssetContentOutputBuilder {
pub fn content(mut self, input: crate::types::AssetZipContent) -> Self {
self.content = ::std::option::Option::Some(input);
self
}
pub fn set_content(mut self, input: ::std::option::Option<crate::types::AssetZipContent>) -> Self {
self.content = input;
self
}
pub fn get_content(&self) -> &::std::option::Option<crate::types::AssetZipContent> {
&self.content
}
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_asset_content::GetAssetContentOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_asset_content::GetAssetContentOutput {
content: self.content,
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 GetAssetContentOutput",
)
})?,
_request_id: self._request_id,
})
}
}