aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws
diff options
context:
space:
mode:
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>2017-12-04 17:59:44 +0100
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>2017-12-06 14:40:17 +0100
commit7b767314a706c363ba466572d2fe8e7d46004b6a (patch)
treece5cc5c96e9f2223d7575e66414f1f5d63641346 /sonar-ws
parent460bb1a793ad325312c5d0644dbd3753d4835207 (diff)
downloadsonarqube-7b767314a706c363ba466572d2fe8e7d46004b6a.tar.gz
sonarqube-7b767314a706c363ba466572d2fe8e7d46004b6a.zip
Generate class WsClient in sonar-ws
Diffstat (limited to 'sonar-ws')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java345
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java129
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java10
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/package-info.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java37
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/ChangePasswordRequest.java75
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/CreateRequest.java135
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/DeactivateRequest.java48
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/GroupsRequest.java119
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java98
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/UpdateRequest.java102
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java191
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/users/package-info.java26
13 files changed, 1177 insertions, 140 deletions
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java
index 3712426dd3a..ecef12eecfd 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java
@@ -19,28 +19,53 @@
*/
package org.sonarqube.ws.client;
+import javax.annotation.Generated;
+import org.sonarqube.ws.client.analysisreports.AnalysisReportsService;
+import org.sonarqube.ws.client.authentication.AuthenticationService;
+import org.sonarqube.ws.client.batch.BatchService;
import org.sonarqube.ws.client.ce.CeService;
import org.sonarqube.ws.client.components.ComponentsService;
+import org.sonarqube.ws.client.custommeasures.CustomMeasuresService;
+import org.sonarqube.ws.client.duplications.DuplicationsService;
+import org.sonarqube.ws.client.editions.EditionsService;
+import org.sonarqube.ws.client.emails.EmailsService;
import org.sonarqube.ws.client.favorites.FavoritesService;
+import org.sonarqube.ws.client.favourites.FavouritesService;
import org.sonarqube.ws.client.issues.IssuesService;
+import org.sonarqube.ws.client.l10n.L10nService;
+import org.sonarqube.ws.client.languages.LanguagesService;
import org.sonarqube.ws.client.measures.MeasuresService;
+import org.sonarqube.ws.client.metrics.MetricsService;
+import org.sonarqube.ws.client.navigation.NavigationService;
import org.sonarqube.ws.client.notifications.NotificationsService;
import org.sonarqube.ws.client.organizations.OrganizationsService;
import org.sonarqube.ws.client.permissions.PermissionsService;
-import org.sonarqube.ws.client.project.ProjectsService;
+import org.sonarqube.ws.client.plugins.PluginsService;
+import org.sonarqube.ws.client.profiles.ProfilesService;
import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService;
import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
+import org.sonarqube.ws.client.projects.ProjectsService;
+import org.sonarqube.ws.client.projecttags.ProjectTagsService;
+import org.sonarqube.ws.client.properties.PropertiesService;
import org.sonarqube.ws.client.qualitygates.QualitygatesService;
import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService;
+import org.sonarqube.ws.client.resources.ResourcesService;
import org.sonarqube.ws.client.roots.RootsService;
import org.sonarqube.ws.client.rules.RulesService;
+import org.sonarqube.ws.client.server.ServerService;
import org.sonarqube.ws.client.settings.SettingsService;
+import org.sonarqube.ws.client.sources.SourcesService;
import org.sonarqube.ws.client.system.SystemService;
-import org.sonarqube.ws.client.user.UsersService;
+import org.sonarqube.ws.client.tests.TestsService;
+import org.sonarqube.ws.client.timemachine.TimemachineService;
+import org.sonarqube.ws.client.updatecenter.UpdatecenterService;
import org.sonarqube.ws.client.usergroups.UserGroupsService;
+import org.sonarqube.ws.client.userproperties.UserPropertiesService;
+import org.sonarqube.ws.client.users.UsersService;
import org.sonarqube.ws.client.usertokens.UserTokensService;
import org.sonarqube.ws.client.webhooks.WebhooksService;
+import org.sonarqube.ws.client.webservices.WebservicesService;
/**
* This class is not public anymore since version 5.5. It is
@@ -48,76 +73,153 @@ import org.sonarqube.ws.client.webhooks.WebhooksService;
*
* @since 5.3
*/
+@Generated("sonar-ws-generator")
class DefaultWsClient implements WsClient {
private final WsConnector wsConnector;
- private final OrganizationsService organizations;
- private final PermissionsService permissions;
- private final ComponentsService components;
- private final FavoritesService favoritesService;
- private final QualityprofilesService qualityprofiles;
- private final IssuesService issues;
- private final UsersService usersService;
- private final UserGroupsService userGroupsService;
- private final UserTokensService userTokensService;
- private final QualitygatesService qualityGatesService;
- private final MeasuresService measures;
- private final SystemService systemService;
+
+ private final AnalysisReportsService analysisReportsService;
+ private final AuthenticationService authenticationService;
private final CeService ceService;
- private final RulesService rulesService;
- private final ProjectsService projectsService;
+ private final ComponentsService componentsService;
+ private final CustomMeasuresService customMeasuresService;
+ private final DuplicationsService duplicationsService;
+ private final EditionsService editionsService;
+ private final EmailsService emailsService;
+ private final FavoritesService favoritesService;
+ private final FavouritesService favouritesService;
+ private final IssuesService issuesService;
+ private final L10nService l10nService;
+ private final LanguagesService languagesService;
+ private final MeasuresService measuresService;
+ private final MetricsService metricsService;
+ private final NavigationService navigationService;
+ private final NotificationsService notificationsService;
+ private final OrganizationsService organizationsService;
+ private final PermissionsService permissionsService;
+ private final PluginsService pluginsService;
+ private final ProfilesService profilesService;
+ private final ProjectAnalysesService projectAnalysesService;
+ private final ProjectBranchesService projectBranchesService;
private final ProjectLinksService projectLinksService;
- private final SettingsService settingsService;
+ private final ProjectTagsService projectTagsService;
+ private final ProjectsService projectsService;
+ private final PropertiesService propertiesService;
+ private final QualitygatesService qualitygatesService;
+ private final QualityprofilesService qualityprofilesService;
+ private final ResourcesService resourcesService;
private final RootsService rootsService;
+ private final RulesService rulesService;
+ private final ServerService serverService;
+ private final SettingsService settingsService;
+ private final SourcesService sourcesService;
+ private final SystemService systemService;
+ private final TestsService testsService;
+ private final TimemachineService timemachineService;
+ private final UpdatecenterService updatecenterService;
+ private final UserGroupsService userGroupsService;
+ private final UserPropertiesService userPropertiesService;
+ private final UserTokensService userTokensService;
+ private final UsersService usersService;
private final WebhooksService webhooksService;
- private final ProjectAnalysesService projectAnalyses;
- private final NotificationsService notificationsService;
- private final ProjectBranchesService projectBranchesService;
+ private final WebservicesService webservicesService;
+ private final BatchService batchService;
DefaultWsClient(WsConnector wsConnector) {
this.wsConnector = wsConnector;
- this.organizations = new OrganizationsService(wsConnector);
- this.permissions = new PermissionsService(wsConnector);
- this.components = new ComponentsService(wsConnector);
- this.favoritesService = new FavoritesService(wsConnector);
- this.qualityprofiles = new QualityprofilesService(wsConnector);
- this.issues = new IssuesService(wsConnector);
- this.usersService = new UsersService(wsConnector);
- this.userGroupsService = new UserGroupsService(wsConnector);
- this.userTokensService = new UserTokensService(wsConnector);
- this.qualityGatesService = new QualitygatesService(wsConnector);
- this.measures = new MeasuresService(wsConnector);
- this.systemService = new SystemService(wsConnector);
+
+ this.analysisReportsService = new AnalysisReportsService(wsConnector);
+ this.authenticationService = new AuthenticationService(wsConnector);
this.ceService = new CeService(wsConnector);
- this.rulesService = new RulesService(wsConnector);
- this.projectsService = new ProjectsService(wsConnector);
+ this.componentsService = new ComponentsService(wsConnector);
+ this.customMeasuresService = new CustomMeasuresService(wsConnector);
+ this.duplicationsService = new DuplicationsService(wsConnector);
+ this.editionsService = new EditionsService(wsConnector);
+ this.emailsService = new EmailsService(wsConnector);
+ this.favoritesService = new FavoritesService(wsConnector);
+ this.favouritesService = new FavouritesService(wsConnector);
+ this.issuesService = new IssuesService(wsConnector);
+ this.l10nService = new L10nService(wsConnector);
+ this.languagesService = new LanguagesService(wsConnector);
+ this.measuresService = new MeasuresService(wsConnector);
+ this.metricsService = new MetricsService(wsConnector);
+ this.navigationService = new NavigationService(wsConnector);
+ this.notificationsService = new NotificationsService(wsConnector);
+ this.organizationsService = new OrganizationsService(wsConnector);
+ this.permissionsService = new PermissionsService(wsConnector);
+ this.pluginsService = new PluginsService(wsConnector);
+ this.profilesService = new ProfilesService(wsConnector);
+ this.projectAnalysesService = new ProjectAnalysesService(wsConnector);
+ this.projectBranchesService = new ProjectBranchesService(wsConnector);
this.projectLinksService = new ProjectLinksService(wsConnector);
- this.settingsService = new SettingsService(wsConnector);
+ this.projectTagsService = new ProjectTagsService(wsConnector);
+ this.projectsService = new ProjectsService(wsConnector);
+ this.propertiesService = new PropertiesService(wsConnector);
+ this.qualitygatesService = new QualitygatesService(wsConnector);
+ this.qualityprofilesService = new QualityprofilesService(wsConnector);
+ this.resourcesService = new ResourcesService(wsConnector);
this.rootsService = new RootsService(wsConnector);
+ this.rulesService = new RulesService(wsConnector);
+ this.serverService = new ServerService(wsConnector);
+ this.settingsService = new SettingsService(wsConnector);
+ this.sourcesService = new SourcesService(wsConnector);
+ this.systemService = new SystemService(wsConnector);
+ this.testsService = new TestsService(wsConnector);
+ this.timemachineService = new TimemachineService(wsConnector);
+ this.updatecenterService = new UpdatecenterService(wsConnector);
+ this.userGroupsService = new UserGroupsService(wsConnector);
+ this.userPropertiesService = new UserPropertiesService(wsConnector);
+ this.userTokensService = new UserTokensService(wsConnector);
+ this.usersService = new UsersService(wsConnector);
this.webhooksService = new WebhooksService(wsConnector);
- this.projectAnalyses = new ProjectAnalysesService(wsConnector);
- this.projectBranchesService = new ProjectBranchesService(wsConnector);
- this.notificationsService = new NotificationsService(wsConnector);
+ this.webservicesService = new WebservicesService(wsConnector);
+ this.batchService = new BatchService(wsConnector);
}
@Override
+ @Deprecated
public WsConnector wsConnector() {
return wsConnector;
}
@Override
- public OrganizationsService organizations() {
- return organizations;
+ public AnalysisReportsService analysisReports() {
+ return analysisReportsService;
}
@Override
- public PermissionsService permissions() {
- return permissions;
+ public AuthenticationService authentication() {
+ return authenticationService;
+ }
+
+ @Override
+ public CeService ce() {
+ return ceService;
}
@Override
public ComponentsService components() {
- return components;
+ return componentsService;
+ }
+
+ @Override
+ public CustomMeasuresService customMeasures() {
+ return customMeasuresService;
+ }
+
+ @Override
+ public DuplicationsService duplications() {
+ return duplicationsService;
+ }
+
+ @Override
+ public EditionsService editions() {
+ return editionsService;
+ }
+
+ @Override
+ public EmailsService emails() {
+ return emailsService;
}
@Override
@@ -126,58 +228,73 @@ class DefaultWsClient implements WsClient {
}
@Override
- public QualityprofilesService qualityProfiles() {
- return qualityprofiles;
+ public FavouritesService favourites() {
+ return favouritesService;
}
@Override
public IssuesService issues() {
- return issues;
+ return issuesService;
}
@Override
- public UsersService users() {
- return usersService;
+ public L10nService l10n() {
+ return l10nService;
}
@Override
- public UserGroupsService userGroups() {
- return userGroupsService;
+ public LanguagesService languages() {
+ return languagesService;
}
@Override
- public UserTokensService userTokens() {
- return userTokensService;
+ public MeasuresService measures() {
+ return measuresService;
}
@Override
- public QualitygatesService qualityGates() {
- return qualityGatesService;
+ public MetricsService metrics() {
+ return metricsService;
}
@Override
- public MeasuresService measures() {
- return measures;
+ public NavigationService navigation() {
+ return navigationService;
}
@Override
- public SystemService system() {
- return systemService;
+ public NotificationsService notifications() {
+ return notificationsService;
}
@Override
- public CeService ce() {
- return ceService;
+ public OrganizationsService organizations() {
+ return organizationsService;
}
@Override
- public RulesService rules() {
- return rulesService;
+ public PermissionsService permissions() {
+ return permissionsService;
}
@Override
- public ProjectsService projects() {
- return projectsService;
+ public PluginsService plugins() {
+ return pluginsService;
+ }
+
+ @Override
+ public ProfilesService profiles() {
+ return profilesService;
+ }
+
+ @Override
+ public ProjectAnalysesService projectAnalyses() {
+ return projectAnalysesService;
+ }
+
+ @Override
+ public ProjectBranchesService projectBranches() {
+ return projectBranchesService;
}
@Override
@@ -186,8 +303,33 @@ class DefaultWsClient implements WsClient {
}
@Override
- public SettingsService settings() {
- return settingsService;
+ public ProjectTagsService projectTags() {
+ return projectTagsService;
+ }
+
+ @Override
+ public ProjectsService projects() {
+ return projectsService;
+ }
+
+ @Override
+ public PropertiesService properties() {
+ return propertiesService;
+ }
+
+ @Override
+ public QualitygatesService qualitygates() {
+ return qualitygatesService;
+ }
+
+ @Override
+ public QualityprofilesService qualityprofiles() {
+ return qualityprofilesService;
+ }
+
+ @Override
+ public ResourcesService resources() {
+ return resourcesService;
}
@Override
@@ -196,22 +338,77 @@ class DefaultWsClient implements WsClient {
}
@Override
- public WebhooksService webhooks() {
- return webhooksService;
+ public RulesService rules() {
+ return rulesService;
}
@Override
- public ProjectAnalysesService projectAnalyses() {
- return projectAnalyses;
+ public ServerService server() {
+ return serverService;
}
@Override
- public ProjectBranchesService projectBranches() {
- return projectBranchesService;
+ public SettingsService settings() {
+ return settingsService;
}
@Override
- public NotificationsService notifications() {
- return notificationsService;
+ public SourcesService sources() {
+ return sourcesService;
+ }
+
+ @Override
+ public SystemService system() {
+ return systemService;
+ }
+
+ @Override
+ public TestsService tests() {
+ return testsService;
+ }
+
+ @Override
+ public TimemachineService timemachine() {
+ return timemachineService;
+ }
+
+ @Override
+ public UpdatecenterService updatecenter() {
+ return updatecenterService;
+ }
+
+ @Override
+ public UserGroupsService userGroups() {
+ return userGroupsService;
+ }
+
+ @Override
+ public UserPropertiesService userProperties() {
+ return userPropertiesService;
+ }
+
+ @Override
+ public UserTokensService userTokens() {
+ return userTokensService;
+ }
+
+ @Override
+ public UsersService users() {
+ return usersService;
+ }
+
+ @Override
+ public WebhooksService webhooks() {
+ return webhooksService;
+ }
+
+ @Override
+ public WebservicesService webservices() {
+ return webservicesService;
+ }
+
+ @Override
+ public BatchService batch() {
+ return batchService;
}
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java
index 88948a30469..3c602a95e75 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java
@@ -19,28 +19,54 @@
*/
package org.sonarqube.ws.client;
+import javax.annotation.Generated;
+
+import org.sonarqube.ws.client.analysisreports.AnalysisReportsService;
+import org.sonarqube.ws.client.authentication.AuthenticationService;
import org.sonarqube.ws.client.ce.CeService;
import org.sonarqube.ws.client.components.ComponentsService;
+import org.sonarqube.ws.client.custommeasures.CustomMeasuresService;
+import org.sonarqube.ws.client.duplications.DuplicationsService;
+import org.sonarqube.ws.client.editions.EditionsService;
+import org.sonarqube.ws.client.emails.EmailsService;
import org.sonarqube.ws.client.favorites.FavoritesService;
+import org.sonarqube.ws.client.favourites.FavouritesService;
import org.sonarqube.ws.client.issues.IssuesService;
+import org.sonarqube.ws.client.l10n.L10nService;
+import org.sonarqube.ws.client.languages.LanguagesService;
import org.sonarqube.ws.client.measures.MeasuresService;
+import org.sonarqube.ws.client.metrics.MetricsService;
+import org.sonarqube.ws.client.navigation.NavigationService;
import org.sonarqube.ws.client.notifications.NotificationsService;
import org.sonarqube.ws.client.organizations.OrganizationsService;
import org.sonarqube.ws.client.permissions.PermissionsService;
-import org.sonarqube.ws.client.project.ProjectsService;
+import org.sonarqube.ws.client.plugins.PluginsService;
+import org.sonarqube.ws.client.profiles.ProfilesService;
import org.sonarqube.ws.client.projectanalyses.ProjectAnalysesService;
import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
+import org.sonarqube.ws.client.projecttags.ProjectTagsService;
+import org.sonarqube.ws.client.projects.ProjectsService;
+import org.sonarqube.ws.client.properties.PropertiesService;
import org.sonarqube.ws.client.qualitygates.QualitygatesService;
import org.sonarqube.ws.client.qualityprofiles.QualityprofilesService;
+import org.sonarqube.ws.client.resources.ResourcesService;
import org.sonarqube.ws.client.roots.RootsService;
import org.sonarqube.ws.client.rules.RulesService;
+import org.sonarqube.ws.client.server.ServerService;
import org.sonarqube.ws.client.settings.SettingsService;
+import org.sonarqube.ws.client.sources.SourcesService;
import org.sonarqube.ws.client.system.SystemService;
-import org.sonarqube.ws.client.user.UsersService;
+import org.sonarqube.ws.client.tests.TestsService;
+import org.sonarqube.ws.client.timemachine.TimemachineService;
+import org.sonarqube.ws.client.updatecenter.UpdatecenterService;
import org.sonarqube.ws.client.usergroups.UserGroupsService;
+import org.sonarqube.ws.client.userproperties.UserPropertiesService;
import org.sonarqube.ws.client.usertokens.UserTokensService;
+import org.sonarqube.ws.client.users.UsersService;
import org.sonarqube.ws.client.webhooks.WebhooksService;
+import org.sonarqube.ws.client.webservices.WebservicesService;
+import org.sonarqube.ws.client.batch.BatchService;
/**
* Allows to request the web services of SonarQube server. Instance is provided by
@@ -60,69 +86,100 @@ import org.sonarqube.ws.client.webhooks.WebhooksService;
*
* @since 5.3
*/
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
public interface WsClient {
- OrganizationsService organizations();
+ WsConnector wsConnector();
+
+ AnalysisReportsService analysisReports();
+
+ AuthenticationService authentication();
+
+ CeService ce();
ComponentsService components();
+ CustomMeasuresService customMeasures();
+
+ DuplicationsService duplications();
+
+ EditionsService editions();
+
+ EmailsService emails();
+
FavoritesService favorites();
+ FavouritesService favourites();
+
IssuesService issues();
+ L10nService l10n();
+
+ LanguagesService languages();
+
+ MeasuresService measures();
+
+ MetricsService metrics();
+
+ NavigationService navigation();
+
NotificationsService notifications();
+ OrganizationsService organizations();
+
PermissionsService permissions();
- QualityprofilesService qualityProfiles();
+ PluginsService plugins();
- UsersService users();
+ ProfilesService profiles();
- UserGroupsService userGroups();
+ ProjectAnalysesService projectAnalyses();
- UserTokensService userTokens();
+ ProjectBranchesService projectBranches();
- QualitygatesService qualityGates();
+ ProjectLinksService projectLinks();
- MeasuresService measures();
+ ProjectTagsService projectTags();
- SystemService system();
+ ProjectsService projects();
- CeService ce();
+ PropertiesService properties();
- RulesService rules();
+ QualitygatesService qualitygates();
- WsConnector wsConnector();
+ QualityprofilesService qualityprofiles();
- /**
- * @since 5.5
- */
- ProjectsService projects();
+ ResourcesService resources();
- /**
- * @since 6.1
- */
- ProjectLinksService projectLinks();
+ RootsService roots();
+
+ RulesService rules();
+
+ ServerService server();
- /**
- * @since 6.1
- */
SettingsService settings();
- /**
- * @since 6.2
- */
- RootsService roots();
+ SourcesService sources();
+
+ SystemService system();
+
+ TestsService tests();
+
+ TimemachineService timemachine();
+
+ UpdatecenterService updatecenter();
+
+ UserGroupsService userGroups();
+
+ UserPropertiesService userProperties();
+
+ UserTokensService userTokens();
+
+ UsersService users();
- /**
- * @since 6.2
- */
WebhooksService webhooks();
- ProjectAnalysesService projectAnalyses();
+ WebservicesService webservices();
- /**
- * @since 6.6>
- */
- ProjectBranchesService projectBranches();
+ BatchService batch();
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java
index 6ead62cc9cc..42bd594689a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java
@@ -21,6 +21,11 @@ package org.sonarqube.ws.client.issues;
import java.util.stream.Collectors;
import javax.annotation.Generated;
+import org.sonarqube.ws.MediaTypes;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.PostRequest;
+import org.sonarqube.ws.client.WsConnector;
import org.sonarqube.ws.Issues.AddCommentResponse;
import org.sonarqube.ws.Issues.AssignResponse;
import org.sonarqube.ws.Issues.AuthorsResponse;
@@ -33,11 +38,6 @@ import org.sonarqube.ws.Issues.SetSeverityResponse;
import org.sonarqube.ws.Issues.SetTagsResponse;
import org.sonarqube.ws.Issues.SetTypeResponse;
import org.sonarqube.ws.Issues.TagsResponse;
-import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.client.BaseService;
-import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.WsConnector;
/**
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues">Further information about this web service online</a>
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/package-info.java
index 8e2e690c6eb..2498aa78330 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/package-info.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/package-info.java
@@ -18,7 +18,9 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
@ParametersAreNonnullByDefault
+@Generated("sonar-ws-generator")
package org.sonarqube.ws.client;
import javax.annotation.ParametersAreNonnullByDefault;
+import javax.annotation.Generated;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java
index e33ccfd16ac..bfef940b019 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java
@@ -26,11 +26,12 @@ import org.sonarqube.ws.client.BaseService;
import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.client.PostRequest;
import org.sonarqube.ws.client.WsConnector;
-import org.sonarqube.ws.Qualitygates.AppResponse;
import org.sonarqube.ws.Qualitygates.CreateResponse;
import org.sonarqube.ws.Qualitygates.CreateConditionResponse;
import org.sonarqube.ws.Qualitygates.GetByProjectResponse;
+import org.sonarqube.ws.Qualitygates.ListWsResponse;
import org.sonarqube.ws.Qualitygates.ProjectStatusResponse;
+import org.sonarqube.ws.Qualitygates.ShowWsResponse;
import org.sonarqube.ws.Qualitygates.UpdateConditionResponse;
/**
@@ -46,19 +47,6 @@ public class QualitygatesService extends BaseService {
/**
*
* This is part of the internal API.
- * This is a GET request.
- * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/app">Further information about this action online (including a response example)</a>
- * @since 4.3
- */
- public AppResponse app() {
- return call(
- new GetRequest(path("app")),
- AppResponse.parser());
- }
-
- /**
- *
- * This is part of the internal API.
* This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/copy">Further information about this action online (including a response example)</a>
* @since 4.3
@@ -172,11 +160,10 @@ public class QualitygatesService extends BaseService {
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/list">Further information about this action online (including a response example)</a>
* @since 4.3
*/
- public String list() {
+ public ListWsResponse list() {
return call(
- new GetRequest(path("list"))
- .setMediaType(MediaTypes.JSON)
- ).content();
+ new GetRequest(path("list")),
+ ListWsResponse.parser());
}
/**
@@ -269,13 +256,12 @@ public class QualitygatesService extends BaseService {
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/show">Further information about this action online (including a response example)</a>
* @since 4.3
*/
- public String show(ShowRequest request) {
+ public ShowWsResponse show(ShowRequest request) {
return call(
new GetRequest(path("show"))
.setParam("id", request.getId())
- .setParam("name", request.getName())
- .setMediaType(MediaTypes.JSON)
- ).content();
+ .setParam("name", request.getName()),
+ ShowWsResponse.parser());
}
/**
@@ -284,11 +270,12 @@ public class QualitygatesService extends BaseService {
* This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/unset_default">Further information about this action online (including a response example)</a>
* @since 4.3
+ * @deprecated since 7.0
*/
- public void unsetDefault(UnsetDefaultRequest request) {
- call(
+ @Deprecated
+ public String unsetDefault() {
+ return call(
new PostRequest(path("unset_default"))
- .setParam("id", request.getId())
.setMediaType(MediaTypes.JSON)
).content();
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/ChangePasswordRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/ChangePasswordRequest.java
new file mode 100644
index 00000000000..fe370e42bff
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/ChangePasswordRequest.java
@@ -0,0 +1,75 @@
+/*
+ * 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.users;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/change_password">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("sonar-ws-generator")
+public class ChangePasswordRequest {
+
+ private String login;
+ private String password;
+ private String previousPassword;
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "myuser"
+ */
+ public ChangePasswordRequest setLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ public String getLogin() {
+ return login;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "mypassword"
+ */
+ public ChangePasswordRequest setPassword(String password) {
+ this.password = password;
+ return this;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * Example value: "oldpassword"
+ */
+ public ChangePasswordRequest setPreviousPassword(String previousPassword) {
+ this.previousPassword = previousPassword;
+ return this;
+ }
+
+ public String getPreviousPassword() {
+ return previousPassword;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/CreateRequest.java
new file mode 100644
index 00000000000..7852c6846c8
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/CreateRequest.java
@@ -0,0 +1,135 @@
+/*
+ * 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.users;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/create">Further information about this action online (including a response example)</a>
+ * @since 3.7
+ */
+@Generated("sonar-ws-generator")
+public class CreateRequest {
+
+ private String email;
+ private String local;
+ private String login;
+ private String name;
+ private String password;
+ private String scmAccount;
+ private String scmAccounts;
+
+ /**
+ * Example value: "myname@email.com"
+ */
+ public CreateRequest setEmail(String email) {
+ this.email = email;
+ return this;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * Possible values:
+ * <ul>
+ * <li>"true"</li>
+ * <li>"false"</li>
+ * <li>"yes"</li>
+ * <li>"no"</li>
+ * </ul>
+ */
+ public CreateRequest setLocal(String local) {
+ this.local = local;
+ return this;
+ }
+
+ public String getLocal() {
+ return local;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "myuser"
+ */
+ public CreateRequest setLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ public String getLogin() {
+ return login;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "My Name"
+ */
+ public CreateRequest setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Example value: "mypassword"
+ */
+ public CreateRequest setPassword(String password) {
+ this.password = password;
+ return this;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ /**
+ * Example value: "scmAccount=firstValue&scmAccount=secondValue&scmAccount=thirdValue"
+ */
+ public CreateRequest setScmAccount(String scmAccount) {
+ this.scmAccount = scmAccount;
+ return this;
+ }
+
+ public String getScmAccount() {
+ return scmAccount;
+ }
+
+ /**
+ * Example value: "myscmaccount1,myscmaccount2"
+ * @deprecated since 6.1
+ */
+ @Deprecated
+ public CreateRequest setScmAccounts(String scmAccounts) {
+ this.scmAccounts = scmAccounts;
+ return this;
+ }
+
+ public String getScmAccounts() {
+ return scmAccounts;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/DeactivateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/DeactivateRequest.java
new file mode 100644
index 00000000000..cf8906d82ce
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/DeactivateRequest.java
@@ -0,0 +1,48 @@
+/*
+ * 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.users;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/deactivate">Further information about this action online (including a response example)</a>
+ * @since 3.7
+ */
+@Generated("sonar-ws-generator")
+public class DeactivateRequest {
+
+ private String login;
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "myuser"
+ */
+ public DeactivateRequest setLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ public String getLogin() {
+ return login;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/GroupsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/GroupsRequest.java
new file mode 100644
index 00000000000..8db1e4e3133
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/GroupsRequest.java
@@ -0,0 +1,119 @@
+/*
+ * 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.users;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/groups">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("sonar-ws-generator")
+public class GroupsRequest {
+
+ private String login;
+ private String organization;
+ private String p;
+ private String ps;
+ private String q;
+ private String selected;
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "admin"
+ */
+ public GroupsRequest setLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ public String getLogin() {
+ return login;
+ }
+
+ /**
+ * This is part of the internal API.
+ * Example value: "my-org"
+ */
+ public GroupsRequest setOrganization(String organization) {
+ this.organization = organization;
+ return this;
+ }
+
+ public String getOrganization() {
+ return organization;
+ }
+
+ /**
+ * Example value: "42"
+ */
+ public GroupsRequest setP(String p) {
+ this.p = p;
+ return this;
+ }
+
+ public String getP() {
+ return p;
+ }
+
+ /**
+ * Example value: "20"
+ */
+ public GroupsRequest setPs(String ps) {
+ this.ps = ps;
+ return this;
+ }
+
+ public String getPs() {
+ return ps;
+ }
+
+ /**
+ * Example value: "users"
+ */
+ public GroupsRequest setQ(String q) {
+ this.q = q;
+ return this;
+ }
+
+ public String getQ() {
+ return q;
+ }
+
+ /**
+ * Possible values:
+ * <ul>
+ * <li>"all"</li>
+ * <li>"deselected"</li>
+ * <li>"selected"</li>
+ * </ul>
+ */
+ public GroupsRequest setSelected(String selected) {
+ this.selected = selected;
+ return this;
+ }
+
+ public String getSelected() {
+ return selected;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java
new file mode 100644
index 00000000000..f7b7967d1bc
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java
@@ -0,0 +1,98 @@
+/*
+ * 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.users;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/search">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+@Generated("sonar-ws-generator")
+public class SearchRequest {
+
+ private List<String> f;
+ private String p;
+ private String ps;
+ private String q;
+
+ /**
+ * Possible values:
+ * <ul>
+ * <li>"name"</li>
+ * <li>"email"</li>
+ * <li>"avatart"</li>
+ * <li>"scmAccounts"</li>
+ * <li>"groups"</li>
+ * <li>"active"</li>
+ * <li>"local"</li>
+ * <li>"externalIdentity"</li>
+ * <li>"externalProvider"</li>
+ * </ul>
+ * @deprecated since 5.4
+ */
+ @Deprecated
+ public SearchRequest setF(List<String> f) {
+ this.f = f;
+ return this;
+ }
+
+ public List<String> getF() {
+ return f;
+ }
+
+ /**
+ * Example value: "42"
+ */
+ public SearchRequest setP(String p) {
+ this.p = p;
+ return this;
+ }
+
+ public String getP() {
+ return p;
+ }
+
+ /**
+ * Example value: "20"
+ */
+ public SearchRequest setPs(String ps) {
+ this.ps = ps;
+ return this;
+ }
+
+ public String getPs() {
+ return ps;
+ }
+
+ /**
+ */
+ public SearchRequest setQ(String q) {
+ this.q = q;
+ return this;
+ }
+
+ public String getQ() {
+ return q;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UpdateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UpdateRequest.java
new file mode 100644
index 00000000000..672f3c89be7
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UpdateRequest.java
@@ -0,0 +1,102 @@
+/*
+ * 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.users;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/update">Further information about this action online (including a response example)</a>
+ * @since 3.7
+ */
+@Generated("sonar-ws-generator")
+public class UpdateRequest {
+
+ private String email;
+ private String login;
+ private String name;
+ private String scmAccount;
+ private String scmAccounts;
+
+ /**
+ * Example value: "myname@email.com"
+ */
+ public UpdateRequest setEmail(String email) {
+ this.email = email;
+ return this;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ * Example value: "myuser"
+ */
+ public UpdateRequest setLogin(String login) {
+ this.login = login;
+ return this;
+ }
+
+ public String getLogin() {
+ return login;
+ }
+
+ /**
+ * Example value: "My Name"
+ */
+ public UpdateRequest setName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Example value: "scmAccount=firstValue&scmAccount=secondValue&scmAccount=thirdValue"
+ */
+ public UpdateRequest setScmAccount(String scmAccount) {
+ this.scmAccount = scmAccount;
+ return this;
+ }
+
+ public String getScmAccount() {
+ return scmAccount;
+ }
+
+ /**
+ * Example value: "myscmaccount1,myscmaccount2"
+ * @deprecated since 6.1
+ */
+ @Deprecated
+ public UpdateRequest setScmAccounts(String scmAccounts) {
+ this.scmAccounts = scmAccounts;
+ return this;
+ }
+
+ public String getScmAccounts() {
+ return scmAccounts;
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java
new file mode 100644
index 00000000000..f456762369b
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/UsersService.java
@@ -0,0 +1,191 @@
+/*
+ * 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.users;
+
+import java.util.stream.Collectors;
+import javax.annotation.Generated;
+import org.sonarqube.ws.MediaTypes;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.PostRequest;
+import org.sonarqube.ws.client.WsConnector;
+import org.sonarqube.ws.Users.CreateWsResponse;
+import org.sonarqube.ws.Users.CurrentWsResponse;
+import org.sonarqube.ws.Users.GroupsWsResponse;
+import org.sonarqube.ws.Users.IdentityProvidersWsResponse;
+import org.sonarqube.ws.Users.SearchWsResponse;
+
+/**
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users">Further information about this web service online</a>
+ */
+@Generated("sonar-ws-generator")
+public class UsersService extends BaseService {
+
+ public UsersService(WsConnector wsConnector) {
+ super(wsConnector, "api/users");
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/change_password">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+ public void changePassword(ChangePasswordRequest request) {
+ call(
+ new PostRequest(path("change_password"))
+ .setParam("login", request.getLogin())
+ .setParam("password", request.getPassword())
+ .setParam("previousPassword", request.getPreviousPassword())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/create">Further information about this action online (including a response example)</a>
+ * @since 3.7
+ */
+ public void create(CreateRequest request) {
+ call(
+ new PostRequest(path("create"))
+ .setParam("email", request.getEmail())
+ .setParam("local", request.getLocal())
+ .setParam("login", request.getLogin())
+ .setParam("name", request.getName())
+ .setParam("password", request.getPassword())
+ .setParam("scmAccount", request.getScmAccount())
+ .setParam("scmAccounts", request.getScmAccounts()),
+ CreateWsResponse.parser());
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a GET request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/current">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+ public CurrentWsResponse current() {
+ return call(
+ new GetRequest(path("current")),
+ CurrentWsResponse.parser());
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/deactivate">Further information about this action online (including a response example)</a>
+ * @since 3.7
+ */
+ public String deactivate(DeactivateRequest request) {
+ return call(
+ new PostRequest(path("deactivate"))
+ .setParam("login", request.getLogin())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a GET request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/groups">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+ public GroupsWsResponse groups(GroupsRequest request) {
+ return call(
+ new GetRequest(path("groups"))
+ .setParam("login", request.getLogin())
+ .setParam("organization", request.getOrganization())
+ .setParam("p", request.getP())
+ .setParam("ps", request.getPs())
+ .setParam("q", request.getQ())
+ .setParam("selected", request.getSelected()),
+ GroupsWsResponse.parser());
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a GET request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/identity_providers">Further information about this action online (including a response example)</a>
+ * @since 5.5
+ */
+ public IdentityProvidersWsResponse identityProviders() {
+ return call(
+ new GetRequest(path("identity_providers")),
+ IdentityProvidersWsResponse.parser());
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a GET request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/search">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+ public SearchWsResponse search(SearchRequest request) {
+ return call(
+ new GetRequest(path("search"))
+ .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
+ .setParam("p", request.getP())
+ .setParam("ps", request.getPs())
+ .setParam("q", request.getQ()),
+ SearchWsResponse.parser());
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/skip_onboarding_tutorial">Further information about this action online (including a response example)</a>
+ * @since 6.5
+ */
+ public void skipOnboardingTutorial() {
+ call(
+ new PostRequest(path("skip_onboarding_tutorial"))
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+
+ /**
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users/update">Further information about this action online (including a response example)</a>
+ * @since 3.7
+ */
+ public String update(UpdateRequest request) {
+ return call(
+ new PostRequest(path("update"))
+ .setParam("email", request.getEmail())
+ .setParam("login", request.getLogin())
+ .setParam("name", request.getName())
+ .setParam("scmAccount", request.getScmAccount())
+ .setParam("scmAccounts", request.getScmAccounts())
+ .setMediaType(MediaTypes.JSON)
+ ).content();
+ }
+}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/users/package-info.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/package-info.java
new file mode 100644
index 00000000000..90f68b1a6d2
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/users/package-info.java
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+@ParametersAreNonnullByDefault
+@Generated("sonar-ws-generator")
+package org.sonarqube.ws.client.users;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+import javax.annotation.Generated;
+