#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Parameter {
pub parameter_name: ::std::option::Option<::std::string::String>,
pub parameter_type: ::std::option::Option<crate::types::ParameterType>,
pub parameter_value: ::std::option::Option<::std::string::String>,
pub node_type_specific_values: ::std::option::Option<::std::vec::Vec<crate::types::NodeTypeSpecificValue>>,
pub description: ::std::option::Option<::std::string::String>,
pub source: ::std::option::Option<::std::string::String>,
pub data_type: ::std::option::Option<::std::string::String>,
pub allowed_values: ::std::option::Option<::std::string::String>,
pub is_modifiable: ::std::option::Option<crate::types::IsModifiable>,
pub change_type: ::std::option::Option<crate::types::ChangeType>,
}
impl Parameter {
pub fn parameter_name(&self) -> ::std::option::Option<&str> {
self.parameter_name.as_deref()
}
pub fn parameter_type(&self) -> ::std::option::Option<&crate::types::ParameterType> {
self.parameter_type.as_ref()
}
pub fn parameter_value(&self) -> ::std::option::Option<&str> {
self.parameter_value.as_deref()
}
pub fn node_type_specific_values(&self) -> &[crate::types::NodeTypeSpecificValue] {
self.node_type_specific_values.as_deref().unwrap_or_default()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn source(&self) -> ::std::option::Option<&str> {
self.source.as_deref()
}
pub fn data_type(&self) -> ::std::option::Option<&str> {
self.data_type.as_deref()
}
pub fn allowed_values(&self) -> ::std::option::Option<&str> {
self.allowed_values.as_deref()
}
pub fn is_modifiable(&self) -> ::std::option::Option<&crate::types::IsModifiable> {
self.is_modifiable.as_ref()
}
pub fn change_type(&self) -> ::std::option::Option<&crate::types::ChangeType> {
self.change_type.as_ref()
}
}
impl Parameter {
pub fn builder() -> crate::types::builders::ParameterBuilder {
crate::types::builders::ParameterBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ParameterBuilder {
pub(crate) parameter_name: ::std::option::Option<::std::string::String>,
pub(crate) parameter_type: ::std::option::Option<crate::types::ParameterType>,
pub(crate) parameter_value: ::std::option::Option<::std::string::String>,
pub(crate) node_type_specific_values: ::std::option::Option<::std::vec::Vec<crate::types::NodeTypeSpecificValue>>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) source: ::std::option::Option<::std::string::String>,
pub(crate) data_type: ::std::option::Option<::std::string::String>,
pub(crate) allowed_values: ::std::option::Option<::std::string::String>,
pub(crate) is_modifiable: ::std::option::Option<crate::types::IsModifiable>,
pub(crate) change_type: ::std::option::Option<crate::types::ChangeType>,
}
impl ParameterBuilder {
pub fn parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.parameter_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.parameter_name = input;
self
}
pub fn get_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
&self.parameter_name
}
pub fn parameter_type(mut self, input: crate::types::ParameterType) -> Self {
self.parameter_type = ::std::option::Option::Some(input);
self
}
pub fn set_parameter_type(mut self, input: ::std::option::Option<crate::types::ParameterType>) -> Self {
self.parameter_type = input;
self
}
pub fn get_parameter_type(&self) -> &::std::option::Option<crate::types::ParameterType> {
&self.parameter_type
}
pub fn parameter_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.parameter_value = ::std::option::Option::Some(input.into());
self
}
pub fn set_parameter_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.parameter_value = input;
self
}
pub fn get_parameter_value(&self) -> &::std::option::Option<::std::string::String> {
&self.parameter_value
}
pub fn node_type_specific_values(mut self, input: crate::types::NodeTypeSpecificValue) -> Self {
let mut v = self.node_type_specific_values.unwrap_or_default();
v.push(input);
self.node_type_specific_values = ::std::option::Option::Some(v);
self
}
pub fn set_node_type_specific_values(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::NodeTypeSpecificValue>>) -> Self {
self.node_type_specific_values = input;
self
}
pub fn get_node_type_specific_values(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::NodeTypeSpecificValue>> {
&self.node_type_specific_values
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source = ::std::option::Option::Some(input.into());
self
}
pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source = input;
self
}
pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
&self.source
}
pub fn data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_type = input;
self
}
pub fn get_data_type(&self) -> &::std::option::Option<::std::string::String> {
&self.data_type
}
pub fn allowed_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.allowed_values = ::std::option::Option::Some(input.into());
self
}
pub fn set_allowed_values(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.allowed_values = input;
self
}
pub fn get_allowed_values(&self) -> &::std::option::Option<::std::string::String> {
&self.allowed_values
}
pub fn is_modifiable(mut self, input: crate::types::IsModifiable) -> Self {
self.is_modifiable = ::std::option::Option::Some(input);
self
}
pub fn set_is_modifiable(mut self, input: ::std::option::Option<crate::types::IsModifiable>) -> Self {
self.is_modifiable = input;
self
}
pub fn get_is_modifiable(&self) -> &::std::option::Option<crate::types::IsModifiable> {
&self.is_modifiable
}
pub fn change_type(mut self, input: crate::types::ChangeType) -> Self {
self.change_type = ::std::option::Option::Some(input);
self
}
pub fn set_change_type(mut self, input: ::std::option::Option<crate::types::ChangeType>) -> Self {
self.change_type = input;
self
}
pub fn get_change_type(&self) -> &::std::option::Option<crate::types::ChangeType> {
&self.change_type
}
pub fn build(self) -> crate::types::Parameter {
crate::types::Parameter {
parameter_name: self.parameter_name,
parameter_type: self.parameter_type,
parameter_value: self.parameter_value,
node_type_specific_values: self.node_type_specific_values,
description: self.description,
source: self.source,
data_type: self.data_type,
allowed_values: self.allowed_values,
is_modifiable: self.is_modifiable,
change_type: self.change_type,
}
}
}