xref: /aosp_15_r20/external/googleapis/google/home/enterprise/sdm/v1/device.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.home.enterprise.sdm.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/protobuf/struct.proto";
22
23option csharp_namespace = "Google.Home.Enterprise.Sdm.V1";
24option go_package = "google.golang.org/genproto/googleapis/home/enterprise/sdm/v1;sdm";
25option java_multiple_files = true;
26option java_package = "com.google.home.enterprise.sdm.v1";
27option objc_class_prefix = "GHENTSDM";
28option php_namespace = "Google\\Home\\Enterprise\\Sdm\\V1";
29
30// Device resource represents an instance of enterprise managed device in the
31// property.
32message Device {
33  option (google.api.resource) = {
34    type: "smartdevicemanagement.googleapis.com/Device"
35    pattern: "enterprises/{enterprise}/devices/{device}"
36  };
37
38  // Required. The resource name of the device. For example:
39  // "enterprises/XYZ/devices/123".
40  string name = 1;
41
42  // Output only. Type of the device for general display purposes.
43  // For example: "THERMOSTAT". The device type should not be used to deduce or
44  // infer functionality of the actual device it is assigned to. Instead, use
45  // the returned traits for the device.
46  string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
47
48  // Output only. Device traits.
49  google.protobuf.Struct traits = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
50
51  // Assignee details of the device.
52  repeated ParentRelation parent_relations = 5;
53}
54
55// Represents device relationships, for instance, structure/room to which the
56// device is assigned to.
57message ParentRelation {
58  // Output only. The name of the relation -- e.g., structure/room where the
59  // device is assigned to. For example: "enterprises/XYZ/structures/ABC" or
60  // "enterprises/XYZ/structures/ABC/rooms/123"
61  string parent = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
62
63  // Output only. The custom name of the relation -- e.g., structure/room where
64  // the device is assigned to.
65  string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
66}
67