device.proto 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Copyright 2020 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. syntax = "proto3";
  15. package google.home.enterprise.sdm.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/struct.proto";
  19. option csharp_namespace = "Google.Home.Enterprise.Sdm.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/home/enterprise/sdm/v1;sdm";
  21. option java_multiple_files = true;
  22. option java_package = "com.google.home.enterprise.sdm.v1";
  23. option objc_class_prefix = "GHENTSDM";
  24. option php_namespace = "Google\\Home\\Enterprise\\Sdm\\V1";
  25. // Device resource represents an instance of enterprise managed device in the
  26. // property.
  27. message Device {
  28. option (google.api.resource) = {
  29. type: "smartdevicemanagement.googleapis.com/Device"
  30. pattern: "enterprises/{enterprise}/devices/{device}"
  31. };
  32. // Required. The resource name of the device. For example:
  33. // "enterprises/XYZ/devices/123".
  34. string name = 1;
  35. // Output only. Type of the device for general display purposes.
  36. // For example: "THERMOSTAT". The device type should not be used to deduce or
  37. // infer functionality of the actual device it is assigned to. Instead, use
  38. // the returned traits for the device.
  39. string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  40. // Output only. Device traits.
  41. google.protobuf.Struct traits = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  42. // Assignee details of the device.
  43. repeated ParentRelation parent_relations = 5;
  44. }
  45. // Represents device relationships, for instance, structure/room to which the
  46. // device is assigned to. For now this is only filled in the enterprise flow.
  47. message ParentRelation {
  48. // Output only. The name of the relation -- e.g., structure/room where the
  49. // device is assigned to. For example: "enterprises/XYZ/structures/ABC" or
  50. // "enterprises/XYZ/structures/ABC/rooms/123"
  51. string parent = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  52. // Output only. The custom name of the relation -- e.g., structure/room where
  53. // the device is assigned to.
  54. string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  55. }