# Google Cloud Network Services V1 Client - Class WasmPlugin (0.8.2)

0.8.2 (latest) 0.8.1 0.7.1 0.6.1 0.5.0 0.4.0 0.3.0 0.2.3 0.1.1 Reference documentation and code samples for the Google Cloud Network Services V1 Client class WasmPlugin.

`WasmPlugin` is a resource representing a service executing
a customer-provided Wasm module.

Generated from protobuf message `google.cloud.networkservices.v1.WasmPlugin`

## Namespace

Google \\ Cloud \\ NetworkServices \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. Name of the `WasmPlugin` resource in the following format: `projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp when the resource was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp when the resource was updated. |
| `↳ description` | `string` Optional. A human-readable description of the resource. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Set of labels associated with the `WasmPlugin` resource. The format must comply with [the following requirements](https://docs.cloud.google.com/compute/docs/labeling-resources#requirements). |
| `↳ main_version_id` | `string` Optional. The ID of the `WasmPluginVersion` resource that is the currently serving one. The version referred to must be a child of this `WasmPlugin` resource. |
| `↳ log_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.WasmPlugin.LogConfig` Optional. Specifies the logging options for the activity performed by this plugin. If logging is enabled, plugin logs are exported to Cloud Logging. Note that the settings relate to the logs generated by using logging statements in your Wasm code. |
| `↳ versions` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. All versions of this `WasmPlugin` resource in the key-value format. The key is the resource ID, and the value is the `VersionDetails` object. Lets you create or update a `WasmPlugin` resource and its versions in a single request. When the `main_version_id` field is not empty, it must point to one of the `VersionDetails` objects in the map. If provided in a `PATCH` request, the new versions replace the previous set. Any version omitted from the `versions` field is removed. Because the `WasmPluginVersion` resource is immutable, if a `WasmPluginVersion` resource with the same name already exists and differs, the request fails. Note: In a `GET` request, this field is populated only if the field `GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`. |
| `↳ used_by` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.WasmPlugin.UsedBy>` Output only. List of all [extensions](https://cloud.google.com/service-extensions/docs/overview) that use this `WasmPlugin` resource. |

### getName

Identifier. Name of the `WasmPlugin` resource in the following format:
`projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.

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

### setName

Identifier. Name of the `WasmPlugin` resource in the following format:
`projects/{project}/locations/{location}/wasmPlugins/{wasm_plugin}`.

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

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

### getCreateTime

Output only. The timestamp when the resource was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp when the resource was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getUpdateTime

Output only. The timestamp when the resource was updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The timestamp when the resource was updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getDescription

Optional. A human-readable description of the resource.

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

### setDescription

Optional. A human-readable description of the resource.

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

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

### getLabels

Optional. Set of labels associated with the `WasmPlugin` resource.

The format must comply with [the following
requirements](https://docs.cloud.google.com/compute/docs/labeling-resources#requirements).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Optional. Set of labels associated with the `WasmPlugin` resource.

The format must comply with [the following
requirements](https://docs.cloud.google.com/compute/docs/labeling-resources#requirements).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getMainVersionId

Optional. The ID of the `WasmPluginVersion` resource that is the
currently serving one. The version referred to must be a child of this
`WasmPlugin` resource.

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

### setMainVersionId

Optional. The ID of the `WasmPluginVersion` resource that is the
currently serving one. The version referred to must be a child of this
`WasmPlugin` resource.

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

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

### getLogConfig

Optional. Specifies the logging options for the activity performed by this
plugin. If logging is enabled, plugin logs are exported to
Cloud Logging.

Note that the settings relate to the logs generated by using
logging statements in your Wasm code.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.WasmPlugin.LogConfig|null` |   |

### hasLogConfig

### clearLogConfig

### setLogConfig

Optional. Specifies the logging options for the activity performed by this
plugin. If logging is enabled, plugin logs are exported to
Cloud Logging.

Note that the settings relate to the logs generated by using
logging statements in your Wasm code.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.WasmPlugin.LogConfig` |

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

### getVersions

Optional. All versions of this `WasmPlugin` resource in the key-value
format. The key is the resource ID, and the value is the `VersionDetails`
object.

Lets you create or update a `WasmPlugin` resource and its versions in a
single request. When the `main_version_id` field is not empty, it must
point to one of the `VersionDetails` objects in the map.
If provided in a `PATCH` request, the new versions replace the
previous set. Any version omitted from the `versions` field is removed.
Because the `WasmPluginVersion` resource is immutable, if a
`WasmPluginVersion` resource with the same name already exists and differs,
the request fails.
Note: In a `GET` request, this field is populated only if the field
`GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setVersions

Optional. All versions of this `WasmPlugin` resource in the key-value
format. The key is the resource ID, and the value is the `VersionDetails`
object.

Lets you create or update a `WasmPlugin` resource and its versions in a
single request. When the `main_version_id` field is not empty, it must
point to one of the `VersionDetails` objects in the map.
If provided in a `PATCH` request, the new versions replace the
previous set. Any version omitted from the `versions` field is removed.
Because the `WasmPluginVersion` resource is immutable, if a
`WasmPluginVersion` resource with the same name already exists and differs,
the request fails.
Note: In a `GET` request, this field is populated only if the field
`GetWasmPluginRequest.view` is set to `WASM_PLUGIN_VIEW_FULL`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getUsedBy

Output only. List of all
[extensions](https://cloud.google.com/service-extensions/docs/overview)
that use this `WasmPlugin` resource.

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

### setUsedBy

Output only. List of all
[extensions](https://cloud.google.com/service-extensions/docs/overview)
that use this `WasmPlugin` resource.

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

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