# Google Cloud Network Security V1 Client - Class RequestOperation (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.0 1.0.4 0.6.5 0.5.2 0.4.1 0.3.7 Reference documentation and code samples for the Google Cloud Network Security V1 Client class RequestOperation.

Describes properties of one or more targets of a request.

Generated from protobuf message `google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule.To.RequestOperation`

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1 \\ AuthzPolicy \\ AuthzRule \\ To

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ header_set` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To.RequestOperation.HeaderSet` Optional. A list of headers to match against in http header. |
| `↳ hosts` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 hosts per Authorization Policy. |
| `↳ paths` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 10 paths per Authorization Policy. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method. |
| `↳ methods` | `string[]` Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive. Limited to 10 methods per Authorization Policy. |
| `↳ mcp` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To.RequestOperation.MCP` Optional. Defines the MCP protocol attributes to match on. If the MCP payload in the request body cannot be successfully parsed, the request will be denied. This field can be set only for AuthzPolicies targeting AgentGateway resources. |
| `↳ snis` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` Optional. A list of SNIs to match against. The match can be one of exact, prefix, suffix, or contains (substring match). If there is no SNI (i.e. plaintext HTTP traffic), the request will be denied. Matches are always case sensitive unless the ignoreCase is set. Limited to 10 SNIs per Authorization Policy. |

### getHeaderSet

Optional. A list of headers to match against in http header.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To.RequestOperation.HeaderSet|null` |   |

### hasHeaderSet

### clearHeaderSet

### setHeaderSet

Optional. A list of headers to match against in http header.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To.RequestOperation.HeaderSet` |

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

### getHosts

Optional. A list of HTTP Hosts to match against. The match can be one
of exact, prefix, suffix, or contains (substring match). Matches are
always case sensitive unless the ignoreCase is set. Limited to 10
hosts per Authorization Policy.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` |   |

### setHosts

Optional. A list of HTTP Hosts to match against. The match can be one
of exact, prefix, suffix, or contains (substring match). Matches are
always case sensitive unless the ignoreCase is set. Limited to 10
hosts per Authorization Policy.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` |

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

### getPaths

Optional. A list of paths to match against. The match can be one of
exact, prefix, suffix, or contains (substring match). Matches are
always case sensitive unless the ignoreCase is set. Limited to 10
paths per Authorization Policy.

Note that this path match includes the query parameters. For gRPC
services, this should be a fully-qualified name of the form
/package.service/method.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` |   |

### setPaths

Optional. A list of paths to match against. The match can be one of
exact, prefix, suffix, or contains (substring match). Matches are
always case sensitive unless the ignoreCase is set. Limited to 10
paths per Authorization Policy.

Note that this path match includes the query parameters. For gRPC
services, this should be a fully-qualified name of the form
/package.service/method.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` |

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

### getMethods

Optional. A list of HTTP methods to match against. Each entry must be
a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE,
OPTIONS). It only allows exact match and is always case sensitive.

Limited to 10 methods per Authorization Policy.

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

### setMethods

Optional. A list of HTTP methods to match against. Each entry must be
a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE,
OPTIONS). It only allows exact match and is always case sensitive.

Limited to 10 methods per Authorization Policy.

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

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

### getMcp

Optional. Defines the MCP protocol attributes to match on. If the MCP
payload in the request body cannot be successfully parsed, the
request will be denied. This field can be set only for AuthzPolicies
targeting AgentGateway resources.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To.RequestOperation.MCP|null` |   |

### hasMcp

### clearMcp

### setMcp

Optional. Defines the MCP protocol attributes to match on. If the MCP
payload in the request body cannot be successfully parsed, the
request will be denied. This field can be set only for AuthzPolicies
targeting AgentGateway resources.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.To.RequestOperation.MCP` |

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

### getSnis

Optional. A list of SNIs to match against. The match can be one of
exact, prefix, suffix, or contains (substring match). If there is no
SNI (i.e. plaintext HTTP traffic), the request will be denied.

Matches are always case sensitive unless the ignoreCase is set.
Limited to 10 SNIs per Authorization Policy.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` |   |

### setSnis

Optional. A list of SNIs to match against. The match can be one of
exact, prefix, suffix, or contains (substring match). If there is no
SNI (i.e. plaintext HTTP traffic), the request will be denied.

Matches are always case sensitive unless the ignoreCase is set.
Limited to 10 SNIs per Authorization Policy.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` |

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