# Google Cloud Config V1 Client - Class ResourceDrift (1.8.0)

1.8.0 (latest) 1.7.2 1.6.1 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.5.2 0.2.0 0.1.3 Reference documentation and code samples for the Google Cloud Config V1 Client class ResourceDrift.

A resource drift represents a drift to a resource in the state file.

Generated from protobuf message `google.cloud.config.v1.ResourceDrift`

## Namespace

Google \\ Cloud \\ Config \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The name of the resource drift. Format: 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. |
| `↳ terraform_info` | `https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.ResourceDriftTerraformInfo` Output only. Terraform info of the resource drift. |
| `↳ property_drifts` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-config/latest/V1.PropertyDrift>` Output only. The property drifts of the resource drift. |

### getName

Identifier. The name of the resource drift.

Format:
'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'.

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

### setName

Identifier. The name of the resource drift.

Format:
'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'.

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

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

### getTerraformInfo

Output only. Terraform info of the resource drift.

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

### hasTerraformInfo

### clearTerraformInfo

### setTerraformInfo

Output only. Terraform info of the resource drift.

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

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

### getPropertyDrifts

Output only. The property drifts of the resource drift.

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

### setPropertyDrifts

Output only. The property drifts of the resource drift.

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

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