summaryrefslogtreecommitdiff
path: root/third_party/googleapis/google/home/enterprise/sdm/v1/device.proto
blob: fa2fd6d4c11c4e27b4a4f8f65497987dcf6f5017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.home.enterprise.sdm.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/struct.proto";

option csharp_namespace = "Google.Home.Enterprise.Sdm.V1";
option go_package = "google.golang.org/genproto/googleapis/home/enterprise/sdm/v1;sdm";
option java_multiple_files = true;
option java_package = "com.google.home.enterprise.sdm.v1";
option objc_class_prefix = "GHENTSDM";
option php_namespace = "Google\\Home\\Enterprise\\Sdm\\V1";

// Device resource represents an instance of enterprise managed device in the
// property.
message Device {
  option (google.api.resource) = {
    type: "smartdevicemanagement.googleapis.com/Device"
    pattern: "enterprises/{enterprise}/devices/{device}"
  };

  // Required. The resource name of the device. For example:
  // "enterprises/XYZ/devices/123".
  string name = 1;

  // Output only. Type of the device for general display purposes.
  // For example: "THERMOSTAT". The device type should not be used to deduce or
  // infer functionality of the actual device it is assigned to. Instead, use
  // the returned traits for the device.
  string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. Device traits.
  google.protobuf.Struct traits = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Assignee details of the device.
  repeated ParentRelation parent_relations = 5;
}

// Represents device relationships, for instance, structure/room to which the
// device is assigned to. For now this is only filled in the enterprise flow.
message ParentRelation {
  // Output only. The name of the relation -- e.g., structure/room where the
  // device is assigned to. For example: "enterprises/XYZ/structures/ABC" or
  // "enterprises/XYZ/structures/ABC/rooms/123"
  string parent = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

  // Output only. The custom name of the relation -- e.g., structure/room where
  // the device is assigned to.
  string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}