Compute V1 Client - Class HttpQueryParameterMatch (1.20.0)

Reference documentation and code samples for the Compute V1 Client class HttpQueryParameterMatch.

HttpRouteRuleMatch criteria for a request's query parameter.

Generated from protobuf message google.cloud.compute.v1.HttpQueryParameterMatch

Namespace

Google \ Cloud \ Compute \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ exact_match string

The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch, or regexMatch must be set.

↳ name 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 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, or regexMatch must be set.

↳ regex_match string

The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For more information about regular expression syntax, see Syntax. Only one of presentMatch, exactMatch, or regexMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.

getExactMatch

The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch, or regexMatch must be set.

Returns
Type Description
string

hasExactMatch

clearExactMatch

setExactMatch

The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch, or regexMatch must be set.

Parameter
Name Description
var string
Returns
Type Description
$this

getName

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.

Returns
Type Description
string

hasName

clearName

setName

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getPresentMatch

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, or regexMatch must be set.

Returns
Type Description
bool

hasPresentMatch

clearPresentMatch

setPresentMatch

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, or regexMatch must be set.

Parameter
Name Description
var bool
Returns
Type Description
$this

getRegexMatch

The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For more information about regular expression syntax, see Syntax. Only one of presentMatch, exactMatch, or regexMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.

Returns
Type Description
string

hasRegexMatch

clearRegexMatch

setRegexMatch

The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For more information about regular expression syntax, see Syntax. Only one of presentMatch, exactMatch, or regexMatch must be set. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED.

Parameter
Name Description
var string
Returns
Type Description
$this