#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Configuration {
pub classification: ::std::option::Option<::std::string::String>,
pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl Configuration {
pub fn classification(&self) -> ::std::option::Option<&str> {
self.classification.as_deref()
}
pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.properties.as_ref()
}
}
impl Configuration {
pub fn builder() -> crate::types::builders::ConfigurationBuilder {
crate::types::builders::ConfigurationBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ConfigurationBuilder {
pub(crate) classification: ::std::option::Option<::std::string::String>,
pub(crate) properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl ConfigurationBuilder {
pub fn classification(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.classification = ::std::option::Option::Some(input.into());
self
}
pub fn set_classification(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.classification = input;
self
}
pub fn get_classification(&self) -> &::std::option::Option<::std::string::String> {
&self.classification
}
pub fn properties(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.properties.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.properties = ::std::option::Option::Some(hash_map);
self
}
pub fn set_properties(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.properties = input;
self
}
pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.properties
}
pub fn build(self) -> crate::types::Configuration {
crate::types::Configuration {
classification: self.classification,
properties: self.properties,
}
}
}