- [JSON representation](https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#SCHEMA_REPRESENTATION)
- [StatusUpdate](https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#StatusUpdate)
  - [JSON representation](https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#StatusUpdate.SCHEMA_REPRESENTATION)
- [StreamStatus](https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#StreamStatus)
  - [JSON representation](https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#StreamStatus.SCHEMA_REPRESENTATION)
- [Okay](https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#Okay)
- [Fail](https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#Fail)
  - [JSON representation](https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#Fail.SCHEMA_REPRESENTATION)

A message returned from a device.

| JSON representation |
|---|
| ``` { // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "statusUpdate": { object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#StatusUpdate`) }, "streamStatus": { object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#StreamStatus`) }, "streamData": { object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/StreamData`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `statusUpdate` | ``object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#StatusUpdate`)`` Information about the device's state. |
| `streamStatus` | ``object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#StreamStatus`)`` The result of a device stream from ADB. |
| `streamData` | ``object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/StreamData`)`` Data from an open stream. |
| End of mutually exclusive fields. ||

## StatusUpdate

A StatusUpdate message given over the ADB protocol for the device state.

| JSON representation |
|---|
| ``` { "state": enum (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceState`), "properties": { string: string, ... }, "features": string } ``` |

| Fields ||
|---|---|
| `state` | ``enum (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceState`)`` The device's state |
| `properties` | `map (key: string, value: string)` A map of properties with information about this device. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `features` | `string` A comma-separated list of "features" that this device supports. |

## StreamStatus

The result of a stream.

| JSON representation |
|---|
| ``` { "streamId": integer, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "okay": { object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#Okay`) }, "fail": { object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#Fail`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `streamId` | `integer` The unique ID of this stream, assigned by the client. |
| The result of the stream. Either "Okay" for success or "Fail" for failure. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `okay` | ``object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#Okay`)`` Okay for success. |
| `fail` | ``object (`https://docs.cloud.google.com/developer-device-platform/reference/device-streaming/rest/v1/DeviceMessage#Fail`)`` Fail for failure. |
| End of mutually exclusive fields. ||

## Okay

This type has no fields.
Message signifying that the stream is open

## Fail

Message signifying that the stream failed to open

| JSON representation |
|---|
| ``` { "reason": string } ``` |

| Fields ||
|---|---|
| `reason` | `string` A user-displayable failure reason. |