#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ETag {
pub algorithm: ::std::option::Option<crate::types::ETagAlgorithm>,
pub source1: ::std::option::Option<::std::string::String>,
pub source2: ::std::option::Option<::std::string::String>,
}
impl ETag {
pub fn algorithm(&self) -> ::std::option::Option<&crate::types::ETagAlgorithm> {
self.algorithm.as_ref()
}
pub fn source1(&self) -> ::std::option::Option<&str> {
self.source1.as_deref()
}
pub fn source2(&self) -> ::std::option::Option<&str> {
self.source2.as_deref()
}
}
impl ETag {
pub fn builder() -> crate::types::builders::ETagBuilder {
crate::types::builders::ETagBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ETagBuilder {
pub(crate) algorithm: ::std::option::Option<crate::types::ETagAlgorithm>,
pub(crate) source1: ::std::option::Option<::std::string::String>,
pub(crate) source2: ::std::option::Option<::std::string::String>,
}
impl ETagBuilder {
pub fn algorithm(mut self, input: crate::types::ETagAlgorithm) -> Self {
self.algorithm = ::std::option::Option::Some(input);
self
}
pub fn set_algorithm(mut self, input: ::std::option::Option<crate::types::ETagAlgorithm>) -> Self {
self.algorithm = input;
self
}
pub fn get_algorithm(&self) -> &::std::option::Option<crate::types::ETagAlgorithm> {
&self.algorithm
}
pub fn source1(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source1 = ::std::option::Option::Some(input.into());
self
}
pub fn set_source1(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source1 = input;
self
}
pub fn get_source1(&self) -> &::std::option::Option<::std::string::String> {
&self.source1
}
pub fn source2(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source2 = ::std::option::Option::Some(input.into());
self
}
pub fn set_source2(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source2 = input;
self
}
pub fn get_source2(&self) -> &::std::option::Option<::std::string::String> {
&self.source2
}
pub fn build(self) -> crate::types::ETag {
crate::types::ETag {
algorithm: self.algorithm,
source1: self.source1,
source2: self.source2,
}
}
}