#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssetDestinationEntry {
pub asset_id: ::std::string::String,
pub bucket: ::std::string::String,
pub key: ::std::option::Option<::std::string::String>,
}
impl AssetDestinationEntry {
pub fn asset_id(&self) -> &str {
use std::ops::Deref;
self.asset_id.deref()
}
pub fn bucket(&self) -> &str {
use std::ops::Deref;
self.bucket.deref()
}
pub fn key(&self) -> ::std::option::Option<&str> {
self.key.as_deref()
}
}
impl AssetDestinationEntry {
pub fn builder() -> crate::types::builders::AssetDestinationEntryBuilder {
crate::types::builders::AssetDestinationEntryBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AssetDestinationEntryBuilder {
pub(crate) asset_id: ::std::option::Option<::std::string::String>,
pub(crate) bucket: ::std::option::Option<::std::string::String>,
pub(crate) key: ::std::option::Option<::std::string::String>,
}
impl AssetDestinationEntryBuilder {
pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.asset_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.asset_id = input;
self
}
pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
&self.asset_id
}
pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.bucket = ::std::option::Option::Some(input.into());
self
}
pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.bucket = input;
self
}
pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
&self.bucket
}
pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key = ::std::option::Option::Some(input.into());
self
}
pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key = input;
self
}
pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
&self.key
}
pub fn build(self) -> ::std::result::Result<crate::types::AssetDestinationEntry, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::AssetDestinationEntry {
asset_id: self.asset_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"asset_id",
"asset_id was not specified but it is required when building AssetDestinationEntry",
)
})?,
bucket: self.bucket.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"bucket",
"bucket was not specified but it is required when building AssetDestinationEntry",
)
})?,
key: self.key,
})
}
}