会話型アクションのサポートは 2023 年 6 月 13 日に終了しました。詳細については、
会話型アクションの廃止をご覧ください。
デバイスモデルとデバイス インスタンスのスキーマ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
デバイスモデル
デバイスモデルは、このセクションに示すフィールドによって定義されます。
デバイスモデルのフィールドには、英数字と以下の文字のみを使用できます
記号: ピリオド(.)、ハイフン(-)、アンダースコア(_)、スペース( )、プラス
(+)。フィールドの最初の文字は英字または数字にしてください。
<ph type="x-smartling-placeholder">
</ph>
<ph type="x-smartling-placeholder"></ph>
{
"project_id": "my-devices-project",
"device_model_id": "my-devices-project-prototype-light-v1",
"manifest": {
"manufacturer": "Assistant SDK developer",
"product_name": "Assistant SDK light",
"device_description": "Assistant SDK light device"
},
"device_type": "action.devices.types.LIGHT",
"traits": ["action.devices.traits.OnOff"]
}
をご覧ください。
<ph type="x-smartling-placeholder"></ph>
{
"project_id": string,
"device_model_id": string,
"manifest": {
"manufacturer": string,
"product_name": string,
"device_description": string
},
"device_type": string,
"traits": [ string ]
}
project_id
:(文字列)必須。Google Cloud Platform プロジェクト ID
このデバイスモデルに関連付ける Actions Console プロジェクトの ID です。
1 つのプロジェクトに複数のデバイスモデルを含めることができます。
device_model_id
:(文字列)必須。グローバル一意識別子
。project_id
を次のものとして使用
すべてのプロジェクトの範囲内での競合を回避するための接頭辞。使用済み
デバイス登録時に使用できるようになりました。
manifest
:(オブジェクト(マニフェスト))必須。説明を記述するメタデータ
デバイスのモデルとメーカー。これは(今後の)SDK に表示される場合があります
指標ダッシュボード、その他の関連するビジュアル インターフェースです。
manifest.manufacturer
:(文字列)必須。デバイスの名前
メーカーによって異なります。
manifest.product_name
:(文字列)必須。消費者向け
このデバイスモデルの製品名です。
manifest.device_description
:(文字列)省略可。説明
対応しています。
device_type
:(文字列)必須。デバイス ハードウェアのタイプ。選択
次のように選択されます。
<ph type="x-smartling-placeholder"></ph>
action.devices.types.CAMERA
action.devices.types.DISHWASHER
action.devices.types.DRYER
action.devices.types.LIGHT
action.devices.types.OUTLET
action.devices.types.PHONE
action.devices.types.REFRIGERATOR
action.devices.types.SCENE
action.devices.types.SOUNDBAR
action.devices.types.SPEAKER
action.devices.types.SWITCH
action.devices.types.THERMOSTAT
action.devices.types.TV
action.devices.types.VACUUM
action.devices.types.WASHER
traits
:(Array<String>)省略可。デバイスのトレイトのリスト
サポートします。トレイトには、VM のコマンド、属性、状態が含まれます。
ダウンロードしますアクション パッケージを定義する必要はありません。
を
組み込みトレイト。
デバイス インスタンス
デバイス インスタンスは、このセクションに示すフィールドによって定義されます。
デバイス インスタンスのフィールドは、文字または数字で始まる必要があります。デバイス ID
使用できるのは、文字、数字、記号(ピリオド(.)、
(ハイフン(-)、アンダースコア(_)、プラス(+))。デバイスのニックネームは、
数字、文字、スペース( )記号を含む。
<ph type="x-smartling-placeholder">
</ph>
<ph type="x-smartling-placeholder"></ph>
{
"id": "my_led_1",
"model_id": "my-devices-project-prototype-light-v1",
"nickname": "My Assistant Light",
"client_type": "SDK_LIBRARY"
}
をご覧ください。
<ph type="x-smartling-placeholder"></ph>
{
"id": string,
"model_id": string,
"nickname": string,
"client_type": string
}
id
:(文字列)必須。テストデバイスの識別子。必要があります。
同じ Google アカウントに登録されているすべてのデバイスで
デベロッパー プロジェクト。
model_id
:(文字列)必須。デバイスモデルの識別子。
device_model_id
と同じにする必要があります。
関連付けられていますデバイスモデルが登録されている必要があります
使用します。
nickname
:(文字列)省略可。デバイスのニックネーム。この名前
Google Cloud Storage などのビジュアル インターフェースで
アシスタントの設定。
client_type
:(文字列)必須。クライアント デバイスのタイプ。必要があります。
SDK_SERVICE
または SDK_LIBRARY
のいずれかになります。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eDevice models are defined with a unique ID, manufacturer details, device type, and supported traits, enabling the Google Assistant to understand and interact with the device.\u003c/p\u003e\n"],["\u003cp\u003eDevice instances represent individual devices, linking to a specific model with a unique ID, an optional nickname, and client type (SDK service or library).\u003c/p\u003e\n"],["\u003cp\u003eDevice model and instance IDs can contain letters, numbers, and specific symbols, ensuring proper formatting for identification within the Google ecosystem.\u003c/p\u003e\n"],["\u003cp\u003eA device model's \u003ccode\u003etraits\u003c/code\u003e field determines its functionalities and capabilities, allowing developers to define its behavior and interaction with the Google Assistant.\u003c/p\u003e\n"],["\u003cp\u003eDevice instances are registered using their unique ID and associated with a pre-registered device model, enabling them to be recognized and controlled by the Google Assistant.\u003c/p\u003e\n"]]],["Device models are defined by fields such as `project_id`, `device_model_id`, `manifest`, `device_type`, and `traits`. Fields can contain letters, numbers, and specific symbols. `Manifest` describes the device's manufacturer, product name, and description. Device instances have fields like `id`, `model_id`, `nickname`, and `client_type`, which specify unique identifiers, associated device models, nicknames, and client types. The device `id` and `model_id` are required.\n"],null,["# Device Model and Instance Schemas\n\nDevice model\n------------\n\nThe device model is defined by the fields in this section.\n\n\nDevice model fields can only contain letters, numbers, and the following\nsymbols: period (.), hyphen (-), underscore (_), space ( ) and plus\n(+). The first character of a field must be a letter or number.\nExample \n\n```carbon\n{\n \"project_id\": \"my-devices-project\",\n \"device_model_id\": \"my-devices-project-prototype-light-v1\",\n \"manifest\": {\n \"manufacturer\": \"Assistant SDK developer\",\n \"product_name\": \"Assistant SDK light\",\n \"device_description\": \"Assistant SDK light device\"\n },\n \"device_type\": \"action.devices.types.LIGHT\",\n \"traits\": [\"action.devices.traits.OnOff\"]\n}\n```\nSchema \n\n```carbon\n{\n \"project_id\": string,\n \"device_model_id\": string,\n \"manifest\": {\n \"manufacturer\": string,\n \"product_name\": string,\n \"device_description\": string\n },\n \"device_type\": string,\n \"traits\": [ string ]\n}\n```\n\n- **`project_id`:** (String) Required. Google Cloud Platform project [ID](https://support.google.com/cloud/answer/6158840) of the Actions Console project to associate with this device model. A project can contain multiple device models.\n- **`device_model_id`:** (String) Required. Globally-unique identifier for this device model; use the `project_id` as a prefix to help avoid collisions over the range of all projects. Used in metrics and during device registration.\n- **`manifest`:** (object(Manifest)) Required. Metadata that describes the device model and manufacturer. This may be shown in the (upcoming) SDK console, metrics dashboards, and other related visual interfaces.\n - **`manifest.manufacturer`:** (String) Required. Name of the device manufacturer.\n - **`manifest.product_name`:** (String) Required. Consumer-facing product name for this device model.\n - **`manifest.device_description`:** (String) Optional. Description of this device model.\n- **`device_type`:** (String) Required. The type of device hardware. Select from the following:\n - `action.devices.types.CAMERA`\n - `action.devices.types.DISHWASHER`\n - `action.devices.types.DRYER`\n - `action.devices.types.LIGHT`\n - `action.devices.types.OUTLET`\n - `action.devices.types.PHONE`\n - `action.devices.types.REFRIGERATOR`\n - `action.devices.types.SCENE`\n - `action.devices.types.SOUNDBAR`\n - `action.devices.types.SPEAKER`\n - `action.devices.types.SWITCH`\n - `action.devices.types.THERMOSTAT`\n - `action.devices.types.TV`\n - `action.devices.types.VACUUM`\n - `action.devices.types.WASHER`\n- **`traits`:** (Array\\\u003cString\\\u003e) Optional. List of traits the device supports. Traits include the commands, attributes, and states for the device. You do not need to define an [Action package](/assistant/conversational/action-package/reference/rest/Shared.Types/ActionPackage) to use [built-in traits](/assistant/sdk/reference/traits).\n\nDevice instance\n---------------\n\nThe device instance is defined by the fields in this section.\n\n\nDevice instance fields must start with a letter or number. The device ID\ncan only contain letters, numbers, and the following symbols: period (.),\nhyphen (-), underscore (_), and plus (+). The device nickname can only\ncontain numbers, letters, and the space ( ) symbol.\nExample \n\n```carbon\n {\n \"id\": \"my_led_1\",\n \"model_id\": \"my-devices-project-prototype-light-v1\",\n \"nickname\": \"My Assistant Light\",\n \"client_type\": \"SDK_LIBRARY\"\n }\n```\nSchema \n\n```carbon\n {\n \"id\": string,\n \"model_id\": string,\n \"nickname\": string,\n \"client_type\": string\n }\n```\n\n- **`id`:** (String) Required. Identifier for the test device. Must be unique within all of the devices registered under the same Google Developer project.\n- **`model_id`:** (String) Required. Identifier of the device model; must be the same as the [`device_model_id`](#device_model_json) associated with this test device. The device model must have been registered previously.\n- **`nickname`:** (String) Optional. Nickname for the device. This name will be used to refer to the device in visual interfaces like the Assistant settings.\n- **`client_type`:** (String) Required. The type of client device. Must be either of the following: `SDK_SERVICE` or `SDK_LIBRARY`."]]