#[non_exhaustive]pub struct ParameterSpec {
pub parameter_id: String,
pub scale_type: ScaleType,
pub conditional_parameter_specs: Vec<ConditionalParameterSpec>,
pub parameter_value_spec: Option<ParameterValueSpec>,
/* private fields */
}Expand description
Represents a single parameter to optimize.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parameter_id: StringRequired. The ID of the parameter. Must not contain whitespaces and must be unique amongst all ParameterSpecs.
scale_type: ScaleTypeHow the parameter should be scaled.
Leave unset for CATEGORICAL parameters.
conditional_parameter_specs: Vec<ConditionalParameterSpec>A conditional parameter node is active if the parameter’s value matches the conditional node’s parent_value_condition.
If two items in conditional_parameter_specs have the same name, they must have disjoint parent_value_condition.
parameter_value_spec: Option<ParameterValueSpec>Implementations§
Source§impl ParameterSpec
impl ParameterSpec
pub fn new() -> Self
Sourcepub fn set_parameter_id<T: Into<String>>(self, v: T) -> Self
pub fn set_parameter_id<T: Into<String>>(self, v: T) -> Self
Sets the value of parameter_id.
Sourcepub fn set_scale_type<T: Into<ScaleType>>(self, v: T) -> Self
pub fn set_scale_type<T: Into<ScaleType>>(self, v: T) -> Self
Sets the value of scale_type.
Sourcepub fn set_conditional_parameter_specs<T, V>(self, v: T) -> Self
pub fn set_conditional_parameter_specs<T, V>(self, v: T) -> Self
Sets the value of conditional_parameter_specs.
Sourcepub fn set_parameter_value_spec<T: Into<Option<ParameterValueSpec>>>(
self,
v: T,
) -> Self
pub fn set_parameter_value_spec<T: Into<Option<ParameterValueSpec>>>( self, v: T, ) -> Self
Sets the value of parameter_value_spec.
Note that all the setters affecting parameter_value_spec are mutually
exclusive.
Sourcepub fn double_value_spec(&self) -> Option<&Box<DoubleValueSpec>>
pub fn double_value_spec(&self) -> Option<&Box<DoubleValueSpec>>
The value of parameter_value_spec
if it holds a DoubleValueSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_double_value_spec<T: Into<Box<DoubleValueSpec>>>(self, v: T) -> Self
pub fn set_double_value_spec<T: Into<Box<DoubleValueSpec>>>(self, v: T) -> Self
Sets the value of parameter_value_spec
to hold a DoubleValueSpec.
Note that all the setters affecting parameter_value_spec are
mutually exclusive.
Sourcepub fn integer_value_spec(&self) -> Option<&Box<IntegerValueSpec>>
pub fn integer_value_spec(&self) -> Option<&Box<IntegerValueSpec>>
The value of parameter_value_spec
if it holds a IntegerValueSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_integer_value_spec<T: Into<Box<IntegerValueSpec>>>(
self,
v: T,
) -> Self
pub fn set_integer_value_spec<T: Into<Box<IntegerValueSpec>>>( self, v: T, ) -> Self
Sets the value of parameter_value_spec
to hold a IntegerValueSpec.
Note that all the setters affecting parameter_value_spec are
mutually exclusive.
Sourcepub fn categorical_value_spec(&self) -> Option<&Box<CategoricalValueSpec>>
pub fn categorical_value_spec(&self) -> Option<&Box<CategoricalValueSpec>>
The value of parameter_value_spec
if it holds a CategoricalValueSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_categorical_value_spec<T: Into<Box<CategoricalValueSpec>>>(
self,
v: T,
) -> Self
pub fn set_categorical_value_spec<T: Into<Box<CategoricalValueSpec>>>( self, v: T, ) -> Self
Sets the value of parameter_value_spec
to hold a CategoricalValueSpec.
Note that all the setters affecting parameter_value_spec are
mutually exclusive.
Sourcepub fn discrete_value_spec(&self) -> Option<&Box<DiscreteValueSpec>>
pub fn discrete_value_spec(&self) -> Option<&Box<DiscreteValueSpec>>
The value of parameter_value_spec
if it holds a DiscreteValueSpec, None if the field is not set or
holds a different branch.
Sourcepub fn set_discrete_value_spec<T: Into<Box<DiscreteValueSpec>>>(
self,
v: T,
) -> Self
pub fn set_discrete_value_spec<T: Into<Box<DiscreteValueSpec>>>( self, v: T, ) -> Self
Sets the value of parameter_value_spec
to hold a DiscreteValueSpec.
Note that all the setters affecting parameter_value_spec are
mutually exclusive.
Trait Implementations§
Source§impl Clone for ParameterSpec
impl Clone for ParameterSpec
Source§fn clone(&self) -> ParameterSpec
fn clone(&self) -> ParameterSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more