#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Attribute {
pub attribute_type: ::std::option::Option<crate::types::InstanceAttributeType>,
pub value: ::std::option::Option<::std::string::String>,
}
impl Attribute {
pub fn attribute_type(&self) -> ::std::option::Option<&crate::types::InstanceAttributeType> {
self.attribute_type.as_ref()
}
pub fn value(&self) -> ::std::option::Option<&str> {
self.value.as_deref()
}
}
impl Attribute {
pub fn builder() -> crate::types::builders::AttributeBuilder {
crate::types::builders::AttributeBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AttributeBuilder {
pub(crate) attribute_type: ::std::option::Option<crate::types::InstanceAttributeType>,
pub(crate) value: ::std::option::Option<::std::string::String>,
}
impl AttributeBuilder {
pub fn attribute_type(mut self, input: crate::types::InstanceAttributeType) -> Self {
self.attribute_type = ::std::option::Option::Some(input);
self
}
pub fn set_attribute_type(mut self, input: ::std::option::Option<crate::types::InstanceAttributeType>) -> Self {
self.attribute_type = input;
self
}
pub fn get_attribute_type(&self) -> &::std::option::Option<crate::types::InstanceAttributeType> {
&self.attribute_type
}
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::Attribute {
crate::types::Attribute {
attribute_type: self.attribute_type,
value: self.value,
}
}
}