#[non_exhaustive]pub struct ParameterValidation {
pub validation_type: Option<ValidationType>,
/* private fields */
}Expand description
Configuration for parameter validation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.validation_type: Option<ValidationType>Required. The type of validation to be performed.
Implementations§
Source§impl ParameterValidation
impl ParameterValidation
pub fn new() -> Self
Sourcepub fn set_validation_type<T: Into<Option<ValidationType>>>(self, v: T) -> Self
pub fn set_validation_type<T: Into<Option<ValidationType>>>(self, v: T) -> Self
Sets the value of validation_type.
Note that all the setters affecting validation_type are mutually
exclusive.
§Example
ⓘ
use google_cloud_dataproc_v1::model::RegexValidation;
let x = ParameterValidation::new().set_validation_type(Some(
google_cloud_dataproc_v1::model::parameter_validation::ValidationType::Regex(RegexValidation::default().into())));Sourcepub fn regex(&self) -> Option<&Box<RegexValidation>>
pub fn regex(&self) -> Option<&Box<RegexValidation>>
The value of validation_type
if it holds a Regex, None if the field is not set or
holds a different branch.
Sourcepub fn set_regex<T: Into<Box<RegexValidation>>>(self, v: T) -> Self
pub fn set_regex<T: Into<Box<RegexValidation>>>(self, v: T) -> Self
Sets the value of validation_type
to hold a Regex.
Note that all the setters affecting validation_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_dataproc_v1::model::RegexValidation;
let x = ParameterValidation::new().set_regex(RegexValidation::default()/* use setters */);
assert!(x.regex().is_some());
assert!(x.values().is_none());Sourcepub fn values(&self) -> Option<&Box<ValueValidation>>
pub fn values(&self) -> Option<&Box<ValueValidation>>
The value of validation_type
if it holds a Values, None if the field is not set or
holds a different branch.
Sourcepub fn set_values<T: Into<Box<ValueValidation>>>(self, v: T) -> Self
pub fn set_values<T: Into<Box<ValueValidation>>>(self, v: T) -> Self
Sets the value of validation_type
to hold a Values.
Note that all the setters affecting validation_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_dataproc_v1::model::ValueValidation;
let x = ParameterValidation::new().set_values(ValueValidation::default()/* use setters */);
assert!(x.values().is_some());
assert!(x.regex().is_none());Trait Implementations§
Source§impl Clone for ParameterValidation
impl Clone for ParameterValidation
Source§fn clone(&self) -> ParameterValidation
fn clone(&self) -> ParameterValidation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParameterValidation
impl Debug for ParameterValidation
Source§impl Default for ParameterValidation
impl Default for ParameterValidation
Source§fn default() -> ParameterValidation
fn default() -> ParameterValidation
Returns the “default value” for a type. Read more
Source§impl Message for ParameterValidation
impl Message for ParameterValidation
Source§impl PartialEq for ParameterValidation
impl PartialEq for ParameterValidation
impl StructuralPartialEq for ParameterValidation
Auto Trait Implementations§
impl Freeze for ParameterValidation
impl RefUnwindSafe for ParameterValidation
impl Send for ParameterValidation
impl Sync for ParameterValidation
impl Unpin for ParameterValidation
impl UnsafeUnpin for ParameterValidation
impl UnwindSafe for ParameterValidation
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
Mutably borrows from an owned value. Read more