#[non_exhaustive]pub struct HttpQueryParameterMatch {
pub exact_match: Option<String>,
pub name: Option<String>,
pub present_match: Option<bool>,
pub regex_match: Option<String>,
/* private fields */
}region-url-maps or url-maps only.Expand description
HttpRouteRuleMatch criteria for a request’s query 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.exact_match: Option<String>The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch.
Only one of presentMatch, exactMatch, orregexMatch must be set.
name: Option<String>The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails.
present_match: Option<bool>Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not.
Only one of presentMatch, exactMatch, orregexMatch must be set.
regex_match: Option<String>The queryParameterMatch matches if the value of the parameter matches the regular expression specified byregexMatch. For more information about regular expression syntax, see Syntax.
Only one of presentMatch, exactMatch, orregexMatch must be set.
Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED, EXTERNAL_MANAGED (regional scope) or INTERNAL_MANAGED.
Implementations§
Source§impl HttpQueryParameterMatch
impl HttpQueryParameterMatch
pub fn new() -> Self
Sourcepub fn set_exact_match<T>(self, v: T) -> Self
pub fn set_exact_match<T>(self, v: T) -> Self
Sets the value of exact_match.
§Example
let x = HttpQueryParameterMatch::new().set_exact_match("example");Sourcepub fn set_or_clear_exact_match<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_exact_match<T>(self, v: Option<T>) -> Self
Sets or clears the value of exact_match.
§Example
let x = HttpQueryParameterMatch::new().set_or_clear_exact_match(Some("example"));
let x = HttpQueryParameterMatch::new().set_or_clear_exact_match(None::<String>);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_present_match<T>(self, v: T) -> Self
pub fn set_present_match<T>(self, v: T) -> Self
Sets the value of present_match.
§Example
let x = HttpQueryParameterMatch::new().set_present_match(true);Sourcepub fn set_or_clear_present_match<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_present_match<T>(self, v: Option<T>) -> Self
Sets or clears the value of present_match.
§Example
let x = HttpQueryParameterMatch::new().set_or_clear_present_match(Some(false));
let x = HttpQueryParameterMatch::new().set_or_clear_present_match(None::<bool>);Sourcepub fn set_regex_match<T>(self, v: T) -> Self
pub fn set_regex_match<T>(self, v: T) -> Self
Sets the value of regex_match.
§Example
let x = HttpQueryParameterMatch::new().set_regex_match("example");Sourcepub fn set_or_clear_regex_match<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_regex_match<T>(self, v: Option<T>) -> Self
Sets or clears the value of regex_match.
§Example
let x = HttpQueryParameterMatch::new().set_or_clear_regex_match(Some("example"));
let x = HttpQueryParameterMatch::new().set_or_clear_regex_match(None::<String>);Trait Implementations§
Source§impl Clone for HttpQueryParameterMatch
impl Clone for HttpQueryParameterMatch
Source§fn clone(&self) -> HttpQueryParameterMatch
fn clone(&self) -> HttpQueryParameterMatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more