resources.proto 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. // Copyright 2021 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.chromeos.moblab.v1beta1;
  16. import "google/api/resource.proto";
  17. option go_package = "google.golang.org/genproto/googleapis/chromeos/moblab/v1beta1;moblab";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "ResourcesProto";
  20. option java_package = "com.google.chromeos.moblab.v1beta1";
  21. option optimize_for = SPEED;
  22. // Resource that represents a build target.
  23. message BuildTarget {
  24. option (google.api.resource) = {
  25. type: "chromeosmoblab.googleapis.com/BuildTarget"
  26. pattern: "buildTargets/{build_target}"
  27. };
  28. // The resource name of the build target.
  29. // Format: buildTargets/{build_target}
  30. string name = 1;
  31. }
  32. // Resource that represents a model. Each model belongs to a build target. For
  33. // non-unified build, the model name is the same as its build target name.
  34. message Model {
  35. option (google.api.resource) = {
  36. type: "chromeosmoblab.googleapis.com/Model"
  37. pattern: "buildTargets/{build_target}/models/{model}"
  38. };
  39. // The resource name of the model.
  40. // Format: buildTargets/{build_target}/models/{model}
  41. string name = 1;
  42. }
  43. // Resource that represents a chrome OS milestone.
  44. message Milestone {
  45. option (google.api.resource) = {
  46. type: "chromeosmoblab.googleapis.com/Milestone"
  47. pattern: "milestones/{milestone}"
  48. };
  49. // The resource name of the milestone.
  50. // Format: milestones/{milestone}
  51. string name = 1;
  52. }
  53. // Resource that represents a build for the given build target, model, milestone
  54. // and build version.
  55. message Build {
  56. option (google.api.resource) = {
  57. type: "chromeosmoblab.googleapis.com/Build"
  58. pattern: "buildTargets/{build_target}/models/{model}/builds/{build}"
  59. };
  60. // The build status types.
  61. enum BuildStatus {
  62. // No build status is specified.
  63. BUILD_STATUS_UNSPECIFIED = 0;
  64. // Complete Status: The build passed.
  65. PASS = 1;
  66. // Complete Status: The build failed.
  67. FAIL = 2;
  68. // Intermediate Status: The build is still running.
  69. RUNNING = 3;
  70. // Complete Status: The build was aborted.
  71. ABORTED = 4;
  72. }
  73. // The build types.
  74. enum BuildType {
  75. // Invalid build type.
  76. BUILD_TYPE_UNSPECIFIED = 0;
  77. // The release build.
  78. RELEASE = 1;
  79. // The firmware build.
  80. FIRMWARE = 2;
  81. }
  82. // The resource name of the build.
  83. // Format: buildTargets/{build_target}/models/{model}/builds/{build}
  84. // Example: buildTargets/octopus/models/bobba/builds/1234.0.0
  85. string name = 1;
  86. // The milestone that owns the build.
  87. // Format: milestones/{milestone}
  88. string milestone = 2 [(google.api.resource_reference) = {
  89. type: "chromeosmoblab.googleapis.com/Milestone"
  90. }];
  91. // The build version of the build, e.g. 1234.0.0.
  92. string build_version = 3;
  93. // The status of the build.
  94. BuildStatus status = 4;
  95. // The type of the build.
  96. BuildType type = 5;
  97. // The branch of the build.
  98. string branch = 6;
  99. // The read write firmware version of the software that is flashed to the chip
  100. // on the Chrome OS device.
  101. string rw_firmware_version = 7;
  102. }
  103. // Resource that represents a build artifact stored in Google Cloud Storage for
  104. // the given build target, model, build version and bucket.
  105. message BuildArtifact {
  106. option (google.api.resource) = {
  107. type: "chromeosmoblab.googleapis.com/BuildArtifact"
  108. pattern: "buildTargets/{build_target}/models/{model}/builds/{build}/artifacts/{artifact}"
  109. };
  110. // The resource name of the build artifact.
  111. // Format:
  112. // buildTargets/{build_target}/models/{model}/builds/{build}/artifacts/{artifact}
  113. // Example:
  114. // buildTargets/octopus/models/bobba/builds/1234.0.0/artifacts/chromeos-moblab-peng-staging
  115. string name = 1;
  116. // The build metadata of the build artifact.
  117. string build = 2 [(google.api.resource_reference) = {
  118. type: "chromeosmoblab.googleapis.com/Build"
  119. }];
  120. // The bucket that stores the build artifact.
  121. string bucket = 3;
  122. // The path of the build artifact in the bucket.
  123. string path = 4;
  124. // The number of objects in the build artifact folder. The object number can
  125. // be used to calculated the stage progress by comparing the source build
  126. // artifact with the destination build artifact.
  127. uint32 object_count = 5;
  128. }