#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConditionalParameterSpec
impl Debug for ConditionalParameterSpec
Source§impl Default for ConditionalParameterSpec
impl Default for ConditionalParameterSpec
Source§fn default() -> ConditionalParameterSpec
fn default() -> ConditionalParameterSpec
Source§impl Message for ConditionalParameterSpec
impl Message for ConditionalParameterSpec
Source§impl PartialEq for ConditionalParameterSpec
impl PartialEq for ConditionalParameterSpec
impl StructuralPartialEq for ConditionalParameterSpec
Auto Trait Implementations§
impl Freeze for ConditionalParameterSpec
impl RefUnwindSafe for ConditionalParameterSpec
impl Send for ConditionalParameterSpec
impl Sync for ConditionalParameterSpec
impl Unpin for ConditionalParameterSpec
impl UnsafeUnpin for ConditionalParameterSpec
impl UnwindSafe for ConditionalParameterSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request