# Google Cloud Network Security V1 Client - Class MCPMethod (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 MCPMethod.

Describes a set of MCP methods to match against.

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The MCP method to match against. Allowed values are as follows: 1. `tools`, `prompts`, `resources` - these will match against all sub methods under the respective methods. 2. `prompts/list`, `tools/list`, `resources/list`, `resources/templates/list` 3. `prompts/get`, `tools/call`, `resources/subscribe`, `resources/unsubscribe`, `resources/read` Params cannot be specified for categories 1 and 2. |
| `↳ params` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.AuthzPolicy.AuthzRule.StringMatch>` Optional. A list of MCP method parameters 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 MCP method parameters per Authorization Policy. |

### getName

Required. The MCP method to match against. Allowed values are as
follows:

1. `tools`, `prompts`, `resources` - these will match against all
   sub methods under the respective methods.

2. `prompts/list`, `tools/list`, `resources/list`,
   `resources/templates/list`

3. `prompts/get`, `tools/call`, `resources/subscribe`, `resources/unsubscribe`, `resources/read` Params cannot be specified for categories 1 and 2.

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

### setName

Required. The MCP method to match against. Allowed values are as
follows:

1. `tools`, `prompts`, `resources` - these will match against all
   sub methods under the respective methods.

2. `prompts/list`, `tools/list`, `resources/list`,
   `resources/templates/list`

3. `prompts/get`, `tools/call`, `resources/subscribe`, `resources/unsubscribe`, `resources/read` Params cannot be specified for categories 1 and 2.

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

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

### getParams

Optional. A list of MCP method parameters 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 MCP method parameters 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>` |   |

### setParams

Optional. A list of MCP method parameters 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 MCP method parameters 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` |   |