# ResourceOperation

- [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#State)
- [Type](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#Type)
- [StateHistoryEntry](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#StateHistoryEntry)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#StateHistoryEntry.SCHEMA_REPRESENTATION)

Represents an ongoing operation for a resource

| JSON representation |
|---|
| ``` { "uid": string, "state": enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#State`), "type": enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#Type`), "stateHistory": [ { object (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#StateHistoryEntry`) } ], "requiresReTurnup": boolean } ``` |

| Fields ||
|---|---|
| `uid` | `string` Output only. Operation ID. |
| `state` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#State`)`` Output only. Operation state. |
| `type` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#Type`)`` Output only. Operation type. |
| `stateHistory[]` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#StateHistoryEntry`)`` Output only. State history for the operation. |
| `requiresReTurnup` | `boolean` Output only. A flag to indicate whether a re-turnup is required. |

## State

Enum for operation states.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified operation state. |
| `AWAITING_CUSTOMER_INPUT` | The operation is awaiting customer input. |
| `PROGRESSING` | The operation is in progress. |
| `COMPLETED` | The operation is complete. |

## Type

The type of operation. New values may be added to this enum in the future.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Unspecified operation type. |
| `REPAIR` | Repair operation. |
| `SUSPEND` | Suspend operation. |
| `RESUME` | Resume operation. |

## StateHistoryEntry

Entry for operation state history.

| JSON representation |
|---|
| ``` { "state": enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#State`), "updateTime": string, "reason": string, "responsibleEntity": enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/Entity`) } ``` |

| Fields ||
|---|---|
| `state` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/ResourceOperation#State`)`` Output only. Operation state. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. Timestamp when the operation state was updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `reason` | `string` Output only. Reason for the state change. |
| `responsibleEntity` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/latest/docs/reference/hardware/rest/v1alpha/Entity`)`` Output only. Entity that changed the state. |