# Google Cloud Assured Workloads V1 Client - Class RestrictAllowedResourcesRequest (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.11.5 0.10.2 0.9.1 0.8.3 0.7.3 Reference documentation and code samples for the Google Cloud Assured Workloads V1 Client class RestrictAllowedResourcesRequest.

Request for restricting list of available resources in Workload environment.

Generated from protobuf message `google.cloud.assuredworkloads.v1.RestrictAllowedResourcesRequest`

## Namespace

Google \\ Cloud \\ AssuredWorkloads \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The resource name of the Workload. This is the workloads's relative path in the API, formatted as "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}". For example, "organizations/123/locations/us-east1/workloads/assured-workload-1". |
| `↳ restriction_type` | `int` Required. The type of restriction for using gcp products in the Workload environment. |

### getName

Required. The resource name of the Workload. This is the workloads's
relative path in the API, formatted as
"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}".

For example,
"organizations/123/locations/us-east1/workloads/assured-workload-1".

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

### setName

Required. The resource name of the Workload. This is the workloads's
relative path in the API, formatted as
"organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}".

For example,
"organizations/123/locations/us-east1/workloads/assured-workload-1".

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

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

### getRestrictionType

Required. The type of restriction for using gcp products in the Workload environment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RestrictionType](https://docs.cloud.google.com/php/docs/reference/cloud-assured-workloads/latest/V1.RestrictAllowedResourcesRequest.RestrictionType). |

### setRestrictionType

Required. The type of restriction for using gcp products in the Workload environment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RestrictionType](https://docs.cloud.google.com/php/docs/reference/cloud-assured-workloads/latest/V1.RestrictAllowedResourcesRequest.RestrictionType). |

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