# Compute V1 Client - Class FirewallPolicyRuleMatcher (2.10.0)

2.10.0 (latest) 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.0.0 1.36.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.24.0 1.23.0 1.22.1 1.21.0 1.20.0 1.19.0 1.18.1 1.17.0 1.16.2 1.14.0 1.13.0 1.12.1 1.11.1 1.10.1 1.9.1 1.8.3 1.7.1 1.6.1 1.5.0 Reference documentation and code samples for the Compute V1 Client class FirewallPolicyRuleMatcher.

Represents a match condition that incoming traffic is evaluated against.

Exactly one field must be specified.

Generated from protobuf message `google.cloud.compute.v1.FirewallPolicyRuleMatcher`

## Namespace

Google \\ Cloud \\ Compute \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ dest_address_groups` | `string[]` Address groups which should be matched against the traffic destination. Maximum number of destination address groups is 10. |
| `↳ dest_fqdns` | `string[]` Fully Qualified Domain Name (FQDN) which should be matched against traffic destination. Maximum number of destination fqdn allowed is 100. |
| `↳ dest_ip_ranges` | `string[]` CIDR IP address range. Maximum number of destination CIDR IP ranges allowed is 5000. |
| `↳ dest_network_context` | `string` Network context of the traffic destination. Allowed values are: - UNSPECIFIED - INTERNET - NON_INTERNET Check the DestNetworkContext enum for the list of possible values. |
| `↳ dest_network_type` | `string` Network type of the traffic destination. Allowed values are: - UNSPECIFIED - INTERNET - NON_INTERNET Check the DestNetworkType enum for the list of possible values. |
| `↳ dest_region_codes` | `string[]` Region codes whose IP addresses will be used to match for destination of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of dest region codes allowed is 5000. |
| `↳ dest_threat_intelligences` | `string[]` Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic destination. |
| `↳ layer4_configs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FirewallPolicyRuleMatcherLayer4Config>` Pairs of IP protocols and ports that the rule should match. |
| `↳ src_address_groups` | `string[]` Address groups which should be matched against the traffic source. Maximum number of source address groups is 10. |
| `↳ src_fqdns` | `string[]` Fully Qualified Domain Name (FQDN) which should be matched against traffic source. Maximum number of source fqdn allowed is 100. |
| `↳ src_ip_ranges` | `string[]` CIDR IP address range. Maximum number of source CIDR IP ranges allowed is 5000. |
| `↳ src_network_context` | `string` Network context of the traffic source. Allowed values are: - UNSPECIFIED - INTERNET - INTRA_VPC - NON_INTERNET - VPC_NETWORKS Check the SrcNetworkContext enum for the list of possible values. |
| `↳ src_network_type` | `string` Network type of the traffic source. Allowed values are: - UNSPECIFIED - INTERNET - INTRA_VPC - NON_INTERNET - VPC_NETWORKS Check the SrcNetworkType enum for the list of possible values. |
| `↳ src_networks` | `string[]` Networks of the traffic source. It can be either a full or partial url. |
| `↳ src_region_codes` | `string[]` Region codes whose IP addresses will be used to match for source of traffic. Should be specified as 2 letter country code defined as per ISO 3166 alpha-2 country codes. ex."US" Maximum number of source region codes allowed is 5000. |
| `↳ src_secure_tags` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FirewallPolicyRuleSecureTag>` List of secure tag values, which should be matched at the source of the traffic. For INGRESS rule, if all the srcSecureTag are INEFFECTIVE, and there is no srcIpRange, this rule will be ignored. Maximum number of source tag values allowed is 256. |
| `↳ src_threat_intelligences` | `string[]` Names of Network Threat Intelligence lists. The IPs in these lists will be matched against traffic source. |

### getDestAddressGroups

Address groups which should be matched against the traffic destination.

Maximum number of destination address groups is 10.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDestAddressGroups

Address groups which should be matched against the traffic destination.

Maximum number of destination address groups is 10.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDestFqdns

Fully Qualified Domain Name (FQDN) which should be matched against
traffic destination.

Maximum number of destination fqdn allowed is 100.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDestFqdns

Fully Qualified Domain Name (FQDN) which should be matched against
traffic destination.

Maximum number of destination fqdn allowed is 100.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDestIpRanges

CIDR IP address range.

Maximum number of destination CIDR IP ranges allowed is 5000.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDestIpRanges

CIDR IP address range.

Maximum number of destination CIDR IP ranges allowed is 5000.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDestNetworkContext

Network context of the traffic destination. Allowed values are:

- UNSPECIFIED
- INTERNET
- NON_INTERNET Check the DestNetworkContext enum for the list of possible values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasDestNetworkContext

### clearDestNetworkContext

### setDestNetworkContext

Network context of the traffic destination. Allowed values are:

