From 24549284b72daf95f14593a49fa84e63aa183b35 Mon Sep 17 00:00:00 2001 From: Teryk Bellahsene Date: Fri, 17 Mar 2017 18:11:43 +0100 Subject: SONAR-8894 Search members of an organization WS api/organizations/search_members --- .../organization/SearchMembersWsRequest.java | 82 ++++++++++++++++++++++ sonar-ws/src/main/protobuf/ws-organizations.proto | 15 ++++ 2 files changed, 97 insertions(+) create mode 100644 sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersWsRequest.java (limited to 'sonar-ws/src') diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersWsRequest.java new file mode 100644 index 00000000000..06e8376117c --- /dev/null +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchMembersWsRequest.java @@ -0,0 +1,82 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +package org.sonarqube.ws.client.organization; + +import javax.annotation.CheckForNull; +import javax.annotation.Nullable; + +public class SearchMembersWsRequest { + private String organization; + private String selected; + private String query; + private Integer page; + private Integer pageSize; + + @CheckForNull + public String getOrganization() { + return organization; + } + + public SearchMembersWsRequest setOrganization(@Nullable String organization) { + this.organization = organization; + return this; + } + + @CheckForNull + public String getSelected() { + return selected; + } + + public SearchMembersWsRequest setSelected(@Nullable String selected) { + this.selected = selected; + return this; + } + + @CheckForNull + public String getQuery() { + return query; + } + + public SearchMembersWsRequest setQuery(@Nullable String query) { + this.query = query; + return this; + } + + @CheckForNull + public Integer getPage() { + return page; + } + + public SearchMembersWsRequest setPage(@Nullable Integer page) { + this.page = page; + return this; + } + + @CheckForNull + public Integer getPageSize() { + return pageSize; + } + + public SearchMembersWsRequest setPageSize(@Nullable Integer pageSize) { + this.pageSize = pageSize; + return this; + } +} diff --git a/sonar-ws/src/main/protobuf/ws-organizations.proto b/sonar-ws/src/main/protobuf/ws-organizations.proto index fa0251a9549..bb00aee3581 100644 --- a/sonar-ws/src/main/protobuf/ws-organizations.proto +++ b/sonar-ws/src/main/protobuf/ws-organizations.proto @@ -20,6 +20,8 @@ syntax = "proto2"; package sonarqube.ws.organizations; +import "ws-commons.proto"; + option java_package = "org.sonarqube.ws"; option java_outer_classname = "Organizations"; option optimize_for = SPEED; @@ -39,6 +41,12 @@ message SearchWsResponse { repeated Organization organizations = 1; } +// WS api/organizations/search_members +message SearchMembersWsResponse { + optional sonarqube.ws.commons.Paging paging = 1; + repeated User users = 2; +} + message Organization { optional string key = 1; optional string name = 2; @@ -47,3 +55,10 @@ message Organization { optional string avatar = 5; optional bool guarded = 6; } + +message User { + optional string login = 1; + optional string name = 2; + optional string avatar = 3; + optional int32 groupCount = 4; +} -- cgit v1.2.3