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-organizations.proto 2.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.organizations;
  20. import "ws-commons.proto";
  21. option java_package = "org.sonarqube.ws";
  22. option java_outer_classname = "Organizations";
  23. option optimize_for = SPEED;
  24. // WS api/organizations/create
  25. message CreateWsResponse {
  26. optional Organization organization = 1;
  27. }
  28. // WS api/organizations/update
  29. message UpdateWsResponse {
  30. optional Organization organization = 1;
  31. }
  32. // WS api/organizations/search
  33. message SearchWsResponse {
  34. repeated Organization organizations = 1;
  35. optional sonarqube.ws.commons.Paging paging = 2;
  36. }
  37. // WS api/organizations/search_members
  38. message SearchMembersWsResponse {
  39. optional sonarqube.ws.commons.Paging paging = 1;
  40. repeated User users = 2;
  41. }
  42. // WS api/organizations/add_member
  43. message AddMemberWsResponse {
  44. optional User user = 1;
  45. }
  46. message Organization {
  47. optional string key = 1;
  48. optional string name = 2;
  49. optional string description = 3;
  50. optional string url = 4;
  51. optional string avatar = 5;
  52. optional bool guarded = 6;
  53. optional Alm alm = 8;
  54. optional Actions actions = 9;
  55. optional Subscription subscription = 10;
  56. message Alm {
  57. optional string key = 1;
  58. optional string url = 2;
  59. }
  60. message Actions {
  61. optional bool admin = 1;
  62. optional bool delete = 2;
  63. optional bool provision = 3;
  64. }
  65. }
  66. message User {
  67. optional string login = 1;
  68. optional string name = 2;
  69. optional string avatar = 3;
  70. optional int32 groupCount = 4;
  71. }
  72. // See org.sonar.db.organization.OrganizationDto.Subscription
  73. enum Subscription {
  74. // Zero is required in order to not get LONG as default value
  75. // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
  76. UNKNOWN = 0;
  77. SONARQUBE = 1;
  78. FREE = 2;
  79. PAID = 3;
  80. }