Index
DevicesPlatformService
(interface)CreateDeviceModelRequest
(message)CreateDeviceRequest
(message)DeleteDeviceModelRequest
(message)DeleteDeviceRequest
(message)Device
(message)Device.ClientType
(enum)DeviceModel
(message)DeviceModel.ExecutionMode
(enum)GetDeviceModelRequest
(message)GetDeviceRequest
(message)ListDeviceModelsRequest
(message)ListDeviceModelsResponse
(message)ListDevicesRequest
(message)ListDevicesResponse
(message)Manifest
(message)UpdateDeviceModelRequest
(message)
DevicesPlatformService
This service manages non-Google devices. Currently it provides developers: * one API for device model registration; * one API for device instance registration.
Device model registration creates and manages device model, which contains the capabilities and configurations shared across all devices in that model.
Device instance registration instantiates a device instance based on the capabilities and configurations defined in its model and also allow developer to define some attirbutes that varies among devices.During execution time after registration, both device_model_id and device_id are required in each gRPC request, and Google Assistant API requires both ID are already registered, otherwise an error will be returned.
CreateDevice | |
---|---|
Register one device, return the device if succeed or error if the device already exists or failed.
|
CreateDeviceModel | |
---|---|
Create a 3p device model.
|
DeleteDevice | |
---|---|
Deletes a specific device user owns. Return empty if succeeds, otherwise an error saying the device not found or fail to delete.
|
DeleteDeviceModel | |
---|---|
Delete a 3p device model.
|
GetDevice | |
---|---|
Get setting info of a specific device user owns, return the device if succeeded or error if failed.
|
GetDeviceModel | |
---|---|
Given a device model id, return a device model.
|
ListDeviceModels | |
---|---|
List device models for the project ID associated with this REST API call.
|
ListDevices | |
---|---|
Get list of devices user owns belonging to the given project_id in oauth token. Need to check URL and token has the same project_id.
|
UpdateDeviceModel | |
---|---|
Updates a device model, returns the new version of the model. Note: this is a full update meaning you need to send the whole device model for update.
|
CreateDeviceModelRequest
Request message for DevicesPlatformService.CreateDeviceModel.
Fields | |
---|---|
parent |
Resource name of the project in which to create the device model, of the form |
device_model |
The device_model to be created. |
CreateDeviceRequest
Request message for DevicesPlatformService.CreateDevice.
Fields | |
---|---|
device |
Raw device info provided by user. device_id should be unique in the project, assigned by project owner. |
parent |
The name of the project in which device belongs to, of the form |
DeleteDeviceModelRequest
Request message for DevicesPlatformService.DeleteDeviceModel.
Fields | |
---|---|
name |
Resource name of the project in which to delete the device model, of the form |
DeleteDeviceRequest
Request message for DevicesPlatformService.DeleteDevice.
Fields | |
---|---|
name |
Resource name of the project in which to delete the device, of the form |
Device
Fields | |
---|---|
name |
Resource name of the device, of the form |
id |
Required. Unique device ID in project scope, the format is defined by developer, e.g., "06ba29e5-5f1c-1a89-303c-22de2580f2e2". Must match DeviceConfig.device_id when sending a Converse RPC. This id is resettable for FDR. |
nickname |
Nickname for this device specified by, which would be used for speech recognition and device targeting when user speaks to a device, e.g., user can say "move my smart robot left" when she has a device named "my smart robot". |
model_id |
Required. Identifies uniquely the device “class” (model), among all devices for the agent-id, e.g., "manufacturer-2017-v2". Note that a project could have multiple different device models. |
client_type |
Required. Assistant SDK provide two options for integrating the Assistant into your device. This field is for identifying whether the client is based on Assistant SDK library or calling SDK service API. |
ClientType
Identifies the client type.
Enums | |
---|---|
CLIENT_TYPE_UNSPECIFIED |
The type of the client is not known, default value. |
SDK_SERVICE |
For SDK gRPC service API, which exposes a low level API that directly manipulates the audio bytes of an Assistant request and response. Service |
SDK_LIBRARY |
For Google Assistant client library, a turnkey solution with a high level, event-based API. |
DeviceModel
Defines metadata for a family of devices A device model also defines common capabilities for a family of devices.
Fields | |
---|---|
name |
Resource name of the device model, of the form |
device_model_id |
Required. Global unique ID specified by developer, such as “comcast-voice-assistant-2017-v1”. If a device model ID already exists, an error will be returned. |
project_id |
Required. Cloud project ID associated with the Device Model. Each project is allowed to create multiple device models. |
device_type |
Required. Some Valid Device Type: "action.devices.types.LIGHT" "action.devices.types.OUTLET" "action.devices.types.SWITCH" "action.devices.types.AC_HEATING" |
traits[] |
Optional List of built-in traits the device can support. For example: "action.devices.traits.OnOff" |
manifest |
Required. Metadata that describes the device model and manufacturer. This will be shown in the SDK console, metrics dashboards, and other related visual interfaces. |
execution_modes[] |
Optional Execution mode for Device Actions. If DIRECT_RESPONSE is set, devices are enabled for device control. |
ExecutionMode
Execution mode for Device Actions, current only supports direct response.
Enums | |
---|---|
MODE_UNSPECIFIED |
Not specified. |
DIRECT_RESPONSE |
Device supports direct execution. For queries coming from the device, assistant will return DeviceControlRequest including the command and params. |
GetDeviceModelRequest
Request message for DevicesPlatformService.GetDeviceModel.
Fields | |
---|---|
name |
Resource name of the project in which to get a device model, of the form |
GetDeviceRequest
Request message for DevicesPlatformService.GetDevice.
Fields | |
---|---|
name |
Resource name to get a device, of the form |
ListDeviceModelsRequest
Request message for DevicesPlatformService.ListDeviceModel.
Fields | |
---|---|
parent |
Resource name of device models is being requested, of the form |
ListDeviceModelsResponse
Response message for DevicesPlatformService.CreateDeviceModel.
Fields | |
---|---|
device_models[] |
|
ListDevicesRequest
Request message for DevicesPlatformService.ListDevices.
Fields | |
---|---|
parent |
The name of the project whose devices we'd like to list, of the form `projects/{project_id}'. |
ListDevicesResponse
Response message for DevicesPlatformService.ListDevices.
Fields | |
---|---|
devices[] |
all devices this user owns in given project. |
Manifest
Metadata that describes the device model and manufacturer. This will be shown in the SDK console, metrics dashboards, and other related visual interfaces.
Fields | |
---|---|
manufacturer |
Required. Manufacturer of this device such as “Google”. |
product_name |
Required. Consumer facing product name for this device model, such as “Google Assistant prototype device”. |
device_description |
Optional Description of this device model, such as “Smart speaker from Google, with the Google Assistant Built-in”. |
UpdateDeviceModelRequest
Request message for DevicesPlatformService.UpdateDeviceModel.
Fields | |
---|---|
name |
Resource name of the project in which to update the device model, of the form |
device_model |
New device model developer wants to update to. |