#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StorageLocation {
pub bucket: ::std::option::Option<::std::string::String>,
pub key: ::std::option::Option<::std::string::String>,
}
impl StorageLocation {
pub fn bucket(&self) -> ::std::option::Option<&str> {
self.bucket.as_deref()
}
pub fn key(&self) -> ::std::option::Option<&str> {
self.key.as_deref()
}
}
impl StorageLocation {
pub fn builder() -> crate::types::builders::StorageLocationBuilder {
crate::types::builders::StorageLocationBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StorageLocationBuilder {
pub(crate) bucket: ::std::option::Option<::std::string::String>,
pub(crate) key: ::std::option::Option<::std::string::String>,
}
impl StorageLocationBuilder {
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) -> crate::types::StorageLocation {
crate::types::StorageLocation {
bucket: self.bucket,
key: self.key,
}
}
}