# Google Cloud OsConfig V1 Client - Class OSPolicyResourceConfigStep (2.2.3)

2.2.3 (latest) 2.2.2 2.1.0 2.0.5 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud OsConfig V1 Client class OSPolicyResourceConfigStep.

Step performed by the OS Config agent for configuring an
`OSPolicy` resource to its desired state.

Generated from protobuf message `google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep`

## Namespace

Google \\ Cloud \\ OsConfig \\ V1 \\ OSPolicyAssignmentReport \\ OSPolicyCompliance \\ OSPolicyResourceCompliance

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` Configuration step type. |
| `↳ error_message` | `string` An error message recorded during the execution of this step. Only populated if errors were encountered during this step execution. |

### getType

Configuration step type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type). |

### setType

Configuration step type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-osconfig/latest/V1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type). |

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

### getErrorMessage

An error message recorded during the execution of this step.

Only populated if errors were encountered during this step execution.

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

### setErrorMessage

An error message recorded during the execution of this step.

Only populated if errors were encountered during this step execution.

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

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