Google Cloud Network Security V1 Client - Class StringMatch (1.3.0)

Reference documentation and code samples for the Google Cloud Network Security V1 Client class StringMatch.

Determines how a string value should be matched.

Generated from protobuf message google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.StringMatch

Namespace

Google \ Cloud \ NetworkSecurity \ V1 \ AuthzPolicy \ AuthzRule

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ exact string

The input string must match exactly the string specified here. Examples: * * abc only matches the value abc.

↳ prefix string

The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * * abc matches the value abc.xyz

↳ suffix string

The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * * abc matches the value xyz.abc

↳ contains string

The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * * abc matches the value xyz.abc.def

↳ ignore_case bool

If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. For example, the matcher data will match both input string Data and data if set to true.

getExact

The input string must match exactly the string specified here.

Examples:

  • abc only matches the value abc.
Returns
Type Description
string

hasExact

setExact

The input string must match exactly the string specified here.

Examples:

  • abc only matches the value abc.
Parameter
Name Description
var string
Returns
Type Description
$this

getPrefix

The input string must have the prefix specified here.

Note: empty prefix is not allowed, please use regex instead. Examples:

  • abc matches the value abc.xyz
Returns
Type Description
string

hasPrefix

setPrefix

The input string must have the prefix specified here.

Note: empty prefix is not allowed, please use regex instead. Examples:

  • abc matches the value abc.xyz
Parameter
Name Description
var string
Returns
Type Description
$this

getSuffix

The input string must have the suffix specified here.

Note: empty prefix is not allowed, please use regex instead. Examples:

  • abc matches the value xyz.abc
Returns
Type Description
string

hasSuffix

setSuffix

The input string must have the suffix specified here.

Note: empty prefix is not allowed, please use regex instead. Examples:

  • abc matches the value xyz.abc
Parameter
Name Description
var string
Returns
Type Description
$this

getContains

The input string must have the substring specified here.

Note: empty contains match is not allowed, please use regex instead. Examples:

  • abc matches the value xyz.abc.def
Returns
Type Description
string

hasContains

setContains

The input string must have the substring specified here.

Note: empty contains match is not allowed, please use regex instead. Examples:

  • abc matches the value xyz.abc.def
Parameter
Name Description
var string
Returns
Type Description
$this

getIgnoreCase

If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. For example, the matcher data will match both input string Data and data if set to true.

Returns
Type Description
bool

setIgnoreCase

If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. For example, the matcher data will match both input string Data and data if set to true.

Parameter
Name Description
var bool
Returns
Type Description
$this

getMatchPattern

Returns
Type Description
string