You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ws-measures.proto 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. // SonarQube, open source software quality management tool.
  2. // Copyright (C) 2008-2016 SonarSource
  3. // mailto:contact AT sonarsource DOT com
  4. //
  5. // SonarQube is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU Lesser General Public
  7. // License as published by the Free Software Foundation; either
  8. // version 3 of the License, or (at your option) any later version.
  9. //
  10. // SonarQube is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with this program; if not, write to the Free Software Foundation,
  17. // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. syntax = "proto2";
  19. package sonarqube.ws.measures;
  20. import "ws-commons.proto";
  21. option java_package = "org.sonarqube.ws";
  22. option java_outer_classname = "Measures";
  23. option optimize_for = SPEED;
  24. // WS api/measures/component_tree
  25. message ComponentTreeWsResponse {
  26. optional sonarqube.ws.commons.Paging paging = 1;
  27. optional Component baseComponent = 2;
  28. repeated Component components = 3;
  29. optional Metrics metrics = 4;
  30. optional Periods periods = 5;
  31. }
  32. // WS api/measures/component
  33. message ComponentWsResponse {
  34. optional Component component = 1;
  35. optional Metrics metrics = 2;
  36. optional Periods periods = 3;
  37. }
  38. // WS api/measures/search
  39. message SearchWsResponse {
  40. repeated Measure measures = 1;
  41. }
  42. // WS api/measures/search_history
  43. message SearchHistoryResponse {
  44. optional sonarqube.ws.commons.Paging paging = 1;
  45. repeated HistoryMeasure measures = 2;
  46. message HistoryMeasure {
  47. optional string metric = 1;
  48. repeated HistoryValue history = 2;
  49. }
  50. message HistoryValue {
  51. optional string date = 1;
  52. optional string value = 2;
  53. }
  54. }
  55. message Component {
  56. optional string id = 1;
  57. optional string key = 2;
  58. optional string refId = 3;
  59. optional string refKey = 4;
  60. optional string projectId = 5;
  61. optional string name = 6;
  62. optional string description = 7;
  63. optional string qualifier = 8;
  64. optional string path = 9;
  65. optional string language = 10;
  66. repeated Measure measures = 11;
  67. optional string branch = 12;
  68. optional string pullRequest = 13;
  69. }
  70. message Period {
  71. optional int32 index = 1;
  72. optional string mode = 2;
  73. optional string date = 3;
  74. optional string parameter = 4;
  75. }
  76. message Periods {
  77. repeated Period periods = 1;
  78. }
  79. message Metrics {
  80. repeated sonarqube.ws.commons.Metric metrics = 1;
  81. }
  82. message Measure {
  83. optional string metric = 1;
  84. optional string value = 2;
  85. optional PeriodsValue periods = 3;
  86. optional string component = 4;
  87. optional bool bestValue = 5;
  88. }
  89. message PeriodsValue {
  90. repeated PeriodValue periodsValue = 1;
  91. }
  92. message PeriodValue {
  93. optional int32 index = 1;
  94. optional string value = 2;
  95. optional bool bestValue = 3;
  96. }