# DevicesLongRunningOperationResponse

- [JSON representation](https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#SCHEMA_REPRESENTATION)
- [OperationPerDevice](https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#OperationPerDevice)
  - [JSON representation](https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#OperationPerDevice.SCHEMA_REPRESENTATION)
- [PerDeviceStatusInBatch](https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#PerDeviceStatusInBatch)
  - [JSON representation](https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#PerDeviceStatusInBatch.SCHEMA_REPRESENTATION)

Tracks the status of a long-running operation to claim, unclaim, or attach metadata to devices. To learn more, read [Long‑running batch operations](https://developers.google.com/zero-touch/guides/how-it-works#operations).

| JSON representation ||
|---|---|
| ``` { "successCount": integer, "perDeviceStatus": [ { object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#OperationPerDevice`) } ] } ``` |

| Fields ||
|---|---|
| `successCount` | `integer` A summary of how many items in the operation the server processed successfully. Updated as the operation progresses. |
| `perDeviceStatus[]` | ``object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#OperationPerDevice`)`` The processing status for each device in the operation. One `PerDeviceStatus` per device. The list order matches the items in the original request. |

## OperationPerDevice

A task for each device in the operation. Corresponds to each device change in the request.

| JSON representation ||
|---|---|
| ``` { "result": { object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#PerDeviceStatusInBatch`) }, // Union field `request` can be only one of the following: "claim": { object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/partners.devices/claimAsync#PartnerClaim`) }, "unclaim": { object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/partners.devices/unclaimAsync#PartnerUnclaim`) }, "updateMetadata": { object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/partners.devices/updateMetadataAsync#UpdateMetadataArguments`) } // End of list of possible types for union field `request`. } ``` |

| Fields ||
|---|---|---|
| `result` | ``object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/DevicesLongRunningOperationResponse#PerDeviceStatusInBatch`)`` The processing result for each device. |
| Union field `request`. Containing the request received by the server. `request` can be only one of the following: |||
| `claim` | ``object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/partners.devices/claimAsync#PartnerClaim`)`` A copy of the original device-claim request received by the server. |
| `unclaim` | ``object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/partners.devices/unclaimAsync#PartnerUnclaim`)`` A copy of the original device-unclaim request received by the server. |
| `updateMetadata` | ``object (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/partners.devices/updateMetadataAsync#UpdateMetadataArguments`)`` A copy of the original metadata-update request received by the server. |

## PerDeviceStatusInBatch

Captures the processing status for each device in the operation.

| JSON representation ||
|---|---|
| ``` { "status": enum (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/PerDeviceStatus`), "deviceId": string, "errorMessage": string, "errorIdentifier": string } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://developers.google.com/zero-touch/reference/reseller/rest/v1/PerDeviceStatus`)`` The result status of the device after processing. |
| `deviceId` | `string (https://developers.google.com/discovery/v1/type-format format)` If processing succeeds, the device ID of the device. |
| `errorMessage` | `string` If processing fails, a developer message explaining what went wrong. |
| `errorIdentifier` | `string` If processing fails, the error type. |