#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Tag {
pub key: ::std::option::Option<::std::string::String>,
pub value: ::std::option::Option<::std::string::String>,
}
impl Tag {
pub fn key(&self) -> ::std::option::Option<&str> {
self.key.as_deref()
}
pub fn value(&self) -> ::std::option::Option<&str> {
self.value.as_deref()
}
}
impl Tag {
pub fn builder() -> crate::types::builders::TagBuilder {
crate::types::builders::TagBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TagBuilder {
pub(crate) key: ::std::option::Option<::std::string::String>,
pub(crate) value: ::std::option::Option<::std::string::String>,
}
impl TagBuilder {
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 value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.value = ::std::option::Option::Some(input.into());
self
}
pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.value = input;
self
}
pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
&self.value
}
pub fn build(self) -> crate::types::Tag {
crate::types::Tag {
key: self.key,
value: self.value,
}
}
}