#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParameterSpec
impl Debug for ParameterSpec
Source§impl Default for ParameterSpec
impl Default for ParameterSpec
Source§fn default() -> ParameterSpec
fn default() -> ParameterSpec
Source§impl Message for ParameterSpec
impl Message for ParameterSpec
Source§impl PartialEq for ParameterSpec
impl PartialEq for ParameterSpec
impl StructuralPartialEq for ParameterSpec
Auto Trait Implementations§
impl Freeze for ParameterSpec
impl RefUnwindSafe for ParameterSpec
impl Send for ParameterSpec
impl Sync for ParameterSpec
impl Unpin for ParameterSpec
impl UnsafeUnpin for ParameterSpec
impl UnwindSafe for ParameterSpec
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