#[non_exhaustive]pub struct ParameterSpec {
pub name: String,
pub display_name: String,
pub description: String,
pub is_required: bool,
pub value_type: ValueType,
pub default_value: Option<ParamValue>,
pub substitution_rules: Vec<ParameterSubstitutionRule>,
pub sub_parameters: Vec<ParameterSpec>,
pub validation: Option<Validation>,
/* private fields */
}Expand description
The parameter specification for the cloud control.
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.name: StringRequired. The name of the parameter.
display_name: StringOptional. The friendly name of the parameter. The maximum length is 200 characters.
description: StringOptional. The description of the parameter. The maximum length is 2000 characters.
is_required: boolRequired. Whether the parameter is required.
value_type: ValueTypeRequired. The parameter value type.
default_value: Option<ParamValue>Optional. The default value of the parameter.
substitution_rules: Vec<ParameterSubstitutionRule>Optional. The list of parameter substitutions.
sub_parameters: Vec<ParameterSpec>Optional. The parameter specification for oneOf attributes.
validation: Option<Validation>Optional. The permitted set of values for the parameter.
Implementations§
Source§impl ParameterSpec
impl ParameterSpec
pub fn new() -> Self
Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_is_required<T: Into<bool>>(self, v: T) -> Self
pub fn set_is_required<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_value_type<T: Into<ValueType>>(self, v: T) -> Self
pub fn set_value_type<T: Into<ValueType>>(self, v: T) -> Self
Sets the value of value_type.
§Example
use google_cloud_cloudsecuritycompliance_v1::model::parameter_spec::ValueType;
let x0 = ParameterSpec::new().set_value_type(ValueType::String);
let x1 = ParameterSpec::new().set_value_type(ValueType::Boolean);
let x2 = ParameterSpec::new().set_value_type(ValueType::Stringlist);Sourcepub fn set_default_value<T>(self, v: T) -> Selfwhere
T: Into<ParamValue>,
pub fn set_default_value<T>(self, v: T) -> Selfwhere
T: Into<ParamValue>,
Sets the value of default_value.
§Example
use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
let x = ParameterSpec::new().set_default_value(ParamValue::default()/* use setters */);Sourcepub fn set_or_clear_default_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<ParamValue>,
pub fn set_or_clear_default_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<ParamValue>,
Sets or clears the value of default_value.
§Example
use google_cloud_cloudsecuritycompliance_v1::model::ParamValue;
let x = ParameterSpec::new().set_or_clear_default_value(Some(ParamValue::default()/* use setters */));
let x = ParameterSpec::new().set_or_clear_default_value(None::<ParamValue>);Sourcepub fn set_substitution_rules<T, V>(self, v: T) -> Self
pub fn set_substitution_rules<T, V>(self, v: T) -> Self
Sets the value of substitution_rules.
§Example
use google_cloud_cloudsecuritycompliance_v1::model::ParameterSubstitutionRule;
let x = ParameterSpec::new()
.set_substitution_rules([
ParameterSubstitutionRule::default()/* use setters */,
ParameterSubstitutionRule::default()/* use (different) setters */,
]);Sourcepub fn set_sub_parameters<T, V>(self, v: T) -> Self
pub fn set_sub_parameters<T, V>(self, v: T) -> Self
Sets the value of sub_parameters.
§Example
let x = ParameterSpec::new()
.set_sub_parameters([
ParameterSpec::default()/* use setters */,
ParameterSpec::default()/* use (different) setters */,
]);Sourcepub fn set_validation<T>(self, v: T) -> Selfwhere
T: Into<Validation>,
pub fn set_validation<T>(self, v: T) -> Selfwhere
T: Into<Validation>,
Sets the value of validation.
§Example
use google_cloud_cloudsecuritycompliance_v1::model::Validation;
let x = ParameterSpec::new().set_validation(Validation::default()/* use setters */);Sourcepub fn set_or_clear_validation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Validation>,
pub fn set_or_clear_validation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Validation>,
Sets or clears the value of validation.
§Example
use google_cloud_cloudsecuritycompliance_v1::model::Validation;
let x = ParameterSpec::new().set_or_clear_validation(Some(Validation::default()/* use setters */));
let x = ParameterSpec::new().set_or_clear_validation(None::<Validation>);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