DeviceMessage
Stay organized with collections
Save and categorize content based on your preferences.
A message returned from a device.
JSON representation |
{
// Union field contents can be only one of the following:
"statusUpdate": {
object (StatusUpdate )
},
"streamStatus": {
object (StreamStatus )
},
"streamData": {
object (StreamData )
}
// End of list of possible types for union field contents .
} |
Fields |
Union field contents . contents can be only one of the following:
|
statusUpdate |
object (StatusUpdate )
Information about the device's state.
|
streamStatus |
object (StreamStatus )
The result of a device stream from ADB.
|
streamData |
object (StreamData )
Data from an open stream.
|
StatusUpdate
A StatusUpdate message given over the ADB protocol for the device state.
JSON representation |
{
"state": enum (DeviceState ),
"properties": {
string: string,
...
},
"features": string
} |
Fields |
state |
enum (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
JSON representation |
{
"streamId": integer,
// Union field status can be only one of the following:
"okay": {
object (Okay )
},
"fail": {
object (Fail )
}
// End of list of possible types for union field status .
} |
Fields |
streamId |
integer
The unique ID of this stream, assigned by the client.
|
Union field status . The result of the stream. Either "Okay" for success or "Fail" for failure. status can be only one of the following: |
okay |
object (Okay )
Okay for success.
|
fail |
object (Fail )
Fail for failure.
|
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-25 UTC.
[null,null,["Last updated 2024-07-25 UTC."],[],[],null,["# DeviceMessage\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [StatusUpdate](#StatusUpdate)\n - [JSON representation](#StatusUpdate.SCHEMA_REPRESENTATION)\n- [StreamStatus](#StreamStatus)\n - [JSON representation](#StreamStatus.SCHEMA_REPRESENTATION)\n- [Okay](#Okay)\n- [Fail](#Fail)\n - [JSON representation](#Fail.SCHEMA_REPRESENTATION)\n\nA message returned from a device.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `contents` can be only one of the following: \"statusUpdate\": { object (/docs/test-lab/reference/testing/rest/v1/DeviceMessage#StatusUpdate) }, \"streamStatus\": { object (/docs/test-lab/reference/testing/rest/v1/DeviceMessage#StreamStatus) }, \"streamData\": { object (/docs/test-lab/reference/testing/rest/v1/StreamData) } // End of list of possible types for union field `contents`. } ``` |\n\n| Fields ||\n|----------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `contents`. `contents` can be only one of the following: ||\n| `statusUpdate` | `object (`[StatusUpdate](/docs/test-lab/reference/testing/rest/v1/DeviceMessage#StatusUpdate)`)` Information about the device's state. |\n| `streamStatus` | `object (`[StreamStatus](/docs/test-lab/reference/testing/rest/v1/DeviceMessage#StreamStatus)`)` The result of a device stream from ADB. |\n| `streamData` | `object (`[StreamData](/docs/test-lab/reference/testing/rest/v1/StreamData)`)` Data from an open stream. |\n\nStatusUpdate\n------------\n\nA StatusUpdate message given over the ADB protocol for the device state.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"state\": enum (/docs/test-lab/reference/testing/rest/v1/DeviceState), \"properties\": { string: string, ... }, \"features\": string } ``` |\n\n| Fields ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `state` | `enum (`[DeviceState](/docs/test-lab/reference/testing/rest/v1/DeviceState)`)` The device's state |\n| `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\" }`. |\n| `features` | `string` A comma-separated list of \"features\" that this device supports. |\n\nStreamStatus\n------------\n\nThe result of a stream.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"streamId\": integer, // Union field `status` can be only one of the following: \"okay\": { object (/docs/test-lab/reference/testing/rest/v1/DeviceMessage#Okay) }, \"fail\": { object (/docs/test-lab/reference/testing/rest/v1/DeviceMessage#Fail) } // End of list of possible types for union field `status`. } ``` |\n\n| Fields ||\n|------------|----------------------------------------------------------------------------------------------------|\n| `streamId` | `integer` The unique ID of this stream, assigned by the client. |\n| Union field `status`. The result of the stream. Either \"Okay\" for success or \"Fail\" for failure. `status` can be only one of the following: ||\n| `okay` | `object (`[Okay](/docs/test-lab/reference/testing/rest/v1/DeviceMessage#Okay)`)` Okay for success. |\n| `fail` | `object (`[Fail](/docs/test-lab/reference/testing/rest/v1/DeviceMessage#Fail)`)` Fail for failure. |\n\nOkay\n----\n\nThis type has no fields.\nMessage signifying that the stream is open\n\nFail\n----\n\nMessage signifying that the stream failed to open\n\n| JSON representation |\n|------------------------------|\n| ``` { \"reason\": string } ``` |\n\n| Fields ||\n|----------|---------------------------------------------|\n| `reason` | `string` A user-displayable failure reason. |"]]