#[non_exhaustive]pub struct StringValues {
pub allowed_values: Vec<String>,
pub denied_values: Vec<String>,
/* private fields */
}Expand description
A message that holds specific allowed and denied values.
This message can define specific values and subtrees of the Resource
Manager resource hierarchy (Organizations, Folders, Projects) that
are allowed or denied. This is achieved by using the under: and
optional is: prefixes.
The under: prefix is used to denote resource subtree values.
The is: prefix is used to denote specific values, and is required only
if the value contains a “:”. Values prefixed with “is:” are treated the
same as values with no prefix.
Ancestry subtrees must be in one of the following formats:
projects/<project-id>(for example,projects/tokyo-rain-123)folders/<folder-id>(for example,folders/1234)organizations/<organization-id>(for example,organizations/1234)
The supports_under field of the associated Constraint defines
whether ancestry prefixes can be used.
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.allowed_values: Vec<String>List of values allowed at this resource.
denied_values: Vec<String>List of values denied at this resource.
Implementations§
Source§impl StringValues
impl StringValues
pub fn new() -> Self
Sourcepub fn set_allowed_values<T, V>(self, v: T) -> Self
pub fn set_allowed_values<T, V>(self, v: T) -> Self
Sets the value of allowed_values.
§Example
let x = StringValues::new().set_allowed_values(["a", "b", "c"]);Sourcepub fn set_denied_values<T, V>(self, v: T) -> Self
pub fn set_denied_values<T, V>(self, v: T) -> Self
Sets the value of denied_values.
§Example
let x = StringValues::new().set_denied_values(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for StringValues
impl Clone for StringValues
Source§fn clone(&self) -> StringValues
fn clone(&self) -> StringValues
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more