# Google Cloud OsConfig V1 Client - Class OSPolicyAssignmentOperationMetadata (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 OSPolicyAssignmentOperationMetadata.

OS policy assignment operation metadata provided by OS policy assignment API
methods that return long running operations.

Generated from protobuf message `google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata`

## Namespace

Google \\ Cloud \\ OsConfig \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ os_policy_assignment` | `string` Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id\@revision_id}` |
| `↳ api_method` | `int` The OS policy assignment API method. |
| `↳ rollout_state` | `int` State of the rollout |
| `↳ rollout_start_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Rollout start time |
| `↳ rollout_update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Rollout update time |

### getOsPolicyAssignment

Reference to the `OSPolicyAssignment` API resource.

Format:
`projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id\@revision_id}`

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

### setOsPolicyAssignment

Reference to the `OSPolicyAssignment` API resource.

Format:
`projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id\@revision_id}`

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

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

### getApiMethod

The OS policy assignment API method.

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

### setApiMethod

The OS policy assignment API method.

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

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

### getRolloutState

State of the rollout

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

### setRolloutState

State of the rollout

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

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

### getRolloutStartTime

Rollout start time

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

### hasRolloutStartTime

### clearRolloutStartTime

### setRolloutStartTime

Rollout start time

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

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

### getRolloutUpdateTime

Rollout update time

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

### hasRolloutUpdateTime

### clearRolloutUpdateTime

### setRolloutUpdateTime

Rollout update time

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

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