1*d5c09012SAndroid Build Coastguard Worker// Copyright 2022 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.home.graph.v1; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/protobuf/struct.proto"; 20*d5c09012SAndroid Build Coastguard Worker 21*d5c09012SAndroid Build Coastguard Workeroption go_package = "google.golang.org/genproto/googleapis/home/graph/v1;graph"; 22*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "DeviceProto"; 23*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.home.graph.v1"; 24*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Home\\Graph\\V1"; 25*d5c09012SAndroid Build Coastguard Worker 26*d5c09012SAndroid Build Coastguard Worker// Third-party device definition. 27*d5c09012SAndroid Build Coastguard Workermessage Device { 28*d5c09012SAndroid Build Coastguard Worker // Third-party device ID. 29*d5c09012SAndroid Build Coastguard Worker string id = 1; 30*d5c09012SAndroid Build Coastguard Worker 31*d5c09012SAndroid Build Coastguard Worker // Hardware type of the device. 32*d5c09012SAndroid Build Coastguard Worker // See [device 33*d5c09012SAndroid Build Coastguard Worker // types](https://developers.home.google.com/cloud-to-cloud/guides). 34*d5c09012SAndroid Build Coastguard Worker string type = 2; 35*d5c09012SAndroid Build Coastguard Worker 36*d5c09012SAndroid Build Coastguard Worker // Traits supported by the device. 37*d5c09012SAndroid Build Coastguard Worker // See [device 38*d5c09012SAndroid Build Coastguard Worker // traits](https://developers.home.google.com/cloud-to-cloud/traits). 39*d5c09012SAndroid Build Coastguard Worker repeated string traits = 3; 40*d5c09012SAndroid Build Coastguard Worker 41*d5c09012SAndroid Build Coastguard Worker // Names given to this device by your smart home Action. 42*d5c09012SAndroid Build Coastguard Worker DeviceNames name = 4; 43*d5c09012SAndroid Build Coastguard Worker 44*d5c09012SAndroid Build Coastguard Worker // Indicates whether your smart home Action will report state of this device 45*d5c09012SAndroid Build Coastguard Worker // to Google via 46*d5c09012SAndroid Build Coastguard Worker // [ReportStateAndNotification][google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification]. 47*d5c09012SAndroid Build Coastguard Worker bool will_report_state = 5; 48*d5c09012SAndroid Build Coastguard Worker 49*d5c09012SAndroid Build Coastguard Worker // Suggested name for the room where this device is installed. 50*d5c09012SAndroid Build Coastguard Worker // Google attempts to use this value during user setup. 51*d5c09012SAndroid Build Coastguard Worker string room_hint = 6; 52*d5c09012SAndroid Build Coastguard Worker 53*d5c09012SAndroid Build Coastguard Worker // Suggested name for the structure where this device is installed. 54*d5c09012SAndroid Build Coastguard Worker // Google attempts to use this value during user setup. 55*d5c09012SAndroid Build Coastguard Worker string structure_hint = 7; 56*d5c09012SAndroid Build Coastguard Worker 57*d5c09012SAndroid Build Coastguard Worker // Device manufacturer, model, hardware version, and software version. 58*d5c09012SAndroid Build Coastguard Worker DeviceInfo device_info = 8; 59*d5c09012SAndroid Build Coastguard Worker 60*d5c09012SAndroid Build Coastguard Worker // Attributes for the traits supported by the device. 61*d5c09012SAndroid Build Coastguard Worker google.protobuf.Struct attributes = 9; 62*d5c09012SAndroid Build Coastguard Worker 63*d5c09012SAndroid Build Coastguard Worker // Custom device attributes stored in Home Graph and provided to your 64*d5c09012SAndroid Build Coastguard Worker // smart home Action in each 65*d5c09012SAndroid Build Coastguard Worker // [QUERY](https://developers.home.google.com/cloud-to-cloud/intents/query) 66*d5c09012SAndroid Build Coastguard Worker // and 67*d5c09012SAndroid Build Coastguard Worker // [EXECUTE](https://developers.home.google.com/cloud-to-cloud/intents/execute) 68*d5c09012SAndroid Build Coastguard Worker // intent. 69*d5c09012SAndroid Build Coastguard Worker // Data in this object has a few constraints: No sensitive information, 70*d5c09012SAndroid Build Coastguard Worker // including but not limited to Personally Identifiable Information. 71*d5c09012SAndroid Build Coastguard Worker google.protobuf.Struct custom_data = 10; 72*d5c09012SAndroid Build Coastguard Worker 73*d5c09012SAndroid Build Coastguard Worker // Alternate IDs associated with this device. 74*d5c09012SAndroid Build Coastguard Worker // This is used to identify cloud synced devices enabled for [local 75*d5c09012SAndroid Build Coastguard Worker // fulfillment](https://developers.home.google.com/local-home/overview). 76*d5c09012SAndroid Build Coastguard Worker repeated AgentOtherDeviceId other_device_ids = 11; 77*d5c09012SAndroid Build Coastguard Worker 78*d5c09012SAndroid Build Coastguard Worker // Indicates whether your smart home Action will report notifications 79*d5c09012SAndroid Build Coastguard Worker // to Google for this device via 80*d5c09012SAndroid Build Coastguard Worker // [ReportStateAndNotification][google.home.graph.v1.HomeGraphApiService.ReportStateAndNotification]. 81*d5c09012SAndroid Build Coastguard Worker // 82*d5c09012SAndroid Build Coastguard Worker // If your smart home Action enables users to control device notifications, 83*d5c09012SAndroid Build Coastguard Worker // you should update this field and call 84*d5c09012SAndroid Build Coastguard Worker // [RequestSyncDevices][google.home.graph.v1.HomeGraphApiService.RequestSyncDevices]. 85*d5c09012SAndroid Build Coastguard Worker bool notification_supported_by_agent = 12; 86*d5c09012SAndroid Build Coastguard Worker} 87*d5c09012SAndroid Build Coastguard Worker 88*d5c09012SAndroid Build Coastguard Worker// Identifiers used to describe the device. 89*d5c09012SAndroid Build Coastguard Workermessage DeviceNames { 90*d5c09012SAndroid Build Coastguard Worker // Primary name of the device, generally provided by the user. 91*d5c09012SAndroid Build Coastguard Worker string name = 1; 92*d5c09012SAndroid Build Coastguard Worker 93*d5c09012SAndroid Build Coastguard Worker // Additional names provided by the user for the device. 94*d5c09012SAndroid Build Coastguard Worker repeated string nicknames = 2; 95*d5c09012SAndroid Build Coastguard Worker 96*d5c09012SAndroid Build Coastguard Worker // List of names provided by the manufacturer rather than the user, such as 97*d5c09012SAndroid Build Coastguard Worker // serial numbers, SKUs, etc. 98*d5c09012SAndroid Build Coastguard Worker repeated string default_names = 3; 99*d5c09012SAndroid Build Coastguard Worker} 100*d5c09012SAndroid Build Coastguard Worker 101*d5c09012SAndroid Build Coastguard Worker// Device information. 102*d5c09012SAndroid Build Coastguard Workermessage DeviceInfo { 103*d5c09012SAndroid Build Coastguard Worker // Device manufacturer. 104*d5c09012SAndroid Build Coastguard Worker string manufacturer = 1; 105*d5c09012SAndroid Build Coastguard Worker 106*d5c09012SAndroid Build Coastguard Worker // Device model. 107*d5c09012SAndroid Build Coastguard Worker string model = 2; 108*d5c09012SAndroid Build Coastguard Worker 109*d5c09012SAndroid Build Coastguard Worker // Device hardware version. 110*d5c09012SAndroid Build Coastguard Worker string hw_version = 3; 111*d5c09012SAndroid Build Coastguard Worker 112*d5c09012SAndroid Build Coastguard Worker // Device software version. 113*d5c09012SAndroid Build Coastguard Worker string sw_version = 4; 114*d5c09012SAndroid Build Coastguard Worker} 115*d5c09012SAndroid Build Coastguard Worker 116*d5c09012SAndroid Build Coastguard Worker// Alternate third-party device ID. 117*d5c09012SAndroid Build Coastguard Workermessage AgentOtherDeviceId { 118*d5c09012SAndroid Build Coastguard Worker // Project ID for your smart home Action. 119*d5c09012SAndroid Build Coastguard Worker string agent_id = 1; 120*d5c09012SAndroid Build Coastguard Worker 121*d5c09012SAndroid Build Coastguard Worker // Unique third-party device ID. 122*d5c09012SAndroid Build Coastguard Worker string device_id = 2; 123*d5c09012SAndroid Build Coastguard Worker} 124