# Google Cloud Assured Workloads V1 Client - Class GetViolationRequest (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 GetViolationRequest.

Request for fetching a Workload Violation.

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

## 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 Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} |

### getName

Required. The resource name of the Violation to fetch (ie. Violation.name).

Format:
organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}

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

### setName

Required. The resource name of the Violation to fetch (ie. Violation.name).

Format:
organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation}

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} Please see AssuredWorkloadsServiceClient::violationName() for help formatting this field. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-assured-workloads/latest/V1.GetViolationRequest` |   |