#[non_exhaustive]pub struct ConditionalParameterSpec {
pub parameter_spec: Option<Box<ParameterSpec>>,
pub parent_value_condition: Option<ParentValueCondition>,
/* private fields */
}job-service or vizier-service only.Expand description
Represents a parameter spec with condition from its parent parameter.
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_spec: Option<Box<ParameterSpec>>Required. The spec for a conditional parameter.
parent_value_condition: Option<ParentValueCondition>A set of parameter values from the parent ParameterSpec’s feasible space.
Implementations§
Source§impl ConditionalParameterSpec
impl ConditionalParameterSpec
pub fn new() -> Self
Sourcepub fn set_parameter_spec<T>(self, v: T) -> Selfwhere
T: Into<ParameterSpec>,
pub fn set_parameter_spec<T>(self, v: T) -> Selfwhere
T: Into<ParameterSpec>,
Sets the value of parameter_spec.
§Example
use google_cloud_aiplatform_v1::model::study_spec::ParameterSpec;
let x = ConditionalParameterSpec::new().set_parameter_spec(ParameterSpec::default()/* use setters */);Sourcepub fn set_or_clear_parameter_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<ParameterSpec>,
pub fn set_or_clear_parameter_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<ParameterSpec>,
Sets or clears the value of parameter_spec.
§Example
use google_cloud_aiplatform_v1::model::study_spec::ParameterSpec;
let x = ConditionalParameterSpec::new().set_or_clear_parameter_spec(Some(ParameterSpec::default()/* use setters */));
let x = ConditionalParameterSpec::new().set_or_clear_parameter_spec(None::<ParameterSpec>);Sourcepub fn set_parent_value_condition<T: Into<Option<ParentValueCondition>>>(
self,
v: T,
) -> Self
pub fn set_parent_value_condition<T: Into<Option<ParentValueCondition>>>( self, v: T, ) -> Self
Sets the value of parent_value_condition.
Note that all the setters affecting parent_value_condition are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::study_spec::parameter_spec::conditional_parameter_spec::DiscreteValueCondition;
let x = ConditionalParameterSpec::new().set_parent_value_condition(Some(
google_cloud_aiplatform_v1::model::study_spec::parameter_spec::conditional_parameter_spec::ParentValueCondition::ParentDiscreteValues(DiscreteValueCondition::default().into())));Sourcepub fn parent_discrete_values(&self) -> Option<&Box<DiscreteValueCondition>>
pub fn parent_discrete_values(&self) -> Option<&Box<DiscreteValueCondition>>
The value of parent_value_condition
if it holds a ParentDiscreteValues, None if the field is not set or
holds a different branch.
Sourcepub fn set_parent_discrete_values<T: Into<Box<DiscreteValueCondition>>>(
self,
v: T,
) -> Self
pub fn set_parent_discrete_values<T: Into<Box<DiscreteValueCondition>>>( self, v: T, ) -> Self
Sets the value of parent_value_condition
to hold a ParentDiscreteValues.
Note that all the setters affecting parent_value_condition are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::study_spec::parameter_spec::conditional_parameter_spec::DiscreteValueCondition;
let x = ConditionalParameterSpec::new().set_parent_discrete_values(DiscreteValueCondition::default()/* use setters */);
assert!(x.parent_discrete_values().is_some());
assert!(x.parent_int_values().is_none());
assert!(x.parent_categorical_values().is_none());Sourcepub fn parent_int_values(&self) -> Option<&Box<IntValueCondition>>
pub fn parent_int_values(&self) -> Option<&Box<IntValueCondition>>
The value of parent_value_condition
if it holds a ParentIntValues, None if the field is not set or
holds a different branch.
Sourcepub fn set_parent_int_values<T: Into<Box<IntValueCondition>>>(
self,
v: T,
) -> Self
pub fn set_parent_int_values<T: Into<Box<IntValueCondition>>>( self, v: T, ) -> Self
Sets the value of parent_value_condition
to hold a ParentIntValues.
Note that all the setters affecting parent_value_condition are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::study_spec::parameter_spec::conditional_parameter_spec::IntValueCondition;
let x = ConditionalParameterSpec::new().set_parent_int_values(IntValueCondition::default()/* use setters */);
assert!(x.parent_int_values().is_some());
assert!(x.parent_discrete_values().is_none());
assert!(x.parent_categorical_values().is_none());Sourcepub fn parent_categorical_values(
&self,
) -> Option<&Box<CategoricalValueCondition>>
pub fn parent_categorical_values( &self, ) -> Option<&Box<CategoricalValueCondition>>
The value of parent_value_condition
if it holds a ParentCategoricalValues, None if the field is not set or
holds a different branch.
Sourcepub fn set_parent_categorical_values<T: Into<Box<CategoricalValueCondition>>>(
self,
v: T,
) -> Self
pub fn set_parent_categorical_values<T: Into<Box<CategoricalValueCondition>>>( self, v: T, ) -> Self
Sets the value of parent_value_condition
to hold a ParentCategoricalValues.
Note that all the setters affecting parent_value_condition are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::study_spec::parameter_spec::conditional_parameter_spec::CategoricalValueCondition;
let x = ConditionalParameterSpec::new().set_parent_categorical_values(CategoricalValueCondition::default()/* use setters */);
assert!(x.parent_categorical_values().is_some());
assert!(x.parent_discrete_values().is_none());
assert!(x.parent_int_values().is_none());Trait Implementations§
Source§impl Clone for ConditionalParameterSpec
impl Clone for ConditionalParameterSpec
Source§fn clone(&self) -> ConditionalParameterSpec
fn clone(&self) -> ConditionalParameterSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more