Package google.assistant.devices.v1alpha2

Index

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

rpc CreateDevice(CreateDeviceRequest) returns (Device)

Register one device, return the device if succeed or error if the device already exists or failed.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

CreateDeviceModel

rpc CreateDeviceModel(CreateDeviceModelRequest) returns (DeviceModel)

Create a 3p device model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

DeleteDevice

rpc DeleteDevice(DeleteDeviceRequest) returns (Empty)

Deletes a specific device user owns. Return empty if succeeds, otherwise an error saying the device not found or fail to delete.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

DeleteDeviceModel

rpc DeleteDeviceModel(DeleteDeviceModelRequest) returns (Empty)

Delete a 3p device model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

GetDevice

rpc GetDevice(GetDeviceRequest) returns (Device)

Get setting info of a specific device user owns, return the device if succeeded or error if failed.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

GetDeviceModel

rpc GetDeviceModel(GetDeviceModelRequest) returns (DeviceModel)

Given a device model id, return a device model.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

ListDeviceModels

rpc ListDeviceModels(ListDeviceModelsRequest) returns (ListDeviceModelsResponse)

List device models for the project ID associated with this REST API call.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

ListDevices

rpc ListDevices(ListDevicesRequest) returns (ListDevicesResponse)

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.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

UpdateDeviceModel

rpc UpdateDeviceModel(UpdateDeviceModelRequest) returns (DeviceModel)

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.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/assistant-sdk-prototype

For more information, see the Auth Guide.

CreateDeviceModelRequest

Request message for DevicesPlatformService.CreateDeviceModel.

Fields
parent

string

Resource name of the project in which to create the device model, of the form projects/{project_id}

device_model

DeviceModel

The device_model to be created.

CreateDeviceRequest

Request message for DevicesPlatformService.CreateDevice.

Fields
device

Device

Raw device info provided by user. device_id should be unique in the project, assigned by project owner.

parent

string

The name of the project in which device belongs to, of the form projects/{project_id}

DeleteDeviceModelRequest

Request message for DevicesPlatformService.DeleteDeviceModel.

Fields
name

string

Resource name of the project in which to delete the device model, of the form projects/{project_id}/deviceModels/{device_model_id}

DeleteDeviceRequest

Request message for DevicesPlatformService.DeleteDevice.

Fields
name

string

Resource name of the project in which to delete the device, of the form projects/{project_id}/devices/{device_id}.

Device

Fields
name

string

Resource name of the device, of the form projects/{project_id}/devices/{device_id}. The name is ignored when creating a device.

id

string

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

string

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

string

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

ClientType

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

string

Resource name of the device model, of the form projects/project-id/deviceModels/device-model-id

device_model_id

string

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

string

Required. Cloud project ID associated with the Device Model. Each project is allowed to create multiple device models.

device_type

string

Required. Some Valid Device Type: "action.devices.types.LIGHT" "action.devices.types.OUTLET" "action.devices.types.SWITCH" "action.devices.types.AC_HEATING"

traits[]

string

Optional List of built-in traits the device can support. For example: "action.devices.traits.OnOff"

manifest

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[]

ExecutionMode

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

string

Resource name of the project in which to get a device model, of the form projects/{project_id}/deviceModels/{device_model_id}

GetDeviceRequest

Request message for DevicesPlatformService.GetDevice.

Fields
name

string

Resource name to get a device, of the form projects/{project_id}/devices/{device_id}.

ListDeviceModelsRequest

Request message for DevicesPlatformService.ListDeviceModel.

Fields
parent

string

Resource name of device models is being requested, of the form projects/{project_id}

ListDeviceModelsResponse

Response message for DevicesPlatformService.CreateDeviceModel.

Fields
device_models[]

DeviceModel

ListDevicesRequest

Request message for DevicesPlatformService.ListDevices.

Fields
parent

string

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[]

Device

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

string

Required. Manufacturer of this device such as “Google”.

product_name

string

Required. Consumer facing product name for this device model, such as “Google Assistant prototype device”.

device_description

string

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

string

Resource name of the project in which to update the device model, of the form projects/{project_id}/deviceModels/{device_model_id}

device_model

DeviceModel

New device model developer wants to update to.