- UNSPECIFIED
- INTERNET
- NON_INTERNET Check the DestNetworkContext enum for the list of possible values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDestNetworkType

Network type of the traffic destination. Allowed values are:

- UNSPECIFIED
- INTERNET
- NON_INTERNET Check the DestNetworkType enum for the list of possible values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasDestNetworkType

### clearDestNetworkType

### setDestNetworkType

Network type of the traffic destination. Allowed values are:

- UNSPECIFIED
- INTERNET
- NON_INTERNET Check the DestNetworkType enum for the list of possible values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDestRegionCodes

Region codes whose IP addresses will be used to match for destination
of traffic. Should be specified as 2 letter country code defined as per
ISO 3166 alpha-2 country codes. ex."US"
Maximum number of dest region codes allowed is 5000.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDestRegionCodes

Region codes whose IP addresses will be used to match for destination
of traffic. Should be specified as 2 letter country code defined as per
ISO 3166 alpha-2 country codes. ex."US"
Maximum number of dest region codes allowed is 5000.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDestThreatIntelligences

Names of Network Threat Intelligence lists.

The IPs in these lists will be matched against traffic destination.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setDestThreatIntelligences

Names of Network Threat Intelligence lists.

The IPs in these lists will be matched against traffic destination.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLayer4Configs

Pairs of IP protocols and ports that the rule should match.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FirewallPolicyRuleMatcherLayer4Config>` |   |

### setLayer4Configs

Pairs of IP protocols and ports that the rule should match.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FirewallPolicyRuleMatcherLayer4Config>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcAddressGroups

Address groups which should be matched against the traffic source.

Maximum number of source address groups is 10.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setSrcAddressGroups

Address groups which should be matched against the traffic source.

Maximum number of source address groups is 10.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcFqdns

Fully Qualified Domain Name (FQDN) which should be matched against
traffic source.

Maximum number of source fqdn allowed is 100.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setSrcFqdns

Fully Qualified Domain Name (FQDN) which should be matched against
traffic source.

Maximum number of source fqdn allowed is 100.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcIpRanges

CIDR IP address range.

Maximum number of source CIDR IP ranges allowed is 5000.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setSrcIpRanges

CIDR IP address range.

Maximum number of source CIDR IP ranges allowed is 5000.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcNetworkContext

Network context of the traffic source. Allowed values are:

- UNSPECIFIED
- INTERNET
- INTRA_VPC
- NON_INTERNET
- VPC_NETWORKS Check the SrcNetworkContext enum for the list of possible values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasSrcNetworkContext

### clearSrcNetworkContext

### setSrcNetworkContext

Network context of the traffic source. Allowed values are:

- UNSPECIFIED
- INTERNET
- INTRA_VPC
- NON_INTERNET
- VPC_NETWORKS Check the SrcNetworkContext enum for the list of possible values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcNetworkType

Network type of the traffic source. Allowed values are:

- UNSPECIFIED
- INTERNET
- INTRA_VPC
- NON_INTERNET
- VPC_NETWORKS Check the SrcNetworkType enum for the list of possible values.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### hasSrcNetworkType

### clearSrcNetworkType

### setSrcNetworkType

Network type of the traffic source. Allowed values are:

- UNSPECIFIED
- INTERNET
- INTRA_VPC
- NON_INTERNET
- VPC_NETWORKS Check the SrcNetworkType enum for the list of possible values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcNetworks

Networks of the traffic source. It can be either a full or partial url.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setSrcNetworks

Networks of the traffic source. It can be either a full or partial url.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcRegionCodes

Region codes whose IP addresses will be used to match for source
of traffic. Should be specified as 2 letter country code defined as per
ISO 3166 alpha-2 country codes. ex."US"
Maximum number of source region codes allowed is 5000.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setSrcRegionCodes

Region codes whose IP addresses will be used to match for source
of traffic. Should be specified as 2 letter country code defined as per
ISO 3166 alpha-2 country codes. ex."US"
Maximum number of source region codes allowed is 5000.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcSecureTags

List of secure tag values, which should be matched at the source
of the traffic.

For INGRESS rule, if all the srcSecureTag are INEFFECTIVE,
and there is no srcIpRange, this rule will be ignored.
Maximum number of source tag values allowed is 256.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FirewallPolicyRuleSecureTag>` |   |

### setSrcSecureTags

List of secure tag values, which should be matched at the source
of the traffic.

For INGRESS rule, if all the srcSecureTag are INEFFECTIVE,
and there is no srcIpRange, this rule will be ignored.
Maximum number of source tag values allowed is 256.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-compute/latest/V1.FirewallPolicyRuleSecureTag>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSrcThreatIntelligences

Names of Network Threat Intelligence lists.

The IPs in these lists will be matched against traffic source.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setSrcThreatIntelligences

Names of Network Threat Intelligence lists.

The IPs in these lists will be matched against traffic source.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |