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-settings.proto 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 = "proto3";
  19. package sonarqube.ws.settings;
  20. option java_package = "org.sonarqube.ws";
  21. option java_outer_classname = "Settings";
  22. option optimize_for = SPEED;
  23. // Response of GET api/settings/list_definitions
  24. message ListDefinitionsWsResponse {
  25. repeated Definition definitions = 1;
  26. }
  27. // Response of GET api/settings/encrypt
  28. message EncryptWsResponse {
  29. string encryptedValue = 1;
  30. }
  31. // Response of GET api/settings/generate_secret_key
  32. message GenerateSecretKeyWsResponse {
  33. string secretKey = 1;
  34. }
  35. // Response of GET api/settings/check_secret_key
  36. message CheckSecretKeyWsResponse {
  37. bool secretKeyAvailable = 1;
  38. }
  39. message Definition {
  40. string key = 1;
  41. oneof nameOneOf {string name = 2;}
  42. string description = 3;
  43. Type type = 4;
  44. oneof categoryOneOf {string category = 5;}
  45. oneof subCategoryOneOf {string subCategory = 6;}
  46. oneof defaultValueOneOf {string defaultValue = 7;}
  47. bool multiValues = 8;
  48. repeated string options = 9;
  49. repeated Field fields = 10;
  50. oneof deprecatedKeyOneOf {string deprecatedKey = 11;}
  51. }
  52. message Field {
  53. string key = 1;
  54. string name = 2;
  55. string description = 3;
  56. Type type = 4;
  57. repeated string options = 5;
  58. }
  59. enum Type {
  60. STRING = 0;
  61. TEXT = 1;
  62. PASSWORD = 2;
  63. BOOLEAN = 3;
  64. INTEGER = 4;
  65. FLOAT = 5;
  66. LONG = 6;
  67. REGULAR_EXPRESSION = 7;
  68. METRIC = 8;
  69. USER_LOGIN = 9;
  70. METRIC_LEVEL = 10;
  71. SINGLE_SELECT_LIST = 11;
  72. PROPERTY_SET = 12;
  73. LICENSE = 13;
  74. JSON = 14;
  75. FORMATTED_TEXT = 15;
  76. EMAIL = 16;
  77. }
  78. // Response of GET api/settings/values
  79. //IMPORTANT: As of August 2023 we have to align the protobuf response of values endpoint with SonarCloud, as SonarLint depends on it.
  80. //See https://xtranet-sonarsource.atlassian.net/wiki/spaces/DEV/pages/2878669037/Cross-product+consistency+in+protobuf+Web+endpoints
  81. message ValuesWsResponse {
  82. repeated Setting settings = 1;
  83. repeated string setSecuredSettings = 2;
  84. }
  85. message Setting {
  86. string key = 1;
  87. oneof valueOneOf {
  88. string value = 2;
  89. Values values = 3;
  90. FieldValues fieldValues = 4;
  91. }
  92. bool inherited = 5;
  93. oneof parentValueOneOf {
  94. string parentValue = 6;
  95. Values parentValues = 7;
  96. FieldValues parentFieldValues = 8;
  97. }
  98. Origin parentOrigin = 9;
  99. }
  100. message Values {
  101. repeated string values = 1;
  102. }
  103. message FieldValues {
  104. repeated Value fieldValues = 1;
  105. message Value {
  106. map<string, string> value = 1;
  107. }
  108. }
  109. enum Origin {
  110. UNDEFINED = 0;
  111. INSTANCE = 1;
  112. ORGANIZATION = 2;
  113. PROJECT = 3;
  114. }