]> source.dussan.org Git - sonarqube.git/commitdiff
Auto-generate sonar-ws for integration tests 2803/head
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>
Tue, 14 Nov 2017 09:42:32 +0000 (10:42 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 16 Nov 2017 16:37:18 +0000 (17:37 +0100)
676 files changed:
pom.xml
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/GroupTester.java
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/OrganizationTester.java
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/ProjectTester.java
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QGateTester.java
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/QProfileTester.java
server/sonar-qa-util/src/main/java/org/sonarqube/qa/util/UserTester.java
server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java
server/sonar-server/src/main/java/org/sonar/server/branch/ws/ListAction.java
server/sonar-server/src/main/java/org/sonar/server/ce/ws/ActivityAction.java
server/sonar-server/src/main/java/org/sonar/server/ce/ws/ActivityStatusAction.java
server/sonar-server/src/main/java/org/sonar/server/ce/ws/ComponentAction.java
server/sonar-server/src/main/java/org/sonar/server/ce/ws/SubmitAction.java
server/sonar-server/src/main/java/org/sonar/server/ce/ws/TaskAction.java
server/sonar-server/src/main/java/org/sonar/server/ce/ws/TaskFormatter.java
server/sonar-server/src/main/java/org/sonar/server/ce/ws/TaskTypesAction.java
server/sonar-server/src/main/java/org/sonar/server/ce/ws/WorkerCountAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/ComponentDtoToWsComponent.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/SearchProjectsAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/ShowAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/SuggestionsAction.java
server/sonar-server/src/main/java/org/sonar/server/component/ws/TreeAction.java
server/sonar-server/src/main/java/org/sonar/server/duplication/ws/ShowResponseBuilder.java
server/sonar-server/src/main/java/org/sonar/server/edition/ws/ApplyLicenseAction.java
server/sonar-server/src/main/java/org/sonar/server/edition/ws/FormDataAction.java
server/sonar-server/src/main/java/org/sonar/server/edition/ws/PreviewAction.java
server/sonar-server/src/main/java/org/sonar/server/edition/ws/StatusAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentDtoToWsComponent.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/ComponentTreeData.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/MeasureDtoToWsMeasure.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/SearchHistoryAction.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/SearchHistoryResponseFactory.java
server/sonar-server/src/main/java/org/sonar/server/measure/ws/SnapshotDtoToWsPeriods.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/GroupsAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchGlobalPermissionsAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/SearchProjectPermissionsAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/UsersAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/CreateTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/PermissionTemplateDtoToPermissionTemplateResponse.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/SearchTemplatesAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/TemplateGroupsAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/TemplateUsersAction.java
server/sonar-server/src/main/java/org/sonar/server/permission/ws/template/UpdateTemplateAction.java
server/sonar-server/src/main/java/org/sonar/server/platform/ws/HealthActionSupport.java
server/sonar-server/src/main/java/org/sonar/server/platform/ws/StatusAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/BulkUpdateKeyAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/ProvisionedAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/project/ws/SearchMyProjectsAction.java
server/sonar-server/src/main/java/org/sonar/server/projectlink/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/projectlink/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/projecttag/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/AppAction.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/CreateConditionAction.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/GetByProjectAction.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/ProjectStatusAction.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/QualityGateDetailsFormatter.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/SelectAction.java
server/sonar-server/src/main/java/org/sonar/server/qualitygate/ws/UpdateConditionAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/CopyAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/InheritanceAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/SearchGroupsAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/SearchUsersAction.java
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/ShowAction.java
server/sonar-server/src/main/java/org/sonar/server/root/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/test/ws/CoveredFilesAction.java
server/sonar-server/src/main/java/org/sonar/server/test/ws/ListAction.java
server/sonar-server/src/main/java/org/sonar/server/user/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/user/ws/CurrentAction.java
server/sonar-server/src/main/java/org/sonar/server/user/ws/GroupsAction.java
server/sonar-server/src/main/java/org/sonar/server/user/ws/IdentityProvidersAction.java
server/sonar-server/src/main/java/org/sonar/server/user/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/CreateAction.java
server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/GroupWsSupport.java
server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/SearchAction.java
server/sonar-server/src/main/java/org/sonar/server/usergroups/ws/UpdateAction.java
server/sonar-server/src/main/java/org/sonar/server/usertoken/ws/GenerateAction.java
server/sonar-server/src/main/java/org/sonar/server/usertoken/ws/SearchAction.java
server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java
server/sonar-server/src/test/java/org/sonar/server/branch/ws/ListActionTest.java
server/sonar-server/src/test/java/org/sonar/server/ce/ws/ActivityActionTest.java
server/sonar-server/src/test/java/org/sonar/server/ce/ws/ActivityStatusActionTest.java
server/sonar-server/src/test/java/org/sonar/server/ce/ws/ComponentActionTest.java
server/sonar-server/src/test/java/org/sonar/server/ce/ws/SubmitActionTest.java
server/sonar-server/src/test/java/org/sonar/server/ce/ws/TaskActionTest.java
server/sonar-server/src/test/java/org/sonar/server/ce/ws/TaskFormatterTest.java
server/sonar-server/src/test/java/org/sonar/server/ce/ws/WorkerCountActionTest.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/SearchProjectsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/ShowActionTest.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/SuggestionsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/TreeActionTest.java
server/sonar-server/src/test/java/org/sonar/server/edition/ws/ApplyLicenseActionTest.java
server/sonar-server/src/test/java/org/sonar/server/edition/ws/FormDataActionTest.java
server/sonar-server/src/test/java/org/sonar/server/edition/ws/PreviewActionTest.java
server/sonar-server/src/test/java/org/sonar/server/measure/ws/ComponentActionTest.java
server/sonar-server/src/test/java/org/sonar/server/measure/ws/ComponentTreeActionTest.java
server/sonar-server/src/test/java/org/sonar/server/measure/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/measure/ws/SearchHistoryActionTest.java
server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchGlobalPermissionsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/permission/ws/SearchProjectPermissionsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/SearchTemplatesActionTest.java
server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/TemplateGroupsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/permission/ws/template/TemplateUsersActionTest.java
server/sonar-server/src/test/java/org/sonar/server/platform/ws/HealthActionTest.java
server/sonar-server/src/test/java/org/sonar/server/platform/ws/SafeModeHealthActionTest.java
server/sonar-server/src/test/java/org/sonar/server/project/ws/BulkUpdateKeyActionTest.java
server/sonar-server/src/test/java/org/sonar/server/project/ws/CreateActionTest.java
server/sonar-server/src/test/java/org/sonar/server/project/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/project/ws/SearchMyProjectsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/projectlink/ws/CreateActionTest.java
server/sonar-server/src/test/java/org/sonar/server/projectlink/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/projecttag/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/AppActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/CreateActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/CreateConditionActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/GetByProjectActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/ProjectStatusActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/QualityGateDetailsFormatterTest.java
server/sonar-server/src/test/java/org/sonar/server/qualitygate/ws/UpdateConditionActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/CreateActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/InheritanceActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/SearchGroupsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/SearchUsersActionTest.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/ShowActionTest.java
server/sonar-server/src/test/java/org/sonar/server/root/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/test/ws/ListActionTest.java
server/sonar-server/src/test/java/org/sonar/server/user/ws/CreateActionTest.java
server/sonar-server/src/test/java/org/sonar/server/user/ws/CurrentActionTest.java
server/sonar-server/src/test/java/org/sonar/server/user/ws/GroupsActionTest.java
server/sonar-server/src/test/java/org/sonar/server/usergroups/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/usertoken/ws/GenerateActionTest.java
server/sonar-server/src/test/java/org/sonar/server/usertoken/ws/SearchActionTest.java
server/sonar-server/src/test/java/org/sonar/server/ws/WsUtilsTest.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/report/ReportPublisher.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoader.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/DefaultQualityProfileLoader.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/QualityProfileLoader.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/repository/QualityProfileProvider.java
sonar-scanner-engine/src/main/java/org/sonar/scanner/rule/ModuleQProfiles.java
sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/ScannerMediumTester.java
sonar-scanner-engine/src/test/java/org/sonar/scanner/report/ReportPublisherTest.java
sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultProjectRepositoriesLoaderTest.java
sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/DefaultQualityProfileLoaderTest.java
sonar-scanner-engine/src/test/java/org/sonar/scanner/repository/QualityProfileProviderTest.java
sonar-scanner-engine/src/test/java/org/sonar/scanner/rule/ActiveRulesProviderTest.java
sonar-ws-generated/pom.xml [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/MediaTypes.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseResponse.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/GetRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/Headers.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/HttpException.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/Parameters.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/PostRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsConnector.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsResponse.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/analysisreports/AnalysisReportsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/analysisreports/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/AuthenticationService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/LoginRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/BatchService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/FileRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/IssuesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/ProjectRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ActivityRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/CancelRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/CeService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ComponentRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/SubmitRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/TaskRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/AppRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/ComponentsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SearchProjectsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/ShowRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SuggestionsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/TreeRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/CustomMeasuresService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/MetricsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/UpdateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/DuplicationsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/ShowRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/ApplyLicenseRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/EditionsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/PreviewRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/EmailsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/SendRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/AddRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/FavoritesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/RemoveRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favourites/FavouritesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favourites/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AddCommentRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AssignRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AuthorsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/BulkChangeRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/ChangelogRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/ComponentTagsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/DeleteCommentRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/DoTransitionRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/EditCommentRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetSeverityRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetTagsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetTypeRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/TagsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/IndexRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/L10nService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/LanguagesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/ListRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/ComponentRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/ComponentTreeRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/MeasuresService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/SearchHistoryRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/MetricsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/UpdateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/ComponentRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/NavigationService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/OrganizationRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/AddRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/ListRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/NotificationsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/RemoveRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/orchestrator/OrchestratorService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/orchestrator/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/AddMemberRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/OrganizationsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/RemoveMemberRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/SearchMembersRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/UpdateProjectVisibilityRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/UpdateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddGroupRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddGroupToTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddProjectCreatorToTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddUserRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddUserToTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/ApplyTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/BulkApplyTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/CreateTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/DeleteTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/GroupsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/PermissionsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveGroupFromTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveGroupRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveProjectCreatorFromTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveUserFromTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveUserRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchGlobalPermissionsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchProjectPermissionsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchTemplatesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SetDefaultTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/TemplateGroupsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/TemplateUsersRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/UpdateTemplateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/UsersRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/InstallRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/InstalledRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/PluginsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/UninstallRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/UpdateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/profiles/ProfilesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/profiles/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/CreateEventRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/DeleteEventRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/ProjectAnalysesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/UpdateEventRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/ListRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/RenameRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/BulkDeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/BulkUpdateKeyRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/GhostsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/IndexRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/ProvisionedRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/SearchMyProjectsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/UpdateKeyRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/UpdateVisibilityRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/ProjectTagsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/SetRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/IndexRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/PropertiesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CopyRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CreateConditionRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DeleteConditionRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DeselectRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DestroyRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/GetByProjectRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/ProjectStatusRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/RenameRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SelectRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SetAsDefaultRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/ShowRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/UnsetDefaultRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/UpdateConditionRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ActivateRuleRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ActivateRulesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddGroupRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddProjectRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddUserRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/BackupRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ChangeParentRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ChangelogRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CompareRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CopyRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeactivateRuleRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeactivateRulesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ExportRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/InheritanceRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ProjectsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveGroupRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveProjectRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveUserRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RenameRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RestoreRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchGroupsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchUsersRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SetDefaultRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ShowRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/resources/ResourcesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/resources/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/RootsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/SetRootRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/UnsetRootRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/AppRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/RepositoriesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/RulesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/ShowRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/TagsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/UpdateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/server/ServerService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/server/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/EncryptRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ListDefinitionsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ResetRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/SetRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/SettingsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ValuesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/HashRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/IndexRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/LinesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/RawRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/ScmRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/ShowRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/SourcesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/ChangeLogLevelRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/LogsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/SystemService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/CoveredFilesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/ListRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/TestsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/timemachine/TimemachineService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/timemachine/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/InstalledPluginsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/UpdatecenterService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/UploadRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/AddUserRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/DeleteRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/RemoveUserRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UpdateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UserGroupsService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UsersRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/userproperties/UserPropertiesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/userproperties/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/ChangePasswordRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/CreateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/DeactivateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/GroupsRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/UpdateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/UsersService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/RevokeRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/SearchRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/DeliveriesRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/DeliveryRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/WebhooksService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/ListRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/ResponseExampleRequest.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/WebservicesService.java [new file with mode: 0644]
sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/package-info.java [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-batch.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-ce.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-commons.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-components.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-duplications.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-editions.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-favorites.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-issues.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-measures.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-notifications.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-organizations.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-permissions.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-project_tags.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-projectanalyses.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-projectbranches.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-projectlink.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-projects.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-qualitygates.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-qualityprofiles.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-root.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-rules.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-settings.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-system.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-tests.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-user_groups.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-user_tokens.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-users.proto [new file with mode: 0644]
sonar-ws-generated/src/main/protobuf/ws-webhooks.proto [new file with mode: 0644]
sonar-ws/pom.xml
sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/BaseResponse.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/BaseService.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/DefaultWsClient.java
sonar-ws/src/main/java/org/sonarqube/ws/client/GetRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/Headers.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/HttpException.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/Parameters.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/PostRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/WsClient.java
sonar-ws/src/main/java/org/sonarqube/ws/client/WsConnector.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/WsResponse.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/component/ComponentsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/measure/MeasuresService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/permission/PermissionsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/project/ProjectsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceOld.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java
sonar-ws/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/ProjectStatusWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/QualityGatesService.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/SelectWsRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/root/RootsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemService.java [deleted file]
sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemServiceOld.java [new file with mode: 0644]
sonar-ws/src/main/java/org/sonarqube/ws/client/user/UsersService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/usergroup/UserGroupsService.java
sonar-ws/src/main/java/org/sonarqube/ws/client/usertoken/UserTokensService.java
sonar-ws/src/main/protobuf/ws-batch.proto [deleted file]
sonar-ws/src/main/protobuf/ws-ce.proto [deleted file]
sonar-ws/src/main/protobuf/ws-commons.proto [deleted file]
sonar-ws/src/main/protobuf/ws-components.proto [deleted file]
sonar-ws/src/main/protobuf/ws-duplications.proto [deleted file]
sonar-ws/src/main/protobuf/ws-editions.proto [deleted file]
sonar-ws/src/main/protobuf/ws-favorites.proto [deleted file]
sonar-ws/src/main/protobuf/ws-issues.proto [deleted file]
sonar-ws/src/main/protobuf/ws-measures.proto [deleted file]
sonar-ws/src/main/protobuf/ws-notifications.proto [deleted file]
sonar-ws/src/main/protobuf/ws-organizations.proto [deleted file]
sonar-ws/src/main/protobuf/ws-permissions.proto [deleted file]
sonar-ws/src/main/protobuf/ws-project_tags.proto [deleted file]
sonar-ws/src/main/protobuf/ws-projectanalyses.proto [deleted file]
sonar-ws/src/main/protobuf/ws-projectbranches.proto [deleted file]
sonar-ws/src/main/protobuf/ws-projectlink.proto [deleted file]
sonar-ws/src/main/protobuf/ws-projects.proto [deleted file]
sonar-ws/src/main/protobuf/ws-qualitygates.proto [deleted file]
sonar-ws/src/main/protobuf/ws-qualityprofiles.proto [deleted file]
sonar-ws/src/main/protobuf/ws-root.proto [deleted file]
sonar-ws/src/main/protobuf/ws-rules.proto [deleted file]
sonar-ws/src/main/protobuf/ws-settings.proto [deleted file]
sonar-ws/src/main/protobuf/ws-system.proto [deleted file]
sonar-ws/src/main/protobuf/ws-tests.proto [deleted file]
sonar-ws/src/main/protobuf/ws-user_groups.proto [deleted file]
sonar-ws/src/main/protobuf/ws-user_tokens.proto [deleted file]
sonar-ws/src/main/protobuf/ws-users.proto [deleted file]
sonar-ws/src/main/protobuf/ws-webhooks.proto [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/MessageFormatterTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/ce/CeServiceTest.java [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/client/component/ComponentsServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/measure/MeasuresServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/permission/PermissionsServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/project/ProjectsServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/projectlinks/ProjectLinksServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequestTest.java [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/QualityGatesServiceTest.java [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequestTest.java [deleted file]
sonar-ws/src/test/java/org/sonarqube/ws/client/qualityprofile/QualityProfilesServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/system/SystemServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/user/UsersServiceTest.java
sonar-ws/src/test/java/org/sonarqube/ws/client/usergroup/UserGroupsServiceTest.java
tests/plugins/ws-plugin/src/main/java/LocalCallWebService.java
tests/pom.xml
tests/src/test/java/org/sonarqube/tests/Category1Suite.java
tests/src/test/java/org/sonarqube/tests/analysis/AnalysisEsResilienceTest.java
tests/src/test/java/org/sonarqube/tests/analysis/FavoriteTest.java
tests/src/test/java/org/sonarqube/tests/analysis/FileExclusionsTest.java
tests/src/test/java/org/sonarqube/tests/analysis/IssueExclusionsTest.java
tests/src/test/java/org/sonarqube/tests/analysis/LinksTest.java
tests/src/test/java/org/sonarqube/tests/analysis/PermissionTest.java
tests/src/test/java/org/sonarqube/tests/authorization/AuthorizationSuite.java
tests/src/test/java/org/sonarqube/tests/authorization/PermissionSearchTest.java
tests/src/test/java/org/sonarqube/tests/authorization/PermissionTemplatePageTest.java [new file with mode: 0644]
tests/src/test/java/org/sonarqube/tests/authorization/PermissionTemplateTest.java
tests/src/test/java/org/sonarqube/tests/authorization/ProvisioningPermissionTest.java
tests/src/test/java/org/sonarqube/tests/ce/CeShutdownTest.java
tests/src/test/java/org/sonarqube/tests/ce/CeWorkersTest.java
tests/src/test/java/org/sonarqube/tests/ce/CeWsTest.java
tests/src/test/java/org/sonarqube/tests/ce/ReportFailureNotificationTest.java
tests/src/test/java/org/sonarqube/tests/component/BranchTest.java
tests/src/test/java/org/sonarqube/tests/component/CodePageTest.java
tests/src/test/java/org/sonarqube/tests/component/ComponentsWsTest.java
tests/src/test/java/org/sonarqube/tests/duplication/NewDuplicationsTest.java
tests/src/test/java/org/sonarqube/tests/issue/AutoAssignTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueNotificationsTest.java
tests/src/test/java/org/sonarqube/tests/issue/IssueTagsTest.java
tests/src/test/java/org/sonarqube/tests/issue/NewIssuesMeasureTest.java
tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssueAssignTest.java
tests/src/test/java/org/sonarqube/tests/issue/OrganizationIssuesPageTest.java
tests/src/test/java/org/sonarqube/tests/lite/LiteTest.java
tests/src/test/java/org/sonarqube/tests/measure/MeasuresWsTest.java
tests/src/test/java/org/sonarqube/tests/measure/SincePreviousVersionHistoryTest.java
tests/src/test/java/org/sonarqube/tests/measure/SinceXDaysHistoryTest.java
tests/src/test/java/org/sonarqube/tests/measure/TimeMachineTest.java
tests/src/test/java/org/sonarqube/tests/organization/BillingTest.java
tests/src/test/java/org/sonarqube/tests/organization/OrganizationMembershipTest.java
tests/src/test/java/org/sonarqube/tests/organization/OrganizationMembershipUiTest.java
tests/src/test/java/org/sonarqube/tests/organization/OrganizationTest.java
tests/src/test/java/org/sonarqube/tests/organization/OrganizationWebExtensionsTest.java
tests/src/test/java/org/sonarqube/tests/organization/PersonalOrganizationTest.java
tests/src/test/java/org/sonarqube/tests/organization/RootUserTest.java
tests/src/test/java/org/sonarqube/tests/performance/AbstractPerfTest.java
tests/src/test/java/org/sonarqube/tests/performance/PerfRule.java
tests/src/test/java/org/sonarqube/tests/performance/scanner/DuplicationTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectBulkDeletionPageTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectBulkDeletionTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectDeletionTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectFilterTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectKeyUpdateTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectLinksTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectProvisioningTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectSearchTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectSettingsTest.java [new file with mode: 0644]
tests/src/test/java/org/sonarqube/tests/project/ProjectSuite.java
tests/src/test/java/org/sonarqube/tests/project/ProjectVisibilityPageTest.java
tests/src/test/java/org/sonarqube/tests/project/ProjectsPageTest.java
tests/src/test/java/org/sonarqube/tests/projectAdministration/ProjectAdministrationTest.java [deleted file]
tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateForSmallChangesetsTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/OrganizationQualityGateUiTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/ProjectQualityGatePageTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateNotificationTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateOnRatingMeasuresTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateTest.java
tests/src/test/java/org/sonarqube/tests/qualityGate/QualityGateUiTest.java
tests/src/test/java/org/sonarqube/tests/qualityModel/ReliabilityMeasureTest.java
tests/src/test/java/org/sonarqube/tests/qualityModel/SecurityMeasureTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/ActiveRuleEsResilienceTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesNotificationTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/BuiltInQualityProfilesTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/CustomQualityProfilesTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/OrganizationQualityProfilesUiTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/QualityProfilesEditTest.java
tests/src/test/java/org/sonarqube/tests/qualityProfile/QualityProfilesWsTest.java
tests/src/test/java/org/sonarqube/tests/rule/RulesWsTest.java
tests/src/test/java/org/sonarqube/tests/serverSystem/RestartTest.java
tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemRestartingOrchestrator.java
tests/src/test/java/org/sonarqube/tests/serverSystem/ServerSystemTest.java
tests/src/test/java/org/sonarqube/tests/serverSystem/SystemStateTest.java
tests/src/test/java/org/sonarqube/tests/settings/DeprecatedPropertiesWsTest.java
tests/src/test/java/org/sonarqube/tests/settings/SettingsTest.java
tests/src/test/java/org/sonarqube/tests/startup/StartupIndexationTest.java
tests/src/test/java/org/sonarqube/tests/test/NewCoverageTest.java
tests/src/test/java/org/sonarqube/tests/ui/UiExtensionsTest.java
tests/src/test/java/org/sonarqube/tests/upgrade/UpgradeTest.java
tests/src/test/java/org/sonarqube/tests/user/BaseIdentityProviderTest.java
tests/src/test/java/org/sonarqube/tests/user/ForceAuthenticationTest.java
tests/src/test/java/org/sonarqube/tests/user/LocalAuthenticationTest.java
tests/src/test/java/org/sonarqube/tests/user/MyAccountPageTest.java
tests/src/test/java/org/sonarqube/tests/user/OAuth2IdentityProviderTest.java
tests/src/test/java/org/sonarqube/tests/user/OnboardingTest.java
tests/src/test/java/org/sonarqube/tests/user/OrganizationIdentityProviderTest.java
tests/src/test/java/org/sonarqube/tests/user/RealmAuthenticationTest.java
tests/src/test/java/org/sonarqube/tests/user/SsoAuthenticationTest.java
tests/src/test/java/org/sonarqube/tests/user/UserEsResilienceTest.java
tests/src/test/java/org/sonarqube/tests/user/UsersPageTest.java
tests/src/test/java/util/ItUtils.java
tests/src/test/java/util/user/UserRule.java
tests/src/test/java/util/user/Users.java

diff --git a/pom.xml b/pom.xml
index 4ba6755412768bd28e7fbeb5c6206fd00e4fcfa0..e73536e5ba0d63ebf0aba9f10621a84b73ea987c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -29,6 +29,7 @@
     <module>sonar-markdown</module>
     <module>sonar-plugin-api</module>
     <module>server</module>
+    <module>sonar-ws-generated</module>
     <module>sonar-ws</module>
     <module>sonar-testing-harness</module>
     <module>plugins/sonar-xoo-plugin</module>
         <artifactId>sonar-scanner-protocol</artifactId>
         <version>${project.version}</version>
       </dependency>
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>sonar-ws-generated</artifactId>
+        <version>${project.version}</version>
+      </dependency>      
       <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>sonar-ws</artifactId>
index 8b395c905185d837ea876a9b81b56978ee65f13d..7a3bd5e8fcafc87c6b5088fc55b829196635429f 100644 (file)
@@ -26,9 +26,9 @@ import java.util.function.Consumer;
 import java.util.stream.Collectors;
 import javax.annotation.Nullable;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsUserGroups;
-import org.sonarqube.ws.WsUsers;
-import org.sonarqube.ws.WsUsers.GroupsWsResponse.Group;
+import org.sonarqube.ws.UserGroups;
+import org.sonarqube.ws.Users;
+import org.sonarqube.ws.Users.GroupsWsResponse.Group;
 import org.sonarqube.ws.client.user.GroupsRequest;
 import org.sonarqube.ws.client.usergroup.AddUserWsRequest;
 import org.sonarqube.ws.client.usergroup.CreateWsRequest;
@@ -47,7 +47,7 @@ public class GroupTester {
   }
 
   @SafeVarargs
-  public final WsUserGroups.Group generate(@Nullable Organizations.Organization organization, Consumer<CreateWsRequest.Builder>... populators) {
+  public final UserGroups.Group generate(@Nullable Organizations.Organization organization, Consumer<CreateWsRequest.Builder>... populators) {
     int id = ID_GENERATOR.getAndIncrement();
     CreateWsRequest.Builder request = CreateWsRequest.builder()
       .setName("Group" + id)
@@ -62,7 +62,7 @@ public class GroupTester {
       .setOrganization(organization != null ? organization.getKey() : null)
       .setLogin(userLogin)
       .build();
-    WsUsers.GroupsWsResponse response = session.users().service().groups(request);
+    Users.GroupsWsResponse response = session.users().service().groups(request);
     return response.getGroupsList();
   }
 
index a9d098ee261810f1a72e489c390c8f03cfd45103..08c317c6d406e24cf71bff8693efd434f9c55387 100644 (file)
@@ -25,7 +25,7 @@ import java.util.function.Consumer;
 import javax.annotation.Nullable;
 import org.assertj.core.api.Assertions;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.HttpException;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.organization.CreateWsRequest;
@@ -35,7 +35,6 @@ import org.sonarqube.ws.client.organization.SearchWsRequest;
 import org.sonarqube.ws.client.user.GroupsRequest;
 
 import static java.util.Arrays.stream;
-import static org.assertj.core.api.Assertions.assertThat;
 
 public class OrganizationTester {
 
@@ -70,7 +69,7 @@ public class OrganizationTester {
     return service().create(request.build()).getOrganization();
   }
 
-  public OrganizationTester addMember(Organizations.Organization organization, WsUsers.CreateWsResponse.User user) {
+  public OrganizationTester addMember(Organizations.Organization organization, Users.CreateWsResponse.User user) {
     service().addMember(organization.getKey(), user.getLogin());
     return this;
   }
@@ -89,7 +88,7 @@ public class OrganizationTester {
     return this;
   }
 
-  public OrganizationTester assertThatMemberOf(Organizations.Organization organization, WsUsers.CreateWsResponse.User user) {
+  public OrganizationTester assertThatMemberOf(Organizations.Organization organization, Users.CreateWsResponse.User user) {
     return assertThatMemberOf(organization, user.getLogin());
   }
 
@@ -99,7 +98,7 @@ public class OrganizationTester {
     return this;
   }
 
-  public OrganizationTester assertThatNotMemberOf(Organizations.Organization organization, WsUsers.CreateWsResponse.User user) {
+  public OrganizationTester assertThatNotMemberOf(Organizations.Organization organization, Users.CreateWsResponse.User user) {
     return assertThatNotMemberOf(organization, user.getLogin());
   }
 
@@ -126,7 +125,7 @@ public class OrganizationTester {
   }
 
   private void verifyMembersGroupMembership(String userLogin, @Nullable Organizations.Organization organization, boolean isMember) {
-    List<WsUsers.GroupsWsResponse.Group> groups = session.wsClient().users().groups(GroupsRequest.builder()
+    List<Users.GroupsWsResponse.Group> groups = session.wsClient().users().groups(GroupsRequest.builder()
       .setLogin(userLogin)
       .setOrganization(organization != null ? organization.getKey() : null)
       .setQuery("Members")
index 6b63e850ee2d47e63b865c1c04bbb4048fb427e8..9c48acaf47bc471a2d7e092befaa377b4cd9acae 100644 (file)
@@ -23,7 +23,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Consumer;
 import javax.annotation.Nullable;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsProjects;
+import org.sonarqube.ws.Projects;
 import org.sonarqube.ws.client.project.CreateRequest;
 import org.sonarqube.ws.client.project.DeleteRequest;
 import org.sonarqube.ws.client.project.ProjectsService;
@@ -49,7 +49,12 @@ public class ProjectTester {
   }
 
   @SafeVarargs
-  public final WsProjects.CreateWsResponse.Project generate(@Nullable Organizations.Organization organization, Consumer<CreateRequest.Builder>... populators) {
+  public final Projects.CreateWsResponse.Project provision(Consumer<CreateRequest.Builder>... populators) {
+    return provision(null, populators);
+  }
+
+  @SafeVarargs
+  public final Projects.CreateWsResponse.Project provision(@Nullable Organizations.Organization organization, Consumer<CreateRequest.Builder>... populators) {
     int id = ID_GENERATOR.getAndIncrement();
     CreateRequest.Builder request = CreateRequest.builder()
       .setKey("key" + id)
index e0a1f8bae539a1747dacf876008930cbf581c04e..5db54abe49f2780c2d106c560f4ad55edb5cfc54 100644 (file)
@@ -24,12 +24,13 @@ import com.google.gson.annotations.SerializedName;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsQualityGates.CreateWsResponse;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Qualitygates.CreateWsResponse;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.qualitygate.QualityGatesService;
-import org.sonarqube.ws.client.qualitygate.SelectWsRequest;
+import org.sonarqube.ws.client.qualitygates.CreateRequest;
+import org.sonarqube.ws.client.qualitygates.QualitygatesService;
+import org.sonarqube.ws.client.qualitygates.SelectRequest;
 
 public class QGateTester {
   private static final AtomicInteger ID_GENERATOR = new AtomicInteger();
@@ -40,7 +41,7 @@ public class QGateTester {
     this.session = session;
   }
 
-  public QualityGatesService service() {
+  public QualitygatesService service() {
     return session.wsClient().qualityGates();
   }
 
@@ -54,11 +55,11 @@ public class QGateTester {
 
   public CreateWsResponse generate() {
     int id = ID_GENERATOR.getAndIncrement();
-    return session.wsClient().qualityGates().create("QualityGate" + id);
+    return session.wsClient().qualityGates().create(new CreateRequest().setName("QualityGate" + id));
   }
 
   public void associateProject(CreateWsResponse qualityGate, Project project){
-    service().associateProject(new SelectWsRequest().setGateId(qualityGate.getId()).setProjectKey(project.getKey()));
+    service().select(new SelectRequest().setGateId(String.valueOf(qualityGate.getId())).setProjectKey(project.getKey()));
   }
 
   public static class ListResponse {
index 2c80d28fe2c9fd3b4df55166b75975d01a26b34a..25ac4c79602ba89338fbb8c4fb5c798fe8496b05 100644 (file)
@@ -25,9 +25,9 @@ import java.util.function.Consumer;
 import org.assertj.core.api.Assertions;
 import org.sonarqube.ws.Common;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse.QualityProfile;
 import org.sonarqube.ws.Rules;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
 import org.sonarqube.ws.client.HttpException;
 import org.sonarqube.ws.client.qualityprofile.ActivateRuleWsRequest;
 import org.sonarqube.ws.client.qualityprofile.AddProjectRequest;
index 72e3cb5126ee6a453fc608b9246847c6abf3c511..8b38ca267a28fc8424d22adaaed9805f9534627b 100644 (file)
@@ -24,8 +24,8 @@ import java.util.Optional;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Consumer;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsUsers;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.user.CreateRequest;
 import org.sonarqube.ws.client.user.SearchRequest;
@@ -122,8 +122,8 @@ public class UserTester {
     return session.wsClient().users();
   }
 
-  public Optional<WsUsers.SearchWsResponse.User> getByLogin(String login) {
-    List<WsUsers.SearchWsResponse.User> users = session.wsClient().users().search(SearchRequest.builder().setQuery(login).build()).getUsersList();
+  public Optional<Users.SearchWsResponse.User> getByLogin(String login) {
+    List<Users.SearchWsResponse.User> users = session.wsClient().users().search(SearchRequest.builder().setQuery(login).build()).getUsersList();
     if (users.size() == 1) {
       return Optional.of(users.get(0));
     }
index 939b9a46935512ad07066000262793c25bee6436..06fb6d5382dc85c34e2eab2808bf28cfcbbba73b 100644 (file)
@@ -27,8 +27,8 @@ import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.scanner.protocol.input.FileData;
 import org.sonar.scanner.protocol.input.ProjectRepositories;
-import org.sonarqube.ws.WsBatch.WsProjectResponse;
-import org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.Builder;
+import org.sonarqube.ws.Batch.WsProjectResponse;
+import org.sonarqube.ws.Batch.WsProjectResponse.FileData.Builder;
 
 import static org.sonar.core.util.Protobuf.setNullable;
 import static org.sonar.server.ws.KeyExamples.KEY_BRANCH_EXAMPLE_001;
index 078fb44ce6e26f4470a7c02eb67fa407696ba9c0..f82fe00936a5ee1e14007d812a692648d011e847 100644 (file)
@@ -45,7 +45,7 @@ import org.sonar.server.issue.index.IssueIndex;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.WsUtils;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsBranches;
+import org.sonarqube.ws.ProjectBranches;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.Collections.singletonList;
@@ -112,7 +112,7 @@ public class ListAction implements BranchWsAction {
         .selectLastAnalysesByRootComponentUuids(dbSession, branches.stream().map(BranchDto::getUuid).collect(Collectors.toList()))
         .stream().collect(uniqueIndex(SnapshotDto::getComponentUuid, s -> formatDateTime(s.getCreatedAt())));
 
-      WsBranches.ListWsResponse.Builder protobufResponse = WsBranches.ListWsResponse.newBuilder();
+      ProjectBranches.ListWsResponse.Builder protobufResponse = ProjectBranches.ListWsResponse.newBuilder();
       branches.stream()
         .forEach(b -> addBranch(protobufResponse, b, mergeBranchesByUuid, qualityGateMeasuresByComponentUuids.get(b.getUuid()), branchStatisticsByBranchUuid.get(b.getUuid()),
           analysisDateByBranchUuid.get(b.getUuid())));
@@ -120,9 +120,9 @@ public class ListAction implements BranchWsAction {
     }
   }
 
-  private static void addBranch(WsBranches.ListWsResponse.Builder response, BranchDto branch, Map<String, BranchDto> mergeBranchesByUuid, @Nullable MeasureDto qualityGateMeasure,
-    BranchStatistics branchStatistics, @Nullable String analysisDate) {
-    WsBranches.Branch.Builder builder = toBranchBuilder(branch, Optional.ofNullable(mergeBranchesByUuid.get(branch.getMergeBranchUuid())));
+  private static void addBranch(ProjectBranches.ListWsResponse.Builder response, BranchDto branch, Map<String, BranchDto> mergeBranchesByUuid,
+                                @Nullable MeasureDto qualityGateMeasure, BranchStatistics branchStatistics, @Nullable String analysisDate) {
+    ProjectBranches.Branch.Builder builder = toBranchBuilder(branch, Optional.ofNullable(mergeBranchesByUuid.get(branch.getMergeBranchUuid())));
     setBranchStatus(builder, branch, qualityGateMeasure, branchStatistics);
     if (analysisDate != null) {
       builder.setAnalysisDate(analysisDate);
@@ -130,8 +130,8 @@ public class ListAction implements BranchWsAction {
     response.addBranches(builder);
   }
 
-  private static WsBranches.Branch.Builder toBranchBuilder(BranchDto branch, Optional<BranchDto> mergeBranch) {
-    WsBranches.Branch.Builder builder = WsBranches.Branch.newBuilder();
+  private static ProjectBranches.Branch.Builder toBranchBuilder(BranchDto branch, Optional<BranchDto> mergeBranch) {
+    ProjectBranches.Branch.Builder builder = ProjectBranches.Branch.newBuilder();
     String branchKey = branch.getKey();
     setNullable(branchKey, builder::setName);
     builder.setIsMain(branch.isMain());
@@ -147,8 +147,9 @@ public class ListAction implements BranchWsAction {
     return builder;
   }
 
-  private static void setBranchStatus(WsBranches.Branch.Builder builder, BranchDto branch, @Nullable MeasureDto qualityGateMeasure, @Nullable BranchStatistics branchStatistics) {
-    WsBranches.Branch.Status.Builder statusBuilder = WsBranches.Branch.Status.newBuilder();
+  private static void setBranchStatus(ProjectBranches.Branch.Builder builder, BranchDto branch, @Nullable MeasureDto qualityGateMeasure,
+                                      @Nullable BranchStatistics branchStatistics) {
+    ProjectBranches.Branch.Status.Builder statusBuilder = ProjectBranches.Branch.Status.newBuilder();
     if (branch.getBranchType() == LONG && qualityGateMeasure != null) {
       statusBuilder.setQualityGateStatus(qualityGateMeasure.getData());
     }
index 3d2d55203ca74dbe9a7f3a70b52d46bdfb628137..a3f773fc5ca9572617d36da45e41cac4b7d8c7b1 100644 (file)
@@ -48,10 +48,12 @@ import org.sonar.db.ce.CeTaskTypes;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.ComponentQuery;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsCe;
-import org.sonarqube.ws.WsCe.ActivityResponse;
-import org.sonarqube.ws.client.ce.ActivityWsRequest;
+import org.sonarqube.ws.Ce;
+import org.sonarqube.ws.Ce.ActivityResponse;
+import org.sonarqube.ws.client.ce.ActivityRequest;
 
+import static java.lang.Boolean.parseBoolean;
+import static java.lang.Integer.parseInt;
 import static java.lang.String.format;
 import static java.util.Collections.singletonList;
 import static org.apache.commons.lang.StringUtils.defaultString;
@@ -161,32 +163,32 @@ public class ActivityAction implements CeWsAction {
     writeProtobuf(activityResponse, wsRequest, wsResponse);
   }
 
-  private ActivityResponse doHandle(ActivityWsRequest request) {
+  private ActivityResponse doHandle(ActivityRequest request) {
 
     try (DbSession dbSession = dbClient.openSession(false)) {
       ComponentDto component = loadComponent(dbSession, request);
       checkPermission(component);
       // if a task searched by uuid is found all other parameters are ignored
-      Optional<WsCe.Task> taskSearchedById = searchTaskByUuid(dbSession, request);
+      Optional<Ce.Task> taskSearchedById = searchTaskByUuid(dbSession, request);
       if (taskSearchedById.isPresent()) {
         return buildResponse(
           singletonList(taskSearchedById.get()),
           Collections.emptyList(),
-          request.getPageSize());
+          parseInt(request.getPs()));
       }
 
       CeTaskQuery query = buildQuery(dbSession, request, component);
-      List<WsCe.Task> queuedTasks = loadQueuedTasks(dbSession, request, query);
-      List<WsCe.Task> pastTasks = loadPastTasks(dbSession, request, query);
+      List<Ce.Task> queuedTasks = loadQueuedTasks(dbSession, request, query);
+      List<Ce.Task> pastTasks = loadPastTasks(dbSession, request, query);
       return buildResponse(
         queuedTasks,
         pastTasks,
-        request.getPageSize());
+        parseInt(request.getPs()));
     }
   }
 
   @CheckForNull
-  private ComponentDto loadComponent(DbSession dbSession, ActivityWsRequest request) {
+  private ComponentDto loadComponent(DbSession dbSession, ActivityRequest request) {
     String componentId = request.getComponentId();
     if (componentId == null) {
       return null;
@@ -205,8 +207,8 @@ public class ActivityAction implements CeWsAction {
     }
   }
 
-  private Optional<WsCe.Task> searchTaskByUuid(DbSession dbSession, ActivityWsRequest request) {
-    String textQuery = request.getQuery();
+  private Optional<Ce.Task> searchTaskByUuid(DbSession dbSession, ActivityRequest request) {
+    String textQuery = request.getQ();
     if (textQuery == null) {
       return Optional.absent();
     }
@@ -220,10 +222,10 @@ public class ActivityAction implements CeWsAction {
     return activity.map(ceActivityDto -> Optional.of(formatter.formatActivity(dbSession, ceActivityDto, null))).orElseGet(Optional::absent);
   }
 
-  private CeTaskQuery buildQuery(DbSession dbSession, ActivityWsRequest request, @Nullable ComponentDto component) {
+  private CeTaskQuery buildQuery(DbSession dbSession, ActivityRequest request, @Nullable ComponentDto component) {
     CeTaskQuery query = new CeTaskQuery();
     query.setType(request.getType());
-    query.setOnlyCurrents(request.getOnlyCurrents());
+    query.setOnlyCurrents(parseBoolean(request.getOnlyCurrents()));
     Date minSubmittedAt = parseStartingDateOrDateTime(request.getMinSubmittedAt());
     query.setMinSubmittedAt(minSubmittedAt == null ? null : minSubmittedAt.getTime());
     Date maxExecutedAt = parseEndingDateOrDateTime(request.getMaxExecutedAt());
@@ -234,7 +236,7 @@ public class ActivityAction implements CeWsAction {
       query.setStatuses(request.getStatus());
     }
 
-    String componentQuery = request.getQuery();
+    String componentQuery = request.getQ();
     if (component != null) {
       query.setComponentUuid(component.uuid());
     } else if (componentQuery != null) {
@@ -251,28 +253,28 @@ public class ActivityAction implements CeWsAction {
     return dbClient.componentDao().selectByQuery(dbSession, componentDtoQuery, 0, CeTaskQuery.MAX_COMPONENT_UUIDS);
   }
 
-  private List<WsCe.Task> loadQueuedTasks(DbSession dbSession, ActivityWsRequest request, CeTaskQuery query) {
-    List<CeQueueDto> dtos = dbClient.ceQueueDao().selectByQueryInDescOrder(dbSession, query, request.getPageSize());
+  private List<Ce.Task> loadQueuedTasks(DbSession dbSession, ActivityRequest request, CeTaskQuery query) {
+    List<CeQueueDto> dtos = dbClient.ceQueueDao().selectByQueryInDescOrder(dbSession, query, parseInt(request.getPs()));
     return formatter.formatQueue(dbSession, dtos);
   }
 
-  private List<WsCe.Task> loadPastTasks(DbSession dbSession, ActivityWsRequest request, CeTaskQuery query) {
-    List<CeActivityDto> dtos = dbClient.ceActivityDao().selectByQuery(dbSession, query, forPage(1).andSize(request.getPageSize()));
+  private List<Ce.Task> loadPastTasks(DbSession dbSession, ActivityRequest request, CeTaskQuery query) {
+    List<CeActivityDto> dtos = dbClient.ceActivityDao().selectByQuery(dbSession, query, forPage(1).andSize(parseInt(request.getPs())));
     return formatter.formatActivity(dbSession, dtos);
   }
 
-  private static ActivityResponse buildResponse(Iterable<WsCe.Task> queuedTasks, Iterable<WsCe.Task> pastTasks, int pageSize) {
-    WsCe.ActivityResponse.Builder wsResponseBuilder = WsCe.ActivityResponse.newBuilder();
+  private static ActivityResponse buildResponse(Iterable<Ce.Task> queuedTasks, Iterable<Ce.Task> pastTasks, int pageSize) {
+    Ce.ActivityResponse.Builder wsResponseBuilder = Ce.ActivityResponse.newBuilder();
 
     int nbInsertedTasks = 0;
-    for (WsCe.Task queuedTask : queuedTasks) {
+    for (Ce.Task queuedTask : queuedTasks) {
       if (nbInsertedTasks < pageSize) {
         wsResponseBuilder.addTasks(queuedTask);
         nbInsertedTasks++;
       }
     }
 
-    for (WsCe.Task pastTask : pastTasks) {
+    for (Ce.Task pastTask : pastTasks) {
       if (nbInsertedTasks < pageSize) {
         wsResponseBuilder.addTasks(pastTask);
         nbInsertedTasks++;
@@ -281,18 +283,18 @@ public class ActivityAction implements CeWsAction {
     return wsResponseBuilder.build();
   }
 
-  private static ActivityWsRequest toSearchWsRequest(Request request) {
-    ActivityWsRequest activityWsRequest = new ActivityWsRequest()
+  private static ActivityRequest toSearchWsRequest(Request request) {
+    ActivityRequest activityWsRequest = new ActivityRequest()
       .setComponentId(request.param(PARAM_COMPONENT_ID))
-      .setQuery(defaultString(request.param(Param.TEXT_QUERY), request.param(PARAM_COMPONENT_QUERY)))
+      .setQ(defaultString(request.param(Param.TEXT_QUERY), request.param(PARAM_COMPONENT_QUERY)))
       .setStatus(request.paramAsStrings(PARAM_STATUS))
       .setType(request.param(PARAM_TYPE))
       .setMinSubmittedAt(request.param(PARAM_MIN_SUBMITTED_AT))
       .setMaxExecutedAt(request.param(PARAM_MAX_EXECUTED_AT))
-      .setOnlyCurrents(request.paramAsBoolean(PARAM_ONLY_CURRENTS))
-      .setPageSize(request.mandatoryParamAsInt(Param.PAGE_SIZE));
+      .setOnlyCurrents(String.valueOf(request.paramAsBoolean(PARAM_ONLY_CURRENTS)))
+      .setPs(String.valueOf(request.mandatoryParamAsInt(Param.PAGE_SIZE)));
 
-    checkRequest(activityWsRequest.getComponentId() == null || activityWsRequest.getQuery() == null, "%s and %s must not be set at the same time",
+    checkRequest(activityWsRequest.getComponentId() == null || activityWsRequest.getQ() == null, "%s and %s must not be set at the same time",
       PARAM_COMPONENT_ID, PARAM_COMPONENT_QUERY);
     return activityWsRequest;
   }
index aaf1ea5fa71cc320dfc809e03468b7fe3c1c9b36..cbe55189827273d8a5baa31c3dcee61e81d55666 100644 (file)
@@ -34,8 +34,8 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.KeyExamples;
-import org.sonarqube.ws.WsCe.ActivityStatusWsResponse;
-import org.sonarqube.ws.client.ce.ActivityStatusWsRequest;
+import org.sonarqube.ws.Ce.ActivityStatusWsResponse;
+import org.sonarqube.ws.client.ce.ActivityStatusRequest;
 
 import static org.sonar.server.component.ComponentFinder.ParamNames.COMPONENT_ID_AND_KEY;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
@@ -80,7 +80,7 @@ public class ActivityStatusAction implements CeWsAction {
     writeProtobuf(activityStatusResponse, request, response);
   }
 
-  private ActivityStatusWsResponse doHandle(ActivityStatusWsRequest request) {
+  private ActivityStatusWsResponse doHandle(ActivityStatusRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       Optional<ComponentDto> component = searchComponent(dbSession, request);
       String componentUuid = component.isPresent() ? component.get().uuid() : null;
@@ -97,7 +97,7 @@ public class ActivityStatusAction implements CeWsAction {
     }
   }
 
-  private Optional<ComponentDto> searchComponent(DbSession dbSession, ActivityStatusWsRequest request) {
+  private Optional<ComponentDto> searchComponent(DbSession dbSession, ActivityStatusRequest request) {
     ComponentDto component = null;
     if (hasComponentInRequest(request)) {
       component = componentFinder.getByUuidOrKey(dbSession, request.getComponentId(), request.getComponentKey(), COMPONENT_ID_AND_KEY);
@@ -113,14 +113,13 @@ public class ActivityStatusAction implements CeWsAction {
     }
   }
 
-  private static boolean hasComponentInRequest(ActivityStatusWsRequest request) {
+  private static boolean hasComponentInRequest(ActivityStatusRequest request) {
     return request.getComponentId() != null || request.getComponentKey() != null;
   }
 
-  private static ActivityStatusWsRequest toWsRequest(Request request) {
-    return ActivityStatusWsRequest.newBuilder()
+  private static ActivityStatusRequest toWsRequest(Request request) {
+    return new ActivityStatusRequest()
       .setComponentId(request.param(PARAM_COMPONENT_ID))
-      .setComponentKey(request.param(DEPRECATED_PARAM_COMPONENT_KEY))
-      .build();
+      .setComponentKey(request.param(DEPRECATED_PARAM_COMPONENT_KEY));
   }
 }
index 289b0cd480eac839092cc9172bd1d81f650f97a6..a30eefb34073a86c18b8d04c02649b0866308f7c 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.KeyExamples;
-import org.sonarqube.ws.WsCe.ProjectResponse;
+import org.sonarqube.ws.Ce.ProjectResponse;
 
 import static org.sonar.db.Pagination.forPage;
 import static org.sonar.server.component.ComponentFinder.ParamNames.COMPONENT_ID_AND_COMPONENT;
index f00b66f0dd73201e14b0c08ca25d23284d68b4f2..88dc9d036cefc6838ed7947c840d1867c03cd798 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.ce.queue.CeTask;
 import org.sonar.server.computation.queue.ReportSubmitter;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.ws.WsUtils;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
 
 import static org.sonar.core.component.ComponentKeys.MAX_COMPONENT_KEY_LENGTH;
 import static org.sonar.db.component.ComponentValidator.MAX_COMPONENT_NAME_LENGTH;
@@ -116,7 +116,7 @@ public class SubmitAction implements CeWsAction {
 
     try (InputStream report = new BufferedInputStream(wsRequest.mandatoryParamAsPart(PARAM_REPORT_DATA).getInputStream())) {
       CeTask task = reportSubmitter.submit(organizationKey, projectKey, projectBranch, projectName, characteristics, report);
-      WsCe.SubmitResponse submitResponse = WsCe.SubmitResponse.newBuilder()
+      Ce.SubmitResponse submitResponse = Ce.SubmitResponse.newBuilder()
         .setTaskId(task.getUuid())
         .setProjectId(task.getComponentUuid())
         .build();
index 9e809380ce7318bcd47f1b62749cf91f02a34ea0..c41e7265fb661c2c289ebc6d3d31c8886ae88be1 100644 (file)
@@ -42,7 +42,7 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.WsUtils;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
 
 import static org.sonar.core.permission.GlobalPermissions.SCAN_EXECUTION;
 import static org.sonar.server.user.AbstractUserSession.insufficientPrivilegesException;
@@ -92,7 +92,7 @@ public class TaskAction implements CeWsAction {
   public void handle(Request wsRequest, Response wsResponse) throws Exception {
     String taskUuid = wsRequest.mandatoryParam(PARAM_TASK_UUID);
     try (DbSession dbSession = dbClient.openSession(false)) {
-      WsCe.TaskResponse.Builder wsTaskResponse = WsCe.TaskResponse.newBuilder();
+      Ce.TaskResponse.Builder wsTaskResponse = Ce.TaskResponse.newBuilder();
       Optional<CeQueueDto> queueDto = dbClient.ceQueueDao().selectByUuid(dbSession, taskUuid);
       if (queueDto.isPresent()) {
         com.google.common.base.Optional<ComponentDto> component = loadComponent(dbSession, queueDto.get().getComponentUuid());
index a059c766289ea58788fd471ef1a344cdf938675b..d0e06adc3d5598baf84a8268f370751db74b44a6 100644 (file)
@@ -40,8 +40,8 @@ import org.sonar.db.ce.CeQueueDto;
 import org.sonar.db.ce.CeTaskCharacteristicDto;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.organization.OrganizationDto;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsCe;
 
 import static com.google.common.base.Preconditions.checkState;
 import static java.lang.String.format;
@@ -63,17 +63,17 @@ public class TaskFormatter {
     this.system2 = system2;
   }
 
-  public List<WsCe.Task> formatQueue(DbSession dbSession, List<CeQueueDto> dtos) {
+  public List<Ce.Task> formatQueue(DbSession dbSession, List<CeQueueDto> dtos) {
     DtoCache cache = DtoCache.forQueueDtos(dbClient, dbSession, dtos);
     return dtos.stream().map(input -> formatQueue(input, cache)).collect(MoreCollectors.toList(dtos.size()));
   }
 
-  public WsCe.Task formatQueue(DbSession dbSession, CeQueueDto queue) {
+  public Ce.Task formatQueue(DbSession dbSession, CeQueueDto queue) {
     return formatQueue(queue, DtoCache.forQueueDtos(dbClient, dbSession, singletonList(queue)));
   }
 
-  private WsCe.Task formatQueue(CeQueueDto dto, DtoCache componentDtoCache) {
-    WsCe.Task.Builder builder = WsCe.Task.newBuilder();
+  private Ce.Task formatQueue(CeQueueDto dto, DtoCache componentDtoCache) {
+    Ce.Task.Builder builder = Ce.Task.newBuilder();
     String organizationKey = componentDtoCache.getOrganizationKey(dto.getComponentUuid());
     // FIXME organization field should be set from the CeQueueDto rather than from the ComponentDto
     setNullable(organizationKey, builder::setOrganization);
@@ -82,7 +82,7 @@ public class TaskFormatter {
       setComponent(builder, dto.getComponentUuid(), componentDtoCache);
     }
     builder.setId(dto.getUuid());
-    builder.setStatus(WsCe.TaskStatus.valueOf(dto.getStatus().name()));
+    builder.setStatus(Ce.TaskStatus.valueOf(dto.getStatus().name()));
     builder.setType(dto.getTaskType());
     builder.setLogs(false);
     setNullable(dto.getSubmitterLogin(), builder::setSubmitterLogin);
@@ -93,24 +93,24 @@ public class TaskFormatter {
     return builder.build();
   }
 
-  public WsCe.Task formatActivity(DbSession dbSession, CeActivityDto dto, @Nullable String scannerContext) {
+  public Ce.Task formatActivity(DbSession dbSession, CeActivityDto dto, @Nullable String scannerContext) {
     return formatActivity(dto, DtoCache.forActivityDtos(dbClient, dbSession, singletonList(dto)), scannerContext);
   }
 
-  public List<WsCe.Task> formatActivity(DbSession dbSession, List<CeActivityDto> dtos) {
+  public List<Ce.Task> formatActivity(DbSession dbSession, List<CeActivityDto> dtos) {
     DtoCache cache = DtoCache.forActivityDtos(dbClient, dbSession, dtos);
     return dtos.stream()
       .map(input -> formatActivity(input, cache, null))
       .collect(MoreCollectors.toList(dtos.size()));
   }
 
-  private static WsCe.Task formatActivity(CeActivityDto dto, DtoCache componentDtoCache, @Nullable String scannerContext) {
-    WsCe.Task.Builder builder = WsCe.Task.newBuilder();
+  private static Ce.Task formatActivity(CeActivityDto dto, DtoCache componentDtoCache, @Nullable String scannerContext) {
+    Ce.Task.Builder builder = Ce.Task.newBuilder();
     String organizationKey = componentDtoCache.getOrganizationKey(dto.getComponentUuid());
     // FIXME organization field should be set from the CeActivityDto rather than from the ComponentDto
     setNullable(organizationKey, builder::setOrganization);
     builder.setId(dto.getUuid());
-    builder.setStatus(WsCe.TaskStatus.valueOf(dto.getStatus().name()));
+    builder.setStatus(Ce.TaskStatus.valueOf(dto.getStatus().name()));
     builder.setType(dto.getTaskType());
     builder.setLogs(false);
     setNullable(dto.getComponentUuid(), uuid -> setComponent(builder, uuid, componentDtoCache).setComponentId(uuid));
@@ -133,7 +133,7 @@ public class TaskFormatter {
     return builder.build();
   }
 
-  private static WsCe.Task.Builder setComponent(WsCe.Task.Builder builder, @Nullable String componentUuid, DtoCache componentDtoCache) {
+  private static Ce.Task.Builder setComponent(Ce.Task.Builder builder, @Nullable String componentUuid, DtoCache componentDtoCache) {
     ComponentDto componentDto = componentDtoCache.getComponent(componentUuid);
     if (componentDto == null) {
       return builder;
@@ -144,7 +144,7 @@ public class TaskFormatter {
     return builder;
   }
 
-  private static WsCe.Task.Builder setBranch(WsCe.Task.Builder builder, String taskUuid, DtoCache componentDtoCache) {
+  private static Ce.Task.Builder setBranch(Ce.Task.Builder builder, String taskUuid, DtoCache componentDtoCache) {
     componentDtoCache.getBranchName(taskUuid).ifPresent(
       b -> {
         builder.setBranch(b);
index d4f494a32dc62aa8d3de7e71e2f8249c991f0ece..b55f4ca75961fd3e084373a0119b2aa328fd6e3e 100644 (file)
@@ -25,7 +25,7 @@ import org.sonar.api.server.ws.Request;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.ce.taskprocessor.CeTaskProcessor;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
 
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 
@@ -52,7 +52,7 @@ public class TaskTypesAction implements CeWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    WsCe.TaskTypesWsResponse taskTypesWsResponse = WsCe.TaskTypesWsResponse.newBuilder()
+    Ce.TaskTypesWsResponse taskTypesWsResponse = Ce.TaskTypesWsResponse.newBuilder()
       .addAllTaskTypes(taskTypes)
       .build();
 
index 6a25ea910f1dc0f5977691240f4a96978478eb55..5d0f402bec5b1c9007bd9a3833ce1bc47e938c94 100644 (file)
@@ -25,7 +25,7 @@ import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.ce.configuration.WorkerCountProvider;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsCe.WorkerCountResponse;
+import org.sonarqube.ws.Ce.WorkerCountResponse;
 
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 import static org.sonarqube.ws.client.ce.CeWsParameters.ACTION_WORKER_COUNT;
index a7c29b447e9126a93e09d086f67fc64d724780b6..0ab0e0d43e2bd9a326a1b7b9a6da474d262a637a 100644 (file)
@@ -28,7 +28,7 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.SnapshotDto;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.project.Visibility;
-import org.sonarqube.ws.WsComponents;
+import org.sonarqube.ws.Components;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static com.google.common.base.Strings.emptyToNull;
@@ -46,7 +46,7 @@ class ComponentDtoToWsComponent {
     // prevent instantiation
   }
 
-  static WsComponents.Component.Builder componentDtoToWsComponent(ComponentDto dto, OrganizationDto organizationDto, Optional<SnapshotDto> lastAnalysis) {
+  static Components.Component.Builder componentDtoToWsComponent(ComponentDto dto, OrganizationDto organizationDto, Optional<SnapshotDto> lastAnalysis) {
     checkArgument(
       Objects.equals(dto.getOrganizationUuid(), organizationDto.getUuid()),
       "OrganizationUuid (%s) of ComponentDto to convert to Ws Component is not the same as the one (%s) of the specified OrganizationDto",
@@ -54,8 +54,8 @@ class ComponentDtoToWsComponent {
     return componentDtoToWsComponent(dto, organizationDto.getKey(), lastAnalysis);
   }
 
-  private static WsComponents.Component.Builder componentDtoToWsComponent(ComponentDto dto, String organizationDtoKey, Optional<SnapshotDto> lastAnalysis) {
-    WsComponents.Component.Builder wsComponent = WsComponents.Component.newBuilder()
+  private static Components.Component.Builder componentDtoToWsComponent(ComponentDto dto, String organizationDtoKey, Optional<SnapshotDto> lastAnalysis) {
+    Components.Component.Builder wsComponent = Components.Component.newBuilder()
       .setOrganization(organizationDtoKey)
       .setId(dto.uuid())
       .setKey(dto.getKey())
@@ -78,7 +78,7 @@ class ComponentDtoToWsComponent {
     return wsComponent;
   }
 
-  private static void setTags(ComponentDto dto, WsComponents.Component.Builder wsComponent) {
+  private static void setTags(ComponentDto dto, Components.Component.Builder wsComponent) {
     if (Qualifiers.PROJECT.equals(dto.qualifier())) {
       wsComponent.getTagsBuilder().addAllTags(dto.getTags());
     }
index ce509b074102bdc1ba252d322c0d9f09f8105da9..8e847517bc8ed71e7aa88d9701f1e51ce2224bbe 100644 (file)
@@ -41,8 +41,8 @@ import org.sonar.server.es.SearchIdResult;
 import org.sonar.server.es.SearchOptions;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.ws.WsUtils;
-import org.sonarqube.ws.WsComponents;
-import org.sonarqube.ws.WsComponents.SearchWsResponse;
+import org.sonarqube.ws.Components;
+import org.sonarqube.ws.Components.SearchWsResponse;
 import org.sonarqube.ws.client.component.SearchWsRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
@@ -180,13 +180,13 @@ public class SearchAction implements ComponentsWsAction {
     return responseBuilder.build();
   }
 
-  private static WsComponents.Component dtoToComponent(OrganizationDto organization, ComponentDto dto, String projectKey) {
+  private static Components.Component dtoToComponent(OrganizationDto organization, ComponentDto dto, String projectKey) {
     checkArgument(
       organization.getUuid().equals(dto.getOrganizationUuid()),
       "No Organization found for uuid '%s'",
       dto.getOrganizationUuid());
 
-    WsComponents.Component.Builder builder = WsComponents.Component.newBuilder()
+    Components.Component.Builder builder = Components.Component.newBuilder()
       .setOrganization(organization.getKey())
       .setId(dto.uuid())
       .setKey(dto.getDbKey())
index 1ab654c1fd3a3bb2601a1cc4877357adbcbe0070..f114bd780c5147d317f4d0a89d0ef87e25357696 100644 (file)
@@ -56,8 +56,8 @@ import org.sonar.server.measure.index.ProjectMeasuresQuery;
 import org.sonar.server.project.Visibility;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsComponents.Component;
-import org.sonarqube.ws.WsComponents.SearchProjectsWsResponse;
+import org.sonarqube.ws.Components.Component;
+import org.sonarqube.ws.Components.SearchProjectsWsResponse;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
 
 import static com.google.common.base.MoreObjects.firstNonNull;
index ba38c39f408f4cbbb9327648ee98680dcd5993bd..8288af7cec1a69bc797673023b910dcdf18bba90 100644 (file)
@@ -34,7 +34,7 @@ import org.sonar.db.component.SnapshotDto;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsComponents.ShowWsResponse;
+import org.sonarqube.ws.Components.ShowWsResponse;
 import org.sonarqube.ws.client.component.ShowWsRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
index 307587b35df86128e34c9124a570b5c9cddb9377..bfe7284ed74267e525e3bbdb778ef50eda716d2e 100644 (file)
@@ -56,10 +56,10 @@ import org.sonar.server.component.index.SuggestionQuery;
 import org.sonar.server.es.DefaultIndexSettings;
 import org.sonar.server.favorite.FavoriteFinder;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse.Category;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse.Project;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse.Suggestion;
+import org.sonarqube.ws.Components.SuggestionsWsResponse;
+import org.sonarqube.ws.Components.SuggestionsWsResponse.Category;
+import org.sonarqube.ws.Components.SuggestionsWsResponse.Project;
+import org.sonarqube.ws.Components.SuggestionsWsResponse.Suggestion;
 
 import static com.google.common.base.Preconditions.checkState;
 import static java.util.Arrays.stream;
@@ -72,8 +72,8 @@ import static org.sonar.core.util.stream.MoreCollectors.toSet;
 import static org.sonar.server.component.index.SuggestionQuery.DEFAULT_LIMIT;
 import static org.sonar.server.es.DefaultIndexSettings.MINIMUM_NGRAM_LENGTH;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
-import static org.sonarqube.ws.WsComponents.SuggestionsWsResponse.Organization;
-import static org.sonarqube.ws.WsComponents.SuggestionsWsResponse.newBuilder;
+import static org.sonarqube.ws.Components.SuggestionsWsResponse.Organization;
+import static org.sonarqube.ws.Components.SuggestionsWsResponse.newBuilder;
 import static org.sonarqube.ws.client.component.ComponentsWsParameters.ACTION_SUGGESTIONS;
 
 public class SuggestionsAction implements ComponentsWsAction {
index 5108087f1e58e2a8d3adbe6292892e8c230d3cad..1bd0014c0b08fe08079a5e2025fe3eeb44bbe283 100644 (file)
@@ -50,8 +50,8 @@ import org.sonar.db.component.ComponentTreeQuery.Strategy;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsComponents;
-import org.sonarqube.ws.WsComponents.TreeWsResponse;
+import org.sonarqube.ws.Components;
+import org.sonarqube.ws.Components.TreeWsResponse;
 import org.sonarqube.ws.client.component.TreeWsRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
@@ -233,9 +233,9 @@ public class TreeAction implements ComponentsWsAction {
     return response.build();
   }
 
-  private static WsComponents.Component.Builder toWsComponent(ComponentDto component, OrganizationDto organizationDto,
-    Map<String, ComponentDto> referenceComponentsByUuid) {
-    WsComponents.Component.Builder wsComponent = componentDtoToWsComponent(component, organizationDto, Optional.empty());
+  private static Components.Component.Builder toWsComponent(ComponentDto component, OrganizationDto organizationDto,
+                                                            Map<String, ComponentDto> referenceComponentsByUuid) {
+    Components.Component.Builder wsComponent = componentDtoToWsComponent(component, organizationDto, Optional.empty());
 
     ComponentDto referenceComponent = referenceComponentsByUuid.get(component.getCopyResourceUuid());
     if (referenceComponent != null) {
index b725c7b41c73f12692c14aa502ee3d6596323269..d86a0a23e33a0f6ee2c72b911cf4cfc6e2755faf 100644 (file)
@@ -28,9 +28,9 @@ import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.component.ComponentDao;
 import org.sonar.db.component.ComponentDto;
-import org.sonarqube.ws.WsDuplications;
-import org.sonarqube.ws.WsDuplications.Block;
-import org.sonarqube.ws.WsDuplications.ShowResponse;
+import org.sonarqube.ws.Duplications;
+import org.sonarqube.ws.Duplications.Block;
+import org.sonarqube.ws.Duplications.ShowResponse;
 
 import static com.google.common.collect.Maps.newHashMap;
 import static org.sonar.core.util.Protobuf.setNullable;
@@ -61,8 +61,8 @@ public class ShowResponseBuilder {
     return response.build();
   }
 
-  private static WsDuplications.Duplication.Builder toWsDuplication(DuplicationsParser.Block block, Map<String, String> refByComponentKey) {
-    WsDuplications.Duplication.Builder wsDuplication = WsDuplications.Duplication.newBuilder();
+  private static Duplications.Duplication.Builder toWsDuplication(DuplicationsParser.Block block, Map<String, String> refByComponentKey) {
+    Duplications.Duplication.Builder wsDuplication = Duplications.Duplication.newBuilder();
     block.getDuplications().stream()
       .map(d -> toWsBlock(refByComponentKey, d))
       .forEach(wsDuplication::addBlocks);
@@ -86,8 +86,8 @@ public class ShowResponseBuilder {
     return block;
   }
 
-  private static WsDuplications.File toWsFile(ComponentDto file, @Nullable ComponentDto project, @Nullable ComponentDto subProject, @Nullable String branch) {
-    WsDuplications.File.Builder wsFile = WsDuplications.File.newBuilder();
+  private static Duplications.File toWsFile(ComponentDto file, @Nullable ComponentDto project, @Nullable ComponentDto subProject, @Nullable String branch) {
+    Duplications.File.Builder wsFile = Duplications.File.newBuilder();
     wsFile.setKey(file.getKey());
     wsFile.setUuid(file.uuid());
     wsFile.setName(file.longName());
@@ -113,7 +113,7 @@ public class ShowResponseBuilder {
   private void writeFiles(DbSession session, ShowResponse.Builder response, Map<String, String> refByComponentKey, @Nullable String branch) {
     Map<String, ComponentDto> projectsByUuid = newHashMap();
     Map<String, ComponentDto> parentModulesByUuid = newHashMap();
-    Map<String, WsDuplications.File> filesByRef = response.getMutableFiles();
+    Map<String, Duplications.File> filesByRef = response.getMutableFiles();
 
     for (Map.Entry<String, String> entry : refByComponentKey.entrySet()) {
       String componentKey = entry.getKey();
index cf37a01ba5adaa1b72bdefeeff2e5c0c195d06f4..a52922b60720430d3c57b2f9a80417d843926c59 100644 (file)
@@ -34,7 +34,7 @@ import org.sonar.server.platform.WebServer;
 import org.sonar.server.plugins.edition.EditionInstaller;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.WsUtils;
-import org.sonarqube.ws.WsEditions;
+import org.sonarqube.ws.Editions;
 
 import static com.google.common.base.Preconditions.checkState;
 
@@ -115,11 +115,11 @@ public class ApplyLicenseAction implements EditionsWsAction {
     }
   }
 
-  private WsEditions.StatusResponse buildResponse() {
-    WsEditions.StatusResponse.Builder builder = WsEditions.StatusResponse.newBuilder()
+  private Editions.StatusResponse buildResponse() {
+    Editions.StatusResponse.Builder builder = Editions.StatusResponse.newBuilder()
       .setNextEditionKey(editionManagementState.getPendingEditionKey().orElse(""))
       .setCurrentEditionKey(editionManagementState.getCurrentEditionKey().orElse(""))
-      .setInstallationStatus(WsEditions.InstallationStatus.valueOf(editionManagementState.getPendingInstallationStatus().name()));
+      .setInstallationStatus(Editions.InstallationStatus.valueOf(editionManagementState.getPendingInstallationStatus().name()));
     editionManagementState.getInstallErrorMessage().ifPresent(builder::setInstallError);
     return builder.build();
   }
index 1cfb9aa100f0712831375ba203d7f2453d723b19..ca08a4b66e317355b0028fec28409c6a28362dc4 100644 (file)
@@ -26,7 +26,7 @@ import org.sonar.api.server.ws.WebService;
 import org.sonar.server.measure.index.ProjectMeasuresIndex;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.WsUtils;
-import org.sonarqube.ws.WsEditions.FormDataResponse;
+import org.sonarqube.ws.Editions.FormDataResponse;
 
 public class FormDataAction implements EditionsWsAction {
   private final UserSession userSession;
index a0853f91f856a9bef5e419d1cc80d808313c908b..0e8e313329c24366513eab96eb72345f27dd9336 100644 (file)
@@ -31,12 +31,12 @@ import org.sonar.server.platform.WebServer;
 import org.sonar.server.plugins.edition.EditionInstaller;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.WsUtils;
-import org.sonarqube.ws.WsEditions;
+import org.sonarqube.ws.Editions;
 
 import static java.util.Optional.ofNullable;
-import static org.sonarqube.ws.WsEditions.PreviewStatus.AUTOMATIC_INSTALL;
-import static org.sonarqube.ws.WsEditions.PreviewStatus.MANUAL_INSTALL;
-import static org.sonarqube.ws.WsEditions.PreviewStatus.NO_INSTALL;
+import static org.sonarqube.ws.Editions.PreviewStatus.AUTOMATIC_INSTALL;
+import static org.sonarqube.ws.Editions.PreviewStatus.MANUAL_INSTALL;
+import static org.sonarqube.ws.Editions.PreviewStatus.NO_INSTALL;
 
 public class PreviewAction implements EditionsWsAction {
   private static final String PARAM_LICENSE = "license";
@@ -87,8 +87,8 @@ public class PreviewAction implements EditionsWsAction {
     WsUtils.writeProtobuf(buildResponse(nextState), request, response);
   }
 
-  private static WsEditions.PreviewResponse buildResponse(NextState nextState) {
-    return WsEditions.PreviewResponse.newBuilder()
+  private static Editions.PreviewResponse buildResponse(NextState nextState) {
+    return Editions.PreviewResponse.newBuilder()
       .setNextEditionKey(nextState.getPendingEditionKey().orElse(""))
       .setPreviewStatus(nextState.getPreviewStatus())
       .build();
@@ -108,9 +108,9 @@ public class PreviewAction implements EditionsWsAction {
 
   private static final class NextState {
     private final String pendingEditionKey;
-    private final WsEditions.PreviewStatus previewStatus;
+    private final Editions.PreviewStatus previewStatus;
 
-    private NextState(@Nullable String pendingEditionKey, WsEditions.PreviewStatus previewStatus) {
+    private NextState(@Nullable String pendingEditionKey, Editions.PreviewStatus previewStatus) {
       this.pendingEditionKey = pendingEditionKey;
       this.previewStatus = previewStatus;
     }
@@ -119,7 +119,7 @@ public class PreviewAction implements EditionsWsAction {
       return ofNullable(pendingEditionKey);
     }
 
-    WsEditions.PreviewStatus getPreviewStatus() {
+    Editions.PreviewStatus getPreviewStatus() {
       return previewStatus;
     }
   }
index 604d964c7dcf3b48513ebb633b532dff59e5ea7d..72d136fb5908041b38169d74861b519b5f9356b1 100644 (file)
@@ -25,7 +25,7 @@ import org.sonar.api.server.ws.WebService;
 import org.sonar.server.edition.EditionManagementState;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.WsUtils;
-import org.sonarqube.ws.WsEditions;
+import org.sonarqube.ws.Editions;
 
 public class StatusAction implements EditionsWsAction {
   private final UserSession userSession;
@@ -52,10 +52,10 @@ public class StatusAction implements EditionsWsAction {
       .checkLoggedIn()
       .checkIsSystemAdministrator();
 
-    WsEditions.StatusResponse.Builder responseBuilder = WsEditions.StatusResponse.newBuilder()
+    Editions.StatusResponse.Builder responseBuilder = Editions.StatusResponse.newBuilder()
       .setCurrentEditionKey(editionManagementState.getCurrentEditionKey().orElse(""))
       .setNextEditionKey(editionManagementState.getPendingEditionKey().orElse(""))
-      .setInstallationStatus(WsEditions.InstallationStatus.valueOf(editionManagementState.getPendingInstallationStatus().name()));
+      .setInstallationStatus(Editions.InstallationStatus.valueOf(editionManagementState.getPendingInstallationStatus().name()));
     editionManagementState.getInstallErrorMessage().ifPresent(responseBuilder::setInstallError);
 
     WsUtils.writeProtobuf(responseBuilder.build(), request, response);
index a23e33014e69682a9ce0dfad0f9808d84028361e..03a8edd8eb76c5b3364002fcefd1699784191604 100644 (file)
@@ -51,8 +51,8 @@ import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.measure.ws.MetricDtoWithBestValue.MetricDtoToMetricDtoWithBestValueFunction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.ComponentWsResponse;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.ComponentWsResponse;
 import org.sonarqube.ws.client.measure.ComponentWsRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
@@ -146,7 +146,7 @@ public class ComponentAction implements MeasuresWsAction {
       checkPermissions(component);
       SnapshotDto analysis = dbClient.snapshotDao().selectLastAnalysisByRootComponentUuid(dbSession, component.projectUuid()).orElse(null);
       List<MetricDto> metrics = searchMetrics(dbSession, request);
-      List<WsMeasures.Period> periods = snapshotToWsPeriods(analysis);
+      List<Measures.Period> periods = snapshotToWsPeriods(analysis);
       List<MeasureDto> measures = searchMeasures(dbSession, component, analysis, metrics, developerId);
 
       return buildResponse(request, component, refComponent, measures, metrics, periods);
@@ -181,7 +181,7 @@ public class ComponentAction implements MeasuresWsAction {
   }
 
   private static ComponentWsResponse buildResponse(ComponentWsRequest request, ComponentDto component, Optional<ComponentDto> refComponent, List<MeasureDto> measures,
-    List<MetricDto> metrics, List<WsMeasures.Period> periods) {
+    List<MetricDto> metrics, List<Measures.Period> periods) {
     ComponentWsResponse.Builder response = ComponentWsResponse.newBuilder();
     Map<Integer, MetricDto> metricsById = Maps.uniqueIndex(metrics, MetricDto::getId);
     Map<MetricDto, MeasureDto> measuresByMetric = new HashMap<>();
index 3129de298a377d3b514e9ed8c23bb77f5f0625ce..959d707acdf66b3ca7286e6a9d65418514b275ce 100644 (file)
@@ -24,8 +24,8 @@ import org.sonar.core.util.Protobuf;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.measure.MeasureDto;
 import org.sonar.db.metric.MetricDto;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.Component;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.Component;
 
 class ComponentDtoToWsComponent {
   private ComponentDtoToWsComponent() {
@@ -42,7 +42,7 @@ class ComponentDtoToWsComponent {
       wsComponent.setRefKey(referenceComponent.getDbKey());
     }
 
-    WsMeasures.Measure.Builder measureBuilder = WsMeasures.Measure.newBuilder();
+    Measures.Measure.Builder measureBuilder = Measures.Measure.newBuilder();
     for (Map.Entry<MetricDto, MeasureDto> entry : measuresByMetric.entrySet()) {
       MeasureDtoToWsMeasure.updateMeasureBuilder(measureBuilder, entry.getKey(), entry.getValue());
       wsComponent.addMeasures(measureBuilder);
index 10b5f566fd80f7526fbeca67df90bc740033776d..2423e61ee2fdc1c77b90c255c9aba05cc7a83194 100644 (file)
@@ -38,8 +38,8 @@ import org.sonar.api.utils.Paging;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.ComponentTreeQuery.Strategy;
 import org.sonar.db.metric.MetricDto;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.ComponentTreeWsResponse;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
 import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
@@ -256,7 +256,7 @@ public class ComponentTreeAction implements MeasuresWsAction {
     }
 
     if (areMetricsInResponse(request)) {
-      WsMeasures.Metrics.Builder metricsBuilder = response.getMetricsBuilder();
+      Measures.Metrics.Builder metricsBuilder = response.getMetricsBuilder();
       for (MetricDto metricDto : data.getMetrics()) {
         metricsBuilder.addMetrics(metricDtoToWsMetric(metricDto));
       }
@@ -326,15 +326,15 @@ public class ComponentTreeAction implements MeasuresWsAction {
     return componentTreeWsRequest;
   }
 
-  private static WsMeasures.Component.Builder toWsComponent(ComponentDto component, Map<MetricDto, ComponentTreeData.Measure> measures,
-    Map<String, ComponentDto> referenceComponentsByUuid) {
-    WsMeasures.Component.Builder wsComponent = componentDtoToWsComponent(component);
+  private static Measures.Component.Builder toWsComponent(ComponentDto component, Map<MetricDto, ComponentTreeData.Measure> measures,
+                                                          Map<String, ComponentDto> referenceComponentsByUuid) {
+    Measures.Component.Builder wsComponent = componentDtoToWsComponent(component);
     ComponentDto referenceComponent = referenceComponentsByUuid.get(component.getCopyResourceUuid());
     if (referenceComponent != null) {
       wsComponent.setRefId(referenceComponent.uuid());
       wsComponent.setRefKey(referenceComponent.getDbKey());
     }
-    WsMeasures.Measure.Builder measureBuilder = WsMeasures.Measure.newBuilder();
+    Measures.Measure.Builder measureBuilder = Measures.Measure.newBuilder();
     for (Map.Entry<MetricDto, ComponentTreeData.Measure> entry : measures.entrySet()) {
       ComponentTreeData.Measure measure = entry.getValue();
       updateMeasureBuilder(measureBuilder, entry.getKey(), measure.getValue(), measure.getData(), measure.getVariation());
index 5aa59590dfa580a14198580e4327e29d5c656dab..16a7d522dbcd76adf450aef43f9e740d2d37b633 100644 (file)
@@ -27,7 +27,7 @@ import javax.annotation.Nullable;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.measure.MeasureDto;
 import org.sonar.db.metric.MetricDto;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Measures;
 
 import static java.lang.Double.NaN;
 import static java.lang.Double.isNaN;
@@ -39,7 +39,7 @@ class ComponentTreeData {
   private final int componentCount;
   private final Map<String, ComponentDto> referenceComponentsByUuid;
   private final List<MetricDto> metrics;
-  private final List<WsMeasures.Period> periods;
+  private final List<Measures.Period> periods;
   private final Table<String, MetricDto, Measure> measuresByComponentUuidAndMetric;
 
   private ComponentTreeData(Builder builder) {
@@ -77,7 +77,7 @@ class ComponentTreeData {
   }
 
   @CheckForNull
-  List<WsMeasures.Period> getPeriods() {
+  List<Measures.Period> getPeriods() {
     return periods;
   }
 
@@ -96,7 +96,7 @@ class ComponentTreeData {
     private Map<String, ComponentDto> referenceComponentsByUuid;
     private int componentCount;
     private List<MetricDto> metrics;
-    private List<WsMeasures.Period> periods;
+    private List<Measures.Period> periods;
     private Table<String, MetricDto, Measure> measuresByComponentUuidAndMetric;
 
     private Builder() {
@@ -123,7 +123,7 @@ class ComponentTreeData {
       return this;
     }
 
-    public Builder setPeriods(List<WsMeasures.Period> periods) {
+    public Builder setPeriods(List<Measures.Period> periods) {
       this.periods = periods;
       return this;
     }
index 50cc2d5b98073ade6d74d712dd7fb48b9c950c0f..3764c46b903935820fc12c09b37d8a1732ea273d 100644 (file)
@@ -22,8 +22,8 @@ package org.sonar.server.measure.ws;
 import javax.annotation.Nullable;
 import org.sonar.db.measure.MeasureDto;
 import org.sonar.db.metric.MetricDto;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.Measure;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.Measure;
 
 import static org.sonar.server.measure.ws.MeasureValueFormatter.formatMeasureValue;
 import static org.sonar.server.measure.ws.MeasureValueFormatter.formatNumericalValue;
@@ -47,7 +47,7 @@ class MeasureDtoToWsMeasure {
       measureBuilder.setValue(formatMeasureValue(doubleValue, stringValue, metric));
     }
 
-    WsMeasures.PeriodValue.Builder periodBuilder = WsMeasures.PeriodValue.newBuilder();
+    Measures.PeriodValue.Builder periodBuilder = Measures.PeriodValue.newBuilder();
     if (Double.isNaN(variation)) {
       return;
     }
index 88ec4dc255fcf713f6daf7fa9a88119707e103c7..27672b442e41e08fdbbba338f9088169b85d8ec2 100644 (file)
@@ -37,8 +37,8 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.db.measure.MeasureDto;
 import org.sonar.db.metric.MetricDto;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsMeasures.Measure;
-import org.sonarqube.ws.WsMeasures.SearchWsResponse;
+import org.sonarqube.ws.Measures.Measure;
+import org.sonarqube.ws.Measures.SearchWsResponse;
 import org.sonarqube.ws.client.measure.SearchRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
index d9adb3dbd0f1b27a6fc8b793073c127159f88670..f2e4ac957484d1dbf7575ef49caf30b4e9a62e32 100644 (file)
@@ -44,7 +44,7 @@ import org.sonar.db.metric.MetricDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.KeyExamples;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse;
+import org.sonarqube.ws.Measures.SearchHistoryResponse;
 import org.sonarqube.ws.client.measure.SearchHistoryRequest;
 
 import static java.lang.String.format;
index 187e899508d9c4272c68ca394c54cb38841eac95..0934e64f17e9a08920d75f99653c9cc511e3c035 100644 (file)
@@ -29,9 +29,9 @@ import org.sonar.core.util.stream.MoreCollectors;
 import org.sonar.db.component.SnapshotDto;
 import org.sonar.db.measure.MeasureDto;
 import org.sonar.db.metric.MetricDto;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse.HistoryMeasure;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse.HistoryValue;
+import org.sonarqube.ws.Measures.SearchHistoryResponse;
+import org.sonarqube.ws.Measures.SearchHistoryResponse.HistoryMeasure;
+import org.sonarqube.ws.Measures.SearchHistoryResponse.HistoryValue;
 
 import static org.sonar.api.utils.DateUtils.formatDateTime;
 import static org.sonar.server.measure.ws.MeasureValueFormatter.formatMeasureValue;
index ee874b89978f2a653d932bab7bb905612f7344a0..a902387b981e96825d23390cdd35dbeebcd9b46e 100644 (file)
@@ -23,7 +23,7 @@ import java.util.ArrayList;
 import java.util.List;
 import javax.annotation.Nullable;
 import org.sonar.db.component.SnapshotDto;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Measures;
 
 import static java.util.Collections.emptyList;
 import static org.sonar.api.utils.DateUtils.formatDateTime;
@@ -33,12 +33,12 @@ class SnapshotDtoToWsPeriods {
     // prevent instantiation
   }
 
-  static List<WsMeasures.Period> snapshotToWsPeriods(@Nullable SnapshotDto snapshot) {
+  static List<Measures.Period> snapshotToWsPeriods(@Nullable SnapshotDto snapshot) {
     if (snapshot == null) {
       return emptyList();
     }
 
-    List<WsMeasures.Period> periods = new ArrayList<>();
+    List<Measures.Period> periods = new ArrayList<>();
     if (snapshot.getPeriodDate() != null) {
       periods.add(snapshotDtoToWsPeriod(snapshot));
     }
@@ -46,8 +46,8 @@ class SnapshotDtoToWsPeriods {
     return periods;
   }
 
-  private static WsMeasures.Period snapshotDtoToWsPeriod(SnapshotDto snapshot) {
-    WsMeasures.Period.Builder period = WsMeasures.Period.newBuilder();
+  private static Measures.Period snapshotDtoToWsPeriod(SnapshotDto snapshot) {
+    Measures.Period.Builder period = Measures.Period.newBuilder();
     period.setIndex(1);
     String periodMode = snapshot.getPeriodMode();
     if (periodMode != null) {
index 27077a53d97ed3933a4a057a8b6cd0a62df23b2d..4259bd4adc31a8656a9f5a63f29f9877196d24ec 100644 (file)
@@ -40,8 +40,8 @@ import org.sonar.db.permission.PermissionQuery;
 import org.sonar.db.user.GroupDto;
 import org.sonar.server.permission.ProjectId;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsPermissions.Group;
-import org.sonarqube.ws.WsPermissions.WsGroupsResponse;
+import org.sonarqube.ws.Permissions.Group;
+import org.sonarqube.ws.Permissions.WsGroupsResponse;
 
 import static java.util.Collections.emptyList;
 import static org.sonar.core.util.Protobuf.setNullable;
index 5104cfbb8411657fe3f3489c70b0ccdb5666d05a..260601f7eac47d913cf58b6afae94a9daabb30bf 100644 (file)
@@ -30,13 +30,13 @@ import org.sonar.db.organization.OrganizationDto;
 import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.db.permission.PermissionQuery;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsPermissions.Permission;
-import org.sonarqube.ws.WsPermissions.WsSearchGlobalPermissionsResponse;
+import org.sonarqube.ws.Permissions.Permission;
+import org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse;
 
 import static org.sonar.server.permission.PermissionPrivilegeChecker.checkGlobalAdmin;
 import static org.sonar.server.permission.ws.PermissionsWsParametersBuilder.createOrganizationParameter;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
-import static org.sonarqube.ws.WsPermissions.Permission.newBuilder;
+import static org.sonarqube.ws.Permissions.Permission.newBuilder;
 import static org.sonarqube.ws.client.permission.PermissionsWsParameters.PARAM_ORGANIZATION;
 
 public class SearchGlobalPermissionsAction implements PermissionsWsAction {
index 83adbbed00bb30827ec49c60417fabeea478993d..1782ae1ef8183c0640059d680c3bd3e2c7d064d3 100644 (file)
@@ -36,9 +36,9 @@ import org.sonar.server.permission.PermissionPrivilegeChecker;
 import org.sonar.server.permission.ProjectId;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsPermissions.Permission;
-import org.sonarqube.ws.WsPermissions.SearchProjectPermissionsWsResponse;
-import org.sonarqube.ws.WsPermissions.SearchProjectPermissionsWsResponse.Project;
+import org.sonarqube.ws.Permissions.Permission;
+import org.sonarqube.ws.Permissions.SearchProjectPermissionsWsResponse;
+import org.sonarqube.ws.Permissions.SearchProjectPermissionsWsResponse.Project;
 import org.sonarqube.ws.client.permission.SearchProjectPermissionsWsRequest;
 
 import static org.sonar.server.permission.ws.PermissionRequestValidator.validateQualifier;
index 40d4946820f56e7a10e77bb2f0f1311eddc05426..24f6e992dcc2a5f73b87f89e5847caa00ab33a05 100644 (file)
@@ -39,8 +39,8 @@ import org.sonar.db.user.UserDto;
 import org.sonar.server.issue.ws.AvatarResolver;
 import org.sonar.server.permission.ProjectId;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsPermissions;
-import org.sonarqube.ws.WsPermissions.UsersWsResponse;
+import org.sonarqube.ws.Permissions;
+import org.sonarqube.ws.Permissions.UsersWsResponse;
 
 import static com.google.common.base.Strings.emptyToNull;
 import static java.util.Collections.emptyList;
@@ -146,7 +146,7 @@ public class UsersAction implements PermissionsWsAction {
 
     UsersWsResponse.Builder response = UsersWsResponse.newBuilder();
     users.forEach(user -> {
-      WsPermissions.User.Builder userResponse = response.addUsersBuilder()
+      Permissions.User.Builder userResponse = response.addUsersBuilder()
         .setLogin(user.getLogin())
         .addAllPermissions(permissionsByUserId.get(user.getId()));
       setNullable(user.getEmail(), userResponse::setEmail);
index 6ba87c03a46f066cdf44ab0b0843710c9fae82e5..91ba4eaf24394f6d2414125ce8e7dfc9a7f06713 100644 (file)
@@ -32,8 +32,8 @@ import org.sonar.db.permission.template.PermissionTemplateDto;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsPermissions.CreateTemplateWsResponse;
-import org.sonarqube.ws.WsPermissions.PermissionTemplate;
+import org.sonarqube.ws.Permissions.CreateTemplateWsResponse;
+import org.sonarqube.ws.Permissions.PermissionTemplate;
 import org.sonarqube.ws.client.permission.CreateTemplateWsRequest;
 
 import static java.lang.String.format;
index dfee13143f17e4e8961b00525064840fd20d1ae1..d0cb6b8d49019d187e7d626c73afca40431feb2c 100644 (file)
@@ -23,7 +23,7 @@ import com.google.common.base.Function;
 import javax.annotation.Nonnull;
 import org.sonar.api.utils.DateUtils;
 import org.sonar.db.permission.template.PermissionTemplateDto;
-import org.sonarqube.ws.WsPermissions.PermissionTemplate;
+import org.sonarqube.ws.Permissions.PermissionTemplate;
 
 import static org.sonar.core.util.Protobuf.setNullable;
 
index a07dfe369f741e625cb79a9dedb94b8bd86a25e7..87266ae544ed12b01ca1adf44926c562b4ba0041 100644 (file)
@@ -34,11 +34,11 @@ import org.sonar.db.permission.template.PermissionTemplateDto;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsPermissions;
-import org.sonarqube.ws.WsPermissions.Permission;
-import org.sonarqube.ws.WsPermissions.PermissionTemplate;
-import org.sonarqube.ws.WsPermissions.SearchTemplatesWsResponse;
-import org.sonarqube.ws.WsPermissions.SearchTemplatesWsResponse.TemplateIdQualifier;
+import org.sonarqube.ws.Permissions;
+import org.sonarqube.ws.Permissions.Permission;
+import org.sonarqube.ws.Permissions.PermissionTemplate;
+import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse;
+import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse.TemplateIdQualifier;
 import org.sonarqube.ws.client.permission.SearchTemplatesWsRequest;
 
 import static org.sonar.api.utils.DateUtils.formatDateTime;
@@ -109,7 +109,7 @@ public class SearchTemplatesAction implements PermissionsWsAction {
           .setTemplateId(viewDefaultTemplate)));
   }
 
-  private static void buildTemplatesResponse(WsPermissions.SearchTemplatesWsResponse.Builder response, SearchTemplatesData data) {
+  private static void buildTemplatesResponse(Permissions.SearchTemplatesWsResponse.Builder response, SearchTemplatesData data) {
     Permission.Builder permissionResponse = Permission.newBuilder();
     PermissionTemplate.Builder templateBuilder = PermissionTemplate.newBuilder();
 
@@ -135,7 +135,7 @@ public class SearchTemplatesAction implements PermissionsWsAction {
     }
   }
 
-  private WsPermissions.SearchTemplatesWsResponse buildResponse(SearchTemplatesData data) {
+  private Permissions.SearchTemplatesWsResponse buildResponse(SearchTemplatesData data) {
     SearchTemplatesWsResponse.Builder response = SearchTemplatesWsResponse.newBuilder();
 
     buildTemplatesResponse(response, data);
index 44c44ce26555061fccf464e9d218bffc19b9b6a5..ab2ec105106908b3535a945dd22027d880887436 100644 (file)
@@ -38,7 +38,7 @@ import org.sonar.db.user.GroupDto;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsPermissions;
+import org.sonarqube.ws.Permissions;
 
 import static org.sonar.api.server.ws.WebService.Param.PAGE;
 import static org.sonar.api.server.ws.WebService.Param.PAGE_SIZE;
@@ -99,7 +99,7 @@ public class TemplateGroupsAction implements PermissionsWsAction {
       Paging paging = Paging.forPageIndex(wsRequest.mandatoryParamAsInt(PAGE)).withPageSize(wsRequest.mandatoryParamAsInt(PAGE_SIZE)).andTotal(total);
       List<GroupDto> groups = findGroups(dbSession, query, template);
       List<PermissionTemplateGroupDto> groupPermissions = findGroupPermissions(dbSession, groups, template);
-      WsPermissions.WsGroupsResponse groupsResponse = buildResponse(groups, groupPermissions, paging);
+      Permissions.WsGroupsResponse groupsResponse = buildResponse(groups, groupPermissions, paging);
       writeProtobuf(groupsResponse, wsRequest, wsResponse);
     }
   }
@@ -119,13 +119,13 @@ public class TemplateGroupsAction implements PermissionsWsAction {
     return permissionQuery.build();
   }
 
-  private static WsPermissions.WsGroupsResponse buildResponse(List<GroupDto> groups, List<PermissionTemplateGroupDto> groupPermissions, Paging paging) {
+  private static Permissions.WsGroupsResponse buildResponse(List<GroupDto> groups, List<PermissionTemplateGroupDto> groupPermissions, Paging paging) {
     Multimap<Integer, String> permissionsByGroupId = TreeMultimap.create();
     groupPermissions.forEach(groupPermission -> permissionsByGroupId.put(groupPermission.getGroupId(), groupPermission.getPermission()));
-    WsPermissions.WsGroupsResponse.Builder response = WsPermissions.WsGroupsResponse.newBuilder();
+    Permissions.WsGroupsResponse.Builder response = Permissions.WsGroupsResponse.newBuilder();
 
     groups.forEach(group -> {
-      WsPermissions.Group.Builder wsGroup = response.addGroupsBuilder()
+      Permissions.Group.Builder wsGroup = response.addGroupsBuilder()
         .setName(group.getName());
       if (group.getId() != 0) {
         wsGroup.setId(String.valueOf(group.getId()));
index ce703cbd3d5068215201bfaf8c211008ce6758ed..4535e837be0e5829d681a212642fae7f3e8ab3d4 100644 (file)
@@ -39,8 +39,8 @@ import org.sonar.server.issue.ws.AvatarResolver;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsPermissions;
-import org.sonarqube.ws.WsPermissions.UsersWsResponse;
+import org.sonarqube.ws.Permissions;
+import org.sonarqube.ws.Permissions.UsersWsResponse;
 
 import static com.google.common.base.Strings.emptyToNull;
 import static org.sonar.api.server.ws.WebService.Param.PAGE;
@@ -106,7 +106,7 @@ public class TemplateUsersAction implements PermissionsWsAction {
       List<UserDto> users = findUsers(dbSession, query, template);
       List<PermissionTemplateUserDto> permissionTemplateUsers = dbClient.permissionTemplateDao().selectUserPermissionsByTemplateIdAndUserLogins(dbSession, template.getId(),
         users.stream().map(UserDto::getLogin).collect(Collectors.toList()));
-      WsPermissions.UsersWsResponse templateUsersResponse = buildResponse(users, permissionTemplateUsers, paging);
+      Permissions.UsersWsResponse templateUsersResponse = buildResponse(users, permissionTemplateUsers, paging);
       writeProtobuf(templateUsersResponse, wsRequest, wsResponse);
     }
   }
@@ -127,13 +127,13 @@ public class TemplateUsersAction implements PermissionsWsAction {
     return query.build();
   }
 
-  private WsPermissions.UsersWsResponse buildResponse(List<UserDto> users, List<PermissionTemplateUserDto> permissionTemplateUsers, Paging paging) {
+  private Permissions.UsersWsResponse buildResponse(List<UserDto> users, List<PermissionTemplateUserDto> permissionTemplateUsers, Paging paging) {
     Multimap<Integer, String> permissionsByUserId = TreeMultimap.create();
     permissionTemplateUsers.forEach(userPermission -> permissionsByUserId.put(userPermission.getUserId(), userPermission.getPermission()));
 
     UsersWsResponse.Builder responseBuilder = UsersWsResponse.newBuilder();
     users.forEach(user -> {
-      WsPermissions.User.Builder userResponse = responseBuilder.addUsersBuilder()
+      Permissions.User.Builder userResponse = responseBuilder.addUsersBuilder()
         .setLogin(user.getLogin())
         .addAllPermissions(permissionsByUserId.get(user.getId()));
       setNullable(user.getEmail(), userResponse::setEmail);
index 95477b15f8c2d6fa030b41e3474d53c1e878310f..b2a38561c75bf4418f20b51c17d77cc7fa0af8a1 100644 (file)
@@ -31,8 +31,8 @@ import org.sonar.db.permission.template.PermissionTemplateDto;
 import org.sonar.server.permission.ws.PermissionWsSupport;
 import org.sonar.server.permission.ws.PermissionsWsAction;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsPermissions.PermissionTemplate;
-import org.sonarqube.ws.WsPermissions.UpdateTemplateWsResponse;
+import org.sonarqube.ws.Permissions.PermissionTemplate;
+import org.sonarqube.ws.Permissions.UpdateTemplateWsResponse;
 import org.sonarqube.ws.client.permission.UpdateTemplateWsRequest;
 
 import static com.google.common.base.MoreObjects.firstNonNull;
index 40b283b1ab745c5e8385af91567cd154264657b8..ce9d79125cb9b70125d6756d164fe31f86b09348 100644 (file)
@@ -27,7 +27,7 @@ import org.sonar.process.cluster.health.NodeHealth;
 import org.sonar.server.health.ClusterHealth;
 import org.sonar.server.health.Health;
 import org.sonar.server.health.HealthChecker;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
 
 import static org.sonar.api.utils.DateUtils.formatDateTime;
 
@@ -58,31 +58,31 @@ public class HealthActionSupport {
       .setHandler(handler);
   }
 
-  WsSystem.HealthResponse checkNodeHealth() {
+  System.HealthResponse checkNodeHealth() {
     Health check = healthChecker.checkNode();
-    WsSystem.HealthResponse.Builder responseBuilder = WsSystem.HealthResponse.newBuilder()
-      .setHealth(WsSystem.Health.valueOf(check.getStatus().name()));
-    WsSystem.Cause.Builder causeBuilder = WsSystem.Cause.newBuilder();
+    System.HealthResponse.Builder responseBuilder = System.HealthResponse.newBuilder()
+      .setHealth(System.Health.valueOf(check.getStatus().name()));
+    System.Cause.Builder causeBuilder = System.Cause.newBuilder();
     check.getCauses().forEach(str -> responseBuilder.addCauses(causeBuilder.clear().setMessage(str).build()));
 
     return responseBuilder.build();
   }
 
-  WsSystem.HealthResponse checkClusterHealth() {
+  System.HealthResponse checkClusterHealth() {
     ClusterHealth check = healthChecker.checkCluster();
     return toResponse(check);
   }
 
-  private static WsSystem.HealthResponse toResponse(ClusterHealth check) {
-    WsSystem.HealthResponse.Builder responseBuilder = WsSystem.HealthResponse.newBuilder();
-    WsSystem.Node.Builder nodeBuilder = WsSystem.Node.newBuilder();
-    WsSystem.Cause.Builder causeBuilder = WsSystem.Cause.newBuilder();
+  private static System.HealthResponse toResponse(ClusterHealth check) {
+    System.HealthResponse.Builder responseBuilder = System.HealthResponse.newBuilder();
+    System.Node.Builder nodeBuilder = System.Node.newBuilder();
+    System.Cause.Builder causeBuilder = System.Cause.newBuilder();
 
     Health health = check.getHealth();
-    responseBuilder.setHealth(WsSystem.Health.valueOf(health.getStatus().name()));
+    responseBuilder.setHealth(System.Health.valueOf(health.getStatus().name()));
     health.getCauses().forEach(str -> responseBuilder.addCauses(toCause(str, causeBuilder)));
 
-    WsSystem.Nodes.Builder nodesBuilder = WsSystem.Nodes.newBuilder();
+    System.Nodes.Builder nodesBuilder = System.Nodes.newBuilder();
     check.getNodes().stream()
       .sorted(NODE_HEALTH_COMPARATOR)
       .map(node -> toNode(node, nodeBuilder, causeBuilder))
@@ -92,13 +92,13 @@ public class HealthActionSupport {
     return responseBuilder.build();
   }
 
-  private static WsSystem.Node toNode(NodeHealth nodeHealth, WsSystem.Node.Builder nodeBuilder, WsSystem.Cause.Builder causeBuilder) {
+  private static System.Node toNode(NodeHealth nodeHealth, System.Node.Builder nodeBuilder, System.Cause.Builder causeBuilder) {
     nodeBuilder.clear();
-    nodeBuilder.setHealth(WsSystem.Health.valueOf(nodeHealth.getStatus().name()));
+    nodeBuilder.setHealth(System.Health.valueOf(nodeHealth.getStatus().name()));
     nodeHealth.getCauses().forEach(str -> nodeBuilder.addCauses(toCause(str, causeBuilder)));
     NodeDetails details = nodeHealth.getDetails();
     nodeBuilder
-      .setType(WsSystem.NodeType.valueOf(details.getType().name()))
+      .setType(System.NodeType.valueOf(details.getType().name()))
       .setName(details.getName())
       .setHost(details.getHost())
       .setPort(details.getPort())
@@ -106,7 +106,7 @@ public class HealthActionSupport {
     return nodeBuilder.build();
   }
 
-  private static WsSystem.Cause toCause(String str, WsSystem.Cause.Builder causeBuilder) {
+  private static System.Cause toCause(String str, System.Cause.Builder causeBuilder) {
     return causeBuilder.clear().setMessage(str).build();
   }
 }
index 8b29e6531913b5cf5e6b0a67dcc9bf608cba6033..7be23b4bf0837fe220edf2340d4e2d23966691f5 100644 (file)
@@ -29,7 +29,7 @@ import org.sonar.server.app.RestartFlagHolder;
 import org.sonar.server.platform.Platform;
 import org.sonar.server.platform.db.migration.DatabaseMigrationState;
 import org.sonar.server.ws.WsUtils;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
 
 /**
  * Implementation of the {@code status} action for the System WebService.
@@ -73,22 +73,22 @@ public class StatusAction implements SystemWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    WsSystem.StatusResponse.Builder protobuf = WsSystem.StatusResponse.newBuilder();
+    System.StatusResponse.Builder protobuf = System.StatusResponse.newBuilder();
     Protobuf.setNullable(server.getId(), protobuf::setId);
     Protobuf.setNullable(server.getVersion(), protobuf::setVersion);
     protobuf.setStatus(computeStatus());
     WsUtils.writeProtobuf(protobuf.build(), request, response);
   }
 
-  private WsSystem.Status computeStatus() {
+  private System.Status computeStatus() {
     Platform.Status platformStatus = platform.status();
     switch (platformStatus) {
       case BOOTING:
         // can not happen since there can not even exist an instance of the current class
         // unless the Platform's status is UP/SAFEMODE/STARTING
-        return WsSystem.Status.DOWN;
+        return System.Status.DOWN;
       case UP:
-        return restartFlagHolder.isRestarting() ? WsSystem.Status.RESTARTING : WsSystem.Status.UP;
+        return restartFlagHolder.isRestarting() ? System.Status.RESTARTING : System.Status.UP;
       case STARTING:
         return computeStatusInStarting();
       case SAFEMODE:
@@ -98,34 +98,34 @@ public class StatusAction implements SystemWsAction {
     }
   }
 
-  private WsSystem.Status computeStatusInStarting() {
+  private System.Status computeStatusInStarting() {
     DatabaseMigrationState.Status databaseMigrationStatus = migrationState.getStatus();
     switch (databaseMigrationStatus) {
       case NONE:
-        return WsSystem.Status.STARTING;
+        return System.Status.STARTING;
       case RUNNING:
-        return WsSystem.Status.DB_MIGRATION_RUNNING;
+        return System.Status.DB_MIGRATION_RUNNING;
       case FAILED:
-        return WsSystem.Status.DOWN;
+        return System.Status.DOWN;
       case SUCCEEDED:
         // DB migration can be finished while we haven't yet finished SQ's initialization
-        return WsSystem.Status.STARTING;
+        return System.Status.STARTING;
       default:
         throw new IllegalArgumentException("Unsupported DatabaseMigration.Status " + databaseMigrationStatus);
     }
   }
 
-  private WsSystem.Status computeStatusInSafemode() {
+  private System.Status computeStatusInSafemode() {
     DatabaseMigrationState.Status databaseMigrationStatus = migrationState.getStatus();
     switch (databaseMigrationStatus) {
       case NONE:
-        return WsSystem.Status.DB_MIGRATION_NEEDED;
+        return System.Status.DB_MIGRATION_NEEDED;
       case RUNNING:
-        return WsSystem.Status.DB_MIGRATION_RUNNING;
+        return System.Status.DB_MIGRATION_RUNNING;
       case FAILED:
-        return WsSystem.Status.DOWN;
+        return System.Status.DOWN;
       case SUCCEEDED:
-        return WsSystem.Status.STARTING;
+        return System.Status.STARTING;
       default:
         throw new IllegalArgumentException("Unsupported DatabaseMigration.Status " + databaseMigrationStatus);
     }
index 017a6ec373bcc93f40cc68a5f84ed9f6a5fbb411..9eefaa3f91bf9e8b2032fc25891fc82d8eb4c9f2 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.component.ComponentFinder.ParamNames;
 import org.sonar.server.component.ComponentService;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsProjects.BulkUpdateKeyWsResponse;
+import org.sonarqube.ws.Projects.BulkUpdateKeyWsResponse;
 import org.sonarqube.ws.client.project.BulkUpdateKeyWsRequest;
 
 import static org.sonar.core.util.Uuids.UUID_EXAMPLE_01;
index 56e8d82333262f9701e9ca442f87f1a9de41e547..b643a9ab5c84185605b65554528df2272c87669e 100644 (file)
@@ -30,7 +30,7 @@ import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.component.ComponentUpdater;
 import org.sonar.server.project.Visibility;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsProjects.CreateWsResponse;
+import org.sonarqube.ws.Projects.CreateWsResponse;
 import org.sonarqube.ws.client.project.CreateRequest;
 
 import static org.sonar.api.resources.Qualifiers.PROJECT;
index a5fcf853663b1e6ac07afe87a67896c5150bf6f5..5597c6678ffc899f1ce0c21226612ade3c86e930 100644 (file)
@@ -39,8 +39,8 @@ import org.sonar.db.component.ComponentQuery;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.user.UserSession;
 import org.sonarqube.ws.Common.Paging;
-import org.sonarqube.ws.WsComponents.ProvisionedWsResponse;
-import org.sonarqube.ws.WsComponents.ProvisionedWsResponse.Component;
+import org.sonarqube.ws.Components.ProvisionedWsResponse;
+import org.sonarqube.ws.Components.ProvisionedWsResponse.Component;
 
 import static com.google.common.collect.Sets.newHashSet;
 import static java.util.Optional.ofNullable;
index 03a235e2c61a09ad4d91c713447408f7109b1970..f9f1dab3ee1204353a43eb41c28987f2363d9524 100644 (file)
@@ -39,7 +39,7 @@ import org.sonar.db.organization.OrganizationDto;
 import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.server.project.Visibility;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsProjects.SearchWsResponse;
+import org.sonarqube.ws.Projects.SearchWsResponse;
 import org.sonarqube.ws.client.project.SearchWsRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
@@ -56,8 +56,8 @@ import static org.sonar.server.project.Visibility.PUBLIC;
 import static org.sonar.server.ws.KeyExamples.KEY_PROJECT_EXAMPLE_001;
 import static org.sonar.server.ws.KeyExamples.KEY_PROJECT_EXAMPLE_002;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
-import static org.sonarqube.ws.WsProjects.SearchWsResponse.Component;
-import static org.sonarqube.ws.WsProjects.SearchWsResponse.newBuilder;
+import static org.sonarqube.ws.Projects.SearchWsResponse.Component;
+import static org.sonarqube.ws.Projects.SearchWsResponse.newBuilder;
 import static org.sonarqube.ws.client.project.ProjectsWsParameters.ACTION_SEARCH;
 import static org.sonarqube.ws.client.project.ProjectsWsParameters.MAX_PAGE_SIZE;
 import static org.sonarqube.ws.client.project.ProjectsWsParameters.PARAM_ANALYZED_BEFORE;
index a3e07082fc2215e6f6f5f842ee967ce8c6e00a4f..95aabe985bddbdc778371c347eed3363c481280f 100644 (file)
@@ -30,9 +30,9 @@ import org.sonar.db.DbSession;
 import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.ComponentLinkDto;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsProjects.SearchMyProjectsWsResponse;
-import org.sonarqube.ws.WsProjects.SearchMyProjectsWsResponse.Link;
-import org.sonarqube.ws.WsProjects.SearchMyProjectsWsResponse.Project;
+import org.sonarqube.ws.Projects.SearchMyProjectsWsResponse;
+import org.sonarqube.ws.Projects.SearchMyProjectsWsResponse.Link;
+import org.sonarqube.ws.Projects.SearchMyProjectsWsResponse.Project;
 import org.sonarqube.ws.client.project.SearchMyProjectsRequest;
 
 import static com.google.common.base.Strings.emptyToNull;
index 407624f6e73a7c4484fb5933ca42a7319263d75d..69fec71a4c8a368161f6792af7eb8a03ecdfc00e 100644 (file)
@@ -29,8 +29,8 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.ComponentLinkDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsProjectLinks;
-import org.sonarqube.ws.WsProjectLinks.CreateWsResponse;
+import org.sonarqube.ws.ProjectLinks;
+import org.sonarqube.ws.ProjectLinks.CreateWsResponse;
 import org.sonarqube.ws.client.projectlinks.CreateWsRequest;
 
 import static org.sonar.core.util.Slug.slugify;
@@ -119,7 +119,7 @@ public class CreateAction implements ProjectLinksWsAction {
   }
 
   private static CreateWsResponse buildResponse(ComponentLinkDto link) {
-    return CreateWsResponse.newBuilder().setLink(WsProjectLinks.Link.newBuilder()
+    return CreateWsResponse.newBuilder().setLink(ProjectLinks.Link.newBuilder()
       .setId(String.valueOf(link.getId()))
       .setName(link.getName())
       .setType(link.getType())
index bb9411b0a93dc67ed1b67116eb7609a800b8d2f9..4a66a049295ac5bae133978adf2377bfafc33c31 100644 (file)
@@ -31,8 +31,8 @@ import org.sonar.db.component.ComponentDto;
 import org.sonar.db.component.ComponentLinkDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsProjectLinks.Link;
-import org.sonarqube.ws.WsProjectLinks.SearchWsResponse;
+import org.sonarqube.ws.ProjectLinks.Link;
+import org.sonarqube.ws.ProjectLinks.SearchWsResponse;
 import org.sonarqube.ws.client.projectlinks.SearchWsRequest;
 
 import static org.sonar.core.util.Protobuf.setNullable;
index 2300eaf507ce9f2e218df6d19db704c2f647208b..087ab31baaae6652bd3f932fb44fadc0f7c4a44a 100644 (file)
@@ -25,7 +25,7 @@ import org.sonar.api.server.ws.Request;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.server.measure.index.ProjectMeasuresIndex;
-import org.sonarqube.ws.WsProjectTags;
+import org.sonarqube.ws.ProjectTags;
 
 import static org.sonar.api.server.ws.WebService.Param.PAGE_SIZE;
 import static org.sonar.api.server.ws.WebService.Param.TEXT_QUERY;
@@ -52,12 +52,12 @@ public class SearchAction implements ProjectTagsWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    WsProjectTags.SearchResponse wsResponse = doHandle(request);
+    ProjectTags.SearchResponse wsResponse = doHandle(request);
     writeProtobuf(wsResponse, request, response);
   }
 
-  private WsProjectTags.SearchResponse doHandle(Request request) {
+  private ProjectTags.SearchResponse doHandle(Request request) {
     List<String> tags = index.searchTags(request.param(TEXT_QUERY), request.mandatoryParamAsInt(PAGE_SIZE));
-    return WsProjectTags.SearchResponse.newBuilder().addAllTags(tags).build();
+    return ProjectTags.SearchResponse.newBuilder().addAllTags(tags).build();
   }
 }
index 324611084cfeccdec3343b309a10f099d14751a3..f24c9bb7ecf5f2be4dfcd39f34374444f818c4f7 100644 (file)
@@ -30,13 +30,13 @@ import org.sonar.db.metric.MetricDto;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsQualityGates.AppWsResponse.Metric;
+import org.sonarqube.ws.Qualitygates.AppWsResponse.Metric;
 
 import static org.sonar.api.measures.CoreMetrics.ALERT_STATUS_KEY;
 import static org.sonar.api.measures.Metric.ValueType.RATING;
 import static org.sonar.server.qualitygate.ValidRatingMetrics.isCoreRatingMetric;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
-import static org.sonarqube.ws.WsQualityGates.AppWsResponse;
+import static org.sonarqube.ws.Qualitygates.AppWsResponse;
 
 public class AppAction implements QualityGatesWsAction {
 
index 0bcecbe7a808ecf6dc5f3f6f91d83ed48d0542d7..e188f6540364e83b75b53619efaf060fefa6eca9 100644 (file)
@@ -29,7 +29,7 @@ import org.sonar.db.qualitygate.QualityGateDto;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.qualitygate.QualityGateUpdater;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsQualityGates.CreateWsResponse;
+import org.sonarqube.ws.Qualitygates.CreateWsResponse;
 
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_CREATE;
index e63722b4354bf600d439dcc9331474a16a122120..14361803e3fee25d1e7d2aed51b0496528a88188 100644 (file)
@@ -29,8 +29,7 @@ import org.sonar.db.qualitygate.QualityGateConditionDto;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.qualitygate.QualityGateConditionsUpdater;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsQualityGates.CreateConditionWsResponse;
-import org.sonarqube.ws.client.qualitygate.CreateConditionRequest;
+import org.sonarqube.ws.Qualitygates.CreateConditionWsResponse;
 
 import static org.sonar.core.util.Protobuf.setNullable;
 import static org.sonar.server.qualitygate.ws.QualityGatesWs.addConditionParams;
@@ -80,40 +79,26 @@ public class CreateConditionAction implements QualityGatesWsAction {
   public void handle(Request request, Response response) {
     userSession.checkPermission(OrganizationPermission.ADMINISTER_QUALITY_GATES, defaultOrganizationProvider.get().getUuid());
 
+    int gateId = request.mandatoryParamAsInt(PARAM_GATE_ID);
+    String metric = request.mandatoryParam(PARAM_METRIC);
+    String operator = request.mandatoryParam(PARAM_OPERATOR);
+    String warning = request.param(PARAM_WARNING);
+    String error = request.param(PARAM_ERROR);
+    Integer period = request.paramAsInt(PARAM_PERIOD);
+
     try (DbSession dbSession = dbClient.openSession(false)) {
-      writeProtobuf(doHandle(toWsRequest(request), dbSession), request, response);
+      QualityGateConditionDto condition = qualityGateConditionsUpdater.createCondition(dbSession, gateId, metric, operator, warning, error, period);
+
+      CreateConditionWsResponse.Builder createConditionWsResponse = CreateConditionWsResponse.newBuilder()
+        .setId(condition.getId())
+        .setMetric(condition.getMetricKey())
+        .setOp(condition.getOperator());
+      setNullable(condition.getWarningThreshold(), createConditionWsResponse::setWarning);
+      setNullable(condition.getErrorThreshold(), createConditionWsResponse::setError);
+      setNullable(condition.getPeriod(), createConditionWsResponse::setPeriod);
+      writeProtobuf(createConditionWsResponse.build(), request, response);
       dbSession.commit();
     }
   }
 
-  private CreateConditionWsResponse doHandle(CreateConditionRequest request, DbSession dbSession) {
-    QualityGateConditionDto condition = qualityGateConditionsUpdater.createCondition(dbSession,
-      request.getQualityGateId(),
-      request.getMetricKey(),
-      request.getOperator(),
-      request.getWarning(),
-      request.getError(),
-      request.getPeriod());
-
-    CreateConditionWsResponse.Builder response = CreateConditionWsResponse.newBuilder()
-      .setId(condition.getId())
-      .setMetric(condition.getMetricKey())
-      .setOp(condition.getOperator());
-    setNullable(condition.getWarningThreshold(), response::setWarning);
-    setNullable(condition.getErrorThreshold(), response::setError);
-    setNullable(condition.getPeriod(), response::setPeriod);
-    return response.build();
-  }
-
-  private static CreateConditionRequest toWsRequest(Request request) {
-    return CreateConditionRequest.builder()
-      .setQualityGateId(request.mandatoryParamAsInt(PARAM_GATE_ID))
-      .setMetricKey(request.mandatoryParam(PARAM_METRIC))
-      .setOperator(request.mandatoryParam(PARAM_OPERATOR))
-      .setWarning(request.param(PARAM_WARNING))
-      .setError(request.param(PARAM_ERROR))
-      .setPeriod(request.paramAsInt(PARAM_PERIOD))
-      .build();
-  }
-
 }
index abcfee22a4df20b1c0217ebf9128689ef53c0133..5a6af960e6b0468b6ae80e0b10cfcb7ada0c45a3 100644 (file)
@@ -33,7 +33,7 @@ import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.qualitygate.QualityGateFinder;
 import org.sonar.server.qualitygate.QualityGateFinder.QualityGateData;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsQualityGates.GetByProjectWsResponse;
+import org.sonarqube.ws.Qualitygates.GetByProjectWsResponse;
 
 import static org.sonar.server.user.AbstractUserSession.insufficientPrivilegesException;
 import static org.sonar.server.ws.KeyExamples.KEY_PROJECT_EXAMPLE_001;
index e8838d5769aeab58f25cf3886dbfac1148228f38..ab79a97b456146da9895b3e2204f0afe9ccbce91 100644 (file)
@@ -42,8 +42,7 @@ import org.sonar.server.component.ComponentFinder.ParamNames;
 import org.sonar.server.exceptions.BadRequestException;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.KeyExamples;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse;
-import org.sonarqube.ws.client.qualitygate.ProjectStatusWsRequest;
+import org.sonarqube.ws.Qualitygates.ProjectStatusWsResponse;
 
 import static com.google.common.base.Strings.isNullOrEmpty;
 import static java.util.Collections.singletonList;
@@ -109,13 +108,21 @@ public class ProjectStatusAction implements QualityGatesWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    ProjectStatusWsResponse projectStatusWsResponse = doHandle(toProjectStatusWsRequest(request));
+    String analysisId = request.param(PARAM_ANALYSIS_ID);
+    String projectId = request.param(PARAM_PROJECT_ID);
+    String projectKey = request.param(PARAM_PROJECT_KEY);
+    checkRequest(
+      !isNullOrEmpty(analysisId)
+        ^ !isNullOrEmpty(projectId)
+        ^ !isNullOrEmpty(projectKey),
+      MSG_ONE_PARAMETER_ONLY);
+    ProjectStatusWsResponse projectStatusWsResponse = doHandle(analysisId, projectId, projectKey);
     writeProtobuf(projectStatusWsResponse, request, response);
   }
 
-  private ProjectStatusWsResponse doHandle(ProjectStatusWsRequest request) {
+  private ProjectStatusWsResponse doHandle(String analysisId, String projectId, String projectKey) {
     try (DbSession dbSession = dbClient.openSession(false)) {
-      ProjectAndSnapshot projectAndSnapshot = getProjectAndSnapshot(dbSession, request);
+      ProjectAndSnapshot projectAndSnapshot = getProjectAndSnapshot(dbSession, analysisId, projectId, projectKey);
       checkPermission(projectAndSnapshot.project);
       Optional<String> measureData = getQualityGateDetailsMeasureData(dbSession, projectAndSnapshot.project);
 
@@ -125,19 +132,18 @@ public class ProjectStatusAction implements QualityGatesWsAction {
     }
   }
 
-  private ProjectAndSnapshot getProjectAndSnapshot(DbSession dbSession, ProjectStatusWsRequest request) {
-    String analysisUuid = request.getAnalysisId();
-    if (!isNullOrEmpty(request.getAnalysisId())) {
-      return getSnapshotThenProject(dbSession, analysisUuid);
-    } else if (!isNullOrEmpty(request.getProjectId()) ^ !isNullOrEmpty(request.getProjectKey())) {
-      return getProjectThenSnapshot(dbSession, request);
+  private ProjectAndSnapshot getProjectAndSnapshot(DbSession dbSession, String analysisId, String projectId, String projectKey) {
+    if (!isNullOrEmpty(analysisId)) {
+      return getSnapshotThenProject(dbSession, analysisId);
+    } else if (!isNullOrEmpty(projectId) ^ !isNullOrEmpty(projectKey)) {
+      return getProjectThenSnapshot(dbSession, projectId, projectKey);
     }
 
     throw BadRequestException.create(MSG_ONE_PARAMETER_ONLY);
   }
 
-  private ProjectAndSnapshot getProjectThenSnapshot(DbSession dbSession, ProjectStatusWsRequest request) {
-    ComponentDto projectDto = componentFinder.getByUuidOrKey(dbSession, request.getProjectId(), request.getProjectKey(), ParamNames.PROJECT_ID_AND_KEY);
+  private ProjectAndSnapshot getProjectThenSnapshot(DbSession dbSession, String projectId, String projectKey) {
+    ComponentDto projectDto = componentFinder.getByUuidOrKey(dbSession, projectId, projectKey, ParamNames.PROJECT_ID_AND_KEY);
     java.util.Optional<SnapshotDto> snapshot = dbClient.snapshotDao().selectLastAnalysisByRootComponentUuid(dbSession, projectDto.projectUuid());
     return new ProjectAndSnapshot(projectDto, snapshot.orElse(null));
   }
@@ -165,19 +171,6 @@ public class ProjectStatusAction implements QualityGatesWsAction {
       : Optional.fromNullable(measures.get(0).getData());
   }
 
-  private static ProjectStatusWsRequest toProjectStatusWsRequest(Request request) {
-    ProjectStatusWsRequest projectStatusWsRequest = new ProjectStatusWsRequest()
-      .setAnalysisId(request.param(PARAM_ANALYSIS_ID))
-      .setProjectId(request.param(PARAM_PROJECT_ID))
-      .setProjectKey(request.param(PARAM_PROJECT_KEY));
-    checkRequest(
-      !isNullOrEmpty(projectStatusWsRequest.getAnalysisId())
-        ^ !isNullOrEmpty(projectStatusWsRequest.getProjectId())
-        ^ !isNullOrEmpty(projectStatusWsRequest.getProjectKey()),
-      MSG_ONE_PARAMETER_ONLY);
-    return projectStatusWsRequest;
-  }
-
   private void checkPermission(ComponentDto project) {
     if (!userSession.hasComponentPermission(UserRole.ADMIN, project) &&
       !userSession.hasComponentPermission(UserRole.USER, project)) {
index 6c6a9508142ed28dc7ff24b12ab50e86ab2c120e..9e593013ffdf0c13f7acb61fbf9a875c9177edaf 100644 (file)
@@ -28,7 +28,7 @@ import java.util.function.Predicate;
 import java.util.stream.StreamSupport;
 import javax.annotation.Nullable;
 import org.sonar.db.component.SnapshotDto;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse;
+import org.sonarqube.ws.Qualitygates.ProjectStatusWsResponse;
 
 import static com.google.common.base.Strings.isNullOrEmpty;
 import static org.sonar.api.utils.DateUtils.formatDateTime;
index 4df3158c51342e88e3b79e9959b6c1e1b010a290..c3e33f58fccc8c1c21498c46e42b9d95bef2a509 100644 (file)
@@ -29,12 +29,11 @@ import org.sonar.core.util.Uuids;
 import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.component.ComponentDto;
+import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.db.property.PropertyDto;
 import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.component.ComponentFinder.ParamNames;
-import org.sonar.db.permission.OrganizationPermission;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.client.qualitygate.SelectWsRequest;
 
 import static org.sonar.server.qualitygate.QualityGates.SONAR_QUALITYGATE_PROPERTY;
 import static org.sonar.server.user.AbstractUserSession.insufficientPrivilegesException;
@@ -86,29 +85,22 @@ public class SelectAction implements QualityGatesWsAction {
 
   @Override
   public void handle(Request request, Response response) {
-    doHandle(toSelectWsRequest(request));
-    response.noContent();
-  }
+    long gateId = request.mandatoryParamAsLong(PARAM_GATE_ID);
+    String projectId = request.param(PARAM_PROJECT_ID);
+    String projectKey = request.param(PARAM_PROJECT_KEY);
 
-  private void doHandle(SelectWsRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
-      checkQualityGate(dbSession, request.getGateId());
-      ComponentDto project = getProject(dbSession, request.getProjectId(), request.getProjectKey());
+      checkQualityGate(dbSession, gateId);
+      ComponentDto project = getProject(dbSession, projectId, projectKey);
 
       dbClient.propertiesDao().saveProperty(dbSession, new PropertyDto()
         .setKey(SONAR_QUALITYGATE_PROPERTY)
         .setResourceId(project.getId())
-        .setValue(String.valueOf(request.getGateId())));
+        .setValue(String.valueOf(gateId)));
 
       dbSession.commit();
     }
-  }
-
-  private static SelectWsRequest toSelectWsRequest(Request request) {
-    return new SelectWsRequest()
-      .setGateId(request.mandatoryParamAsLong(PARAM_GATE_ID))
-      .setProjectId(request.param(PARAM_PROJECT_ID))
-      .setProjectKey(request.param(PARAM_PROJECT_KEY));
+    response.noContent();
   }
 
   private ComponentDto getProject(DbSession dbSession, @Nullable String projectId, @Nullable String projectKey) {
index 9fb2035f2d66ab1b1ea90f39e0716ce5ab4919d2..8284bf3d9c43117ca471e037562a976995bc9118 100644 (file)
@@ -28,8 +28,7 @@ import org.sonar.db.qualitygate.QualityGateConditionDto;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.qualitygate.QualityGateConditionsUpdater;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsQualityGates.UpdateConditionWsResponse;
-import org.sonarqube.ws.client.qualitygate.UpdateConditionRequest;
+import org.sonarqube.ws.Qualitygates.UpdateConditionWsResponse;
 
 import static org.sonar.core.util.Protobuf.setNullable;
 import static org.sonar.db.permission.OrganizationPermission.ADMINISTER_QUALITY_GATES;
@@ -80,34 +79,24 @@ public class UpdateConditionAction implements QualityGatesWsAction {
   public void handle(Request request, Response response) {
     userSession.checkPermission(ADMINISTER_QUALITY_GATES, defaultOrganizationProvider.get().getUuid());
 
+    int id = request.mandatoryParamAsInt(PARAM_ID);
+    String metric = request.mandatoryParam(PARAM_METRIC);
+    String operator = request.mandatoryParam(PARAM_OPERATOR);
+    String warning = request.param(PARAM_WARNING);
+    String error = request.param(PARAM_ERROR);
+    Integer period = request.paramAsInt(PARAM_PERIOD);
+
     try (DbSession dbSession = dbClient.openSession(false)) {
-      writeProtobuf(doHandle(toWsRequest(request), dbSession), request, response);
+      QualityGateConditionDto condition = qualityGateConditionsUpdater.updateCondition(dbSession, id, metric, operator, warning, error, period);
+      UpdateConditionWsResponse.Builder updateConditionWsResponse = UpdateConditionWsResponse.newBuilder()
+        .setId(condition.getId())
+        .setMetric(condition.getMetricKey())
+        .setOp(condition.getOperator());
+      setNullable(condition.getWarningThreshold(), updateConditionWsResponse::setWarning);
+      setNullable(condition.getErrorThreshold(), updateConditionWsResponse::setError);
+      setNullable(condition.getPeriod(), updateConditionWsResponse::setPeriod);
+      writeProtobuf(updateConditionWsResponse.build(), request, response);
       dbSession.commit();
     }
   }
-
-  private UpdateConditionWsResponse doHandle(UpdateConditionRequest request, DbSession dbSession) {
-    QualityGateConditionDto condition = qualityGateConditionsUpdater.updateCondition(dbSession, request.getConditionId(), request.getMetricKey(), request.getOperator(),
-      request.getWarning(), request.getError(), request.getPeriod());
-    UpdateConditionWsResponse.Builder response = UpdateConditionWsResponse.newBuilder()
-      .setId(condition.getId())
-      .setMetric(condition.getMetricKey())
-      .setOp(condition.getOperator());
-    setNullable(condition.getWarningThreshold(), response::setWarning);
-    setNullable(condition.getErrorThreshold(), response::setError);
-    setNullable(condition.getPeriod(), response::setPeriod);
-    return response.build();
-  }
-
-  private static UpdateConditionRequest toWsRequest(Request request) {
-    return UpdateConditionRequest.builder()
-      .setConditionId(request.mandatoryParamAsInt(PARAM_ID))
-      .setMetricKey(request.mandatoryParam(PARAM_METRIC))
-      .setOperator(request.mandatoryParam(PARAM_OPERATOR))
-      .setWarning(request.param(PARAM_WARNING))
-      .setError(request.param(PARAM_ERROR))
-      .setPeriod(request.paramAsInt(PARAM_PERIOD))
-      .build();
-  }
-
 }
index 4f8e7ea710018edfde3166f926723cf87369a7b7..fecbbcdb8f7e3a19220396fe56d361b7c04e9d6c 100644 (file)
@@ -30,7 +30,7 @@ import org.sonar.db.DbSession;
 import org.sonar.db.qualityprofile.QProfileDto;
 import org.sonar.server.qualityprofile.QProfileCopier;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.QualityProfiles.CopyWsResponse;
+import org.sonarqube.ws.Qualityprofiles.CopyWsResponse;
 
 import static org.sonar.core.util.Protobuf.setNullable;
 import static org.sonar.core.util.Uuids.UUID_EXAMPLE_01;
index a8c18e70bda3803d66316e082d655c0307772773..c179b663a5656b233e48ec49e0f15dc2ca72a4ec 100644 (file)
@@ -36,7 +36,7 @@ import org.sonar.server.qualityprofile.QProfileName;
 import org.sonar.server.qualityprofile.QProfileResult;
 import org.sonar.server.qualityprofile.index.ActiveRuleIndexer;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
 import org.sonarqube.ws.client.qualityprofile.CreateRequest;
 
 import static org.sonar.db.permission.OrganizationPermission.ADMINISTER_QUALITY_PROFILES;
index cf048d75c9fd2468e171bf75e23811e8d6706fa8..0831d3704bda37965aaaf23f5ebff8a70d74e6a8 100644 (file)
@@ -34,8 +34,8 @@ import org.sonar.db.organization.OrganizationDto;
 import org.sonar.db.qualityprofile.ActiveRuleCountQuery;
 import org.sonar.db.qualityprofile.ActiveRuleDao;
 import org.sonar.db.qualityprofile.QProfileDto;
-import org.sonarqube.ws.QualityProfiles.InheritanceWsResponse;
-import org.sonarqube.ws.QualityProfiles.InheritanceWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.InheritanceWsResponse;
+import org.sonarqube.ws.Qualityprofiles.InheritanceWsResponse.QualityProfile;
 
 import static org.sonar.core.util.Protobuf.setNullable;
 import static org.sonar.db.qualityprofile.ActiveRuleDto.OVERRIDES;
index a23522a21f6122d26cedc7793c8b5bbc727279f3..3e90a178b13448bfc28f88d0eecc03fa8c579d6a 100644 (file)
@@ -50,8 +50,8 @@ import org.sonar.server.component.ComponentFinder;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.util.LanguageParamUtils;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 import org.sonarqube.ws.client.qualityprofile.SearchWsRequest;
 
 import static com.google.common.base.Preconditions.checkState;
index 2a753a4d5013777d3a6bebf6396445cfa3cc143b..32fb6e74e6bc98711786b634e5506cc8df9e1e4c 100644 (file)
@@ -37,7 +37,7 @@ import org.sonar.db.qualityprofile.QProfileDto;
 import org.sonar.db.qualityprofile.SearchGroupsQuery;
 import org.sonar.db.user.GroupDto;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.QualityProfiles;
+import org.sonarqube.ws.Qualityprofiles;
 import org.sonarqube.ws.client.qualityprofile.SearchUsersRequest;
 
 import static org.sonar.api.server.ws.WebService.Param.PAGE;
@@ -130,7 +130,7 @@ public class SearchGroupsAction implements QProfileWsAction {
         .stream()
         .collect(MoreCollectors.uniqueIndex(GroupDto::getId));
       writeProtobuf(
-        QualityProfiles.SearchGroupsResponse.newBuilder()
+        Qualityprofiles.SearchGroupsResponse.newBuilder()
           .addAllGroups(groupMemberships.stream()
             .map(groupsMembership -> toGroup(groupsById.get(groupsMembership.getGroupId()), groupsMembership.isSelected()))
             .collect(toList()))
@@ -151,8 +151,8 @@ public class SearchGroupsAction implements QProfileWsAction {
       .build();
   }
 
-  private static QualityProfiles.SearchGroupsResponse.Group toGroup(GroupDto group, boolean isSelected) {
-    QualityProfiles.SearchGroupsResponse.Group.Builder builder = QualityProfiles.SearchGroupsResponse.Group.newBuilder()
+  private static Qualityprofiles.SearchGroupsResponse.Group toGroup(GroupDto group, boolean isSelected) {
+    Qualityprofiles.SearchGroupsResponse.Group.Builder builder = Qualityprofiles.SearchGroupsResponse.Group.newBuilder()
       .setName(group.getName())
       .setSelected(isSelected);
     setNullable(group.getDescription(), builder::setDescription);
index d031e80e18828746c461da4bb390c9ce67391988..c0ab8247722fb5f027a170497e5f2c46bd9a5836 100644 (file)
@@ -38,7 +38,7 @@ import org.sonar.db.qualityprofile.UserMembershipDto;
 import org.sonar.db.user.UserDto;
 import org.sonar.server.issue.ws.AvatarResolver;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.QualityProfiles.SearchUsersResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchUsersResponse;
 import org.sonarqube.ws.client.qualityprofile.SearchUsersRequest;
 
 import static com.google.common.base.Strings.emptyToNull;
index ce0b4a4ed87d61ce2fc8ed16e64d3203abc89dbf..0a48cee306406b110eb3056fe89628c7901730fc 100644 (file)
@@ -38,10 +38,10 @@ import org.sonar.db.qualityprofile.QProfileDto;
 import org.sonar.server.es.SearchOptions;
 import org.sonar.server.rule.index.RuleIndex;
 import org.sonar.server.rule.index.RuleQuery;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.QualityProfiles.ShowResponse;
-import org.sonarqube.ws.QualityProfiles.ShowResponse.CompareToSonarWay;
-import org.sonarqube.ws.QualityProfiles.ShowResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse.CompareToSonarWay;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse.QualityProfile;
 
 import static java.util.Collections.singletonList;
 import static org.sonar.api.rule.RuleStatus.DEPRECATED;
@@ -154,7 +154,7 @@ public class ShowAction implements QProfileWsAction {
 
   private static ShowResponse buildResponse(QProfileDto profile, boolean isDefault, Language language, long activeRules, long deprecatedActiveRules, long projects,
                                             @Nullable CompareToSonarWay compareToSonarWay) {
-    ShowResponse.Builder showResponseBuilder = QualityProfiles.ShowResponse.newBuilder();
+    ShowResponse.Builder showResponseBuilder = Qualityprofiles.ShowResponse.newBuilder();
     QualityProfile.Builder profileBuilder = QualityProfile.newBuilder()
       .setKey(profile.getKee())
       .setName(profile.getName())
index 51e76cfa0b47a870cee1ae19fb62f69ca518fc41..ea8519f37c9be0678b49c0bd314e589b00c9e513 100644 (file)
@@ -28,7 +28,7 @@ import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.user.UserDto;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsRoot;
+import org.sonarqube.ws.Root;
 
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 
@@ -69,13 +69,13 @@ public class SearchAction implements RootsWsAction {
   }
 
   private static void writeResponse(Request request, Response response, List<UserDto> dtos) {
-    WsRoot.SearchWsResponse.Builder responseBuilder = WsRoot.SearchWsResponse.newBuilder();
-    WsRoot.Root.Builder rootBuilder = WsRoot.Root.newBuilder();
+    Root.SearchWsResponse.Builder responseBuilder = Root.SearchWsResponse.newBuilder();
+    Root.RootContent.Builder rootBuilder = Root.RootContent.newBuilder();
     dtos.forEach(dto -> responseBuilder.addRoots(toRoot(rootBuilder, dto)));
     writeProtobuf(responseBuilder.build(), request, response);
   }
 
-  private static WsRoot.Root toRoot(WsRoot.Root.Builder builder, UserDto dto) {
+  private static Root.RootContent toRoot(Root.RootContent.Builder builder, UserDto dto) {
     builder.clear();
     builder.setLogin(dto.getLogin());
     if (dto.getName() != null) {
index c1dad3459e6e56262b57d91b507feb570834ebce..07d6c2d7596f475a0be7e0786165b60acccec678 100644 (file)
@@ -39,7 +39,7 @@ import org.sonar.server.test.index.CoveredFileDoc;
 import org.sonar.server.test.index.TestDoc;
 import org.sonar.server.test.index.TestIndex;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsTests;
+import org.sonarqube.ws.Tests;
 
 import static org.sonar.core.util.Protobuf.setNullable;
 import static org.sonar.server.ws.WsUtils.checkFoundWithOptional;
@@ -86,10 +86,10 @@ public class CoveredFilesAction implements TestsWsAction {
     List<CoveredFileDoc> coveredFiles = index.coveredFiles(testId);
     Map<String, ComponentDto> componentsByUuid = buildComponentsByUuid(coveredFiles);
 
-    WsTests.CoveredFilesResponse.Builder responseBuilder = WsTests.CoveredFilesResponse.newBuilder();
+    Tests.CoveredFilesResponse.Builder responseBuilder = Tests.CoveredFilesResponse.newBuilder();
     if (!coveredFiles.isEmpty()) {
       for (CoveredFileDoc doc : coveredFiles) {
-        WsTests.CoveredFilesResponse.CoveredFile.Builder fileBuilder = WsTests.CoveredFilesResponse.CoveredFile.newBuilder();
+        Tests.CoveredFilesResponse.CoveredFile.Builder fileBuilder = Tests.CoveredFilesResponse.CoveredFile.newBuilder();
         fileBuilder.setId(doc.fileUuid());
         fileBuilder.setCoveredLines(doc.coveredLines().size());
         ComponentDto component = componentsByUuid.get(doc.fileUuid());
index 57afa5ad572550e8c60ad21dc4b7477fc2aa4654..f8f28daf38244c3c52e46b793236ea9fd6f53a7f 100644 (file)
@@ -46,7 +46,7 @@ import org.sonar.server.user.UserSession;
 import org.sonar.server.ws.KeyExamples;
 import org.sonar.server.ws.WsUtils;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsTests;
+import org.sonarqube.ws.Tests;
 
 import static org.sonar.api.server.ws.WebService.Param.PAGE;
 import static org.sonar.api.server.ws.WebService.Param.PAGE_SIZE;
@@ -158,7 +158,7 @@ public class ListAction implements TestsWsAction {
       componentsByTestFileUuid = buildComponentsByTestFileUuid(dbSession, tests.getDocs());
     }
 
-    WsTests.ListResponse.Builder responseBuilder = WsTests.ListResponse.newBuilder();
+    Tests.ListResponse.Builder responseBuilder = Tests.ListResponse.newBuilder();
     responseBuilder.setPaging(Common.Paging.newBuilder()
       .setPageIndex(searchOptions.getPage())
       .setPageSize(searchOptions.getLimit())
@@ -166,7 +166,7 @@ public class ListAction implements TestsWsAction {
       .build());
 
     for (TestDoc testDoc : tests.getDocs()) {
-      WsTests.Test.Builder testBuilder = WsTests.Test.newBuilder();
+      Tests.Test.Builder testBuilder = Tests.Test.newBuilder();
       testBuilder.setId(testDoc.testUuid());
       testBuilder.setName(StringUtils.defaultString(testDoc.name()));
       testBuilder.setFileId(testDoc.fileUuid());
@@ -176,7 +176,7 @@ public class ListAction implements TestsWsAction {
         testBuilder.setFileName(component.longName());
         setNullable(component.getBranch(), testBuilder::setFileBranch);
       }
-      testBuilder.setStatus(WsTests.TestStatus.valueOf(testDoc.status()));
+      testBuilder.setStatus(Tests.TestStatus.valueOf(testDoc.status()));
       if (testDoc.durationInMs() != null) {
         testBuilder.setDurationInMs(testDoc.durationInMs());
       }
index b9f6c4fb7f280caf631bda0436425119c5a30a0d..df3409fd416acf36d5ac54456e6e02296d32ee3a 100644 (file)
@@ -32,7 +32,7 @@ import org.sonar.server.user.ExternalIdentity;
 import org.sonar.server.user.NewUser;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.user.UserUpdater;
-import org.sonarqube.ws.WsUsers.CreateWsResponse;
+import org.sonarqube.ws.Users.CreateWsResponse;
 import org.sonarqube.ws.client.user.CreateRequest;
 
 import static com.google.common.base.Strings.emptyToNull;
index 9ddfdc9190bd7d1586d1377db6bde04fea4c6140..60be4700c6e42304e674b167718067ec2c91cf5f 100644 (file)
@@ -33,15 +33,15 @@ import org.sonar.db.user.UserDto;
 import org.sonar.server.issue.ws.AvatarResolver;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsUsers.CurrentWsResponse;
+import org.sonarqube.ws.Users.CurrentWsResponse;
 
 import static com.google.common.base.Preconditions.checkState;
 import static com.google.common.base.Strings.emptyToNull;
 import static java.util.Collections.singletonList;
 import static org.sonar.core.util.Protobuf.setNullable;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
-import static org.sonarqube.ws.WsUsers.CurrentWsResponse.Permissions;
-import static org.sonarqube.ws.WsUsers.CurrentWsResponse.newBuilder;
+import static org.sonarqube.ws.Users.CurrentWsResponse.Permissions;
+import static org.sonarqube.ws.Users.CurrentWsResponse.newBuilder;
 import static org.sonarqube.ws.client.user.UsersWsParameters.ACTION_CURRENT;
 
 public class CurrentAction implements UsersWsAction {
index d3b052bcfeacc4f511ec9fff3e3d9b03d0765265..e12438d042d23d1f0a7703cd84af1c1ecc6bdbca 100644 (file)
@@ -41,8 +41,8 @@ import org.sonar.db.user.UserDto;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.usergroups.DefaultGroupFinder;
-import org.sonarqube.ws.WsUsers.GroupsWsResponse;
-import org.sonarqube.ws.WsUsers.GroupsWsResponse.Group;
+import org.sonarqube.ws.Users.GroupsWsResponse;
+import org.sonarqube.ws.Users.GroupsWsResponse.Group;
 import org.sonarqube.ws.client.user.GroupsRequest;
 
 import static com.google.common.base.Preconditions.checkArgument;
index 7219454184cd49ceef846900fad0ad0814da259f..11d27802d875b1d61aa1e9979627c479e2da65cb 100644 (file)
@@ -28,8 +28,8 @@ import org.sonar.api.server.ws.Request;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonar.server.authentication.IdentityProviderRepository;
-import org.sonarqube.ws.WsUsers;
-import org.sonarqube.ws.WsUsers.IdentityProvidersWsResponse;
+import org.sonarqube.ws.Users;
+import org.sonarqube.ws.Users.IdentityProvidersWsResponse;
 
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
 
@@ -61,12 +61,12 @@ public class IdentityProvidersAction implements UsersWsAction {
     return response.build();
   }
 
-  private enum IdentityProviderToWsResponse implements Function<IdentityProvider, WsUsers.IdentityProvider> {
+  private enum IdentityProviderToWsResponse implements Function<IdentityProvider, Users.IdentityProvider> {
     INSTANCE;
 
     @Override
-    public WsUsers.IdentityProvider apply(@Nonnull IdentityProvider input) {
-      WsUsers.IdentityProvider.Builder builder = WsUsers.IdentityProvider.newBuilder()
+    public Users.IdentityProvider apply(@Nonnull IdentityProvider input) {
+      Users.IdentityProvider.Builder builder = Users.IdentityProvider.newBuilder()
         .setKey(input.getKey())
         .setName(input.getName());
       Display display = input.getDisplay();
index 1a07d9b07e2e089b972fdea9637854d7e709cddf..f10ba7f7378e8f21ba3d66779059c781e9b36c45 100644 (file)
@@ -40,8 +40,8 @@ import org.sonar.server.user.UserSession;
 import org.sonar.server.user.index.UserDoc;
 import org.sonar.server.user.index.UserIndex;
 import org.sonar.server.user.index.UserQuery;
-import org.sonarqube.ws.WsUsers;
-import org.sonarqube.ws.WsUsers.SearchWsResponse;
+import org.sonarqube.ws.Users;
+import org.sonarqube.ws.Users.SearchWsResponse;
 import org.sonarqube.ws.client.user.SearchRequest;
 
 import static com.google.common.base.MoreObjects.firstNonNull;
@@ -65,10 +65,10 @@ import static org.sonar.server.user.ws.UserJsonWriter.FIELD_NAME;
 import static org.sonar.server.user.ws.UserJsonWriter.FIELD_SCM_ACCOUNTS;
 import static org.sonar.server.user.ws.UserJsonWriter.FIELD_TOKENS_COUNT;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
-import static org.sonarqube.ws.WsUsers.SearchWsResponse.Groups;
-import static org.sonarqube.ws.WsUsers.SearchWsResponse.ScmAccounts;
-import static org.sonarqube.ws.WsUsers.SearchWsResponse.User;
-import static org.sonarqube.ws.WsUsers.SearchWsResponse.newBuilder;
+import static org.sonarqube.ws.Users.SearchWsResponse.Groups;
+import static org.sonarqube.ws.Users.SearchWsResponse.ScmAccounts;
+import static org.sonarqube.ws.Users.SearchWsResponse.User;
+import static org.sonarqube.ws.Users.SearchWsResponse.newBuilder;
 
 public class SearchAction implements UsersWsAction {
 
@@ -111,11 +111,11 @@ public class SearchAction implements UsersWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    WsUsers.SearchWsResponse wsResponse = doHandle(toSearchRequest(request));
+    Users.SearchWsResponse wsResponse = doHandle(toSearchRequest(request));
     writeProtobuf(wsResponse, request, response);
   }
 
-  private WsUsers.SearchWsResponse doHandle(SearchRequest request) {
+  private Users.SearchWsResponse doHandle(SearchRequest request) {
     SearchOptions options = new SearchOptions().setPage(request.getPage(), request.getPageSize());
     List<String> fields = request.getPossibleFields();
     SearchResult<UserDoc> result = userIndex.search(UserQuery.builder().setTextQuery(request.getQuery()).build(), options);
index f7117ec4fd3ac6d8c64f50fa00f691225b529b9f..2f9bd1f33e0aa9b9791ee39414559ef1987a218b 100644 (file)
@@ -29,7 +29,7 @@ import org.sonar.db.DbSession;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.db.user.GroupDto;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsUserGroups;
+import org.sonarqube.ws.UserGroups;
 
 import static java.lang.String.format;
 import static org.sonar.api.user.UserGroupValidation.GROUP_NAME_MAX_LENGTH;
@@ -105,7 +105,7 @@ public class CreateAction implements UserGroupsWsAction {
   }
 
   private void writeResponse(Request request, Response response, OrganizationDto organization, GroupDto group) {
-    WsUserGroups.CreateWsResponse.Builder respBuilder = WsUserGroups.CreateWsResponse.newBuilder();
+    UserGroups.CreateWsResponse.Builder respBuilder = UserGroups.CreateWsResponse.newBuilder();
     // 'default' is always false as it's not possible to create a default group
     respBuilder.setGroup(toProtobuf(organization, group, 0, false));
     writeProtobuf(respBuilder.build(), request, response);
index bc5b4df8b88d1b528e28d2c991ec400b4ecd251a..25835028a5aa49755d6b5492b4e52a32fdc8e513 100644 (file)
@@ -30,7 +30,7 @@ import org.sonar.db.user.GroupDto;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.usergroups.DefaultGroupFinder;
-import org.sonarqube.ws.WsUserGroups;
+import org.sonarqube.ws.UserGroups;
 
 import static com.google.common.base.Preconditions.checkArgument;
 import static org.sonar.core.util.Protobuf.setNullable;
@@ -142,8 +142,8 @@ public class GroupWsSupport {
     checkArgument(!defaultGroup.getId().equals(groupDto.getId()), "Default group '%s' cannot be used to perform this action", groupDto.getName());
   }
 
-  static WsUserGroups.Group.Builder toProtobuf(OrganizationDto organization, GroupDto group, int membersCount, boolean isDefault) {
-    WsUserGroups.Group.Builder wsGroup = WsUserGroups.Group.newBuilder()
+  static UserGroups.Group.Builder toProtobuf(OrganizationDto organization, GroupDto group, int membersCount, boolean isDefault) {
+    UserGroups.Group.Builder wsGroup = UserGroups.Group.newBuilder()
       .setId(group.getId())
       .setOrganization(organization.getKey())
       .setName(group.getName())
index 13632c5bc2447f572efd61b2edd80eed4436cf7a..2fd316d063dd9ecd5cda4406d552cbfb794085e7 100644 (file)
@@ -47,8 +47,8 @@ import static org.sonar.db.permission.OrganizationPermission.ADMINISTER;
 import static org.sonar.server.es.SearchOptions.MAX_LIMIT;
 import static org.sonar.server.usergroups.ws.GroupWsSupport.PARAM_ORGANIZATION_KEY;
 import static org.sonar.server.ws.WsUtils.writeProtobuf;
-import static org.sonarqube.ws.WsUserGroups.Group;
-import static org.sonarqube.ws.WsUserGroups.SearchWsResponse;
+import static org.sonarqube.ws.UserGroups.Group;
+import static org.sonarqube.ws.UserGroups.SearchWsResponse;
 
 public class SearchAction implements UserGroupsWsAction {
 
index 86b5468727733afff2d51e41f97e0df6e4e873e0..a7acd5fe9b4205fc6b3cc332c6debe987803685b 100644 (file)
@@ -32,7 +32,7 @@ import org.sonar.db.organization.OrganizationDto;
 import org.sonar.db.user.GroupDto;
 import org.sonar.db.user.UserMembershipQuery;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsUserGroups;
+import org.sonarqube.ws.UserGroups;
 
 import static java.lang.String.format;
 import static org.sonar.api.user.UserGroupValidation.GROUP_NAME_MAX_LENGTH;
@@ -130,7 +130,7 @@ public class UpdateAction implements UserGroupsWsAction {
       .build();
     int membersCount = dbClient.groupMembershipDao().countMembers(dbSession, query);
 
-    WsUserGroups.UpdateWsResponse.Builder respBuilder = WsUserGroups.UpdateWsResponse.newBuilder();
+    UserGroups.UpdateWsResponse.Builder respBuilder = UserGroups.UpdateWsResponse.newBuilder();
     // 'default' is always false as it's not possible to update a default group
     respBuilder.setGroup(toProtobuf(organization, group, membersCount, false));
     writeProtobuf(respBuilder.build(), request, response);
index 12e1c7b5e7e48521ca3f09367b951b455d1cdbdc..cacf3c779946241eddee579c3603c88bbd808aa1 100644 (file)
@@ -31,8 +31,8 @@ import org.sonar.db.user.UserTokenDto;
 import org.sonar.server.exceptions.ServerException;
 import org.sonar.server.user.UserSession;
 import org.sonar.server.usertoken.TokenGenerator;
-import org.sonarqube.ws.WsUserTokens;
-import org.sonarqube.ws.WsUserTokens.GenerateWsResponse;
+import org.sonarqube.ws.UserTokens;
+import org.sonarqube.ws.UserTokens.GenerateWsResponse;
 import org.sonarqube.ws.client.usertoken.GenerateWsRequest;
 
 import static java.net.HttpURLConnection.HTTP_INTERNAL_ERROR;
@@ -81,11 +81,11 @@ public class GenerateAction implements UserTokensWsAction {
 
   @Override
   public void handle(Request request, Response response) throws Exception {
-    WsUserTokens.GenerateWsResponse generateWsResponse = doHandle(toCreateWsRequest(request));
+    UserTokens.GenerateWsResponse generateWsResponse = doHandle(toCreateWsRequest(request));
     writeProtobuf(generateWsResponse, request, response);
   }
 
-  private WsUserTokens.GenerateWsResponse doHandle(GenerateWsRequest request) {
+  private UserTokens.GenerateWsResponse doHandle(GenerateWsRequest request) {
     try (DbSession dbSession = dbClient.openSession(false)) {
       checkWsRequest(dbSession, request);
       TokenPermissionsValidator.validate(userSession, request.getLogin());
@@ -149,7 +149,7 @@ public class GenerateAction implements UserTokensWsAction {
   }
 
   private static GenerateWsResponse buildResponse(UserTokenDto userTokenDto, String token) {
-    return WsUserTokens.GenerateWsResponse.newBuilder()
+    return UserTokens.GenerateWsResponse.newBuilder()
       .setLogin(userTokenDto.getLogin())
       .setName(userTokenDto.getName())
       .setToken(token)
index 58895ecfb2805a30a1ed820eaff501a12ca6f21a..cadf64b42bb0ed3196615eade0980a28e0f0a146 100644 (file)
@@ -28,7 +28,7 @@ import org.sonar.db.DbClient;
 import org.sonar.db.DbSession;
 import org.sonar.db.user.UserTokenDto;
 import org.sonar.server.user.UserSession;
-import org.sonarqube.ws.WsUserTokens.SearchWsResponse;
+import org.sonarqube.ws.UserTokens.SearchWsResponse;
 import org.sonarqube.ws.client.usertoken.SearchWsRequest;
 
 import static org.sonar.api.utils.DateUtils.formatDateTime;
index b14f30b70a0020c8cdc47810b2a3d130895be81e..1b20167950d3c2623ea11e13a7af4457345b15ec 100644 (file)
@@ -25,7 +25,7 @@ import org.sonar.scanner.protocol.input.FileData;
 import org.sonar.scanner.protocol.input.ProjectRepositories;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsBatch.WsProjectResponse;
+import org.sonarqube.ws.Batch.WsProjectResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Matchers.any;
index e008e9fe9b4668391610a1b7dd6ca9bfd49ed2b0..bb8a93ae72b0b50812a6f0dd6bbb947c4ebff310 100644 (file)
@@ -52,9 +52,9 @@ import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.Common;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsBranches;
-import org.sonarqube.ws.WsBranches.Branch;
-import org.sonarqube.ws.WsBranches.ListWsResponse;
+import org.sonarqube.ws.ProjectBranches;
+import org.sonarqube.ws.ProjectBranches.Branch;
+import org.sonarqube.ws.ProjectBranches.ListWsResponse;
 
 import static java.lang.String.format;
 import static java.util.Collections.emptySet;
@@ -70,7 +70,7 @@ import static org.sonar.api.rules.RuleType.VULNERABILITY;
 import static org.sonar.api.utils.DateUtils.dateToLong;
 import static org.sonar.api.utils.DateUtils.parseDateTime;
 import static org.sonar.test.JsonAssert.assertJson;
-import static org.sonarqube.ws.WsBranches.Branch.Status;
+import static org.sonarqube.ws.ProjectBranches.Branch.Status;
 
 public class ListActionTest {
 
@@ -218,9 +218,9 @@ public class ListActionTest {
     ComponentDto shortLivingBranch = db.components().insertProjectBranch(project,
       b -> b.setKey("short").setBranchType(BranchType.SHORT).setMergeBranchUuid(project.uuid()));
 
-    WsBranches.ShowWsResponse response = ws.newRequest()
+    ProjectBranches.ShowWsResponse response = ws.newRequest()
       .setParam("project", shortLivingBranch.getKey())
-      .executeProtobuf(WsBranches.ShowWsResponse.class);
+      .executeProtobuf(ProjectBranches.ShowWsResponse.class);
 
     assertThat(response.getBranch())
       .extracting(Branch::getName, Branch::getType, Branch::getMergeBranch)
@@ -285,7 +285,7 @@ public class ListActionTest {
       .setParam("project", project.getKey())
       .executeProtobuf(ListWsResponse.class);
 
-    assertThat(response.getBranchesList().stream().map(WsBranches.Branch::getStatus))
+    assertThat(response.getBranchesList().stream().map(ProjectBranches.Branch::getStatus))
       .extracting(Status::hasBugs, Status::getBugs, Status::hasVulnerabilities, Status::getVulnerabilities, Status::hasCodeSmells, Status::getCodeSmells)
       .containsExactlyInAnyOrder(
         tuple(false, 0L, false, 0L, false, 0L),
@@ -306,7 +306,7 @@ public class ListActionTest {
       .setParam("project", project.getKey())
       .executeProtobuf(ListWsResponse.class);
 
-    assertThat(response.getBranchesList().stream().filter(b -> b.getType().equals(Common.BranchType.SHORT)).map(WsBranches.Branch::getStatus))
+    assertThat(response.getBranchesList().stream().filter(b -> b.getType().equals(Common.BranchType.SHORT)).map(ProjectBranches.Branch::getStatus))
       .extracting(Status::getBugs, Status::getVulnerabilities, Status::getCodeSmells)
       .containsExactlyInAnyOrder(tuple(0L, 0L, 0L));
   }
@@ -337,7 +337,7 @@ public class ListActionTest {
       .executeProtobuf(ListWsResponse.class);
 
     assertThat(response.getBranchesList())
-      .extracting(WsBranches.Branch::getType, WsBranches.Branch::hasAnalysisDate, b -> "".equals(b.getAnalysisDate()) ? null : dateToLong(parseDateTime(b.getAnalysisDate())))
+      .extracting(ProjectBranches.Branch::getType, ProjectBranches.Branch::hasAnalysisDate, b -> "".equals(b.getAnalysisDate()) ? null : dateToLong(parseDateTime(b.getAnalysisDate())))
       .containsExactlyInAnyOrder(
         tuple(Common.BranchType.LONG, false, null),
         tuple(Common.BranchType.SHORT, false, null),
index 0f97dde5b8aeba0cada3a0c47af6f3d5fc1c17f2..d21308296a835b1bb45165fa318e832c6b067d06 100644 (file)
@@ -50,11 +50,12 @@ import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
 import org.sonar.test.JsonAssert;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.Common;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsCe;
-import org.sonarqube.ws.WsCe.ActivityResponse;
-import org.sonarqube.ws.WsCe.Task;
+import org.sonarqube.ws.Ce;
+import org.sonarqube.ws.Ce.ActivityResponse;
+import org.sonarqube.ws.Ce.Task;
 
 import static java.util.Arrays.asList;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -110,7 +111,7 @@ public class ActivityActionTest {
     Task task = activityResponse.getTasks(0);
     assertThat(task.getOrganization()).isEqualTo(org2.getKey());
     assertThat(task.getId()).isEqualTo("T2");
-    assertThat(task.getStatus()).isEqualTo(WsCe.TaskStatus.FAILED);
+    assertThat(task.getStatus()).isEqualTo(Ce.TaskStatus.FAILED);
     assertThat(task.getComponentId()).isEqualTo(project2.uuid());
     assertThat(task.hasAnalysisId()).isFalse();
     assertThat(task.getExecutionTimeMs()).isEqualTo(500L);
@@ -118,7 +119,7 @@ public class ActivityActionTest {
 
     task = activityResponse.getTasks(1);
     assertThat(task.getId()).isEqualTo("T1");
-    assertThat(task.getStatus()).isEqualTo(WsCe.TaskStatus.SUCCESS);
+    assertThat(task.getStatus()).isEqualTo(Ce.TaskStatus.SUCCESS);
     assertThat(task.getComponentId()).isEqualTo(project1.uuid());
     assertThat(task.getLogs()).isFalse();
     assertThat(task.getOrganization()).isEqualTo(org1.getKey());
@@ -226,7 +227,7 @@ public class ActivityActionTest {
 
     assertThat(activityResponse.getTasksCount()).isEqualTo(1);
     assertThat(activityResponse.getTasks(0).getId()).isEqualTo("T1");
-    assertThat(activityResponse.getTasks(0).getStatus()).isEqualTo(WsCe.TaskStatus.SUCCESS);
+    assertThat(activityResponse.getTasks(0).getStatus()).isEqualTo(Ce.TaskStatus.SUCCESS);
     assertThat(activityResponse.getTasks(0).getComponentId()).isEqualTo(project1.uuid());
   }
 
@@ -354,9 +355,9 @@ public class ActivityActionTest {
     ActivityResponse response = ws.newRequest().executeProtobuf(ActivityResponse.class);
 
     assertThat(response.getTasksList())
-      .extracting(Task::getId, WsCe.Task::getBranch, WsCe.Task::getBranchType, WsCe.Task::getStatus, WsCe.Task::getComponentKey)
+      .extracting(Task::getId, Ce.Task::getBranch, Ce.Task::getBranchType, Ce.Task::getStatus, Ce.Task::getComponentKey)
       .containsExactlyInAnyOrder(
-        tuple("T1", longLivingBranch.getBranch(), Common.BranchType.LONG, WsCe.TaskStatus.SUCCESS, longLivingBranch.getKey()));
+        tuple("T1", longLivingBranch.getBranch(), Common.BranchType.LONG, Ce.TaskStatus.SUCCESS, longLivingBranch.getKey()));
   }
 
   @Test
@@ -375,10 +376,10 @@ public class ActivityActionTest {
       .executeProtobuf(ActivityResponse.class);
 
     assertThat(response.getTasksList())
-      .extracting(Task::getId, WsCe.Task::getBranch, WsCe.Task::getBranchType, WsCe.Task::getStatus)
+      .extracting(Task::getId, Ce.Task::getBranch, Ce.Task::getBranchType, Ce.Task::getStatus)
       .containsExactlyInAnyOrder(
-        tuple("T1", branch, Common.BranchType.LONG, WsCe.TaskStatus.IN_PROGRESS),
-        tuple("T2", branch, Common.BranchType.LONG, WsCe.TaskStatus.PENDING));
+        tuple("T1", branch, Common.BranchType.LONG, Ce.TaskStatus.IN_PROGRESS),
+        tuple("T2", branch, Common.BranchType.LONG, Ce.TaskStatus.PENDING));
   }
 
   @Test
index 02dc23d6a80ed33d3a5c3a6eb2bcd6bb4f0853c2..ca9f836a290d4064909a1fa237d80ecc9885554d 100644 (file)
@@ -40,7 +40,8 @@ import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
+import org.sonarqube.ws.Ce;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.db.ce.CeQueueTesting.newCeQueueDto;
@@ -101,7 +102,7 @@ public class ActivityStatusActionTest {
     insertActivity(CeActivityDto.Status.FAILED, projectUuid);
     insertActivity(CeActivityDto.Status.FAILED, anotherProjectUuid);
 
-    WsCe.ActivityStatusWsResponse result = call(projectUuid);
+    Ce.ActivityStatusWsResponse result = call(projectUuid);
 
     assertThat(result.getPending()).isEqualTo(2);
     assertThat(result.getFailing()).isEqualTo(1);
@@ -109,7 +110,7 @@ public class ActivityStatusActionTest {
 
   @Test
   public void empty_status() {
-    WsCe.ActivityStatusWsResponse result = call();
+    Ce.ActivityStatusWsResponse result = call();
 
     assertThat(result.getPending()).isEqualTo(0);
     assertThat(result.getFailing()).isEqualTo(0);
@@ -174,19 +175,19 @@ public class ActivityStatusActionTest {
     db.commit();
   }
 
-  private WsCe.ActivityStatusWsResponse call() {
+  private Ce.ActivityStatusWsResponse call() {
     return callByComponentUuidOrComponentKey(null, null);
   }
 
-  private WsCe.ActivityStatusWsResponse call(String componentUuid) {
+  private Ce.ActivityStatusWsResponse call(String componentUuid) {
     return callByComponentUuidOrComponentKey(componentUuid, null);
   }
 
-  private WsCe.ActivityStatusWsResponse callByComponentKey(String componentKey) {
+  private Ce.ActivityStatusWsResponse callByComponentKey(String componentKey) {
     return callByComponentUuidOrComponentKey(null, componentKey);
   }
 
-  private WsCe.ActivityStatusWsResponse callByComponentUuidOrComponentKey(@Nullable String componentUuid, @Nullable String componentKey) {
+  private Ce.ActivityStatusWsResponse callByComponentUuidOrComponentKey(@Nullable String componentUuid, @Nullable String componentKey) {
     TestRequest request = ws.newRequest();
     if (componentUuid != null) {
       request.setParam(PARAM_COMPONENT_ID, componentUuid);
@@ -194,6 +195,6 @@ public class ActivityStatusActionTest {
     if (componentKey != null) {
       request.setParam(DEPRECATED_PARAM_COMPONENT_KEY, componentKey);
     }
-    return request.executeProtobuf(WsCe.ActivityStatusWsResponse.class);
+    return request.executeProtobuf(Ce.ActivityStatusWsResponse.class);
   }
 }
index cf75d3afc540eb57143a40d8c144b60ad2fda697..0ad97b9b1c76722a1775ffb1b784c78bba848378 100644 (file)
@@ -40,9 +40,10 @@ import org.sonar.server.exceptions.ForbiddenException;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.Common;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Java6Assertions.tuple;
@@ -74,9 +75,9 @@ public class ComponentActionTest {
     ComponentDto project = db.components().insertPrivateProject();
     userSession.addProjectPermission(UserRole.USER, project);
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam(PARAM_COMPONENT, project.getKey())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
 
     assertThat(response.getQueueCount()).isEqualTo(0);
     assertThat(response.hasCurrent()).isFalse();
@@ -95,9 +96,9 @@ public class ComponentActionTest {
     insertQueue("T4", project1, IN_PROGRESS);
     insertQueue("T5", project1, PENDING);
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam(PARAM_COMPONENT, project1.getKey())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
     assertThat(response.getQueueCount()).isEqualTo(2);
     assertThat(response.getQueue(0).getId()).isEqualTo("T4");
     assertThat(response.getQueue(1).getId()).isEqualTo("T5");
@@ -106,7 +107,7 @@ public class ComponentActionTest {
     assertThat(response.getCurrent().getId()).isEqualTo("T3");
     assertThat(response.getCurrent().hasAnalysisId()).isFalse();
     assertThat(response.getQueueList())
-      .extracting(WsCe.Task::getOrganization)
+      .extracting(Ce.Task::getOrganization)
       .containsOnly(organization.getKey());
     assertThat(response.getCurrent().getOrganization()).isEqualTo(organization.getKey());
   }
@@ -118,9 +119,9 @@ public class ComponentActionTest {
     SnapshotDto analysis = db.components().insertSnapshot(project);
     insertActivity("T1", project, CeActivityDto.Status.SUCCESS, analysis);
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam(PARAM_COMPONENT, project.getDbKey())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
     assertThat(response.hasCurrent()).isTrue();
     assertThat(response.getCurrent().getId()).isEqualTo("T1");
     assertThat(response.getCurrent().getAnalysisId()).isEqualTo(analysis.getUuid());
@@ -133,9 +134,9 @@ public class ComponentActionTest {
     SnapshotDto analysis = db.components().insertSnapshot(project);
     insertActivity("T1", project, CeActivityDto.Status.SUCCESS, analysis);
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam(PARAM_COMPONENT_ID, project.uuid())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
     assertThat(response.hasCurrent()).isTrue();
     assertThat(response.getCurrent().getId()).isEqualTo("T1");
     assertThat(response.getCurrent().getAnalysisId()).isEqualTo(analysis.getUuid());
@@ -151,9 +152,9 @@ public class ComponentActionTest {
     insertActivity("T4", project, CeActivityDto.Status.CANCELED);
     insertActivity("T5", project, CeActivityDto.Status.CANCELED);
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam(PARAM_COMPONENT, project.getKey())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
     assertThat(response.getQueueCount()).isEqualTo(0);
     // T3 is the latest task executed on PROJECT_1 ignoring Canceled ones
     assertThat(response.hasCurrent()).isTrue();
@@ -170,14 +171,14 @@ public class ComponentActionTest {
     insertCharacteristic(activity, BRANCH_KEY, longLivingBranch.getBranch());
     insertCharacteristic(activity, BRANCH_TYPE_KEY, LONG.name());
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam(PARAM_COMPONENT, project.getKey())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
 
     assertThat(response.getCurrent())
-      .extracting(WsCe.Task::getId, WsCe.Task::getBranch, WsCe.Task::getBranchType, WsCe.Task::getStatus, WsCe.Task::getComponentKey)
+      .extracting(Ce.Task::getId, Ce.Task::getBranch, Ce.Task::getBranchType, Ce.Task::getStatus, Ce.Task::getComponentKey)
       .containsOnly(
-        "T1", longLivingBranch.getBranch(), Common.BranchType.LONG, WsCe.TaskStatus.SUCCESS, project.getKey());
+        "T1", longLivingBranch.getBranch(), Common.BranchType.LONG, Ce.TaskStatus.SUCCESS, project.getKey());
   }
 
   @Test
@@ -192,15 +193,15 @@ public class ComponentActionTest {
     insertCharacteristic(queue2, BRANCH_KEY, longLivingBranch.getBranch());
     insertCharacteristic(queue2, BRANCH_TYPE_KEY, LONG.name());
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam(PARAM_COMPONENT, longLivingBranch.getKey())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
 
     assertThat(response.getQueueList())
-      .extracting(WsCe.Task::getId, WsCe.Task::getBranch, WsCe.Task::getBranchType, WsCe.Task::getStatus, WsCe.Task::getComponentKey)
+      .extracting(Ce.Task::getId, Ce.Task::getBranch, Ce.Task::getBranchType, Ce.Task::getStatus, Ce.Task::getComponentKey)
       .containsOnly(
-        tuple("T1", longLivingBranch.getBranch(), Common.BranchType.LONG, WsCe.TaskStatus.IN_PROGRESS, project.getKey()),
-        tuple("T2", longLivingBranch.getBranch(), Common.BranchType.LONG, WsCe.TaskStatus.PENDING, project.getKey()));
+        tuple("T1", longLivingBranch.getBranch(), Common.BranchType.LONG, Ce.TaskStatus.IN_PROGRESS, project.getKey()),
+        tuple("T2", longLivingBranch.getBranch(), Common.BranchType.LONG, Ce.TaskStatus.PENDING, project.getKey()));
   }
 
   @Test
@@ -217,12 +218,12 @@ public class ComponentActionTest {
     insertCharacteristic(shortLivingBranchQueue, BRANCH_KEY, shortLivingBranch.getBranch());
     insertCharacteristic(shortLivingBranchQueue, BRANCH_TYPE_KEY, SHORT.name());
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam(PARAM_COMPONENT, longLivingBranch.getKey())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
 
     assertThat(response.getQueueList())
-      .extracting(WsCe.Task::getId, WsCe.Task::getComponentKey, WsCe.Task::getBranch, WsCe.Task::getBranchType)
+      .extracting(Ce.Task::getId, Ce.Task::getComponentKey, Ce.Task::getBranch, Ce.Task::getBranchType)
       .containsOnly(
         tuple("Main", project.getKey(), "", Common.BranchType.UNKNOWN_BRANCH_TYPE),
         tuple("Long", longLivingBranch.getKey(), longLivingBranch.getBranch(), Common.BranchType.LONG),
@@ -236,9 +237,9 @@ public class ComponentActionTest {
     SnapshotDto analysis = db.components().insertSnapshot(project);
     insertActivity("T1", project, CeActivityDto.Status.SUCCESS, analysis);
 
-    WsCe.ProjectResponse response = ws.newRequest()
+    Ce.ProjectResponse response = ws.newRequest()
       .setParam("componentKey", project.getKey())
-      .executeProtobuf(WsCe.ProjectResponse.class);
+      .executeProtobuf(Ce.ProjectResponse.class);
     assertThat(response.hasCurrent()).isTrue();
     assertThat(response.getCurrent().getId()).isEqualTo("T1");
     assertThat(response.getCurrent().getAnalysisId()).isEqualTo(analysis.getUuid());
index 2e92ee646efecd462471138c730042682796991c..d654fa390a3c05064c76d92fca876b2a0b284996 100644 (file)
@@ -37,8 +37,9 @@ import org.sonar.server.organization.TestDefaultOrganizationProvider;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
 import org.sonar.test.JsonAssert;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.entry;
@@ -77,12 +78,12 @@ public class SubmitActionTest {
     when(reportSubmitter.submit(eq(organizationKey), eq("my_project"), Matchers.isNull(String.class), eq("My Project"),
       anyMapOf(String.class, String.class), any(InputStream.class))).thenReturn(A_CE_TASK);
 
-    WsCe.SubmitResponse submitResponse = tester.newRequest()
+    Ce.SubmitResponse submitResponse = tester.newRequest()
       .setParam("projectKey", "my_project")
       .setParam("projectName", "My Project")
       .setPart("report", new ByteArrayInputStream("{binary}".getBytes()), "foo.bar")
       .setMethod("POST")
-      .executeProtobuf(WsCe.SubmitResponse.class);
+      .executeProtobuf(Ce.SubmitResponse.class);
 
     verify(reportSubmitter).submit(eq(organizationKey), eq("my_project"), Matchers.isNull(String.class), eq("My Project"),
       anyMapOf(String.class, String.class), any(InputStream.class));
@@ -97,13 +98,13 @@ public class SubmitActionTest {
       anyMapOf(String.class, String.class), any(InputStream.class))).thenReturn(A_CE_TASK);
 
     String[] characteristics = {"branch=branch1", "key=value1=value2"};
-    WsCe.SubmitResponse submitResponse = tester.newRequest()
+    Ce.SubmitResponse submitResponse = tester.newRequest()
       .setParam("projectKey", "my_project")
       .setParam("projectName", "My Project")
       .setMultiParam("characteristic", Arrays.asList(characteristics))
       .setPart("report", new ByteArrayInputStream("{binary}".getBytes()), "foo.bar")
       .setMethod("POST")
-      .executeProtobuf(WsCe.SubmitResponse.class);
+      .executeProtobuf(Ce.SubmitResponse.class);
 
     assertThat(submitResponse.getTaskId()).isEqualTo("TASK_1");
     verify(reportSubmitter).submit(eq(organizationKey), eq("my_project"), Matchers.isNull(String.class), eq("My Project"),
index 14d998d9231ba7d7a354e7238390475815d38f0f..620444228a47b13e27894467e9876a4ff6de0d00 100644 (file)
@@ -41,8 +41,9 @@ import org.sonar.server.exceptions.ForbiddenException;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
 
 import static java.util.Collections.singleton;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -88,12 +89,12 @@ public class TaskActionTest {
     queueDto.setSubmitterLogin("john");
     persist(queueDto);
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
-      .executeProtobuf(WsCe.TaskResponse.class);
+      .executeProtobuf(Ce.TaskResponse.class);
     assertThat(taskResponse.getTask().getOrganization()).isEqualTo(organizationDto.getKey());
     assertThat(taskResponse.getTask().getId()).isEqualTo(SOME_TASK_UUID);
-    assertThat(taskResponse.getTask().getStatus()).isEqualTo(WsCe.TaskStatus.PENDING);
+    assertThat(taskResponse.getTask().getStatus()).isEqualTo(Ce.TaskStatus.PENDING);
     assertThat(taskResponse.getTask().getSubmitterLogin()).isEqualTo("john");
     assertThat(taskResponse.getTask().getComponentId()).isEqualTo(project.uuid());
     assertThat(taskResponse.getTask().getComponentKey()).isEqualTo(project.getDbKey());
@@ -109,13 +110,13 @@ public class TaskActionTest {
     CeActivityDto activityDto = createActivityDto(SOME_TASK_UUID);
     persist(activityDto);
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
-      .executeProtobuf(WsCe.TaskResponse.class);
-    WsCe.Task task = taskResponse.getTask();
+      .executeProtobuf(Ce.TaskResponse.class);
+    Ce.Task task = taskResponse.getTask();
     assertThat(task.getOrganization()).isEqualTo(organizationDto.getKey());
     assertThat(task.getId()).isEqualTo(SOME_TASK_UUID);
-    assertThat(task.getStatus()).isEqualTo(WsCe.TaskStatus.FAILED);
+    assertThat(task.getStatus()).isEqualTo(Ce.TaskStatus.FAILED);
     assertThat(task.getComponentId()).isEqualTo(project.uuid());
     assertThat(task.getComponentKey()).isEqualTo(project.getDbKey());
     assertThat(task.getComponentName()).isEqualTo(project.name());
@@ -135,12 +136,12 @@ public class TaskActionTest {
     insertCharacteristic(activity, BRANCH_KEY, longLivingBranch.getBranch());
     insertCharacteristic(activity, BRANCH_TYPE_KEY, LONG.name());
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
-      .executeProtobuf(WsCe.TaskResponse.class);
+      .executeProtobuf(Ce.TaskResponse.class);
 
     assertThat(taskResponse.getTask())
-      .extracting(WsCe.Task::getId, WsCe.Task::getBranch, WsCe.Task::getBranchType, WsCe.Task::getComponentKey)
+      .extracting(Ce.Task::getId, Ce.Task::getBranch, Ce.Task::getBranchType, Ce.Task::getComponentKey)
       .containsExactlyInAnyOrder(SOME_TASK_UUID, longLivingBranch.getBranch(), Common.BranchType.LONG, longLivingBranch.getKey());
   }
 
@@ -152,12 +153,12 @@ public class TaskActionTest {
     insertCharacteristic(queueDto, BRANCH_KEY, branch);
     insertCharacteristic(queueDto, BRANCH_TYPE_KEY, LONG.name());
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
-      .executeProtobuf(WsCe.TaskResponse.class);
+      .executeProtobuf(Ce.TaskResponse.class);
 
     assertThat(taskResponse.getTask())
-      .extracting(WsCe.Task::getId, WsCe.Task::getBranch, WsCe.Task::getBranchType, WsCe.Task::hasComponentKey)
+      .extracting(Ce.Task::getId, Ce.Task::getBranch, Ce.Task::getBranchType, Ce.Task::hasComponentKey)
       .containsExactlyInAnyOrder(SOME_TASK_UUID, branch, Common.BranchType.LONG, false);
   }
 
@@ -170,11 +171,11 @@ public class TaskActionTest {
       .setErrorStacktrace("error stack");
     persist(activityDto);
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
       .setParam("additionalFields", "stacktrace")
-      .executeProtobuf(WsCe.TaskResponse.class);
-    WsCe.Task task = taskResponse.getTask();
+      .executeProtobuf(Ce.TaskResponse.class);
+    Ce.Task task = taskResponse.getTask();
     assertThat(task.getId()).isEqualTo(SOME_TASK_UUID);
     assertThat(task.getErrorMessage()).isEqualTo(activityDto.getErrorMessage());
     assertThat(task.hasErrorStacktrace()).isTrue();
@@ -190,10 +191,10 @@ public class TaskActionTest {
       .setErrorStacktrace("error stack");
     persist(activityDto);
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
-      .executeProtobuf(WsCe.TaskResponse.class);
-    WsCe.Task task = taskResponse.getTask();
+      .executeProtobuf(Ce.TaskResponse.class);
+    Ce.Task task = taskResponse.getTask();
     assertThat(task.getId()).isEqualTo(SOME_TASK_UUID);
     assertThat(task.getErrorMessage()).isEqualTo(activityDto.getErrorMessage());
     assertThat(task.hasErrorStacktrace()).isFalse();
@@ -207,11 +208,11 @@ public class TaskActionTest {
     persist(createActivityDto(SOME_TASK_UUID));
     persistScannerContext(SOME_TASK_UUID, scannerContext);
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
       .setParam("additionalFields", "scannerContext")
-      .executeProtobuf(WsCe.TaskResponse.class);
-    WsCe.Task task = taskResponse.getTask();
+      .executeProtobuf(Ce.TaskResponse.class);
+    Ce.Task task = taskResponse.getTask();
     assertThat(task.getId()).isEqualTo(SOME_TASK_UUID);
     assertThat(task.getScannerContext()).isEqualTo(scannerContext);
   }
@@ -224,11 +225,11 @@ public class TaskActionTest {
     persist(createActivityDto(SOME_TASK_UUID));
     persistScannerContext(SOME_TASK_UUID, scannerContext);
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
       .setParam("additionalFields", "stacktrace")
-      .executeProtobuf(WsCe.TaskResponse.class);
-    WsCe.Task task = taskResponse.getTask();
+      .executeProtobuf(Ce.TaskResponse.class);
+    Ce.Task task = taskResponse.getTask();
     assertThat(task.getId()).isEqualTo(SOME_TASK_UUID);
     assertThat(task.hasScannerContext()).isFalse();
   }
@@ -241,10 +242,10 @@ public class TaskActionTest {
       .setErrorMessage("error msg");
     persist(activityDto);
 
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", SOME_TASK_UUID)
-      .executeProtobuf(WsCe.TaskResponse.class);
-    WsCe.Task task = taskResponse.getTask();
+      .executeProtobuf(Ce.TaskResponse.class);
+    Ce.Task task = taskResponse.getTask();
     assertThat(task.getId()).isEqualTo(SOME_TASK_UUID);
     assertThat(task.getErrorMessage()).isEqualTo(activityDto.getErrorMessage());
     assertThat(task.hasErrorStacktrace()).isFalse();
@@ -433,10 +434,10 @@ public class TaskActionTest {
   }
 
   private void call(String taskUuid) {
-    WsCe.TaskResponse taskResponse = ws.newRequest()
+    Ce.TaskResponse taskResponse = ws.newRequest()
       .setParam("id", taskUuid)
-      .executeProtobuf(WsCe.TaskResponse.class);
-    WsCe.Task task = taskResponse.getTask();
+      .executeProtobuf(Ce.TaskResponse.class);
+    Ce.Task task = taskResponse.getTask();
     assertThat(task.getId()).isEqualTo(taskUuid);
   }
 
index c2e32f7b89537d0635369f7aa382d84d5ac28d80..850e6f5c787dcd0db5f10468da6e133983c1be4e 100644 (file)
@@ -31,7 +31,8 @@ import org.sonar.db.ce.CeActivityDto;
 import org.sonar.db.ce.CeQueueDto;
 import org.sonar.db.ce.CeTaskTypes;
 import org.sonar.db.organization.OrganizationDto;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
+import org.sonarqube.ws.Ce;
 
 import static java.util.Arrays.asList;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -54,11 +55,11 @@ public class TaskFormatterTest {
     dto.setStatus(CeQueueDto.Status.PENDING);
     dto.setCreatedAt(1_450_000_000_000L);
 
-    WsCe.Task wsTask = underTest.formatQueue(db.getSession(), dto);
+    Ce.Task wsTask = underTest.formatQueue(db.getSession(), dto);
 
     assertThat(wsTask.getType()).isEqualTo("TYPE");
     assertThat(wsTask.getId()).isEqualTo("UUID");
-    assertThat(wsTask.getStatus()).isEqualTo(WsCe.TaskStatus.PENDING);
+    assertThat(wsTask.getStatus()).isEqualTo(Ce.TaskStatus.PENDING);
     assertThat(wsTask.getLogs()).isFalse();
     assertThat(wsTask.getSubmittedAt()).isEqualTo(DateUtils.formatDateTime(new Date(1_450_000_000_000L)));
     assertThat(wsTask.hasScannerContext()).isFalse();
@@ -88,7 +89,7 @@ public class TaskFormatterTest {
     dto.setComponentUuid(uuid);
     dto.setSubmitterLogin("rob");
 
-    WsCe.Task wsTask = underTest.formatQueue(db.getSession(), dto);
+    Ce.Task wsTask = underTest.formatQueue(db.getSession(), dto);
 
     assertThat(wsTask.getType()).isEqualTo("TYPE");
     assertThat(wsTask.getId()).isEqualTo("UUID");
@@ -96,7 +97,7 @@ public class TaskFormatterTest {
     assertThat(wsTask.getComponentKey()).isEqualTo("COMPONENT_KEY");
     assertThat(wsTask.getComponentName()).isEqualTo("Component Name");
     assertThat(wsTask.getComponentQualifier()).isEqualTo("TRK");
-    assertThat(wsTask.getStatus()).isEqualTo(WsCe.TaskStatus.IN_PROGRESS);
+    assertThat(wsTask.getStatus()).isEqualTo(Ce.TaskStatus.IN_PROGRESS);
     assertThat(wsTask.getLogs()).isFalse();
     assertThat(wsTask.getSubmitterLogin()).isEqualTo("rob");
     assertThat(wsTask.hasExecutionTimeMs()).isTrue();
@@ -113,7 +114,7 @@ public class TaskFormatterTest {
     dto.setCreatedAt(1_450_000_000_000L);
     dto.setComponentUuid("DOES_NOT_EXIST");
 
-    WsCe.Task wsTask = underTest.formatQueue(db.getSession(), dto);
+    Ce.Task wsTask = underTest.formatQueue(db.getSession(), dto);
 
     assertThat(wsTask.getComponentId()).isEqualTo("DOES_NOT_EXIST");
     assertThat(wsTask.hasComponentKey()).isFalse();
@@ -132,7 +133,7 @@ public class TaskFormatterTest {
     dto.setStartedAt(startedAt);
     when(system2.now()).thenReturn(now);
 
-    WsCe.Task wsTask = underTest.formatQueue(db.getSession(), dto);
+    Ce.Task wsTask = underTest.formatQueue(db.getSession(), dto);
 
     assertThat(wsTask.getExecutionTimeMs()).isEqualTo(now - startedAt);
   }
@@ -151,7 +152,7 @@ public class TaskFormatterTest {
     dto2.setStatus(CeQueueDto.Status.PENDING);
     dto2.setCreatedAt(1_451_000_000_000L);
 
-    Iterable<WsCe.Task> wsTasks = underTest.formatQueue(db.getSession(), asList(dto1, dto2));
+    Iterable<Ce.Task> wsTasks = underTest.formatQueue(db.getSession(), asList(dto1, dto2));
     assertThat(wsTasks).extracting("id").containsExactly("UUID1", "UUID2");
   }
 
@@ -159,11 +160,11 @@ public class TaskFormatterTest {
   public void formatActivity() {
     CeActivityDto dto = newActivity("UUID", "COMPONENT_UUID", CeActivityDto.Status.FAILED);
 
-    WsCe.Task wsTask = underTest.formatActivity(db.getSession(), dto, null);
+    Ce.Task wsTask = underTest.formatActivity(db.getSession(), dto, null);
 
     assertThat(wsTask.getType()).isEqualTo(CeTaskTypes.REPORT);
     assertThat(wsTask.getId()).isEqualTo("UUID");
-    assertThat(wsTask.getStatus()).isEqualTo(WsCe.TaskStatus.FAILED);
+    assertThat(wsTask.getStatus()).isEqualTo(Ce.TaskStatus.FAILED);
     assertThat(wsTask.getSubmittedAt()).isEqualTo(DateUtils.formatDateTime(new Date(1_450_000_000_000L)));
     assertThat(wsTask.getExecutionTimeMs()).isEqualTo(500L);
     assertThat(wsTask.getAnalysisId()).isEqualTo("U1");
@@ -176,7 +177,7 @@ public class TaskFormatterTest {
     CeActivityDto dto = newActivity("UUID", "COMPONENT_UUID", CeActivityDto.Status.FAILED);
 
     String expected = "scanner context baby!";
-    WsCe.Task wsTask = underTest.formatActivity(db.getSession(), dto, expected);
+    Ce.Task wsTask = underTest.formatActivity(db.getSession(), dto, expected);
 
     assertThat(wsTask.hasScannerContext()).isTrue();
     assertThat(wsTask.getScannerContext()).isEqualTo(expected);
@@ -187,7 +188,7 @@ public class TaskFormatterTest {
     CeActivityDto dto1 = newActivity("UUID1", "COMPONENT_UUID", CeActivityDto.Status.FAILED);
     CeActivityDto dto2 = newActivity("UUID2", "COMPONENT_UUID", CeActivityDto.Status.SUCCESS);
 
-    Iterable<WsCe.Task> wsTasks = underTest.formatActivity(db.getSession(), asList(dto1, dto2));
+    Iterable<Ce.Task> wsTasks = underTest.formatActivity(db.getSession(), asList(dto1, dto2));
 
     assertThat(wsTasks).extracting("id").containsExactly("UUID1", "UUID2");
   }
@@ -199,7 +200,7 @@ public class TaskFormatterTest {
       .setErrorStacktrace("error stacktrace")
       .setErrorType("anErrorType");
 
-    WsCe.Task task = underTest.formatActivity(db.getSession(), Collections.singletonList(dto)).iterator().next();
+    Ce.Task task = underTest.formatActivity(db.getSession(), Collections.singletonList(dto)).iterator().next();
 
     assertThat(task.getErrorMessage()).isEqualTo(dto.getErrorMessage());
     assertThat(task.getErrorStacktrace()).isEqualTo(dto.getErrorStacktrace());
@@ -211,7 +212,7 @@ public class TaskFormatterTest {
     CeActivityDto dto = newActivity("UUID", "COMPONENT_UUID", CeActivityDto.Status.FAILED)
       .setErrorMessage("error msg");
 
-    WsCe.Task task = underTest.formatActivity(db.getSession(), Collections.singletonList(dto)).iterator().next();
+    Ce.Task task = underTest.formatActivity(db.getSession(), Collections.singletonList(dto)).iterator().next();
 
     assertThat(task.getErrorMessage()).isEqualTo(dto.getErrorMessage());
     assertThat(task.hasErrorStacktrace()).isFalse();
@@ -222,7 +223,7 @@ public class TaskFormatterTest {
     CeActivityDto dto = newActivity("UUID", "COMPONENT_UUID", CeActivityDto.Status.FAILED)
       .setErrorMessage("error msg");
 
-    WsCe.Task task = underTest.formatActivity(db.getSession(), Collections.singletonList(dto)).iterator().next();
+    Ce.Task task = underTest.formatActivity(db.getSession(), Collections.singletonList(dto)).iterator().next();
 
     assertThat(task.getErrorMessage()).isEqualTo(dto.getErrorMessage());
     assertThat(task.hasErrorStacktrace()).isFalse();
index e28f0bfe5346ee9218c111ab6ba5a1d4c62f8e4c..d7b0fb8fd685b03b44ae33b5c8bc702f778b1126 100644 (file)
@@ -28,7 +28,7 @@ import org.sonar.ce.configuration.WorkerCountProvider;
 import org.sonar.server.exceptions.ForbiddenException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsCe.WorkerCountResponse;
+import org.sonarqube.ws.Ce.WorkerCountResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
index 3a6cc5e891b083dad81f23e269febeb7c5a3f403..98357f4b30c9bf7513028a1df81c9dbf523b3141 100644 (file)
@@ -51,8 +51,8 @@ import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsComponents.Component;
-import org.sonarqube.ws.WsComponents.SearchWsResponse;
+import org.sonarqube.ws.Components.Component;
+import org.sonarqube.ws.Components.SearchWsResponse;
 import org.sonarqube.ws.client.component.SearchWsRequest;
 
 import static java.util.Arrays.asList;
index ed3a6786785ac2135068bd1bbe81a2df6f9dfd7b..2f2a6d1ac9e0cb97d9e8335eff2ec841bb94625d 100644 (file)
@@ -57,8 +57,8 @@ import org.sonar.server.ws.KeyExamples;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsComponents.Component;
-import org.sonarqube.ws.WsComponents.SearchProjectsWsResponse;
+import org.sonarqube.ws.Components.Component;
+import org.sonarqube.ws.Components.SearchProjectsWsResponse;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
 
 import static java.util.Arrays.asList;
index 6691cd3a359bebbdc784603eff977d6d32a91c88..bdb2229755eb25d0ba3c2258dc4a0a78edb14021 100644 (file)
@@ -32,7 +32,6 @@ import org.sonar.api.utils.System2;
 import org.sonar.api.web.UserRole;
 import org.sonar.db.DbTester;
 import org.sonar.db.component.ComponentDto;
-import org.sonar.db.component.SnapshotDto;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.server.component.TestComponentFinder;
 import org.sonar.server.exceptions.ForbiddenException;
@@ -40,8 +39,8 @@ import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsComponents.Component;
-import org.sonarqube.ws.WsComponents.ShowWsResponse;
+import org.sonarqube.ws.Components.Component;
+import org.sonarqube.ws.Components.ShowWsResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.tuple;
index 7858f907b8f32d303ddce55c871a15953f95468b..cc706cca7cf8f4393bd90ccca2e95e1b726fc043 100644 (file)
@@ -50,11 +50,11 @@ import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse.Category;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse.Organization;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse.Project;
-import org.sonarqube.ws.WsComponents.SuggestionsWsResponse.Suggestion;
+import org.sonarqube.ws.Components.SuggestionsWsResponse;
+import org.sonarqube.ws.Components.SuggestionsWsResponse.Category;
+import org.sonarqube.ws.Components.SuggestionsWsResponse.Organization;
+import org.sonarqube.ws.Components.SuggestionsWsResponse.Project;
+import org.sonarqube.ws.Components.SuggestionsWsResponse.Suggestion;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
index 806621bdd8a76a831174d39147c7a5224aac2d1e..7a1bb4d5ed7f66bfcf531cfbd3436ef9559bb001 100644 (file)
@@ -52,8 +52,8 @@ import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
 import org.sonar.test.JsonAssert;
-import org.sonarqube.ws.WsComponents;
-import org.sonarqube.ws.WsComponents.TreeWsResponse;
+import org.sonarqube.ws.Components;
+import org.sonarqube.ws.Components.TreeWsResponse;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -333,9 +333,9 @@ public class TreeActionTest {
       .setParam(PARAM_BRANCH, branchKey)
       .executeProtobuf(TreeWsResponse.class);
 
-    assertThat(response.getBaseComponent()).extracting(WsComponents.Component::getKey, WsComponents.Component::getBranch)
+    assertThat(response.getBaseComponent()).extracting(Components.Component::getKey, Components.Component::getBranch)
       .containsExactlyInAnyOrder(module.getKey(), branchKey);
-    assertThat(response.getComponentsList()).extracting(WsComponents.Component::getKey, WsComponents.Component::getBranch)
+    assertThat(response.getComponentsList()).extracting(Components.Component::getKey, Components.Component::getBranch)
       .containsExactlyInAnyOrder(
         tuple(directory.getKey(), branchKey),
         tuple(file.getKey(), branchKey));
@@ -352,7 +352,7 @@ public class TreeActionTest {
 
     ws.newRequest()
       .setParam(PARAM_COMPONENT, branch.getDbKey())
-      .executeProtobuf(WsComponents.ShowWsResponse.class);
+      .executeProtobuf(Components.ShowWsResponse.class);
   }
 
   @Test
@@ -366,7 +366,7 @@ public class TreeActionTest {
 
     ws.newRequest()
       .setParam(PARAM_COMPONENT_ID, branch.uuid())
-      .executeProtobuf(WsComponents.ShowWsResponse.class);
+      .executeProtobuf(Components.ShowWsResponse.class);
   }
 
   @Test
index 181a980a6fd0ddba9d1931e890f64e8bc6f19690..53892e9e183677d9dce4496b01cd6705547e93d2 100644 (file)
@@ -51,8 +51,8 @@ import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
 import org.sonar.test.JsonAssert;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsEditions;
-import org.sonarqube.ws.WsEditions.StatusResponse;
+import org.sonarqube.ws.Editions;
+import org.sonarqube.ws.Editions.StatusResponse;
 
 import static java.util.Collections.singleton;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -310,16 +310,16 @@ public class ApplyLicenseActionTest {
 
     TestResponse response = request.execute();
 
-    StatusResponse parsedResponse = WsEditions.StatusResponse.parseFrom(response.getInputStream());
+    StatusResponse parsedResponse = Editions.StatusResponse.parseFrom(response.getInputStream());
     assertThat(parsedResponse.getInstallError()).isEqualTo(errorMessage);
   }
 
   private void assertResponse(TestResponse response, String expectedNextEditionKey, String expectedEditionKey,
     PendingStatus expectedPendingStatus) throws IOException {
-    StatusResponse parsedResponse = WsEditions.StatusResponse.parseFrom(response.getInputStream());
+    StatusResponse parsedResponse = Editions.StatusResponse.parseFrom(response.getInputStream());
     assertThat(parsedResponse.getCurrentEditionKey()).isEqualTo(expectedEditionKey);
     assertThat(parsedResponse.getNextEditionKey()).isEqualTo(expectedNextEditionKey);
-    assertThat(parsedResponse.getInstallationStatus()).isEqualTo(WsEditions.InstallationStatus.valueOf(expectedPendingStatus.toString()));
+    assertThat(parsedResponse.getInstallationStatus()).isEqualTo(Editions.InstallationStatus.valueOf(expectedPendingStatus.toString()));
   }
 
   private void setPendingLicense(PendingStatus pendingStatus) {
index e2ce1b6034713f16fcc3a7106b17b5e2fce7b9c8..1cd71ce83f86e0769cbd755c11d380638691b178 100644 (file)
@@ -40,7 +40,7 @@ import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonar.test.JsonAssert;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsEditions.FormDataResponse;
+import org.sonarqube.ws.Editions.FormDataResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
index 8e8d0170da56cf3f9e85acc005b79614265d55a7..2f6438b2803897654f867abf5db645317568cbe4 100644 (file)
@@ -45,10 +45,10 @@ import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
 import org.sonar.test.JsonAssert;
+import org.sonarqube.ws.Editions;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsEditions;
-import org.sonarqube.ws.WsEditions.PreviewResponse;
-import org.sonarqube.ws.WsEditions.PreviewStatus;
+import org.sonarqube.ws.Editions.PreviewResponse;
+import org.sonarqube.ws.Editions.PreviewStatus;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
@@ -233,7 +233,7 @@ public class PreviewActionTest {
   }
 
   private void assertResponse(TestResponse response, String expectedNextEditionKey, PreviewStatus expectedPreviewStatus) throws IOException {
-    PreviewResponse parsedResponse = WsEditions.PreviewResponse.parseFrom(response.getInputStream());
+    PreviewResponse parsedResponse = Editions.PreviewResponse.parseFrom(response.getInputStream());
     assertThat(parsedResponse.getPreviewStatus()).isEqualTo(expectedPreviewStatus);
     assertThat(parsedResponse.getNextEditionKey()).isEqualTo(expectedNextEditionKey);
   }
index 362ba23e66afed96c2c89c132d45efd93f7361fc..82468f874c4115c7000eec9988a781484d2a4a7a 100644 (file)
@@ -40,9 +40,9 @@ import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.Component;
-import org.sonarqube.ws.WsMeasures.ComponentWsResponse;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.Component;
+import org.sonarqube.ws.Measures.ComponentWsResponse;
 
 import static java.lang.Double.parseDouble;
 import static java.lang.String.format;
@@ -138,7 +138,7 @@ public class ComponentActionTest {
     assertThat(response.getComponent()).extracting(Component::getKey, Component::getBranch)
       .containsExactlyInAnyOrder(file.getKey(), file.getBranch());
     assertThat(response.getComponent().getMeasuresList())
-      .extracting(WsMeasures.Measure::getMetric, m -> parseDouble(m.getValue()))
+      .extracting(Measures.Measure::getMetric, m -> parseDouble(m.getValue()))
       .containsExactlyInAnyOrder(tuple(complexity.getKey(), measure.getValue()));
   }
 
index 692a818e36a47a411978e3a184cbbeb5e6df1625..32bc30d6a3173634253fb4e0e39049ef3787c85a 100644 (file)
@@ -49,8 +49,8 @@ import org.sonar.server.i18n.I18nRule;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.ComponentTreeWsResponse;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
 
 import static java.lang.Double.parseDouble;
 import static java.lang.String.format;
@@ -226,7 +226,7 @@ public class ComponentTreeActionTest {
 
     assertThat(response.getComponentsList().get(0).getMeasuresList()).extracting("metric").containsOnly("coverage");
     // file measures
-    List<WsMeasures.Measure> fileMeasures = response.getComponentsList().get(1).getMeasuresList();
+    List<Measures.Measure> fileMeasures = response.getComponentsList().get(1).getMeasuresList();
     assertThat(fileMeasures).extracting("metric").containsOnly("ncloc", "coverage");
     assertThat(fileMeasures).extracting("value").containsOnly("5", "15.5");
     assertThat(response.getPeriods().getPeriodsList()).extracting("mode").containsOnly("last_version");
@@ -267,7 +267,7 @@ public class ComponentTreeActionTest {
     // directory measures
     assertThat(response.getComponentsList().get(0).getMeasuresList()).extracting("metric").containsOnly("coverage");
     // file measures
-    List<WsMeasures.Measure> fileMeasures = response.getComponentsList().get(1).getMeasuresList();
+    List<Measures.Measure> fileMeasures = response.getComponentsList().get(1).getMeasuresList();
     assertThat(fileMeasures).extracting("metric").containsOnly("ncloc", "coverage", "new_violations");
     assertThat(fileMeasures).extracting("value").containsOnly("100", "15.5", "");
 
@@ -503,12 +503,12 @@ public class ComponentTreeActionTest {
       .setParam(PARAM_COMPONENT, file.getKey())
       .setParam(PARAM_BRANCH, file.getBranch())
       .setParam(PARAM_METRIC_KEYS, complexity.getKey())
-      .executeProtobuf(WsMeasures.ComponentTreeWsResponse.class);
+      .executeProtobuf(Measures.ComponentTreeWsResponse.class);
 
-    assertThat(response.getBaseComponent()).extracting(WsMeasures.Component::getKey, WsMeasures.Component::getBranch)
+    assertThat(response.getBaseComponent()).extracting(Measures.Component::getKey, Measures.Component::getBranch)
       .containsExactlyInAnyOrder(file.getKey(), file.getBranch());
     assertThat(response.getBaseComponent().getMeasuresList())
-      .extracting(WsMeasures.Measure::getMetric, m -> parseDouble(m.getValue()))
+      .extracting(Measures.Measure::getMetric, m -> parseDouble(m.getValue()))
       .containsExactlyInAnyOrder(tuple(complexity.getKey(), measure.getValue()));
   }
 
@@ -526,7 +526,7 @@ public class ComponentTreeActionTest {
       .executeProtobuf(ComponentTreeWsResponse.class);
 
     assertThat(response.getBaseComponent().getId()).isEqualTo(project.uuid());
-    assertThat(response.getComponentsList()).extracting(WsMeasures.Component::getId)
+    assertThat(response.getComponentsList()).extracting(Measures.Component::getId)
       .containsExactlyInAnyOrder(file.uuid());
   }
 
@@ -594,7 +594,7 @@ public class ComponentTreeActionTest {
       .executeProtobuf(ComponentTreeWsResponse.class);
 
     assertThat(result.getComponentsList())
-      .extracting(WsMeasures.Component::getKey, WsMeasures.Component::getRefId, WsMeasures.Component::getRefKey)
+      .extracting(Measures.Component::getKey, Measures.Component::getRefId, Measures.Component::getRefKey)
       .containsExactlyInAnyOrder(tuple(projectCopy.getKey(), project.uuid(), project.getKey()));
   }
 
index 6c846d51018fd1b39dbcf175c895d6234fac8a74..535eeb756967fc159139ebd439006405603a165c 100644 (file)
@@ -47,9 +47,9 @@ import org.sonar.server.exceptions.BadRequestException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.Measure;
-import org.sonarqube.ws.WsMeasures.SearchWsResponse;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.Measure;
+import org.sonarqube.ws.Measures.SearchWsResponse;
 
 import static com.google.common.collect.Lists.newArrayList;
 import static java.util.Arrays.asList;
@@ -144,7 +144,7 @@ public class SearchActionTest {
     assertThat(measure.getMetric()).isEqualTo("coverage");
     assertThat(measure.getValue()).isEqualTo("15.5");
     assertThat(measure.getPeriods().getPeriodsValueList())
-      .extracting(WsMeasures.PeriodValue::getIndex, WsMeasures.PeriodValue::getValue)
+      .extracting(Measures.PeriodValue::getIndex, Measures.PeriodValue::getValue)
       .containsOnly(tuple(1, "10.0"));
   }
 
index 85940ce4dc80e18f89201b8bf656a525eea092b8..73ae00a32b77fb426c4fc3630b6412dfd697d105 100644 (file)
@@ -47,9 +47,9 @@ import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.Common.Paging;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse.HistoryMeasure;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse.HistoryValue;
+import org.sonarqube.ws.Measures.SearchHistoryResponse;
+import org.sonarqube.ws.Measures.SearchHistoryResponse.HistoryMeasure;
+import org.sonarqube.ws.Measures.SearchHistoryResponse.HistoryValue;
 import org.sonarqube.ws.client.measure.SearchHistoryRequest;
 
 import static com.google.common.collect.Lists.newArrayList;
index 1782763fcc4bf60ec0a5adf37617a7b1e2c08168..30de11db233a48302d81fa3e199360a2d1750d00 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.server.exceptions.ForbiddenException;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.exceptions.UnauthorizedException;
 import org.sonar.server.i18n.I18nRule;
-import org.sonarqube.ws.WsPermissions;
+import org.sonarqube.ws.Permissions;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.core.permission.GlobalPermissions.PROVISIONING;
@@ -101,11 +101,11 @@ public class SearchGlobalPermissionsActionTest extends BasePermissionWsTest<Sear
     db.users().insertPermissionOnUser(org, user, ADMINISTER_QUALITY_GATES);
     db.organizations().addMember(org, user);
 
-    WsPermissions.WsSearchGlobalPermissionsResponse result = newRequest()
-      .executeProtobuf(WsPermissions.WsSearchGlobalPermissionsResponse.class);
+    Permissions.WsSearchGlobalPermissionsResponse result = newRequest()
+      .executeProtobuf(Permissions.WsSearchGlobalPermissionsResponse.class);
 
     assertThat(result.getPermissionsCount()).isEqualTo(GlobalPermissions.ALL.size());
-    for (WsPermissions.Permission permission : result.getPermissionsList()) {
+    for (Permissions.Permission permission : result.getPermissionsList()) {
       if (permission.getKey().equals(SCAN_EXECUTION)) {
         assertThat(permission.getUsersCount()).isEqualTo(1);
       } else {
@@ -118,8 +118,8 @@ public class SearchGlobalPermissionsActionTest extends BasePermissionWsTest<Sear
   public void supports_protobuf_response() throws Exception {
     loginAsAdmin(db.getDefaultOrganization());
 
-    WsPermissions.WsSearchGlobalPermissionsResponse result = newRequest()
-      .executeProtobuf(WsPermissions.WsSearchGlobalPermissionsResponse.class);
+    Permissions.WsSearchGlobalPermissionsResponse result = newRequest()
+      .executeProtobuf(Permissions.WsSearchGlobalPermissionsResponse.class);
 
     assertThat(result).isNotNull();
   }
index 1de62c3a35fcaa599274a6b08d067b79f91461ca..58605ca8d2419f8c689e6860be7cffaf962eb8b7 100644 (file)
@@ -34,7 +34,7 @@ import org.sonar.server.exceptions.ForbiddenException;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.exceptions.UnauthorizedException;
 import org.sonar.server.i18n.I18nRule;
-import org.sonarqube.ws.WsPermissions;
+import org.sonarqube.ws.Permissions;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -249,9 +249,9 @@ public class SearchProjectPermissionsActionTest extends BasePermissionWsTest<Sea
     db.components().insertComponent(newView(organizationDto, "view-uuid"));
     db.components().insertComponent(newPrivateProjectDto(organizationDto, "project-uuid"));
 
-    WsPermissions.SearchProjectPermissionsWsResponse result = newRequest()
+    Permissions.SearchProjectPermissionsWsResponse result = newRequest()
       .setParam(PARAM_QUALIFIER, Qualifiers.PROJECT)
-      .executeProtobuf(WsPermissions.SearchProjectPermissionsWsResponse.class);
+      .executeProtobuf(Permissions.SearchProjectPermissionsWsResponse.class);
 
     assertThat(result.getProjectsList())
       .extracting("id")
index 0268173ccec44419351661183727a444e29a3661..df52f34b91012f6cca1002f5c03d7bde302a64ee 100644 (file)
@@ -38,7 +38,7 @@ import org.sonar.server.i18n.I18nRule;
 import org.sonar.server.permission.ws.BasePermissionWsTest;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsPermissions;
+import org.sonarqube.ws.Permissions;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.api.server.ws.WebService.Param.TEXT_QUERY;
@@ -179,13 +179,13 @@ public class SearchTemplatesActionTest extends BasePermissionWsTest<SearchTempla
     db.commit();
     userSession.addPermission(ADMINISTER, org);
 
-    WsPermissions.SearchTemplatesWsResponse result = newRequest(underTestWithoutViews)
+    Permissions.SearchTemplatesWsResponse result = newRequest(underTestWithoutViews)
       .setParam("organization", org.getKey())
-      .executeProtobuf(WsPermissions.SearchTemplatesWsResponse.class);
+      .executeProtobuf(Permissions.SearchTemplatesWsResponse.class);
 
     assertThat(result.getPermissionTemplatesCount()).isEqualTo(2);
     assertThat(result.getPermissionTemplatesList())
-      .extracting(WsPermissions.PermissionTemplate::getId)
+      .extracting(Permissions.PermissionTemplate::getId)
       .containsOnly(projectDefaultTemplate.getUuid(), templateInOrg.getUuid());
   }
 
index f8533dd657ab71a9e9981a0982ef1d8d5a2954fa..4b8d6eca5bf497f315991f308c5a04a72090cf1b 100644 (file)
@@ -31,7 +31,7 @@ import org.sonar.server.exceptions.ForbiddenException;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.exceptions.UnauthorizedException;
 import org.sonar.server.permission.ws.BasePermissionWsTest;
-import org.sonarqube.ws.WsPermissions.WsGroupsResponse;
+import org.sonarqube.ws.Permissions.WsGroupsResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.api.server.ws.WebService.Param.PAGE;
index 959d68b549a28564439580ec64d9a9b0ef8fe745..cfd7c51ae414978cd371919080b20a6ca661e4a4 100644 (file)
@@ -33,7 +33,7 @@ import org.sonar.server.exceptions.UnauthorizedException;
 import org.sonar.server.issue.ws.AvatarResolverImpl;
 import org.sonar.server.permission.ws.BasePermissionWsTest;
 import org.sonar.server.ws.TestRequest;
-import org.sonarqube.ws.WsPermissions;
+import org.sonarqube.ws.Permissions;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.api.web.UserRole.ADMIN;
@@ -87,9 +87,9 @@ public class TemplateUsersActionTest extends BasePermissionWsTest<TemplateUsersA
     PermissionTemplateDto anotherTemplate = addTemplateToDefaultOrganization();
     addUserToTemplate(newPermissionTemplateUser(USER, anotherTemplate, user1));
 
-    WsPermissions.UsersWsResponse response = newRequest(null, null)
+    Permissions.UsersWsResponse response = newRequest(null, null)
       .setParam(PARAM_TEMPLATE_NAME, template.getName())
-      .executeProtobuf(WsPermissions.UsersWsResponse.class);
+      .executeProtobuf(Permissions.UsersWsResponse.class);
 
     assertThat(response.getUsersList()).extracting("login").containsExactly("login-1", "login-2", "login-3");
     assertThat(response.getUsers(0).getPermissionsList()).containsOnly("issueadmin", "user");
@@ -114,10 +114,10 @@ public class TemplateUsersActionTest extends BasePermissionWsTest<TemplateUsersA
     PermissionTemplateDto anotherTemplate = addTemplateToDefaultOrganization();
     addUserToTemplate(newPermissionTemplateUser(USER, anotherTemplate, user1));
 
-    WsPermissions.UsersWsResponse response = newRequest(null, null)
+    Permissions.UsersWsResponse response = newRequest(null, null)
       .setParam(PARAM_TEMPLATE_NAME, template.getName())
       .setParam(WebService.Param.TEXT_QUERY, "ame-1")
-      .executeProtobuf(WsPermissions.UsersWsResponse.class);
+      .executeProtobuf(Permissions.UsersWsResponse.class);
 
     assertThat(response.getUsersList()).extracting("login").containsOnly("login-1");
   }
@@ -138,8 +138,8 @@ public class TemplateUsersActionTest extends BasePermissionWsTest<TemplateUsersA
     addUserToTemplate(newPermissionTemplateUser(USER, anotherTemplate, user1));
 
     loginAsAdmin(db.getDefaultOrganization());
-    WsPermissions.UsersWsResponse response = newRequest(USER, template.getUuid())
-      .executeProtobuf(WsPermissions.UsersWsResponse.class);
+    Permissions.UsersWsResponse response = newRequest(USER, template.getUuid())
+      .executeProtobuf(Permissions.UsersWsResponse.class);
     assertThat(response.getUsersList()).extracting("login").containsExactly("login-1", "login-2");
     assertThat(response.getUsers(0).getPermissionsList()).containsOnly("issueadmin", "user");
     assertThat(response.getUsers(1).getPermissionsList()).containsOnly("user");
@@ -161,12 +161,12 @@ public class TemplateUsersActionTest extends BasePermissionWsTest<TemplateUsersA
     addUserToTemplate(newPermissionTemplateUser(USER, anotherTemplate, user1));
 
     loginAsAdmin(db.getDefaultOrganization());
-    WsPermissions.UsersWsResponse response = newRequest(USER, null)
+    Permissions.UsersWsResponse response = newRequest(USER, null)
       .setParam(PARAM_TEMPLATE_NAME, template.getName())
       .setParam(WebService.Param.SELECTED, "all")
       .setParam(WebService.Param.PAGE, "2")
       .setParam(WebService.Param.PAGE_SIZE, "1")
-      .executeProtobuf(WsPermissions.UsersWsResponse.class);
+      .executeProtobuf(Permissions.UsersWsResponse.class);
 
     assertThat(response.getUsersList()).extracting("login").containsOnly("login-2");
   }
@@ -183,9 +183,9 @@ public class TemplateUsersActionTest extends BasePermissionWsTest<TemplateUsersA
     addUserToTemplate(newPermissionTemplateUser(ISSUE_ADMIN, template, user3));
 
     loginAsAdmin(db.getDefaultOrganization());
-    WsPermissions.UsersWsResponse response = newRequest(null, null)
+    Permissions.UsersWsResponse response = newRequest(null, null)
       .setParam(PARAM_TEMPLATE_NAME, template.getName())
-      .executeProtobuf(WsPermissions.UsersWsResponse.class);
+      .executeProtobuf(Permissions.UsersWsResponse.class);
 
     assertThat(response.getUsersList()).extracting("login").containsExactly("login-1", "login-2", "login-3");
   }
@@ -198,9 +198,9 @@ public class TemplateUsersActionTest extends BasePermissionWsTest<TemplateUsersA
     addUserToTemplate(newPermissionTemplateUser(USER, anotherTemplate, user));
 
     loginAsAdmin(db.getDefaultOrganization());
-    WsPermissions.UsersWsResponse response = newRequest(null, null)
+    Permissions.UsersWsResponse response = newRequest(null, null)
       .setParam(PARAM_TEMPLATE_NAME, template.getName())
-      .executeProtobuf(WsPermissions.UsersWsResponse.class);
+      .executeProtobuf(Permissions.UsersWsResponse.class);
 
     assertThat(response.getUsersList()).isEmpty();
   }
index 4868b53845d1e3453817d77764cfa3a787e0b57d..7ada7963bf797f4c04811c0d5c0a76a247b56287 100644 (file)
@@ -46,7 +46,7 @@ import org.sonar.server.user.SystemPasscode;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
 
 import static java.util.Collections.emptySet;
 import static java.util.Collections.singleton;
@@ -251,7 +251,7 @@ public class HealthActionTest {
     when(webServer.isStandalone()).thenReturn(true);
     TestRequest request = underTest.newRequest();
 
-    WsSystem.HealthResponse healthResponse = request.executeProtobuf(WsSystem.HealthResponse.class);
+    System.HealthResponse healthResponse = request.executeProtobuf(System.HealthResponse.class);
     assertThat(healthResponse.getHealth().name()).isEqualTo(randomStatus.name());
     assertThat(health.getCauses()).isEqualTo(health.getCauses());
   }
@@ -267,10 +267,10 @@ public class HealthActionTest {
     when(webServer.isStandalone()).thenReturn(false);
     when(healthChecker.checkCluster()).thenReturn(new ClusterHealth(healthBuilder.build(), emptySet()));
 
-    WsSystem.HealthResponse clusterHealthResponse = underTest.newRequest().executeProtobuf(WsSystem.HealthResponse.class);
+    System.HealthResponse clusterHealthResponse = underTest.newRequest().executeProtobuf(System.HealthResponse.class);
     assertThat(clusterHealthResponse.getHealth().name()).isEqualTo(randomStatus.name());
     assertThat(clusterHealthResponse.getCausesList())
-      .extracting(WsSystem.Cause::getMessage)
+      .extracting(System.Cause::getMessage)
       .containsOnly(causes);
   }
 
@@ -281,14 +281,14 @@ public class HealthActionTest {
     when(webServer.isStandalone()).thenReturn(false);
     when(healthChecker.checkCluster()).thenReturn(new ClusterHealth(GREEN, singleton(nodeHealth)));
 
-    WsSystem.HealthResponse response = underTest.newRequest().executeProtobuf(WsSystem.HealthResponse.class);
+    System.HealthResponse response = underTest.newRequest().executeProtobuf(System.HealthResponse.class);
 
     assertThat(response.getNodes().getNodesList())
       .hasSize(1);
-    WsSystem.Node node = response.getNodes().getNodesList().iterator().next();
+    System.Node node = response.getNodes().getNodesList().iterator().next();
     assertThat(node.getHealth().name()).isEqualTo(nodeHealth.getStatus().name());
     assertThat(node.getCausesList())
-      .extracting(WsSystem.Cause::getMessage)
+      .extracting(System.Cause::getMessage)
       .containsOnly(nodeHealth.getCauses().stream().toArray(String[]::new));
     assertThat(node.getName()).isEqualTo(nodeHealth.getDetails().getName());
     assertThat(node.getHost()).isEqualTo(nodeHealth.getDetails().getHost());
@@ -323,10 +323,10 @@ public class HealthActionTest {
     when(webServer.isStandalone()).thenReturn(false);
     when(healthChecker.checkCluster()).thenReturn(new ClusterHealth(GREEN, new HashSet<>(nodeHealths)));
 
-    WsSystem.HealthResponse response = underTest.newRequest().executeProtobuf(WsSystem.HealthResponse.class);
+    System.HealthResponse response = underTest.newRequest().executeProtobuf(System.HealthResponse.class);
 
     assertThat(response.getNodes().getNodesList())
-      .extracting(WsSystem.Node::getStartedAt)
+      .extracting(System.Node::getStartedAt)
       .containsExactly(expected);
   }
 
index 0ee02bbd5f54eafcb1fe066ced3cbc8daaf92001..41c3d00f3332cb47ed37c20f651262791e518960 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.server.user.SystemPasscode;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
 
 import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -128,7 +128,7 @@ public class SafeModeHealthActionTest {
     when(healthChecker.checkNode()).thenReturn(health);
     TestRequest request = underTest.newRequest();
 
-    WsSystem.HealthResponse healthResponse = request.executeProtobuf(WsSystem.HealthResponse.class);
+    System.HealthResponse healthResponse = request.executeProtobuf(System.HealthResponse.class);
     assertThat(healthResponse.getHealth().name()).isEqualTo(randomStatus.name());
     assertThat(health.getCauses()).isEqualTo(health.getCauses());
   }
@@ -143,10 +143,10 @@ public class SafeModeHealthActionTest {
     Arrays.stream(causes).forEach(healthBuilder::addCause);
     when(healthChecker.checkNode()).thenReturn(healthBuilder.build());
 
-    WsSystem.HealthResponse clusterHealthResponse = underTest.newRequest().executeProtobuf(WsSystem.HealthResponse.class);
+    System.HealthResponse clusterHealthResponse = underTest.newRequest().executeProtobuf(System.HealthResponse.class);
     assertThat(clusterHealthResponse.getHealth().name()).isEqualTo(randomStatus.name());
     assertThat(clusterHealthResponse.getCausesList())
-      .extracting(WsSystem.Cause::getMessage)
+      .extracting(System.Cause::getMessage)
       .containsOnly(causes);
   }
 
index 1e0e6b4c4e463e7db8d5bcbcc5992df2de66023b..0f73cbc6922b25244dd6ecb744bd5bc603906c3d 100644 (file)
@@ -48,8 +48,8 @@ import org.sonar.server.measure.index.ProjectMeasuresIndexDefinition;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsProjects.BulkUpdateKeyWsResponse;
-import org.sonarqube.ws.WsProjects.BulkUpdateKeyWsResponse.Key;
+import org.sonarqube.ws.Projects.BulkUpdateKeyWsResponse;
+import org.sonarqube.ws.Projects.BulkUpdateKeyWsResponse.Key;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.tuple;
index c420b889e80f69bf51d97833df344a42fb3e781c..f6039570f0d5676c5f744fade2bfadc8afed8d68 100644 (file)
@@ -43,8 +43,8 @@ import org.sonar.server.permission.PermissionTemplateService;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsProjects.CreateWsResponse;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
+import org.sonarqube.ws.Projects.CreateWsResponse;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
 import org.sonarqube.ws.client.project.CreateRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
index 9f122fe9febfe08385497f41de7f5754df1ef8b6..b4f670a9bfa78b9af5cdaf399d172a628f73e224 100644 (file)
@@ -45,8 +45,8 @@ import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsProjects.SearchWsResponse;
-import org.sonarqube.ws.WsProjects.SearchWsResponse.Component;
+import org.sonarqube.ws.Projects.SearchWsResponse;
+import org.sonarqube.ws.Projects.SearchWsResponse.Component;
 import org.sonarqube.ws.client.component.ComponentsWsParameters;
 import org.sonarqube.ws.client.project.SearchWsRequest;
 
index 8c4df109c8d53382e216616fd0dcd02641144655..fb7574edbfc8c30ab0fb656fa6bd2b479c130d1d 100644 (file)
@@ -44,8 +44,8 @@ import org.sonar.db.user.UserDto;
 import org.sonar.server.exceptions.UnauthorizedException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsProjects.SearchMyProjectsWsResponse;
-import org.sonarqube.ws.WsProjects.SearchMyProjectsWsResponse.Project;
+import org.sonarqube.ws.Projects.SearchMyProjectsWsResponse;
+import org.sonarqube.ws.Projects.SearchMyProjectsWsResponse.Project;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.api.measures.CoreMetrics.ALERT_STATUS_KEY;
index 6b4bd5f8f2d0b29b5d965b5496bccc8b1606653e..f1ab8b32bb371ee267e76e75eb6414f2d6053f35 100644 (file)
@@ -43,7 +43,7 @@ import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsProjectLinks;
+import org.sonarqube.ws.ProjectLinks;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -290,12 +290,12 @@ public class CreateActionTest {
   }
 
   private void createAndTest(ComponentDto project, String name, String url, String type) throws IOException {
-    WsProjectLinks.CreateWsResponse response = ws.newRequest()
+    ProjectLinks.CreateWsResponse response = ws.newRequest()
       .setMethod("POST")
       .setParam(PARAM_PROJECT_KEY, project.getDbKey())
       .setParam(PARAM_NAME, name)
       .setParam(PARAM_URL, url)
-      .executeProtobuf(WsProjectLinks.CreateWsResponse.class);
+      .executeProtobuf(ProjectLinks.CreateWsResponse.class);
 
     long newId = Long.valueOf(response.getLink().getId());
 
index 79975ce4b5ac8fdcee069305f6ed32ec4813bc22..7e421fc2451eb85c085dc4f85274c9f245846ba4 100644 (file)
@@ -43,8 +43,8 @@ import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsProjectLinks.Link;
-import org.sonarqube.ws.WsProjectLinks.SearchWsResponse;
+import org.sonarqube.ws.ProjectLinks.Link;
+import org.sonarqube.ws.ProjectLinks.SearchWsResponse;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
index 640295fd6af7aa01b49a2188dc04ae07d3e48553..0479cc5ddf400ac7e9a5329735ad89e152d87020 100644 (file)
@@ -44,7 +44,7 @@ import org.sonar.server.permission.index.PermissionIndexerTester;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsProjectTags.SearchResponse;
+import org.sonarqube.ws.ProjectTags.SearchResponse;
 
 import static com.google.common.collect.Lists.newArrayList;
 import static org.assertj.core.api.Assertions.assertThat;
index 5e666e3fd9d3902b69c32f2b598418fc63a8d361..ec037e309f9ce6c083eac228d69bca0f8e2100f4 100644 (file)
@@ -32,7 +32,7 @@ import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.organization.TestDefaultOrganizationProvider;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsQualityGates.AppWsResponse;
+import org.sonarqube.ws.Qualitygates.AppWsResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.api.measures.Metric.ValueType.BOOL;
index 9f4c68ea2f7cd8d049939fa8d1ccac3430984fb3..66181d1f55be14ecb1226d71223cd3df4630ba89 100644 (file)
@@ -34,7 +34,7 @@ import org.sonar.server.organization.TestDefaultOrganizationProvider;
 import org.sonar.server.qualitygate.QualityGateUpdater;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsQualityGates.CreateWsResponse;
+import org.sonarqube.ws.Qualitygates.CreateWsResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.db.permission.OrganizationPermission.ADMINISTER_QUALITY_GATES;
index 45ad8ed38efd2c9b56a403f4bf2c9131a8baa201..01c7f67834b45f68e7e55fb5ed00410bd58a0d58 100644 (file)
@@ -42,8 +42,7 @@ import org.sonar.server.qualitygate.QualityGateConditionsUpdater;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsQualityGates.CreateConditionWsResponse;
+import org.sonarqube.ws.Qualitygates.CreateConditionWsResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.db.metric.MetricTesting.newMetricDto;
index 0529e7bfc267a61f677b788c089acddb047b9ae2..63879d9942924d9f9f890d942aa0bc00a4e4f419 100644 (file)
@@ -43,8 +43,8 @@ import org.sonar.server.qualitygate.QualityGateFinder;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsQualityGates;
-import org.sonarqube.ws.WsQualityGates.GetByProjectWsResponse;
+import org.sonarqube.ws.Qualitygates;
+import org.sonarqube.ws.Qualitygates.GetByProjectWsResponse;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -120,7 +120,7 @@ public class GetByProjectActionTest {
 
     GetByProjectWsResponse result = callByKey(project.getKey());
 
-    WsQualityGates.QualityGate qualityGate = result.getQualityGate();
+    Qualitygates.QualityGate qualityGate = result.getQualityGate();
     assertThat(Long.valueOf(qualityGate.getId())).isEqualTo(dbQualityGate.getId());
     assertThat(qualityGate.getName()).isEqualTo(dbQualityGate.getName());
     assertThat(qualityGate.getDefault()).isTrue();
@@ -137,7 +137,7 @@ public class GetByProjectActionTest {
 
     GetByProjectWsResponse result = callByKey(project.getKey());
 
-    WsQualityGates.QualityGate qualityGate = result.getQualityGate();
+    Qualitygates.QualityGate qualityGate = result.getQualityGate();
     assertThat(qualityGate.getName()).isEqualTo(dbQualityGate.getName());
     assertThat(qualityGate.getDefault()).isFalse();
   }
index 05b5ad04eba2b41234f0b183cd3bdd9173377251..c457670ae72275e3c48ddf54cd88cbaa2a588ea6 100644 (file)
@@ -44,8 +44,8 @@ import org.sonar.server.exceptions.ForbiddenException;
 import org.sonar.server.exceptions.NotFoundException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse.Status;
+import org.sonarqube.ws.Qualitygates.ProjectStatusWsResponse;
+import org.sonarqube.ws.Qualitygates.ProjectStatusWsResponse.Status;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
index 1bd630b6d043790be82ac2454762f88013c057a6..00196c7e001963e3cf55ab5286e8453a9469e405 100644 (file)
@@ -28,8 +28,8 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.sonar.db.component.SnapshotDto;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse.ProjectStatus;
+import org.sonarqube.ws.Qualitygates.ProjectStatusWsResponse;
+import org.sonarqube.ws.Qualitygates.ProjectStatusWsResponse.ProjectStatus;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.api.utils.DateUtils.formatDateTime;
index 9f223c46fda652b8619723355c0dca39fe6c5787..194ae1b1bc79df10a386a48c0a7a6e13ef4bed15 100644 (file)
@@ -42,8 +42,7 @@ import org.sonar.server.qualitygate.QualityGateConditionsUpdater;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsQualityGates.CreateConditionWsResponse;
+import org.sonarqube.ws.Qualitygates.CreateConditionWsResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.db.metric.MetricTesting.newMetricDto;
index bb1d60400d6e66de9408ba67cba68be5dbdbf103..4a0cb167daa12e2e3ad2db40d8f45cbd28c8e63d 100644 (file)
@@ -63,8 +63,8 @@ import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
 import org.sonar.test.JsonAssert;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse.QualityProfile;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
index ec5e34aa621a3d80f88cc796da1c49cb613799c6..e9ecbd0cedc1f2f0f17d5b209ad6cd2bb54ea0ed 100644 (file)
@@ -56,7 +56,7 @@ import org.sonar.server.rule.index.RuleIndexer;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.util.TypeValidations;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.QualityProfiles.InheritanceWsResponse;
+import org.sonarqube.ws.Qualityprofiles.InheritanceWsResponse;
 
 import static java.util.Arrays.asList;
 import static org.assertj.core.api.Assertions.assertThat;
index f873af646b470d2ba8cd40081f76e68688bb5067..289ec3904f60eb456f51ab3094d3b658a6b39dce 100644 (file)
@@ -48,8 +48,8 @@ import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 
 import static java.lang.String.format;
 import static java.util.stream.IntStream.range;
index de50235bc56d633642fe88f403c9fc43746dbae9..4f6d72805157c4a99487ae3ee2133cb91cdde899 100644 (file)
@@ -36,7 +36,7 @@ import org.sonar.server.language.LanguageTesting;
 import org.sonar.server.organization.TestDefaultOrganizationProvider;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.QualityProfiles.SearchGroupsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchGroupsResponse;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
index bcaf668c04627a47476bd8e9842181118ce346bf..975af2d69e54cc4fee14972f9546a0040fbac99a 100644 (file)
@@ -38,7 +38,7 @@ import org.sonar.server.language.LanguageTesting;
 import org.sonar.server.organization.TestDefaultOrganizationProvider;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.QualityProfiles.SearchUsersResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchUsersResponse;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
index 4ec5fb1230e282fee5a89632eda3c51e5ce69e75..bf9cab32872545527b5c0e294e34605cf9cea66c 100644 (file)
@@ -43,10 +43,10 @@ import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.QualityProfiles.ShowResponse;
-import org.sonarqube.ws.QualityProfiles.ShowResponse.CompareToSonarWay;
-import org.sonarqube.ws.QualityProfiles.ShowResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse.CompareToSonarWay;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse.QualityProfile;
 
 import static java.util.stream.IntStream.range;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -104,7 +104,7 @@ public class ShowActionTest {
   public void profile_info() {
     QProfileDto profile = db.qualityProfiles().insert(db.getDefaultOrganization(), p -> p.setLanguage(XOO1.getKey()));
 
-    QualityProfiles.ShowResponse result = call(ws.newRequest().setParam(PARAM_KEY, profile.getKee()));
+    Qualityprofiles.ShowResponse result = call(ws.newRequest().setParam(PARAM_KEY, profile.getKee()));
 
     assertThat(result.getProfile())
       .extracting(QualityProfile::getKey, QualityProfile::getName, QualityProfile::getIsBuiltIn, QualityProfile::getLanguage, QualityProfile::getLanguageName,
@@ -117,7 +117,7 @@ public class ShowActionTest {
     QProfileDto profile = db.qualityProfiles().insert(db.getDefaultOrganization(), p -> p.setLanguage(XOO1.getKey()));
     db.qualityProfiles().setAsDefault(profile);
 
-    QualityProfiles.ShowResponse result = call(ws.newRequest().setParam(PARAM_KEY, profile.getKee()));
+    Qualityprofiles.ShowResponse result = call(ws.newRequest().setParam(PARAM_KEY, profile.getKee()));
 
     assertThat(result.getProfile().getIsDefault()).isTrue();
   }
@@ -142,7 +142,7 @@ public class ShowActionTest {
       .setLastUsed(time)
       .setUserUpdatedAt(time));
 
-    QualityProfiles.ShowResponse result = call(ws.newRequest().setParam(PARAM_KEY, profile.getKee()));
+    Qualityprofiles.ShowResponse result = call(ws.newRequest().setParam(PARAM_KEY, profile.getKee()));
 
     assertThat(result.getProfile().getRulesUpdatedAt()).isEqualTo("2016-12-21T19:10:03+0100");
     assertThat(parseDateTime(result.getProfile().getLastUsed()).getTime()).isEqualTo(time);
@@ -165,7 +165,7 @@ public class ShowActionTest {
       .mapToObj(i -> db.components().insertPrivateProject())
       .forEach(project -> db.qualityProfiles().associateWithProject(project, profile));
 
-    QualityProfiles.ShowResponse result = call(ws.newRequest().setParam(PARAM_KEY, profile.getKee()));
+    Qualityprofiles.ShowResponse result = call(ws.newRequest().setParam(PARAM_KEY, profile.getKee()));
 
     assertThat(result.getProfile())
       .extracting(QualityProfile::getActiveRuleCount, QualityProfile::getActiveDeprecatedRuleCount, QualityProfile::getProjectCount)
@@ -240,7 +240,7 @@ public class ShowActionTest {
     QProfileDto sonarWayProfile = db.qualityProfiles().insert(db.getDefaultOrganization(), p -> p.setIsBuiltIn(true).setName("Sonar way").setLanguage(XOO1.getKey()));
     QProfileDto anotherBuiltInProfile = db.qualityProfiles().insert(db.getDefaultOrganization(), p -> p.setIsBuiltIn(true).setLanguage(XOO1.getKey()));
 
-    QualityProfiles.ShowResponse result = call(ws.newRequest()
+    Qualityprofiles.ShowResponse result = call(ws.newRequest()
       .setParam(PARAM_KEY, anotherBuiltInProfile.getKee())
       .setParam(PARAM_COMPARE_TO_SONAR_WAY, "true"));
 
@@ -252,7 +252,7 @@ public class ShowActionTest {
     QProfileDto sonarWayProfile = db.qualityProfiles().insert(db.getDefaultOrganization(), p -> p.setIsBuiltIn(false).setName("Sonar way").setLanguage(XOO1.getKey()));
     QProfileDto profile = db.qualityProfiles().insert(db.getDefaultOrganization(), p -> p.setLanguage(XOO1.getKey()));
 
-    QualityProfiles.ShowResponse result = call(ws.newRequest()
+    Qualityprofiles.ShowResponse result = call(ws.newRequest()
       .setParam(PARAM_KEY, profile.getKee())
       .setParam(PARAM_COMPARE_TO_SONAR_WAY, "true"));
 
@@ -264,7 +264,7 @@ public class ShowActionTest {
     QProfileDto sonarWayProfile = db.qualityProfiles().insert(db.getDefaultOrganization(), p -> p.setIsBuiltIn(true).setName("Sonar way").setLanguage(XOO1.getKey()));
     QProfileDto profile = db.qualityProfiles().insert(db.getDefaultOrganization(), p -> p.setLanguage(XOO1.getKey()));
 
-    QualityProfiles.ShowResponse result = call(ws.newRequest()
+    Qualityprofiles.ShowResponse result = call(ws.newRequest()
       .setParam(PARAM_KEY, profile.getKee())
       .setParam(PARAM_COMPARE_TO_SONAR_WAY, "false"));
 
@@ -352,6 +352,6 @@ public class ShowActionTest {
 
   private ShowResponse call(TestRequest request) {
     TestRequest wsRequest = request.setMediaType(MediaTypes.PROTOBUF);
-    return wsRequest.executeProtobuf(QualityProfiles.ShowResponse.class);
+    return wsRequest.executeProtobuf(Qualityprofiles.ShowResponse.class);
   }
 }
index a47344191e7aa877fe5f491a41335ffa515738a0..0c7d2ef1aa10d4fd1b98e6dbabac821546aadffd 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestResponse;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsRoot;
+import org.sonarqube.ws.Root;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.test.JsonAssert.assertJson;
@@ -112,9 +112,9 @@ public class SearchActionTest {
     userDao.setRoot(dbSession, rootDto.getLogin(), true);
     dbSession.commit();
 
-    List<WsRoot.Root> roots = executeRequest();
+    List<Root.RootContent> roots = executeRequest();
     assertThat(roots).hasSize(1);
-    WsRoot.Root root = roots.iterator().next();
+    Root.RootContent root = roots.iterator().next();
     assertThat(root.getLogin()).isEqualTo(rootDto.getLogin());
     assertThat(root.hasName()).isFalse();
     assertThat(root.hasEmail()).isFalse();
@@ -132,7 +132,7 @@ public class SearchActionTest {
     dbSession.commit();
 
     assertThat(executeRequest())
-      .extracting(WsRoot.Root::getName)
+      .extracting(Root.RootContent::getName)
       .containsExactly("bbb", "ccc");
   }
 
@@ -140,9 +140,9 @@ public class SearchActionTest {
     return userSessionRule.logIn().setRoot();
   }
 
-  private List<WsRoot.Root> executeRequest() {
+  private List<Root.RootContent> executeRequest() {
     return wsTester.newRequest()
-      .executeProtobuf(WsRoot.SearchWsResponse.class)
+      .executeProtobuf(Root.SearchWsResponse.class)
       .getRootsList();
   }
 
index 28e4986f50e837853e16d4c3e107a4b8cbaa99b3..61a2a31d10b28e61a1a40078e66f14ad23e6dc35 100644 (file)
@@ -42,8 +42,8 @@ import org.sonar.server.test.index.TestIndexer;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsTests;
-import org.sonarqube.ws.WsTests.ListResponse;
+import org.sonarqube.ws.Tests;
+import org.sonarqube.ws.Tests.ListResponse;
 
 import static java.lang.String.format;
 import static java.util.Arrays.asList;
@@ -121,10 +121,10 @@ public class ListActionTest {
     ListResponse request = call(ws.newRequest().setParam(TEST_ID, test.getUuid()));
 
     assertThat(request.getTestsList()).hasSize(1);
-    WsTests.Test result = request.getTests(0);
+    Tests.Test result = request.getTests(0);
     assertThat(result.getId()).isEqualTo(test.getUuid());
     assertThat(result.getName()).isEqualTo(test.getName());
-    assertThat(result.getStatus()).isEqualTo(WsTests.TestStatus.OK);
+    assertThat(result.getStatus()).isEqualTo(Tests.TestStatus.OK);
     assertThat(result.getFileId()).isEqualTo(testFile.uuid());
     assertThat(result.getFileKey()).isEqualTo(testFile.getDbKey());
     assertThat(result.getFileName()).isEqualTo(testFile.path());
@@ -145,7 +145,7 @@ public class ListActionTest {
       .setParam(TEST_ID, test1.getUuid()));
 
     assertThat(request.getTestsList())
-      .extracting(WsTests.Test::getId)
+      .extracting(Tests.Test::getId)
       .containsOnly(test1.getUuid());
   }
 
@@ -163,7 +163,7 @@ public class ListActionTest {
       .setParam(TEST_FILE_ID, testFile.uuid()));
 
     assertThat(request.getTestsList())
-      .extracting(WsTests.Test::getId)
+      .extracting(Tests.Test::getId)
       .containsOnly(test1.getUuid(), test2.getUuid());
   }
 
@@ -181,7 +181,7 @@ public class ListActionTest {
       .setParam(TEST_FILE_KEY, testFile.getDbKey()));
 
     assertThat(request.getTestsList())
-      .extracting(WsTests.Test::getId)
+      .extracting(Tests.Test::getId)
       .containsOnly(test1.getUuid(), test2.getUuid());
   }
 
@@ -202,7 +202,7 @@ public class ListActionTest {
       .setParam("branch", testFile.getBranch()));
 
     assertThat(request.getTestsList())
-      .extracting(WsTests.Test::getId, WsTests.Test::getFileKey, WsTests.Test::getFileBranch)
+      .extracting(Tests.Test::getId, Tests.Test::getFileKey, Tests.Test::getFileBranch)
       .containsOnly(
         tuple(test1.getUuid(), testFile.getKey(), testFile.getBranch()),
         tuple(test2.getUuid(), testFile.getKey(), testFile.getBranch()));
@@ -222,7 +222,7 @@ public class ListActionTest {
       .setParam(SOURCE_FILE_ID, mainFile.uuid())
       .setParam(SOURCE_FILE_LINE_NUMBER, "11"));
 
-    assertThat(request.getTestsList()).extracting(WsTests.Test::getId).containsOnly(test1.getUuid(), test2.getUuid());
+    assertThat(request.getTestsList()).extracting(Tests.Test::getId).containsOnly(test1.getUuid(), test2.getUuid());
   }
 
   @Test
@@ -240,7 +240,7 @@ public class ListActionTest {
       .setParam(SOURCE_FILE_LINE_NUMBER, "10"));
 
     assertThat(request.getTestsList())
-      .extracting(WsTests.Test::getId)
+      .extracting(Tests.Test::getId)
       .containsOnly(test1.getUuid(), test3.getUuid());
   }
 
@@ -262,7 +262,7 @@ public class ListActionTest {
       .setParam("branch", testFile.getBranch()));
 
     assertThat(request.getTestsList())
-      .extracting(WsTests.Test::getId, WsTests.Test::getFileKey, WsTests.Test::getFileBranch)
+      .extracting(Tests.Test::getId, Tests.Test::getFileKey, Tests.Test::getFileBranch)
       .containsOnly(
         tuple(test1.getUuid(), testFile.getKey(), testFile.getBranch()),
         tuple(test3.getUuid(), testFile.getKey(), testFile.getBranch()));
index e6e6d81463a9add29327a3f184c120a18f1254b1..5de4d8d7e563c505c8a662390d677466b729ab53 100644 (file)
@@ -50,8 +50,8 @@ import org.sonar.server.user.index.UserIndexer;
 import org.sonar.server.usergroups.DefaultGroupFinder;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsUsers.CreateWsResponse;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.user.CreateRequest;
 
 import static java.util.Collections.singletonList;
index c58427b9cf4898173a439635e7f9893d0667181c..39c4c96d0ab6e77392846e77477934a73d372310 100644 (file)
@@ -32,7 +32,7 @@ import org.sonar.server.organization.DefaultOrganizationProvider;
 import org.sonar.server.organization.TestDefaultOrganizationProvider;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.WsUsers.CurrentWsResponse;
+import org.sonarqube.ws.Users.CurrentWsResponse;
 
 import static com.google.common.collect.Lists.newArrayList;
 import static org.assertj.core.api.Assertions.assertThat;
index a29772a55bc877bd8591f0bfa1d957f52989e5a1..27b5b06ceb1229a2626c76cab9aeffb7d824ca29 100644 (file)
@@ -37,7 +37,7 @@ import org.sonar.server.usergroups.DefaultGroupFinder;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsUsers.GroupsWsResponse;
+import org.sonarqube.ws.Users.GroupsWsResponse;
 
 import static java.lang.String.format;
 import static java.util.Collections.singletonList;
index 0b20a89e7395a07209be83a4d11dd6ce1ed37b4d..fce5824fe8c8373cbf1facae608b6e74739511a5 100644 (file)
@@ -48,8 +48,8 @@ import static org.sonar.api.server.ws.WebService.Param.TEXT_QUERY;
 import static org.sonar.db.permission.OrganizationPermission.ADMINISTER;
 import static org.sonar.db.user.GroupTesting.newGroupDto;
 import static org.sonar.test.JsonAssert.assertJson;
-import static org.sonarqube.ws.WsUserGroups.Group;
-import static org.sonarqube.ws.WsUserGroups.SearchWsResponse;
+import static org.sonarqube.ws.UserGroups.Group;
+import static org.sonarqube.ws.UserGroups.SearchWsResponse;
 
 public class SearchActionTest {
 
index 3d305c6c8adde65006cd0b2f0de152e498744825..2fae76356d22fb9905a84c4b1facc88645fa2ec5 100644 (file)
@@ -35,7 +35,7 @@ import org.sonar.server.usertoken.TokenGenerator;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsUserTokens.GenerateWsResponse;
+import org.sonarqube.ws.UserTokens.GenerateWsResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Matchers.anyString;
index 04f78ea535dbb4b1138c793c69f1a2795e2464de..eb0f1539d35c37c01162538da436e8ff515937c6 100644 (file)
@@ -34,8 +34,7 @@ import org.sonar.server.exceptions.UnauthorizedException;
 import org.sonar.server.tester.UserSessionRule;
 import org.sonar.server.ws.TestRequest;
 import org.sonar.server.ws.WsActionTester;
-import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsUserTokens.SearchWsResponse;
+import org.sonarqube.ws.UserTokens.SearchWsResponse;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.db.user.UserTesting.newUserDto;
index dc4bbf024524c8f0a382e62c7d4ae3a683ea0491..65126a05bec5351f9d0ae101a9a69b71f590d72d 100644 (file)
@@ -27,7 +27,7 @@ import org.sonar.api.utils.log.LogTester;
 import org.sonar.server.exceptions.BadRequestException;
 import org.sonarqube.ws.Issues;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsPermissions;
+import org.sonarqube.ws.Permissions;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.sonar.test.ExceptionCauseMatcher.hasType;
@@ -73,7 +73,7 @@ public class WsUtilsTest {
     TestRequest request = new TestRequest();
     request.setMediaType(MediaTypes.PROTOBUF);
 
-    WsPermissions.Permission message = WsPermissions.Permission.newBuilder().setName("permission-name").build();
+    Permissions.Permission message = Permissions.Permission.newBuilder().setName("permission-name").build();
 
     expectedException.expect(IllegalStateException.class);
     expectedException.expectCause(hasType(NullPointerException.class));
index c9b3b9518985b0b93dda4eb8f98790884b13aa36..a07e3e36b1327915937d659356888581d8702122 100644 (file)
@@ -48,8 +48,8 @@ import org.sonar.scanner.bootstrap.GlobalAnalysisMode;
 import org.sonar.scanner.bootstrap.ScannerWsClient;
 import org.sonar.scanner.protocol.output.ScannerReportWriter;
 import org.sonar.scanner.scan.branch.BranchConfiguration;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsCe;
 import org.sonarqube.ws.client.HttpException;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsResponse;
@@ -192,7 +192,7 @@ public class ReportPublisher implements Startable {
     }
 
     try (InputStream protobuf = response.contentStream()) {
-      return WsCe.SubmitResponse.parser().parseFrom(protobuf).getTaskId();
+      return Ce.SubmitResponse.parser().parseFrom(protobuf).getTaskId();
     } catch (Exception e) {
       throw Throwables.propagate(e);
     } finally {
index ca0ba4da7e0700ea57ae9899fd3054a549febbba..a97af0ebc4394cf73263f334cf412daa17826922 100644 (file)
@@ -34,10 +34,10 @@ import org.slf4j.LoggerFactory;
 import org.sonar.api.utils.MessageException;
 import org.sonar.scanner.bootstrap.ScannerWsClient;
 import org.sonar.scanner.util.ScannerUtils;
-import org.sonarqube.ws.WsBatch;
-import org.sonarqube.ws.WsBatch.WsProjectResponse;
-import org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath;
-import org.sonarqube.ws.WsBatch.WsProjectResponse.Settings;
+import org.sonarqube.ws.Batch;
+import org.sonarqube.ws.Batch.WsProjectResponse;
+import org.sonarqube.ws.Batch.WsProjectResponse.FileDataByPath;
+import org.sonarqube.ws.Batch.WsProjectResponse.Settings;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.HttpException;
 import org.sonarqube.ws.client.WsResponse;
@@ -111,7 +111,7 @@ public class DefaultProjectRepositoriesLoader implements ProjectRepositoriesLoad
 
       Map<String, FileDataByPath> fileDataByModuleAndPath = response.getFileDataByModuleAndPath();
       for (Map.Entry<String, FileDataByPath> e1 : fileDataByModuleAndPath.entrySet()) {
-        for (Map.Entry<String, WsBatch.WsProjectResponse.FileData> e2 : e1.getValue().getFileDataByPath().entrySet()) {
+        for (Map.Entry<String, Batch.WsProjectResponse.FileData> e2 : e1.getValue().getFileDataByPath().entrySet()) {
           FileData fd = new FileData(e2.getValue().getHash(), e2.getValue().getRevision());
           fileDataTable.put(e1.getKey(), e2.getKey(), fd);
         }
index 779174757d492d47808e695d718aaa46cbbb3330..f46b5d5b77fb9303ac5bc855aaa0171a3d320e0d 100644 (file)
@@ -32,8 +32,8 @@ import org.apache.commons.io.IOUtils;
 import org.sonar.api.config.Configuration;
 import org.sonar.api.utils.MessageException;
 import org.sonar.scanner.bootstrap.ScannerWsClient;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 import org.sonarqube.ws.client.GetRequest;
 
 import static java.util.function.Function.identity;
index 96394c57c419d737b12d4e22bb932f0dacbd1007..6a7416434d3de035fa5b4cdfda6d936aebb3f58f 100644 (file)
@@ -21,7 +21,7 @@ package org.sonar.scanner.repository;
 
 import java.util.List;
 import javax.annotation.Nullable;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 
 public interface QualityProfileLoader {
   List<QualityProfile> load(String projectKey, @Nullable String profileName);
index 076e363f7b734b6d8897e39d85eba3ad01cdafc4..60be7b5140e7866e409343848df9523685f14c52 100644 (file)
@@ -28,7 +28,7 @@ import org.sonar.api.utils.log.Loggers;
 import org.sonar.api.utils.log.Profiler;
 import org.sonar.scanner.analysis.AnalysisProperties;
 import org.sonar.scanner.rule.ModuleQProfiles;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 
 public class QualityProfileProvider extends ProviderAdapter {
   private static final Logger LOG = Loggers.get(QualityProfileProvider.class);
index 30d87568514ad6764c2c6abd51ef956caeb56082..fc26ce4fe36f3f5fefcd3a2c1a716631257c6e7f 100644 (file)
@@ -21,7 +21,7 @@ package org.sonar.scanner.rule;
 
 import org.sonar.api.utils.DateUtils;
 
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 import org.sonar.api.batch.ScannerSide;
 
 import javax.annotation.CheckForNull;
index 430ab5dc62a354a96c159cdefc2487666664519b..618ce7fdf58894627a1b4ce19950f59e187a2e3a 100644 (file)
@@ -72,7 +72,7 @@ import org.sonar.scanner.scan.branch.BranchConfiguration;
 import org.sonar.scanner.scan.branch.BranchConfigurationLoader;
 import org.sonar.scanner.scan.branch.BranchType;
 import org.sonar.scanner.scan.branch.ProjectBranches;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 import org.sonarqube.ws.Rules.ListResponse.Rule;
 
 /**
index 7309c43975c9a4a0850f1783ade9ad1ef360e469..ba4f3ba03e7bf9242a40640e06750c145a595ca7 100644 (file)
@@ -47,7 +47,7 @@ import org.sonar.core.config.ScannerProperties;
 import org.sonar.scanner.bootstrap.GlobalAnalysisMode;
 import org.sonar.scanner.bootstrap.ScannerWsClient;
 import org.sonar.scanner.scan.branch.BranchConfiguration;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.client.HttpException;
 import org.sonarqube.ws.client.WsRequest;
 import org.sonarqube.ws.client.WsResponse;
@@ -213,7 +213,7 @@ public class ReportPublisherTest {
 
     PipedOutputStream out = new PipedOutputStream();
     PipedInputStream in = new PipedInputStream(out);
-    WsCe.SubmitResponse.newBuilder().build().writeTo(out);
+    Ce.SubmitResponse.newBuilder().build().writeTo(out);
     out.close();
 
     when(response.failIfNotSuccessful()).thenReturn(response);
@@ -247,7 +247,7 @@ public class ReportPublisherTest {
 
     PipedOutputStream out = new PipedOutputStream();
     PipedInputStream in = new PipedInputStream(out);
-    WsCe.SubmitResponse.newBuilder().build().writeTo(out);
+    Ce.SubmitResponse.newBuilder().build().writeTo(out);
     out.close();
 
     when(response.failIfNotSuccessful()).thenReturn(response);
index abb528b202da7726f7936e7aa509b24779e6aef7..c8009a9a116ff9d0c6fd920f1dd998acdc9c9df3 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.rules.ExpectedException;
 import org.sonar.api.utils.MessageException;
 import org.sonar.scanner.WsTestUtil;
 import org.sonar.scanner.bootstrap.ScannerWsClient;
-import org.sonarqube.ws.WsBatch.WsProjectResponse;
+import org.sonarqube.ws.Batch.WsProjectResponse;
 import org.sonarqube.ws.client.HttpException;
 import org.sonarqube.ws.client.WsRequest;
 
index c02c6d05a40b22dad97b2cdf8b0aac944e583ee6..0ed0aa9c2a419440983a8dbc30b6fb71ce4a5a7d 100644 (file)
@@ -30,8 +30,8 @@ import org.sonar.api.config.internal.MapSettings;
 import org.sonar.api.utils.MessageException;
 import org.sonar.scanner.WsTestUtil;
 import org.sonar.scanner.bootstrap.ScannerWsClient;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
@@ -128,7 +128,7 @@ public class DefaultQualityProfileLoaderTest {
 
   private static InputStream createStreamOfProfiles(String... names) throws IOException {
     ByteArrayOutputStream os = new ByteArrayOutputStream();
-    QualityProfiles.SearchWsResponse.Builder responseBuilder = QualityProfiles.SearchWsResponse.newBuilder();
+    Qualityprofiles.SearchWsResponse.Builder responseBuilder = Qualityprofiles.SearchWsResponse.newBuilder();
 
     for (String n : names) {
       QualityProfile qp = QualityProfile.newBuilder().setKey(n).setName(n).setLanguage("lang").build();
index 255e008b6d79c8bba69831dcb35ffa5a44b29b68..43a4ecbaaad865b9761c711503fde0eeae1012ef 100644 (file)
@@ -34,7 +34,7 @@ import org.sonar.api.utils.log.LogTester;
 import org.sonar.api.utils.log.LoggerLevel;
 import org.sonar.scanner.analysis.AnalysisProperties;
 import org.sonar.scanner.rule.ModuleQProfiles;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Matchers.anyString;
index 5091ea813fd56367c940927c97753142d399b643..9b2edb814a60491dd90c3d3809fe9d0f4a3b9875 100644 (file)
@@ -30,7 +30,7 @@ import org.mockito.MockitoAnnotations;
 import org.sonar.api.batch.rule.ActiveRules;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.api.utils.DateUtils;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Matchers.eq;
diff --git a/sonar-ws-generated/pom.xml b/sonar-ws-generated/pom.xml
new file mode 100644 (file)
index 0000000..2ca3fb6
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.sonarsource.sonarqube</groupId>
+    <artifactId>sonarqube</artifactId>
+    <version>7.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>sonar-ws-generated</artifactId>
+  <name>SonarQube :: Web Service :: Generated</name>
+  <description>Generated classes for Web Services</description>
+
+  <properties>
+    <sonar.exclusions>src/main/**/*</sonar.exclusions>
+    <sonar.test.exclusions>src/main/**/*</sonar.test.exclusions>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.google.protobuf</groupId>
+      <artifactId>protobuf-java</artifactId>
+    </dependency>    
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.findbugs</groupId>
+      <artifactId>jsr305</artifactId>
+      <scope>provided</scope>
+    </dependency>    
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.sonarsource.sonarqube</groupId>
+      <artifactId>sonar-plugin-api</artifactId>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+
+    <!-- Tests -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.assertj</groupId>
+      <artifactId>assertj-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>sonar-testing-harness</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.squareup.okhttp3</groupId>
+      <artifactId>mockwebserver</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/MediaTypes.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/MediaTypes.java
new file mode 100644 (file)
index 0000000..08783ca
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * 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;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableMap;
+import java.util.Locale;
+import java.util.Map;
+import org.apache.commons.io.FilenameUtils;
+
+/**
+ * @since 5.3
+ */
+public final class MediaTypes {
+
+  public static final String JSON = "application/json";
+  public static final String XML = "application/xml";
+  public static final String TXT = "text/plain";
+  public static final String PROTOBUF = "application/x-protobuf";
+  public static final String ZIP = "application/zip";
+  public static final String JAVASCRIPT = "application/javascript";
+  public static final String HTML = "text/html";
+  public static final String DEFAULT = "application/octet-stream";
+
+  private static final Map<String, String> MAP = new ImmutableMap.Builder<String, String>()
+    .put("js", JAVASCRIPT)
+    .put("json", JSON)
+    .put("zip", "application/zip")
+    .put("tgz", "application/tgz")
+    .put("ps", "application/postscript")
+    .put("jnlp", "application/jnlp")
+    .put("jar", "application/java-archive")
+    .put("xls", "application/vnd.ms-excel")
+    .put("ppt", "application/vnd.ms-powerpoint")
+    .put("tar", "application/x-tar")
+    .put("xml", XML)
+    .put("dtd", "application/xml-dtd")
+    .put("xslt", "application/xslt+xml")
+    .put("bmp", "image/bmp")
+    .put("gif", "image/gif")
+    .put("jpg", "image/jpeg")
+    .put("jpeg", "image/jpeg")
+    .put("tiff", "image/tiff")
+    .put("png", "image/png")
+    .put("svg", "image/svg+xml")
+    .put("ico", "image/x-icon")
+    .put("txt", TXT)
+    .put("csv", "text/csv")
+    .put("properties", "text/plain")
+    .put("rtf", "text/rtf")
+    .put("html", HTML)
+    .put("css", "text/css")
+    .put("tsv", "text/tab-separated-values")
+    .build();
+
+  private MediaTypes() {
+    // only static methods
+  }
+
+  public static String getByFilename(String filename) {
+    String extension = FilenameUtils.getExtension(filename);
+    String mime = null;
+    if (!Strings.isNullOrEmpty(extension)) {
+      mime = MAP.get(extension.toLowerCase(Locale.ENGLISH));
+    }
+    return mime != null ? mime : DEFAULT;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseRequest.java
new file mode 100644 (file)
index 0000000..8b5fbcf
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+ * 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;
+
+import com.google.common.collect.LinkedListMultimap;
+import com.google.common.collect.ListMultimap;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import org.sonarqube.ws.MediaTypes;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Strings.isNullOrEmpty;
+import static java.util.Collections.singletonList;
+import static java.util.Collections.unmodifiableSet;
+import static java.util.Objects.requireNonNull;
+
+abstract class BaseRequest<SELF extends BaseRequest> implements WsRequest {
+
+  private final String path;
+
+  private String mediaType = MediaTypes.JSON;
+
+  private final DefaultParameters parameters = new DefaultParameters();
+  private final DefaultHeaders headers = new DefaultHeaders();
+
+  BaseRequest(String path) {
+    this.path = path;
+  }
+
+  @Override
+  public String getPath() {
+    return path;
+  }
+
+  @Override
+  public String getMediaType() {
+    return mediaType;
+  }
+
+  /**
+   * Expected media type of response. Default is {@link MediaTypes#JSON}.
+   */
+  public SELF setMediaType(String s) {
+    requireNonNull(s, "media type of response cannot be null");
+    this.mediaType = s;
+    return (SELF) this;
+  }
+
+  public SELF setParam(String key, @Nullable String value) {
+    return setSingleValueParam(key, value);
+  }
+
+  public SELF setParam(String key, @Nullable Integer value) {
+    return setSingleValueParam(key, value);
+  }
+
+  public SELF setParam(String key, @Nullable Long value) {
+    return setSingleValueParam(key, value);
+  }
+
+  public SELF setParam(String key, @Nullable Float value) {
+    return setSingleValueParam(key, value);
+  }
+
+  public SELF setParam(String key, @Nullable Boolean value) {
+    return setSingleValueParam(key, value);
+  }
+
+  private SELF setSingleValueParam(String key, @Nullable Object value) {
+    checkArgument(!isNullOrEmpty(key), "a WS parameter key cannot be null");
+    if (value == null) {
+      return (SELF) this;
+    }
+    parameters.setValue(key, value.toString());
+
+    return (SELF) this;
+  }
+
+  public SELF setParam(String key, @Nullable Collection<? extends Object> values) {
+    checkArgument(!isNullOrEmpty(key), "a WS parameter key cannot be null");
+    if (values == null || values.isEmpty()) {
+      return (SELF) this;
+    }
+
+    parameters.setValues(key, values.stream()
+      .filter(Objects::nonNull)
+      .map(Object::toString)
+      .filter(value -> !value.isEmpty())
+      .collect(Collectors.toList()));
+
+    return (SELF) this;
+  }
+
+  @Override
+  public Map<String, String> getParams() {
+    return parameters.keyValues.keySet().stream()
+      .collect(Collectors.toMap(
+        Function.identity(),
+        key -> parameters.keyValues.get(key).get(0),
+        (v1, v2) -> {
+          throw new IllegalStateException(String.format("Duplicate key '%s' in request", v1));
+        },
+        LinkedHashMap::new));
+  }
+
+  @Override
+  public Parameters getParameters() {
+    return parameters;
+  }
+
+  @Override
+  public Headers getHeaders() {
+    return headers;
+  }
+
+  public SELF setHeader(String name, @Nullable String value) {
+    requireNonNull(name, "Header name can't be null");
+    headers.setValue(name, value);
+    return (SELF) this;
+  }
+
+  private static class DefaultParameters implements Parameters {
+    // preserve insertion order
+    private final ListMultimap<String, String> keyValues = LinkedListMultimap.create();
+
+    @Override
+    @CheckForNull
+    public String getValue(String key) {
+      return keyValues.containsKey(key) ? keyValues.get(key).get(0) : null;
+    }
+
+    @Override
+    public List<String> getValues(String key) {
+      return keyValues.get(key);
+    }
+
+    @Override
+    public Set<String> getKeys() {
+      return keyValues.keySet();
+    }
+
+    private DefaultParameters setValue(String key, String value) {
+      checkArgument(!isNullOrEmpty(key));
+      checkArgument(value != null);
+
+      keyValues.putAll(key, singletonList(value));
+      return this;
+    }
+
+    private DefaultParameters setValues(String key, Collection<String> values) {
+      checkArgument(!isNullOrEmpty(key));
+      checkArgument(values != null && !values.isEmpty());
+
+      this.keyValues.putAll(key, values.stream().map(Object::toString).filter(Objects::nonNull).collect(Collectors.toList()));
+
+      return this;
+    }
+  }
+
+  private static class DefaultHeaders implements Headers {
+    private final Map<String, String> keyValues = new HashMap<>();
+
+    @Override
+    public Optional<String> getValue(String name) {
+      return Optional.ofNullable(keyValues.get(name));
+    }
+
+    private DefaultHeaders setValue(String name, @Nullable String value) {
+      checkArgument(!isNullOrEmpty(name));
+
+      if (value == null) {
+        keyValues.remove(name);
+      } else {
+        keyValues.put(name, value);
+      }
+      return this;
+    }
+
+    @Override
+    public Set<String> getNames() {
+      return unmodifiableSet(keyValues.keySet());
+    }
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseResponse.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseResponse.java
new file mode 100644 (file)
index 0000000..039754f
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * 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;
+
+import static java.net.HttpURLConnection.HTTP_NO_CONTENT;
+
+abstract class BaseResponse implements WsResponse {
+
+  @Override
+  public boolean isSuccessful() {
+    return code() >= 200 && code() < 300;
+  }
+
+  @Override
+  public WsResponse failIfNotSuccessful() {
+    if (!isSuccessful()) {
+      String content = content();
+      close();
+      throw new HttpException(requestUrl(), code(), content);
+    }
+    return this;
+  }
+
+  @Override
+  public boolean hasContent() {
+    return code() != HTTP_NO_CONTENT;
+  }
+  
+  @Override
+  public void close() {
+    // override if needed
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/BaseService.java
new file mode 100644 (file)
index 0000000..4c6a0e9
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * 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;
+
+import com.google.protobuf.Message;
+import com.google.protobuf.Parser;
+import java.io.InputStream;
+import java.util.Collection;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import org.apache.commons.io.IOUtils;
+import org.sonarqube.ws.MediaTypes;
+
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Strings.isNullOrEmpty;
+
+public abstract class BaseService {
+
+  private final WsConnector wsConnector;
+  protected final String controller;
+
+  public BaseService(WsConnector wsConnector, String controllerPath) {
+    checkArgument(!isNullOrEmpty(controllerPath));
+    this.wsConnector = wsConnector;
+    this.controller = controllerPath;
+  }
+
+  protected <T extends Message> T call(BaseRequest request, Parser<T> parser) {
+    request.setMediaType(MediaTypes.PROTOBUF);
+    WsResponse response = call(request);
+    return convert(response, parser);
+  }
+
+  protected WsResponse call(WsRequest request) {
+    return wsConnector.call(request).failIfNotSuccessful();
+  }
+
+  public <T extends Message> T convert(WsResponse response, Parser<T> parser) {
+    try (InputStream byteStream = response.contentStream()) {
+      byte[] bytes = IOUtils.toByteArray(byteStream);
+      // HTTP header "Content-Type" is not verified. It may be different than protobuf.
+      return parser.parseFrom(bytes);
+    } catch (Exception e) {
+      throw new IllegalStateException("Fail to parse protobuf response of " + response.requestUrl(), e);
+    }
+  }
+
+  protected String path(String action) {
+    return String.format("%s/%s", controller, action);
+  }
+
+  @CheckForNull
+  protected static String inlineMultipleParamValue(@Nullable Collection<String> values) {
+    return values == null ? null : String.join(",", values);
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/GetRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/GetRequest.java
new file mode 100644 (file)
index 0000000..02a1f2a
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * 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;
+
+/**
+ * @since 5.3
+ */
+public class GetRequest extends BaseRequest<GetRequest> {
+  public GetRequest(String path) {
+    super(path);
+  }
+
+  @Override
+  public Method getMethod() {
+    return Method.GET;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/Headers.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/Headers.java
new file mode 100644 (file)
index 0000000..b289789
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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;
+
+import java.util.Optional;
+import java.util.Set;
+
+/**
+ * HTTP headers
+ *
+ * @since 6.6
+ */
+public interface Headers {
+
+  Optional<String> getValue(String name);
+
+  Set<String> getNames();
+
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/HttpException.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/HttpException.java
new file mode 100644 (file)
index 0000000..d456fae
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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;
+
+/**
+ * @since 5.3
+ */
+public class HttpException extends RuntimeException {
+
+  private final String url;
+  private final int code;
+  private final String content;
+
+  public HttpException(String url, int code, String content) {
+    super(String.format("Error %d on %s : %s", code, url, content));
+    this.url = url;
+    this.code = code;
+    this.content = content;
+  }
+  
+  public String content() {
+    return content;
+  }
+
+  public String url() {
+    return url;
+  }
+
+  /**
+   * @see java.net.HttpURLConnection constants
+   */
+  public int code() {
+    return code;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/Parameters.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/Parameters.java
new file mode 100644 (file)
index 0000000..ae692ab
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * 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;
+
+import java.util.List;
+import java.util.Set;
+import javax.annotation.CheckForNull;
+
+public interface Parameters {
+  /**
+   * In the case of a multi value parameter, returns the first element
+   */
+  @CheckForNull
+  String getValue(String key);
+
+  List<String> getValues(String key);
+
+  Set<String> getKeys();
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/PostRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/PostRequest.java
new file mode 100644 (file)
index 0000000..13cbdd5
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * 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;
+
+import java.io.File;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @since 5.3
+ */
+public class PostRequest extends BaseRequest<PostRequest> {
+
+  private final Map<String, Part> parts = new LinkedHashMap<>();
+
+  public PostRequest(String path) {
+    super(path);
+  }
+
+  @Override
+  public Method getMethod() {
+    return Method.POST;
+  }
+
+  public PostRequest setPart(String name, Part part) {
+    this.parts.put(name, part);
+    return this;
+  }
+
+  public Map<String, Part> getParts() {
+    return parts;
+  }
+
+  public static class Part {
+    private final String mediaType;
+    private final File file;
+
+    public Part(String mediaType, File file) {
+      this.mediaType = mediaType;
+      this.file = file;
+    }
+
+    public String getMediaType() {
+      return mediaType;
+    }
+
+    public File getFile() {
+      return file;
+    }
+  }
+
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsConnector.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsConnector.java
new file mode 100644 (file)
index 0000000..b203d18
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/**
+ * @since 5.3
+ */
+public interface WsConnector {
+
+  /**
+   * Server base URL, always with trailing slash, for instance "http://localhost:9000/"
+   */
+  String baseUrl();
+
+  /**
+   * @throws IllegalStateException if the request could not be executed due to
+   *     a connectivity problem or timeout. Because networks can
+   *     fail during an exchange, it is possible that the remote server
+   *     accepted the request before the failure
+   */
+  WsResponse call(WsRequest wsRequest);
+
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsRequest.java
new file mode 100644 (file)
index 0000000..9907ae7
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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;
+
+import java.util.Map;
+
+/**
+ * @since 5.3
+ */
+public interface WsRequest {
+
+  Method getMethod();
+
+  String getPath();
+
+  String getMediaType();
+
+  /**
+   *
+   * In case of multi value parameters, returns the first value
+   *
+   * @deprecated since 6.1. Use {@link #getParameters()} instead
+   */
+  @Deprecated
+  Map<String, String> getParams();
+
+  Parameters getParameters();
+
+  Headers getHeaders();
+
+  enum Method {
+    GET, POST
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsResponse.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/WsResponse.java
new file mode 100644 (file)
index 0000000..fcaed89
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * 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;
+
+import java.io.Closeable;
+import java.io.InputStream;
+import java.io.Reader;
+
+/**
+ * @since 5.3
+ */
+public interface WsResponse extends Closeable {
+
+  /**
+   * The absolute requested URL
+   */
+  String requestUrl();
+
+  /**
+   * HTTP status code
+   */
+  int code();
+
+  /**
+   * Returns true if the code is in [200..300), which means the request was
+   * successfully received, understood, and accepted.
+   */
+  boolean isSuccessful() ;
+
+  /**
+   * Throws a {@link HttpException} if {@link #isSuccessful()} is false.
+   */
+  WsResponse failIfNotSuccessful();
+
+  String contentType();
+
+  boolean hasContent();
+
+  InputStream contentStream();
+
+  Reader contentReader();
+
+  String content();
+  
+  @Override
+  void close();
+
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/analysisreports/AnalysisReportsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/analysisreports/AnalysisReportsService.java
new file mode 100644 (file)
index 0000000..c60120c
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * 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.analysisreports;
+
+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;
+
+/**
+ * Get details about Compute Engine tasks.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/analysis_reports">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AnalysisReportsService extends BaseService {
+
+  public AnalysisReportsService(WsConnector wsConnector) {
+    super(wsConnector, "api/analysis_reports");
+  }
+
+  /**
+   * Check if the queue of Compute Engine is empty
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/analysis_reports/is_queue_empty">Further information about this action online (including a response example)</a>
+   * @since 5.1
+   */
+  public String isQueueEmpty() {
+    return call(
+      new GetRequest(path("is_queue_empty"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/analysisreports/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/analysisreports/package-info.java
new file mode 100644 (file)
index 0000000..126c8ae
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.analysisreports;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/AuthenticationService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/AuthenticationService.java
new file mode 100644 (file)
index 0000000..bf37442
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * 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.authentication;
+
+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;
+
+/**
+ * Handle authentication.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/authentication">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AuthenticationService extends BaseService {
+
+  public AuthenticationService(WsConnector wsConnector) {
+    super(wsConnector, "api/authentication");
+  }
+
+  /**
+   * Authenticate a user.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/authentication/login">Further information about this action online (including a response example)</a>
+   * @since 6.0
+   */
+  public void login(LoginRequest request) {
+    call(
+      new PostRequest(path("login"))
+        .setParam("login", request.getLogin())
+        .setParam("password", request.getPassword())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Logout a user.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/authentication/logout">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public void logout() {
+    call(
+      new PostRequest(path("logout"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Check credentials.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/authentication/validate">Further information about this action online (including a response example)</a>
+   * @since 3.3
+   */
+  public String validate() {
+    return call(
+      new GetRequest(path("validate"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/LoginRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/LoginRequest.java
new file mode 100644 (file)
index 0000000..956216e
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.authentication;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Authenticate a user.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/authentication/login">Further information about this action online (including a response example)</a>
+ * @since 6.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class LoginRequest {
+
+  private String login;
+  private String password;
+
+  /**
+   * Login of the user
+   *
+   * This is a mandatory parameter.
+   */
+  public LoginRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Password of the user
+   *
+   * This is a mandatory parameter.
+   */
+  public LoginRequest setPassword(String password) {
+    this.password = password;
+    return this;
+  }
+
+  public String getPassword() {
+    return password;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/authentication/package-info.java
new file mode 100644 (file)
index 0000000..61fd208
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.authentication;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/BatchService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/BatchService.java
new file mode 100644 (file)
index 0000000..410d569
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * 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.batch;
+
+import javax.annotation.Generated;
+import org.sonarqube.ws.Batch.WsProjectResponse;
+import org.sonarqube.ws.MediaTypes;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.WsConnector;
+
+/**
+ * Get JAR files and referentials for batch
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/batch">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class BatchService extends BaseService {
+
+  public BatchService(WsConnector wsConnector) {
+    super(wsConnector, "batch");
+  }
+
+  /**
+   * Download a JAR file listed in the index (see batch/index)
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/batch/file">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public String file(FileRequest request) {
+    return call(
+      new GetRequest(path("file"))
+        .setParam("name", request.getName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List the JAR files to be downloaded by scanners
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/batch/index">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public String index() {
+    return call(
+      new GetRequest(path("index"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Return open issues
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/batch/issues">Further information about this action online (including a response example)</a>
+   * @since 5.1
+   */
+  public String issues(IssuesRequest request) {
+    return call(
+      new GetRequest(path("issues"))
+        .setParam("branch", request.getBranch())
+        .setParam("key", request.getKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Return project repository
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/batch/project">Further information about this action online (including a response example)</a>
+   * @since 4.5
+   */
+  public WsProjectResponse project(ProjectRequest request) {
+    return call(
+      new GetRequest(path("project"))
+        .setParam("branch", request.getBranch())
+        .setParam("issues_mode", request.getIssuesMode())
+        .setParam("key", request.getKey())
+        .setParam("profile", request.getProfile()),
+      WsProjectResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/FileRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/FileRequest.java
new file mode 100644 (file)
index 0000000..9e7a04c
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.batch;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Download a JAR file listed in the index (see batch/index)
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/batch/file">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class FileRequest {
+
+  private String name;
+
+  /**
+   * File name
+   *
+   * Example value: "batch-library-2.3.jar"
+   */
+  public FileRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/IssuesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/IssuesRequest.java
new file mode 100644 (file)
index 0000000..8b5a5a5
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.batch;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Return open issues
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/batch/issues">Further information about this action online (including a response example)</a>
+ * @since 5.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class IssuesRequest {
+
+  private String branch;
+  private String key;
+
+  /**
+   * Branch key
+   *
+   * Example value: "feature/my_branch"
+   */
+  public IssuesRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Project, module or file key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public IssuesRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/ProjectRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/ProjectRequest.java
new file mode 100644 (file)
index 0000000..8d148f9
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * 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.batch;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Return project repository
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/batch/project">Further information about this action online (including a response example)</a>
+ * @since 4.5
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProjectRequest {
+
+  private String branch;
+  private String issuesMode;
+  private String key;
+  private String profile;
+
+  /**
+   * Branch key
+   *
+   * Example value: "feature/my_branch"
+   */
+  public ProjectRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Issues mode or not
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ProjectRequest setIssuesMode(String issuesMode) {
+    this.issuesMode = issuesMode;
+    return this;
+  }
+
+  public String getIssuesMode() {
+    return issuesMode;
+  }
+
+  /**
+   * Project or module key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public ProjectRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Profile name
+   *
+   * Example value: "SonarQube Way"
+   */
+  public ProjectRequest setProfile(String profile) {
+    this.profile = profile;
+    return this;
+  }
+
+  public String getProfile() {
+    return profile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/batch/package-info.java
new file mode 100644 (file)
index 0000000..53ebb04
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.batch;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ActivityRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ActivityRequest.java
new file mode 100644 (file)
index 0000000..9fda0dc
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+ * 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.ce;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for tasks.<br> Requires the system administration permission, or project administration permission if componentId is set.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/activity">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ActivityRequest {
+
+  private String componentId;
+  private String componentQuery;
+  private String maxExecutedAt;
+  private String minSubmittedAt;
+  private String onlyCurrents;
+  private String p;
+  private String ps;
+  private String q;
+  private List<String> status;
+  private String type;
+
+  /**
+   * Id of the component (project) to filter on
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FL0"
+   */
+  public ActivityRequest setComponentId(String componentId) {
+    this.componentId = componentId;
+    return this;
+  }
+
+  public String getComponentId() {
+    return componentId;
+  }
+
+  /**
+   * Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li></ul>Must not be set together with componentId.<br />Deprecated and replaced by 'q'
+   *
+   * Example value: "Apache"
+   * @deprecated since 5.5
+   */
+  @Deprecated
+  public ActivityRequest setComponentQuery(String componentQuery) {
+    this.componentQuery = componentQuery;
+    return this;
+  }
+
+  public String getComponentQuery() {
+    return componentQuery;
+  }
+
+  /**
+   * Maximum date of end of task processing (inclusive)
+   *
+   * Example value: "2017-11-16T10:21:24+0100"
+   */
+  public ActivityRequest setMaxExecutedAt(String maxExecutedAt) {
+    this.maxExecutedAt = maxExecutedAt;
+    return this;
+  }
+
+  public String getMaxExecutedAt() {
+    return maxExecutedAt;
+  }
+
+  /**
+   * Minimum date of task submission (inclusive)
+   *
+   * Example value: "2017-11-16T10:21:24+0100"
+   */
+  public ActivityRequest setMinSubmittedAt(String minSubmittedAt) {
+    this.minSubmittedAt = minSubmittedAt;
+    return this;
+  }
+
+  public String getMinSubmittedAt() {
+    return minSubmittedAt;
+  }
+
+  /**
+   * Filter on the last tasks (only the most recent finished task by project)
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ActivityRequest setOnlyCurrents(String onlyCurrents) {
+    this.onlyCurrents = onlyCurrents;
+    return this;
+  }
+
+  public String getOnlyCurrents() {
+    return onlyCurrents;
+  }
+
+  /**
+   * Deprecated parameter
+   *
+   * @deprecated since 5.5
+   */
+  @Deprecated
+  public ActivityRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 1000
+   *
+   * Example value: "20"
+   */
+  public ActivityRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li><li>task ids that are exactly the same as the supplied string</li></ul>Must not be set together with componentId
+   *
+   * Example value: "Apache"
+   */
+  public ActivityRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Comma separated list of task statuses
+   *
+   * Example value: "IN_PROGRESS,SUCCESS"
+   * Possible values:
+   * <ul>
+   *   <li>"SUCCESS"</li>
+   *   <li>"FAILED"</li>
+   *   <li>"CANCELED"</li>
+   *   <li>"PENDING"</li>
+   *   <li>"IN_PROGRESS"</li>
+   * </ul>
+   */
+  public ActivityRequest setStatus(List<String> status) {
+    this.status = status;
+    return this;
+  }
+
+  public List<String> getStatus() {
+    return status;
+  }
+
+  /**
+   * Task type
+   *
+   * Example value: "REPORT"
+   * Possible values:
+   * <ul>
+   *   <li>"REPORT"</li>
+   * </ul>
+   */
+  public ActivityRequest setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getType() {
+    return type;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusRequest.java
new file mode 100644 (file)
index 0000000..487aac0
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.ce;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Return CE activity related metrics.<br>Requires 'Administer System' permission or 'Administer' rights on the specified project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/activity_status">Further information about this action online (including a response example)</a>
+ * @since 5.5
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ActivityStatusRequest {
+
+  private String componentId;
+  private String componentKey;
+
+  /**
+   * Id of the component (project) to filter on
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FL0"
+   */
+  public ActivityStatusRequest setComponentId(String componentId) {
+    this.componentId = componentId;
+    return this;
+  }
+
+  public String getComponentId() {
+    return componentId;
+  }
+
+  /**
+   * Key of the component (project) to filter on
+   *
+   * Example value: "my_project"
+   */
+  public ActivityStatusRequest setComponentKey(String componentKey) {
+    this.componentKey = componentKey;
+    return this;
+  }
+
+  public String getComponentKey() {
+    return componentKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/CancelRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/CancelRequest.java
new file mode 100644 (file)
index 0000000..fc08cbf
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.ce;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Cancels a pending task.<br/>In-progress tasks cannot be canceled.<br/>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the project related to the task</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/cancel">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CancelRequest {
+
+  private String id;
+
+  /**
+   * Id of the task to cancel.
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public CancelRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/CeService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/CeService.java
new file mode 100644 (file)
index 0000000..fc1dfa7
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * 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.ce;
+
+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.Ce.ActivityResponse;
+import org.sonarqube.ws.Ce.ActivityStatusWsResponse;
+import org.sonarqube.ws.Ce.SubmitResponse;
+import org.sonarqube.ws.Ce.TaskResponse;
+import org.sonarqube.ws.Ce.TaskTypesWsResponse;
+import org.sonarqube.ws.Ce.WorkerCountResponse;
+
+/**
+ * Get information on Compute Engine tasks.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CeService extends BaseService {
+
+  public CeService(WsConnector wsConnector) {
+    super(wsConnector, "api/ce");
+  }
+
+  /**
+   * Search for tasks.<br> Requires the system administration permission, or project administration permission if componentId is set.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/activity">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public ActivityResponse activity(ActivityRequest request) {
+    return call(
+      new GetRequest(path("activity"))
+        .setParam("componentId", request.getComponentId())
+        .setParam("componentQuery", request.getComponentQuery())
+        .setParam("maxExecutedAt", request.getMaxExecutedAt())
+        .setParam("minSubmittedAt", request.getMinSubmittedAt())
+        .setParam("onlyCurrents", request.getOnlyCurrents())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("status", request.getStatus() == null ? null : request.getStatus().stream().collect(Collectors.joining(",")))
+        .setParam("type", request.getType()),
+      ActivityResponse.parser());
+  }
+
+  /**
+   * Return CE activity related metrics.<br>Requires 'Administer System' permission or 'Administer' rights on the specified project.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/activity_status">Further information about this action online (including a response example)</a>
+   * @since 5.5
+   */
+  public ActivityStatusWsResponse activityStatus(ActivityStatusRequest request) {
+    return call(
+      new GetRequest(path("activity_status"))
+        .setParam("componentId", request.getComponentId())
+        .setParam("componentKey", request.getComponentKey()),
+      ActivityStatusWsResponse.parser());
+  }
+
+  /**
+   * Cancels a pending task.<br/>In-progress tasks cannot be canceled.<br/>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the project related to the task</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/cancel">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void cancel(CancelRequest request) {
+    call(
+      new PostRequest(path("cancel"))
+        .setParam("id", request.getId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Cancels all pending tasks. Requires system administration permission. In-progress tasks are not canceled.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/cancel_all">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void cancelAll() {
+    call(
+      new PostRequest(path("cancel_all"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get the pending tasks, in-progress tasks and the last executed task of a given component (usually a project).<br>Requires the following permission: 'Browse' on the specified component.<br>Either 'componentId' or 'component' must be provided.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/component">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String component(ComponentRequest request) {
+    return call(
+      new GetRequest(path("component"))
+        .setParam("component", request.getComponent())
+        .setParam("componentId", request.getComponentId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Submits a scanner report to the queue. Report is processed asynchronously. Requires analysis permission. If the project does not exist, then the provisioning permission is also required.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/submit">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public SubmitResponse submit(SubmitRequest request) {
+    return call(
+      new PostRequest(path("submit"))
+        .setParam("characteristic", request.getCharacteristic())
+        .setParam("organization", request.getOrganization())
+        .setParam("projectBranch", request.getProjectBranch())
+        .setParam("projectKey", request.getProjectKey())
+        .setParam("projectName", request.getProjectName())
+        .setParam("report", request.getReport()),
+      SubmitResponse.parser());
+  }
+
+  /**
+   * Give Compute Engine task details such as type, status, duration and associated component.<br />Requires 'Administer System' or 'Execute Analysis' permission.<br/>Since 6.1, field "logs" is deprecated and its value is always false.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/task">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public TaskResponse task(TaskRequest request) {
+    return call(
+      new GetRequest(path("task"))
+        .setParam("additionalFields", request.getAdditionalFields() == null ? null : request.getAdditionalFields().stream().collect(Collectors.joining(",")))
+        .setParam("id", request.getId()),
+      TaskResponse.parser());
+  }
+
+  /**
+   * List available task types
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/task_types">Further information about this action online (including a response example)</a>
+   * @since 5.5
+   */
+  public TaskTypesWsResponse taskTypes() {
+    return call(
+      new GetRequest(path("task_types")),
+      TaskTypesWsResponse.parser());
+  }
+
+  /**
+   * Return number of Compute Engine workers.<br/>Requires the system administration permission
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/worker_count">Further information about this action online (including a response example)</a>
+   * @since 6.5
+   */
+  public WorkerCountResponse workerCount() {
+    return call(
+      new GetRequest(path("worker_count")),
+      WorkerCountResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ComponentRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/ComponentRequest.java
new file mode 100644 (file)
index 0000000..5da28f2
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * 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.ce;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the pending tasks, in-progress tasks and the last executed task of a given component (usually a project).<br>Requires the following permission: 'Browse' on the specified component.<br>Either 'componentId' or 'component' must be provided.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/component">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ComponentRequest {
+
+  private String component;
+  private String componentId;
+
+  /**
+   * Example value: "my_project"
+   */
+  public ComponentRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public ComponentRequest setComponentId(String componentId) {
+    this.componentId = componentId;
+    return this;
+  }
+
+  public String getComponentId() {
+    return componentId;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/SubmitRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/SubmitRequest.java
new file mode 100644 (file)
index 0000000..dccee4d
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * 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.ce;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Submits a scanner report to the queue. Report is processed asynchronously. Requires analysis permission. If the project does not exist, then the provisioning permission is also required.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/submit">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SubmitRequest {
+
+  private String characteristic;
+  private String organization;
+  private String projectBranch;
+  private String projectKey;
+  private String projectName;
+  private String report;
+
+  /**
+   * Optional characteristic of the analysis. Can be repeated to define multiple characteristics.
+   *
+   * Example value: "branchType=long"
+   */
+  public SubmitRequest setCharacteristic(String characteristic) {
+    this.characteristic = characteristic;
+    return this;
+  }
+
+  public String getCharacteristic() {
+    return characteristic;
+  }
+
+  /**
+   * Key of the organization the project belongs to
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SubmitRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Optional branch of project
+   *
+   * Example value: "branch-1.x"
+   */
+  public SubmitRequest setProjectBranch(String projectBranch) {
+    this.projectBranch = projectBranch;
+    return this;
+  }
+
+  public String getProjectBranch() {
+    return projectBranch;
+  }
+
+  /**
+   * Key of project
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public SubmitRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  /**
+   * Optional name of the project, used only if the project does not exist yet.
+   *
+   * Example value: "My Project"
+   */
+  public SubmitRequest setProjectName(String projectName) {
+    this.projectName = projectName;
+    return this;
+  }
+
+  public String getProjectName() {
+    return projectName;
+  }
+
+  /**
+   * Report file. Format is not an API, it changes among SonarQube versions.
+   *
+   * This is a mandatory parameter.
+   */
+  public SubmitRequest setReport(String report) {
+    this.report = report;
+    return this;
+  }
+
+  public String getReport() {
+    return report;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/TaskRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/TaskRequest.java
new file mode 100644 (file)
index 0000000..a3f492c
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * 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.ce;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Give Compute Engine task details such as type, status, duration and associated component.<br />Requires 'Administer System' or 'Execute Analysis' permission.<br/>Since 6.1, field "logs" is deprecated and its value is always false.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/ce/task">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class TaskRequest {
+
+  private List<String> additionalFields;
+  private String id;
+
+  /**
+   * Comma-separated list of the optional fields to be returned in response.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"stacktrace"</li>
+   *   <li>"scannerContext"</li>
+   * </ul>
+   */
+  public TaskRequest setAdditionalFields(List<String> additionalFields) {
+    this.additionalFields = additionalFields;
+    return this;
+  }
+
+  public List<String> getAdditionalFields() {
+    return additionalFields;
+  }
+
+  /**
+   * Id of task
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public TaskRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/ce/package-info.java
new file mode 100644 (file)
index 0000000..9971fa2
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.ce;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/AppRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/AppRequest.java
new file mode 100644 (file)
index 0000000..961d739
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * 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.components;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Coverage data required for rendering the component viewer.<br>Requires the following permission: 'Browse'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/app">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AppRequest {
+
+  private String branch;
+  private String component;
+  private String componentId;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public AppRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key
+   *
+   * Example value: "my_project"
+   */
+  public AppRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Component ID
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public AppRequest setComponentId(String componentId) {
+    this.componentId = componentId;
+    return this;
+  }
+
+  public String getComponentId() {
+    return componentId;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/ComponentsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/ComponentsService.java
new file mode 100644 (file)
index 0000000..4e4980c
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * 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.components;
+
+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.Components.SearchWsResponse;
+import org.sonarqube.ws.Components.SearchProjectsWsResponse;
+import org.sonarqube.ws.Components.ShowWsResponse;
+import org.sonarqube.ws.Components.SuggestionsWsResponse;
+import org.sonarqube.ws.Components.TreeWsResponse;
+
+/**
+ * Get information about a component (file, directory, project, ...) and its ancestors or descendants. Update a project or module key.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ComponentsService extends BaseService {
+
+  public ComponentsService(WsConnector wsConnector) {
+    super(wsConnector, "api/components");
+  }
+
+  /**
+   * Coverage data required for rendering the component viewer.<br>Requires the following permission: 'Browse'.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/app">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public String app(AppRequest request) {
+    return call(
+      new GetRequest(path("app"))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("componentId", request.getComponentId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for components
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/search">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public SearchWsResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(","))),
+      SearchWsResponse.parser());
+  }
+
+  /**
+   * Search for projects
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/search_projects">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public SearchProjectsWsResponse searchProjects(SearchProjectsRequest request) {
+    return call(
+      new GetRequest(path("search_projects"))
+        .setParam("asc", request.getAsc())
+        .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
+        .setParam("facets", request.getFacets() == null ? null : request.getFacets().stream().collect(Collectors.joining(",")))
+        .setParam("filter", request.getFilter())
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("s", request.getS()),
+      SearchProjectsWsResponse.parser());
+  }
+
+  /**
+   * Returns a component (file, directory, project, view…) and its ancestors. The ancestors are ordered from the parent to the root project. The 'componentId' or 'component' parameter must be provided.<br>Requires the following permission: 'Browse' on the project of the specified component.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/show">Further information about this action online (including a response example)</a>
+   * @since 5.4
+   */
+  public ShowWsResponse show(ShowRequest request) {
+    return call(
+      new GetRequest(path("show"))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("componentId", request.getComponentId()),
+      ShowWsResponse.parser());
+  }
+
+  /**
+   * Internal WS for the top-right search engine. The result will contain component search results, grouped by their qualifiers.<p>Each result contains:<ul><li>the organization key</li><li>the component key</li><li>the component's name (unescaped)</li><li>optionally a display name, which puts emphasis to matching characters (this text contains html tags and parts of the html-escaped name)</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/suggestions">Further information about this action online (including a response example)</a>
+   * @since 4.2
+   */
+  public SuggestionsWsResponse suggestions(SuggestionsRequest request) {
+    return call(
+      new GetRequest(path("suggestions"))
+        .setParam("more", request.getMore())
+        .setParam("recentlyBrowsed", request.getRecentlyBrowsed() == null ? null : request.getRecentlyBrowsed().stream().collect(Collectors.joining(",")))
+        .setParam("s", request.getS()),
+      SuggestionsWsResponse.parser());
+  }
+
+  /**
+   * Navigate through components based on the chosen strategy. The componentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the specified project.<br>When limiting search with the q parameter, directories are not returned.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/tree">Further information about this action online (including a response example)</a>
+   * @since 5.4
+   */
+  public TreeWsResponse tree(TreeRequest request) {
+    return call(
+      new GetRequest(path("tree"))
+        .setParam("asc", request.getAsc())
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("componentId", request.getComponentId())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(",")))
+        .setParam("s", request.getS() == null ? null : request.getS().stream().collect(Collectors.joining(",")))
+        .setParam("strategy", request.getStrategy()),
+      TreeWsResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SearchProjectsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SearchProjectsRequest.java
new file mode 100644 (file)
index 0000000..42a387d
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * 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.components;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for projects
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/search_projects">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchProjectsRequest {
+
+  private String asc;
+  private List<String> f;
+  private List<String> facets;
+  private String filter;
+  private String organization;
+  private String p;
+  private String ps;
+  private String s;
+
+  /**
+   * Ascending sort
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchProjectsRequest setAsc(String asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  public String getAsc() {
+    return asc;
+  }
+
+  /**
+   * Comma-separated list of the fields to be returned in response
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"analysisDate"</li>
+   *   <li>"leakPeriodDate"</li>
+   * </ul>
+   */
+  public SearchProjectsRequest setF(List<String> f) {
+    this.f = f;
+    return this;
+  }
+
+  public List<String> getF() {
+    return f;
+  }
+
+  /**
+   * Comma-separated list of the facets to be computed. No facet is computed by default.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"alert_status"</li>
+   *   <li>"coverage"</li>
+   *   <li>"duplicated_lines_density"</li>
+   *   <li>"languages"</li>
+   *   <li>"ncloc"</li>
+   *   <li>"new_coverage"</li>
+   *   <li>"new_duplicated_lines_density"</li>
+   *   <li>"new_lines"</li>
+   *   <li>"new_maintainability_rating"</li>
+   *   <li>"new_reliability_rating"</li>
+   *   <li>"new_security_rating"</li>
+   *   <li>"reliability_rating"</li>
+   *   <li>"security_rating"</li>
+   *   <li>"sqale_rating"</li>
+   *   <li>"tags"</li>
+   * </ul>
+   */
+  public SearchProjectsRequest setFacets(List<String> facets) {
+    this.facets = facets;
+    return this;
+  }
+
+  public List<String> getFacets() {
+    return facets;
+  }
+
+  /**
+   * Filter of projects on name, key, measure value, quality gate, language, tag or whether a project is a favorite or not.<br>The filter must be encoded to form a valid URL (for example '=' must be replaced by '%3D').<br>Examples of use:<ul> <li>to filter my favorite projects with a failed quality gate and a coverage greater than or equals to 60% and a coverage strictly lower than 80%:<br>   <code>filter="alert_status = ERROR and isFavorite and coverage >= 60 and coverage < 80"</code></li> <li>to filter projects with a reliability, security and maintainability rating equals or worse than B:<br>   <code>filter="reliability_rating>=2 and security_rating>=2 and sqale_rating>=2"</code></li> <li>to filter projects without duplication data:<br>   <code>filter="duplicated_lines_density = NO_DATA"</code></li></ul>To filter on project name or key, use the 'query' keyword, for instance : <code>filter='query = "Sonar"'</code>.<br><br>To filter on a numeric metric, provide the metric key.<br>These are the supported metric keys:<br><ul><li>alert_status</li><li>coverage</li><li>duplicated_lines_density</li><li>lines</li><li>ncloc</li><li>ncloc_language_distribution</li><li>new_coverage</li><li>new_duplicated_lines_density</li><li>new_lines</li><li>new_maintainability_rating</li><li>new_reliability_rating</li><li>new_security_rating</li><li>reliability_rating</li><li>security_rating</li><li>sqale_rating</li></ul><br>To filter on a rating, provide the corresponding metric key (ex: reliability_rating for reliability rating).<br>The possible values are:<ul> <li>'1' for rating A</li> <li>'2' for rating B</li> <li>'3' for rating C</li> <li>'4' for rating D</li> <li>'5' for rating E</li></ul>To filter on a Quality Gate status use the metric key 'alert_status'. Only the '=' operator can be used.<br>The possible values are:<ul> <li>'OK' for Passed</li> <li>'WARN' for Warning</li> <li>'ERROR' for Failed</li></ul>To filter on language keys use the language key: <ul> <li>to filter on a single language you can use 'language = java'</li> <li>to filter on several languages you must use 'language IN (java, js)'</li></ul>Use the WS api/languages/list to find the key of a language.<br> To filter on tags use the 'tag' keyword:<ul>  <li>to filter on one tag you can use <code>tag = finance</code></li> <li>to filter on several tags you must use <code>tag in (offshore, java)</code></li></ul>
+   *
+   */
+  public SearchProjectsRequest setFilter(String filter) {
+    this.filter = filter;
+    return this;
+  }
+
+  public String getFilter() {
+    return filter;
+  }
+
+  /**
+   * the organization to search projects in
+   *
+   * This is part of the internal API.
+   */
+  public SearchProjectsRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchProjectsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchProjectsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Sort projects by numeric metric key, quality gate status (using 'alert_status'), last analysis date (using 'analysisDate'), or by project name.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"alert_status"</li>
+   *   <li>"analysisDate"</li>
+   *   <li>"coverage"</li>
+   *   <li>"duplicated_lines_density"</li>
+   *   <li>"lines"</li>
+   *   <li>"name"</li>
+   *   <li>"ncloc"</li>
+   *   <li>"ncloc_language_distribution"</li>
+   *   <li>"new_coverage"</li>
+   *   <li>"new_duplicated_lines_density"</li>
+   *   <li>"new_lines"</li>
+   *   <li>"new_maintainability_rating"</li>
+   *   <li>"new_reliability_rating"</li>
+   *   <li>"new_security_rating"</li>
+   *   <li>"reliability_rating"</li>
+   *   <li>"security_rating"</li>
+   *   <li>"sqale_rating"</li>
+   * </ul>
+   */
+  public SearchProjectsRequest setS(String s) {
+    this.s = s;
+    return this;
+  }
+
+  public String getS() {
+    return s;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SearchRequest.java
new file mode 100644 (file)
index 0000000..a9da503
--- /dev/null
@@ -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.components;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for components
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/search">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String language;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+  private List<String> qualifiers;
+
+  /**
+   * Language key. If provided, only components for the given language are returned.
+   *
+   * Example value: ""
+   */
+  public SearchRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0.
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li></ul>
+   *
+   * Example value: "sonar"
+   */
+  public SearchRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Comma-separated list of component qualifiers. Filter the results with the specified qualifiers. Possible values are:<ul><li>BRC - Sub-projects</li><li>DIR - Directories</li><li>FIL - Files</li><li>TRK - Projects</li><li>UTS - Test Files</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"BRC"</li>
+   *   <li>"DIR"</li>
+   *   <li>"FIL"</li>
+   *   <li>"TRK"</li>
+   *   <li>"UTS"</li>
+   * </ul>
+   */
+  public SearchRequest setQualifiers(List<String> qualifiers) {
+    this.qualifiers = qualifiers;
+    return this;
+  }
+
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/ShowRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/ShowRequest.java
new file mode 100644 (file)
index 0000000..6c7a5b8
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * 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.components;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Returns a component (file, directory, project, view…) and its ancestors. The ancestors are ordered from the parent to the root project. The 'componentId' or 'component' parameter must be provided.<br>Requires the following permission: 'Browse' on the project of the specified component.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/show">Further information about this action online (including a response example)</a>
+ * @since 5.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ShowRequest {
+
+  private String branch;
+  private String component;
+  private String componentId;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ShowRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key
+   *
+   * Example value: "my_project"
+   */
+  public ShowRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Component id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public ShowRequest setComponentId(String componentId) {
+    this.componentId = componentId;
+    return this;
+  }
+
+  public String getComponentId() {
+    return componentId;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SuggestionsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/SuggestionsRequest.java
new file mode 100644 (file)
index 0000000..ffb8759
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * 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.components;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Internal WS for the top-right search engine. The result will contain component search results, grouped by their qualifiers.<p>Each result contains:<ul><li>the organization key</li><li>the component key</li><li>the component's name (unescaped)</li><li>optionally a display name, which puts emphasis to matching characters (this text contains html tags and parts of the html-escaped name)</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/suggestions">Further information about this action online (including a response example)</a>
+ * @since 4.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SuggestionsRequest {
+
+  private String more;
+  private List<String> recentlyBrowsed;
+  private String s;
+
+  /**
+   * Category, for which to display the next 20 results (skipping the first 6 results)
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"VW"</li>
+   *   <li>"SVW"</li>
+   *   <li>"APP"</li>
+   *   <li>"TRK"</li>
+   *   <li>"BRC"</li>
+   *   <li>"FIL"</li>
+   *   <li>"UTS"</li>
+   * </ul>
+   */
+  public SuggestionsRequest setMore(String more) {
+    this.more = more;
+    return this;
+  }
+
+  public String getMore() {
+    return more;
+  }
+
+  /**
+   * Comma separated list of component keys, that have recently been browsed by the user. Only the first 50 items will be used. Order is not taken into account.
+   *
+   * Example value: "org.sonarsource:sonarqube,some.other:project"
+   */
+  public SuggestionsRequest setRecentlyBrowsed(List<String> recentlyBrowsed) {
+    this.recentlyBrowsed = recentlyBrowsed;
+    return this;
+  }
+
+  public List<String> getRecentlyBrowsed() {
+    return recentlyBrowsed;
+  }
+
+  /**
+   * Search query: can contain several search tokens separated by spaces.
+   *
+   * Example value: "sonar"
+   */
+  public SuggestionsRequest setS(String s) {
+    this.s = s;
+    return this;
+  }
+
+  public String getS() {
+    return s;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/TreeRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/TreeRequest.java
new file mode 100644 (file)
index 0000000..300dd6b
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * 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.components;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Navigate through components based on the chosen strategy. The componentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the specified project.<br>When limiting search with the q parameter, directories are not returned.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/components/tree">Further information about this action online (including a response example)</a>
+ * @since 5.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class TreeRequest {
+
+  private String asc;
+  private String branch;
+  private String component;
+  private String componentId;
+  private String p;
+  private String ps;
+  private String q;
+  private List<String> qualifiers;
+  private List<String> s;
+  private String strategy;
+
+  /**
+   * Ascending sort
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public TreeRequest setAsc(String asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  public String getAsc() {
+    return asc;
+  }
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public TreeRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Base component key. The search is based on this component.
+   *
+   * Example value: "my_project"
+   */
+  public TreeRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Base component id. The search is based on this component.
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public TreeRequest setComponentId(String componentId) {
+    this.componentId = componentId;
+    return this;
+  }
+
+  public String getComponentId() {
+    return componentId;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public TreeRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public TreeRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li></ul>
+   *
+   * Example value: "FILE_NAM"
+   */
+  public TreeRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Comma-separated list of component qualifiers. Filter the results with the specified qualifiers. Possible values are:<ul><li>BRC - Sub-projects</li><li>DIR - Directories</li><li>FIL - Files</li><li>TRK - Projects</li><li>UTS - Test Files</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"BRC"</li>
+   *   <li>"DIR"</li>
+   *   <li>"FIL"</li>
+   *   <li>"TRK"</li>
+   *   <li>"UTS"</li>
+   * </ul>
+   */
+  public TreeRequest setQualifiers(List<String> qualifiers) {
+    this.qualifiers = qualifiers;
+    return this;
+  }
+
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  /**
+   * Comma-separated list of sort fields
+   *
+   * Example value: "name, path"
+   * Possible values:
+   * <ul>
+   *   <li>"name"</li>
+   *   <li>"path"</li>
+   *   <li>"qualifier"</li>
+   * </ul>
+   */
+  public TreeRequest setS(List<String> s) {
+    this.s = s;
+    return this;
+  }
+
+  public List<String> getS() {
+    return s;
+  }
+
+  /**
+   * Strategy to search for base component descendants:<ul><li>children: return the children components of the base component. Grandchildren components are not returned</li><li>all: return all the descendants components of the base component. Grandchildren are returned.</li><li>leaves: return all the descendant components (files, in general) which don't have other children. They are the leaves of the component tree.</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"all"</li>
+   *   <li>"children"</li>
+   *   <li>"leaves"</li>
+   * </ul>
+   */
+  public TreeRequest setStrategy(String strategy) {
+    this.strategy = strategy;
+    return this;
+  }
+
+  public String getStrategy() {
+    return strategy;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/components/package-info.java
new file mode 100644 (file)
index 0000000..f9d52ca
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.components;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/CreateRequest.java
new file mode 100644 (file)
index 0000000..b77bd29
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * 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.custommeasures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a custom measure.<br /> The project id or the project key must be provided (only project and module custom measures can be created). The metric id or the metric key must be provided.<br/>Requires 'Administer System' permission or 'Administer' permission on the project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/create">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String description;
+  private String metricId;
+  private String metricKey;
+  private String projectId;
+  private String projectKey;
+  private String value;
+
+  /**
+   * Description
+   *
+   * Example value: "Team size growing."
+   */
+  public CreateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Metric id
+   *
+   * Example value: "16"
+   */
+  public CreateRequest setMetricId(String metricId) {
+    this.metricId = metricId;
+    return this;
+  }
+
+  public String getMetricId() {
+    return metricId;
+  }
+
+  /**
+   * Metric key
+   *
+   * Example value: "ncloc"
+   */
+  public CreateRequest setMetricKey(String metricKey) {
+    this.metricKey = metricKey;
+    return this;
+  }
+
+  public String getMetricKey() {
+    return metricKey;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public CreateRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public CreateRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  /**
+   * Measure value. Value type depends on metric type:<ul><li>INT - type: integer</li><li>FLOAT - type: double</li><li>PERCENT - type: double</li><li>BOOL - the possible values are true or false</li><li>STRING - type: string</li><li>MILLISEC - type: integer</li><li>DATA - type: string</li><li>LEVEL - the possible values are OK, WARN, ERROR</li><li>DISTRIB - type: string</li><li>RATING - type: double</li><li>WORK_DUR - long representing the number of minutes</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Example value: "47"
+   */
+  public CreateRequest setValue(String value) {
+    this.value = value;
+    return this;
+  }
+
+  public String getValue() {
+    return value;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/CustomMeasuresService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/CustomMeasuresService.java
new file mode 100644 (file)
index 0000000..0838f1b
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * 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.custommeasures;
+
+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;
+
+/**
+ * Manage custom measures for a project. See also api/metrics.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CustomMeasuresService extends BaseService {
+
+  public CustomMeasuresService(WsConnector wsConnector) {
+    super(wsConnector, "api/custom_measures");
+  }
+
+  /**
+   * Create a custom measure.<br /> The project id or the project key must be provided (only project and module custom measures can be created). The metric id or the metric key must be provided.<br/>Requires 'Administer System' permission or 'Administer' permission on the project.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/create">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void create(CreateRequest request) {
+    call(
+      new PostRequest(path("create"))
+        .setParam("description", request.getDescription())
+        .setParam("metricId", request.getMetricId())
+        .setParam("metricKey", request.getMetricKey())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setParam("value", request.getValue())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Delete a custom measure.<br /> Requires 'Administer System' permission or 'Administer' permission on the project.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/delete">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("id", request.getId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List all custom metrics for which no custom measure already exists on a given project.<br /> The project id or project key must be provided.<br />Requires 'Administer System' permission or 'Administer' permission on the project.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/metrics">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String metrics(MetricsRequest request) {
+    return call(
+      new GetRequest(path("metrics"))
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List custom measures. The project id or project key must be provided.<br />Requires 'Administer System' permission or 'Administer' permission on the project.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/search">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String 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("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setParam("ps", request.getPs())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Update a custom measure. Value and/or description must be provided<br />Requires 'Administer System' permission or 'Administer' permission on the project.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/update">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void update(UpdateRequest request) {
+    call(
+      new PostRequest(path("update"))
+        .setParam("description", request.getDescription())
+        .setParam("id", request.getId())
+        .setParam("value", request.getValue())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/DeleteRequest.java
new file mode 100644 (file)
index 0000000..922e4c3
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.custommeasures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a custom measure.<br /> Requires 'Administer System' permission or 'Administer' permission on the project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/delete">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String id;
+
+  /**
+   * Id
+   *
+   * This is a mandatory parameter.
+   * Example value: "24"
+   */
+  public DeleteRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/MetricsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/MetricsRequest.java
new file mode 100644 (file)
index 0000000..7915309
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.custommeasures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List all custom metrics for which no custom measure already exists on a given project.<br /> The project id or project key must be provided.<br />Requires 'Administer System' permission or 'Administer' permission on the project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/metrics">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class MetricsRequest {
+
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public MetricsRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public MetricsRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/SearchRequest.java
new file mode 100644 (file)
index 0000000..55036e6
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * 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.custommeasures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List custom measures. The project id or project key must be provided.<br />Requires 'Administer System' permission or 'Administer' permission on the project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/search">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private List<String> f;
+  private String p;
+  private String projectId;
+  private String projectKey;
+  private String ps;
+
+  /**
+   * Comma-separated list of the fields to be returned in response. All the fields are returned by default.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"projectId"</li>
+   *   <li>"projectKey"</li>
+   *   <li>"value"</li>
+   *   <li>"description"</li>
+   *   <li>"metric"</li>
+   *   <li>"createdAt"</li>
+   *   <li>"updatedAt"</li>
+   *   <li>"user"</li>
+   *   <li>"pending"</li>
+   * </ul>
+   */
+  public SearchRequest setF(List<String> f) {
+    this.f = f;
+    return this;
+  }
+
+  public List<String> getF() {
+    return f;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public SearchRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public SearchRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/UpdateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/UpdateRequest.java
new file mode 100644 (file)
index 0000000..076058b
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * 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.custommeasures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update a custom measure. Value and/or description must be provided<br />Requires 'Administer System' permission or 'Administer' permission on the project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/custom_measures/update">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateRequest {
+
+  private String description;
+  private String id;
+  private String value;
+
+  /**
+   * Example value: "Team size growing."
+   */
+  public UpdateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * id
+   *
+   * This is a mandatory parameter.
+   * Example value: "42"
+   */
+  public UpdateRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * Measure value. Value type depends on metric type:<ul><li>INT - type: integer</li><li>FLOAT - type: double</li><li>PERCENT - type: double</li><li>BOOL - the possible values are true or false</li><li>STRING - type: string</li><li>MILLISEC - type: integer</li><li>DATA - type: string</li><li>LEVEL - the possible values are OK, WARN, ERROR</li><li>DISTRIB - type: string</li><li>RATING - type: double</li><li>WORK_DUR - long representing the number of minutes</li></ul>
+   *
+   * Example value: "true"
+   */
+  public UpdateRequest setValue(String value) {
+    this.value = value;
+    return this;
+  }
+
+  public String getValue() {
+    return value;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/custommeasures/package-info.java
new file mode 100644 (file)
index 0000000..54c6886
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.custommeasures;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/DuplicationsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/DuplicationsService.java
new file mode 100644 (file)
index 0000000..dcb0fff
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * 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.duplications;
+
+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.Duplications.ShowResponse;
+
+/**
+ * Get duplication information for a project.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/duplications">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DuplicationsService extends BaseService {
+
+  public DuplicationsService(WsConnector wsConnector) {
+    super(wsConnector, "api/duplications");
+  }
+
+  /**
+   * Get duplications. Require Browse permission on file's project
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/duplications/show">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public ShowResponse show(ShowRequest request) {
+    return call(
+      new GetRequest(path("show"))
+        .setParam("branch", request.getBranch())
+        .setParam("key", request.getKey())
+        .setParam("uuid", request.getUuid()),
+      ShowResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/ShowRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/ShowRequest.java
new file mode 100644 (file)
index 0000000..aa9cde5
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * 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.duplications;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get duplications. Require Browse permission on file's project
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/duplications/show">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ShowRequest {
+
+  private String branch;
+  private String key;
+  private String uuid;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ShowRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * File key
+   *
+   * Example value: "my_project:/src/foo/Bar.php"
+   */
+  public ShowRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * File ID. If provided, 'key' must not be provided.
+   *
+   * Example value: "584a89f2-8037-4f7b-b82c-8b45d2d63fb2"
+   * @deprecated since 6.5
+   */
+  @Deprecated
+  public ShowRequest setUuid(String uuid) {
+    this.uuid = uuid;
+    return this;
+  }
+
+  public String getUuid() {
+    return uuid;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/duplications/package-info.java
new file mode 100644 (file)
index 0000000..cbd34e1
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.duplications;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/ApplyLicenseRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/ApplyLicenseRequest.java
new file mode 100644 (file)
index 0000000..ba79abb
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.editions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Apply changes to SonarQube to match the specified license. Clear error message of previous automatic install of an edition, if there is any. Require 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions/apply_license">Further information about this action online (including a response example)</a>
+ * @since 6.7
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ApplyLicenseRequest {
+
+  private String license;
+
+  /**
+   * the license
+   *
+   * This is a mandatory parameter.
+   */
+  public ApplyLicenseRequest setLicense(String license) {
+    this.license = license;
+    return this;
+  }
+
+  public String getLicense() {
+    return license;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/EditionsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/EditionsService.java
new file mode 100644 (file)
index 0000000..1ee4ae0
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * 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.editions;
+
+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.Editions.FormDataResponse;
+import org.sonarqube.ws.Editions.PreviewResponse;
+import org.sonarqube.ws.Editions.StatusResponse;
+
+/**
+ * Manage SonarSource commercial editions.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class EditionsService extends BaseService {
+
+  public EditionsService(WsConnector wsConnector) {
+    super(wsConnector, "api/editions");
+  }
+
+  /**
+   * Apply changes to SonarQube to match the specified license. Clear error message of previous automatic install of an edition, if there is any. Require 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions/apply_license">Further information about this action online (including a response example)</a>
+   * @since 6.7
+   */
+  public String applyLicense(ApplyLicenseRequest request) {
+    return call(
+      new PostRequest(path("apply_license"))
+        .setParam("license", request.getLicense())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Clear error message of last install of an edition (if any). Require 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions/clear_error_message">Further information about this action online (including a response example)</a>
+   * @since 6.7
+   */
+  public void clearErrorMessage() {
+    call(
+      new PostRequest(path("clear_error_message"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Provide data to prefill license request forms: the server ID and the total number of lines of code.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions/form_data">Further information about this action online (including a response example)</a>
+   * @since 6.7
+   */
+  public FormDataResponse formData() {
+    return call(
+      new GetRequest(path("form_data")),
+      FormDataResponse.parser());
+  }
+
+  /**
+   * Preview the changes to SonarQube to match the specified license. Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions/preview">Further information about this action online (including a response example)</a>
+   * @since 6.7
+   */
+  public PreviewResponse preview(PreviewRequest request) {
+    return call(
+      new PostRequest(path("preview"))
+        .setParam("license", request.getLicense()),
+      PreviewResponse.parser());
+  }
+
+  /**
+   * Provide status of SonarSource commercial edition of the current SonarQube. Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions/status">Further information about this action online (including a response example)</a>
+   * @since 6.7
+   */
+  public StatusResponse status() {
+    return call(
+      new GetRequest(path("status")),
+      StatusResponse.parser());
+  }
+
+  /**
+   * Uninstall the currently installed edition. Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions/uninstall">Further information about this action online (including a response example)</a>
+   * @since 6.7
+   */
+  public void uninstall() {
+    call(
+      new PostRequest(path("uninstall"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/PreviewRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/PreviewRequest.java
new file mode 100644 (file)
index 0000000..00f909c
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.editions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Preview the changes to SonarQube to match the specified license. Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/editions/preview">Further information about this action online (including a response example)</a>
+ * @since 6.7
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class PreviewRequest {
+
+  private String license;
+
+  /**
+   * the license
+   *
+   * This is a mandatory parameter.
+   */
+  public PreviewRequest setLicense(String license) {
+    this.license = license;
+    return this;
+  }
+
+  public String getLicense() {
+    return license;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/editions/package-info.java
new file mode 100644 (file)
index 0000000..e600294
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.editions;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/EmailsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/EmailsService.java
new file mode 100644 (file)
index 0000000..cbf56d8
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * 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.emails;
+
+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;
+
+/**
+ * Manage emails
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/emails">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class EmailsService extends BaseService {
+
+  public EmailsService(WsConnector wsConnector) {
+    super(wsConnector, "api/emails");
+  }
+
+  /**
+   * Test email configuration by sending an email<br>Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/emails/send">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public void send(SendRequest request) {
+    call(
+      new PostRequest(path("send"))
+        .setParam("message", request.getMessage())
+        .setParam("subject", request.getSubject())
+        .setParam("to", request.getTo())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/SendRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/SendRequest.java
new file mode 100644 (file)
index 0000000..8880e49
--- /dev/null
@@ -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.emails;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Test email configuration by sending an email<br>Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/emails/send">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SendRequest {
+
+  private String message;
+  private String subject;
+  private String to;
+
+  /**
+   * Content of the email
+   *
+   * This is a mandatory parameter.
+   */
+  public SendRequest setMessage(String message) {
+    this.message = message;
+    return this;
+  }
+
+  public String getMessage() {
+    return message;
+  }
+
+  /**
+   * Subject of the email
+   *
+   * Example value: "Test Message from SonarQube"
+   */
+  public SendRequest setSubject(String subject) {
+    this.subject = subject;
+    return this;
+  }
+
+  public String getSubject() {
+    return subject;
+  }
+
+  /**
+   * Email address
+   *
+   * This is a mandatory parameter.
+   * Example value: "john@doo.com"
+   */
+  public SendRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/emails/package-info.java
new file mode 100644 (file)
index 0000000..2219eed
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.emails;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/AddRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/AddRequest.java
new file mode 100644 (file)
index 0000000..5bf1135
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.favorites;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a component (project, directory, file etc.) as favorite for the authenticated user.<br>Requires authentication and the following permission: 'Browse' on the project of the specified component.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favorites/add">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddRequest {
+
+  private String component;
+
+  /**
+   * Component key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project:/src/foo/Bar.php"
+   */
+  public AddRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/FavoritesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/FavoritesService.java
new file mode 100644 (file)
index 0000000..2aaf636
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * 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.favorites;
+
+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.Favorites.SearchResponse;
+
+/**
+ * Manage user favorites
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favorites">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class FavoritesService extends BaseService {
+
+  public FavoritesService(WsConnector wsConnector) {
+    super(wsConnector, "api/favorites");
+  }
+
+  /**
+   * Add a component (project, directory, file etc.) as favorite for the authenticated user.<br>Requires authentication and the following permission: 'Browse' on the project of the specified component.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favorites/add">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public void add(AddRequest request) {
+    call(
+      new PostRequest(path("add"))
+        .setParam("component", request.getComponent())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove a component (project, directory, file etc.) as favorite for the authenticated user.<br>Requires authentication.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favorites/remove">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public void remove(RemoveRequest request) {
+    call(
+      new PostRequest(path("remove"))
+        .setParam("component", request.getComponent())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for the authenticated user favorites.<br>Requires authentication.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favorites/search">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public SearchResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs()),
+      SearchResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/RemoveRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/RemoveRequest.java
new file mode 100644 (file)
index 0000000..2d34462
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.favorites;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a component (project, directory, file etc.) as favorite for the authenticated user.<br>Requires authentication.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favorites/remove">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveRequest {
+
+  private String component;
+
+  /**
+   * Component key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public RemoveRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/SearchRequest.java
new file mode 100644 (file)
index 0000000..77eaab5
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.favorites;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for the authenticated user favorites.<br>Requires authentication.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favorites/search">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String p;
+  private String ps;
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favorites/package-info.java
new file mode 100644 (file)
index 0000000..3a3d705
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.favorites;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favourites/FavouritesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favourites/FavouritesService.java
new file mode 100644 (file)
index 0000000..67a4b27
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.favourites;
+
+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;
+
+/**
+ * Removed since 6.3, please use api/favorites instead
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favourites">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class FavouritesService extends BaseService {
+
+  public FavouritesService(WsConnector wsConnector) {
+    super(wsConnector, "api/favourites");
+  }
+
+  /**
+   * The web service is removed and you're invited to use api/favorites instead
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/favourites/index">Further information about this action online (including a response example)</a>
+   * @since 2.6
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public String index() {
+    return call(
+      new GetRequest(path("index"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favourites/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/favourites/package-info.java
new file mode 100644 (file)
index 0000000..49cec47
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.favourites;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AddCommentRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AddCommentRequest.java
new file mode 100644 (file)
index 0000000..4d0d397
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/add_comment">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddCommentRequest {
+
+  private String issue;
+  private String text;
+
+  /**
+   * Issue key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public AddCommentRequest setIssue(String issue) {
+    this.issue = issue;
+    return this;
+  }
+
+  public String getIssue() {
+    return issue;
+  }
+
+  /**
+   * Comment text
+   *
+   * This is a mandatory parameter.
+   * Example value: "Won't fix because it doesn't apply to the context"
+   */
+  public AddCommentRequest setText(String text) {
+    this.text = text;
+    return this;
+  }
+
+  public String getText() {
+    return text;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AssignRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AssignRequest.java
new file mode 100644 (file)
index 0000000..1ae5e92
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Assign/Unassign an issue. Requires authentication and Browse permission on project
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/assign">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AssignRequest {
+
+  private String assignee;
+  private String issue;
+  private String me;
+
+  /**
+   * Login of the assignee. When not set, it will unassign the issue. Use '_me' to assign to current user
+   *
+   * Example value: "admin"
+   */
+  public AssignRequest setAssignee(String assignee) {
+    this.assignee = assignee;
+    return this;
+  }
+
+  public String getAssignee() {
+    return assignee;
+  }
+
+  /**
+   * Issue key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public AssignRequest setIssue(String issue) {
+    this.issue = issue;
+    return this;
+  }
+
+  public String getIssue() {
+    return issue;
+  }
+
+  /**
+   * (deprecated) Assign the issue to the logged-in user. Replaced by the parameter assignee=_me
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   * @deprecated since 5.2
+   */
+  @Deprecated
+  public AssignRequest setMe(String me) {
+    this.me = me;
+    return this;
+  }
+
+  public String getMe() {
+    return me;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AuthorsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/AuthorsRequest.java
new file mode 100644 (file)
index 0000000..8dc8cf3
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search SCM accounts which match a given query
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/authors">Further information about this action online (including a response example)</a>
+ * @since 5.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AuthorsRequest {
+
+  private String ps;
+  private String q;
+
+  /**
+   * The size of the list to return
+   *
+   * Example value: "25"
+   */
+  public AuthorsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * A pattern to match SCM accounts against
+   *
+   * Example value: "luke"
+   */
+  public AuthorsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/BulkChangeRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/BulkChangeRequest.java
new file mode 100644 (file)
index 0000000..3de9985
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Bulk change on issues.<br/>Requires authentication.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/bulk_change">Further information about this action online (including a response example)</a>
+ * @since 3.7
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class BulkChangeRequest {
+
+  private String addTags;
+  private String assign;
+  private String comment;
+  private String doTransition;
+  private List<String> issues;
+  private String plan;
+  private String removeTags;
+  private String sendNotifications;
+  private String setSeverity;
+  private String setType;
+
+  /**
+   * Add tags
+   *
+   * Example value: "security,java8"
+   */
+  public BulkChangeRequest setAddTags(String addTags) {
+    this.addTags = addTags;
+    return this;
+  }
+
+  public String getAddTags() {
+    return addTags;
+  }
+
+  /**
+   * To assign the list of issues to a specific user (login), or un-assign all the issues
+   *
+   * Example value: "john.smith"
+   */
+  public BulkChangeRequest setAssign(String assign) {
+    this.assign = assign;
+    return this;
+  }
+
+  public String getAssign() {
+    return assign;
+  }
+
+  /**
+   * To add a comment to a list of issues
+   *
+   * Example value: "Here is my comment"
+   */
+  public BulkChangeRequest setComment(String comment) {
+    this.comment = comment;
+    return this;
+  }
+
+  public String getComment() {
+    return comment;
+  }
+
+  /**
+   * Transition
+   *
+   * Example value: "reopen"
+   * Possible values:
+   * <ul>
+   *   <li>"confirm"</li>
+   *   <li>"unconfirm"</li>
+   *   <li>"reopen"</li>
+   *   <li>"resolve"</li>
+   *   <li>"falsepositive"</li>
+   *   <li>"wontfix"</li>
+   *   <li>"close"</li>
+   * </ul>
+   */
+  public BulkChangeRequest setDoTransition(String doTransition) {
+    this.doTransition = doTransition;
+    return this;
+  }
+
+  public String getDoTransition() {
+    return doTransition;
+  }
+
+  /**
+   * Comma-separated list of issue keys
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy,AU-TpxcA-iU5OvuD2FLz"
+   */
+  public BulkChangeRequest setIssues(List<String> issues) {
+    this.issues = issues;
+    return this;
+  }
+
+  public List<String> getIssues() {
+    return issues;
+  }
+
+  /**
+   * In 5.5, action plans are dropped. Has no effect. To plan the list of issues to a specific action plan (key), or unlink all the issues from an action plan
+   *
+   * @deprecated since 5.5
+   */
+  @Deprecated
+  public BulkChangeRequest setPlan(String plan) {
+    this.plan = plan;
+    return this;
+  }
+
+  public String getPlan() {
+    return plan;
+  }
+
+  /**
+   * Remove tags
+   *
+   * Example value: "security,java8"
+   */
+  public BulkChangeRequest setRemoveTags(String removeTags) {
+    this.removeTags = removeTags;
+    return this;
+  }
+
+  public String getRemoveTags() {
+    return removeTags;
+  }
+
+  /**
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public BulkChangeRequest setSendNotifications(String sendNotifications) {
+    this.sendNotifications = sendNotifications;
+    return this;
+  }
+
+  public String getSendNotifications() {
+    return sendNotifications;
+  }
+
+  /**
+   * To change the severity of the list of issues
+   *
+   * Example value: "BLOCKER"
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public BulkChangeRequest setSetSeverity(String setSeverity) {
+    this.setSeverity = setSeverity;
+    return this;
+  }
+
+  public String getSetSeverity() {
+    return setSeverity;
+  }
+
+  /**
+   * To change the type of the list of issues
+   *
+   * Example value: "BUG"
+   * Possible values:
+   * <ul>
+   *   <li>"CODE_SMELL"</li>
+   *   <li>"BUG"</li>
+   *   <li>"VULNERABILITY"</li>
+   * </ul>
+   */
+  public BulkChangeRequest setSetType(String setType) {
+    this.setType = setType;
+    return this;
+  }
+
+  public String getSetType() {
+    return setType;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/ChangelogRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/ChangelogRequest.java
new file mode 100644 (file)
index 0000000..530bbb7
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Display changelog of an issue.<br/>Requires the 'Browse' permission on the project of the specified issue.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/changelog">Further information about this action online (including a response example)</a>
+ * @since 4.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ChangelogRequest {
+
+  private String issue;
+
+  /**
+   * Issue key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public ChangelogRequest setIssue(String issue) {
+    this.issue = issue;
+    return this;
+  }
+
+  public String getIssue() {
+    return issue;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/ComponentTagsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/ComponentTagsRequest.java
new file mode 100644 (file)
index 0000000..64e3616
--- /dev/null
@@ -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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List tags for the issues under a given component (including issues on the descendants of the component)
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/component_tags">Further information about this action online (including a response example)</a>
+ * @since 5.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ComponentTagsRequest {
+
+  private String componentUuid;
+  private String createdAfter;
+  private String ps;
+
+  /**
+   * A component UUID
+   *
+   * This is a mandatory parameter.
+   * Example value: "7d8749e8-3070-4903-9188-bdd82933bb92"
+   */
+  public ComponentTagsRequest setComponentUuid(String componentUuid) {
+    this.componentUuid = componentUuid;
+    return this;
+  }
+
+  public String getComponentUuid() {
+    return componentUuid;
+  }
+
+  /**
+   * To retrieve tags on issues created after the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided.
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public ComponentTagsRequest setCreatedAfter(String createdAfter) {
+    this.createdAfter = createdAfter;
+    return this;
+  }
+
+  public String getCreatedAfter() {
+    return createdAfter;
+  }
+
+  /**
+   * The maximum size of the list to return
+   *
+   * Example value: "25"
+   */
+  public ComponentTagsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/DeleteCommentRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/DeleteCommentRequest.java
new file mode 100644 (file)
index 0000000..a598ccd
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/delete_comment">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteCommentRequest {
+
+  private String comment;
+
+  /**
+   * Comment key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public DeleteCommentRequest setComment(String comment) {
+    this.comment = comment;
+    return this;
+  }
+
+  public String getComment() {
+    return comment;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/DoTransitionRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/DoTransitionRequest.java
new file mode 100644 (file)
index 0000000..8b3c0e9
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Do workflow transition on an issue. Requires authentication and Browse permission on project.<br/>The transitions 'wontfix' and 'falsepositive' require the permission 'Administer Issues'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/do_transition">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DoTransitionRequest {
+
+  private String issue;
+  private String transition;
+
+  /**
+   * Issue key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public DoTransitionRequest setIssue(String issue) {
+    this.issue = issue;
+    return this;
+  }
+
+  public String getIssue() {
+    return issue;
+  }
+
+  /**
+   * Transition
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"confirm"</li>
+   *   <li>"unconfirm"</li>
+   *   <li>"reopen"</li>
+   *   <li>"resolve"</li>
+   *   <li>"falsepositive"</li>
+   *   <li>"wontfix"</li>
+   *   <li>"close"</li>
+   * </ul>
+   */
+  public DoTransitionRequest setTransition(String transition) {
+    this.transition = transition;
+    return this;
+  }
+
+  public String getTransition() {
+    return transition;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/EditCommentRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/EditCommentRequest.java
new file mode 100644 (file)
index 0000000..be7bdea
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Edit a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/edit_comment">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class EditCommentRequest {
+
+  private String comment;
+  private String text;
+
+  /**
+   * Comment key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public EditCommentRequest setComment(String comment) {
+    this.comment = comment;
+    return this;
+  }
+
+  public String getComment() {
+    return comment;
+  }
+
+  /**
+   * Comment text
+   *
+   * This is a mandatory parameter.
+   * Example value: "Won't fix because it doesn't apply to the context"
+   */
+  public EditCommentRequest setText(String text) {
+    this.text = text;
+    return this;
+  }
+
+  public String getText() {
+    return text;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/IssuesService.java
new file mode 100644 (file)
index 0000000..a8d72be
--- /dev/null
@@ -0,0 +1,322 @@
+/*
+ * 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.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.BulkChangeWsResponse;
+import org.sonarqube.ws.Issues.ChangelogWsResponse;
+import org.sonarqube.ws.Issues.SearchWsResponse;
+
+/**
+ * Read and update issues.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class IssuesService extends BaseService {
+
+  public IssuesService(WsConnector wsConnector) {
+    super(wsConnector, "api/issues");
+  }
+
+  /**
+   * Add a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/add_comment">Further information about this action online (including a response example)</a>
+   * @since 3.6
+   */
+  public String addComment(AddCommentRequest request) {
+    return call(
+      new PostRequest(path("add_comment"))
+        .setParam("issue", request.getIssue())
+        .setParam("text", request.getText())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Assign/Unassign an issue. Requires authentication and Browse permission on project
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/assign">Further information about this action online (including a response example)</a>
+   * @since 3.6
+   */
+  public String assign(AssignRequest request) {
+    return call(
+      new PostRequest(path("assign"))
+        .setParam("assignee", request.getAssignee())
+        .setParam("issue", request.getIssue())
+        .setParam("me", request.getMe())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search SCM accounts which match a given query
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/authors">Further information about this action online (including a response example)</a>
+   * @since 5.1
+   */
+  public String authors(AuthorsRequest request) {
+    return call(
+      new GetRequest(path("authors"))
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Bulk change on issues.<br/>Requires authentication.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/bulk_change">Further information about this action online (including a response example)</a>
+   * @since 3.7
+   */
+  public BulkChangeWsResponse bulkChange(BulkChangeRequest request) {
+    return call(
+      new PostRequest(path("bulk_change"))
+        .setParam("add_tags", request.getAddTags())
+        .setParam("assign", request.getAssign())
+        .setParam("comment", request.getComment())
+        .setParam("do_transition", request.getDoTransition())
+        .setParam("issues", request.getIssues() == null ? null : request.getIssues().stream().collect(Collectors.joining(",")))
+        .setParam("plan", request.getPlan())
+        .setParam("remove_tags", request.getRemoveTags())
+        .setParam("sendNotifications", request.getSendNotifications())
+        .setParam("set_severity", request.getSetSeverity())
+        .setParam("set_type", request.getSetType()),
+      BulkChangeWsResponse.parser());
+  }
+
+  /**
+   * Display changelog of an issue.<br/>Requires the 'Browse' permission on the project of the specified issue.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/changelog">Further information about this action online (including a response example)</a>
+   * @since 4.1
+   */
+  public ChangelogWsResponse changelog(ChangelogRequest request) {
+    return call(
+      new GetRequest(path("changelog"))
+        .setParam("issue", request.getIssue()),
+      ChangelogWsResponse.parser());
+  }
+
+  /**
+   * List tags for the issues under a given component (including issues on the descendants of the component)
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/component_tags">Further information about this action online (including a response example)</a>
+   * @since 5.1
+   */
+  public String componentTags(ComponentTagsRequest request) {
+    return call(
+      new GetRequest(path("component_tags"))
+        .setParam("componentUuid", request.getComponentUuid())
+        .setParam("createdAfter", request.getCreatedAfter())
+        .setParam("ps", request.getPs())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Delete a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/delete_comment">Further information about this action online (including a response example)</a>
+   * @since 3.6
+   */
+  public String deleteComment(DeleteCommentRequest request) {
+    return call(
+      new PostRequest(path("delete_comment"))
+        .setParam("comment", request.getComment())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Do workflow transition on an issue. Requires authentication and Browse permission on project.<br/>The transitions 'wontfix' and 'falsepositive' require the permission 'Administer Issues'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/do_transition">Further information about this action online (including a response example)</a>
+   * @since 3.6
+   */
+  public String doTransition(DoTransitionRequest request) {
+    return call(
+      new PostRequest(path("do_transition"))
+        .setParam("issue", request.getIssue())
+        .setParam("transition", request.getTransition())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Edit a comment.<br/>Requires authentication and the following permission: 'Browse' on the project of the specified issue.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/edit_comment">Further information about this action online (including a response example)</a>
+   * @since 3.6
+   */
+  public String editComment(EditCommentRequest request) {
+    return call(
+      new PostRequest(path("edit_comment"))
+        .setParam("comment", request.getComment())
+        .setParam("text", request.getText())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for issues.<br>At most one of the following parameters can be provided at the same time: componentKeys, componentUuids, components, componentRootUuids, componentRoots.<br>Requires the 'Browse' permission on the specified project(s).
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/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("additionalFields", request.getAdditionalFields() == null ? null : request.getAdditionalFields().stream().collect(Collectors.joining(",")))
+        .setParam("asc", request.getAsc())
+        .setParam("assigned", request.getAssigned())
+        .setParam("assignees", request.getAssignees() == null ? null : request.getAssignees().stream().collect(Collectors.joining(",")))
+        .setParam("authors", request.getAuthors() == null ? null : request.getAuthors().stream().collect(Collectors.joining(",")))
+        .setParam("branch", request.getBranch())
+        .setParam("componentKeys", request.getComponentKeys() == null ? null : request.getComponentKeys().stream().collect(Collectors.joining(",")))
+        .setParam("componentRootUuids", request.getComponentRootUuids())
+        .setParam("componentRoots", request.getComponentRoots())
+        .setParam("componentUuids", request.getComponentUuids() == null ? null : request.getComponentUuids().stream().collect(Collectors.joining(",")))
+        .setParam("components", request.getComponents())
+        .setParam("createdAfter", request.getCreatedAfter())
+        .setParam("createdAt", request.getCreatedAt())
+        .setParam("createdBefore", request.getCreatedBefore())
+        .setParam("createdInLast", request.getCreatedInLast())
+        .setParam("directories", request.getDirectories() == null ? null : request.getDirectories().stream().collect(Collectors.joining(",")))
+        .setParam("facetMode", request.getFacetMode())
+        .setParam("facets", request.getFacets() == null ? null : request.getFacets().stream().collect(Collectors.joining(",")))
+        .setParam("fileUuids", request.getFileUuids() == null ? null : request.getFileUuids().stream().collect(Collectors.joining(",")))
+        .setParam("issues", request.getIssues() == null ? null : request.getIssues().stream().collect(Collectors.joining(",")))
+        .setParam("languages", request.getLanguages() == null ? null : request.getLanguages().stream().collect(Collectors.joining(",")))
+        .setParam("moduleUuids", request.getModuleUuids() == null ? null : request.getModuleUuids().stream().collect(Collectors.joining(",")))
+        .setParam("onComponentOnly", request.getOnComponentOnly())
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("projectUuids", request.getProjectUuids() == null ? null : request.getProjectUuids().stream().collect(Collectors.joining(",")))
+        .setParam("projects", request.getProjects() == null ? null : request.getProjects().stream().collect(Collectors.joining(",")))
+        .setParam("ps", request.getPs())
+        .setParam("resolutions", request.getResolutions() == null ? null : request.getResolutions().stream().collect(Collectors.joining(",")))
+        .setParam("resolved", request.getResolved())
+        .setParam("rules", request.getRules() == null ? null : request.getRules().stream().collect(Collectors.joining(",")))
+        .setParam("s", request.getS())
+        .setParam("severities", request.getSeverities() == null ? null : request.getSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("sinceLeakPeriod", request.getSinceLeakPeriod())
+        .setParam("statuses", request.getStatuses() == null ? null : request.getStatuses().stream().collect(Collectors.joining(",")))
+        .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
+        .setParam("types", request.getTypes() == null ? null : request.getTypes().stream().collect(Collectors.joining(","))),
+      SearchWsResponse.parser());
+  }
+
+  /**
+   * Change severity.<br/>Requires the following permissions:<ul>  <li>'Authentication'</li>  <li>'Browse' rights on project of the specified issue</li>  <li>'Administer Issues' rights on project of the specified issue</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/set_severity">Further information about this action online (including a response example)</a>
+   * @since 3.6
+   */
+  public String setSeverity(SetSeverityRequest request) {
+    return call(
+      new PostRequest(path("set_severity"))
+        .setParam("issue", request.getIssue())
+        .setParam("severity", request.getSeverity())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Set tags on an issue. <br/>Requires authentication and Browse permission on project
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/set_tags">Further information about this action online (including a response example)</a>
+   * @since 5.1
+   */
+  public String setTags(SetTagsRequest request) {
+    return call(
+      new PostRequest(path("set_tags"))
+        .setParam("issue", request.getIssue())
+        .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Change type of issue, for instance from 'code smell' to 'bug'.<br/>Requires the following permissions:<ul>  <li>'Authentication'</li>  <li>'Browse' rights on project of the specified issue</li>  <li>'Administer Issues' rights on project of the specified issue</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/set_type">Further information about this action online (including a response example)</a>
+   * @since 5.5
+   */
+  public String setType(SetTypeRequest request) {
+    return call(
+      new PostRequest(path("set_type"))
+        .setParam("issue", request.getIssue())
+        .setParam("type", request.getType())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List tags matching a given query
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/tags">Further information about this action online (including a response example)</a>
+   * @since 5.1
+   */
+  public String tags(TagsRequest request) {
+    return call(
+      new GetRequest(path("tags"))
+        .setParam("organization", request.getOrganization())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SearchRequest.java
new file mode 100644 (file)
index 0000000..d795565
--- /dev/null
@@ -0,0 +1,705 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for issues.<br>At most one of the following parameters can be provided at the same time: componentKeys, componentUuids, components, componentRootUuids, componentRoots.<br>Requires the 'Browse' permission on the specified project(s).
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/search">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private List<String> additionalFields;
+  private String asc;
+  private String assigned;
+  private List<String> assignees;
+  private List<String> authors;
+  private String branch;
+  private List<String> componentKeys;
+  private String componentRootUuids;
+  private String componentRoots;
+  private List<String> componentUuids;
+  private String components;
+  private String createdAfter;
+  private String createdAt;
+  private String createdBefore;
+  private String createdInLast;
+  private List<String> directories;
+  private String facetMode;
+  private List<String> facets;
+  private List<String> fileUuids;
+  private List<String> issues;
+  private List<String> languages;
+  private List<String> moduleUuids;
+  private String onComponentOnly;
+  private String organization;
+  private String p;
+  private List<String> projectUuids;
+  private List<String> projects;
+  private String ps;
+  private List<String> resolutions;
+  private String resolved;
+  private List<String> rules;
+  private String s;
+  private List<String> severities;
+  private String sinceLeakPeriod;
+  private List<String> statuses;
+  private List<String> tags;
+  private List<String> types;
+
+  /**
+   * Comma-separated list of the optional fields to be returned in response. Action plans are dropped in 5.5, it is not returned in the response.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"_all"</li>
+   *   <li>"comments"</li>
+   *   <li>"languages"</li>
+   *   <li>"actionPlans"</li>
+   *   <li>"rules"</li>
+   *   <li>"transitions"</li>
+   *   <li>"actions"</li>
+   *   <li>"users"</li>
+   * </ul>
+   */
+  public SearchRequest setAdditionalFields(List<String> additionalFields) {
+    this.additionalFields = additionalFields;
+    return this;
+  }
+
+  public List<String> getAdditionalFields() {
+    return additionalFields;
+  }
+
+  /**
+   * Ascending sort
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setAsc(String asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  public String getAsc() {
+    return asc;
+  }
+
+  /**
+   * To retrieve assigned or unassigned issues
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setAssigned(String assigned) {
+    this.assigned = assigned;
+    return this;
+  }
+
+  public String getAssigned() {
+    return assigned;
+  }
+
+  /**
+   * Comma-separated list of assignee logins. The value '__me__' can be used as a placeholder for user who performs the request
+   *
+   * Example value: "admin,usera,__me__"
+   */
+  public SearchRequest setAssignees(List<String> assignees) {
+    this.assignees = assignees;
+    return this;
+  }
+
+  public List<String> getAssignees() {
+    return assignees;
+  }
+
+  /**
+   * Comma-separated list of SCM accounts
+   *
+   * Example value: "torvalds@linux-foundation.org"
+   */
+  public SearchRequest setAuthors(List<String> authors) {
+    this.authors = authors;
+    return this;
+  }
+
+  public List<String> getAuthors() {
+    return authors;
+  }
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public SearchRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Comma-separated list of component keys. Retrieve issues associated to a specific list of components (and all its descendants). A component can be a portfolio, project, module, directory or file.
+   *
+   * Example value: "my_project"
+   */
+  public SearchRequest setComponentKeys(List<String> componentKeys) {
+    this.componentKeys = componentKeys;
+    return this;
+  }
+
+  public List<String> getComponentKeys() {
+    return componentKeys;
+  }
+
+  /**
+   * If used, will have the same meaning as componentUuids AND onComponentOnly=false.
+   *
+   * @deprecated since 5.1
+   */
+  @Deprecated
+  public SearchRequest setComponentRootUuids(String componentRootUuids) {
+    this.componentRootUuids = componentRootUuids;
+    return this;
+  }
+
+  public String getComponentRootUuids() {
+    return componentRootUuids;
+  }
+
+  /**
+   * If used, will have the same meaning as componentKeys AND onComponentOnly=false.
+   *
+   * @deprecated since 5.1
+   */
+  @Deprecated
+  public SearchRequest setComponentRoots(String componentRoots) {
+    this.componentRoots = componentRoots;
+    return this;
+  }
+
+  public String getComponentRoots() {
+    return componentRoots;
+  }
+
+  /**
+   * To retrieve issues associated to a specific list of components their sub-components (comma-separated list of component IDs). This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. A component can be a project, module, directory or file.
+   *
+   * Example value: "584a89f2-8037-4f7b-b82c-8b45d2d63fb2"
+   * @deprecated since 6.5
+   */
+  @Deprecated
+  public SearchRequest setComponentUuids(List<String> componentUuids) {
+    this.componentUuids = componentUuids;
+    return this;
+  }
+
+  public List<String> getComponentUuids() {
+    return componentUuids;
+  }
+
+  /**
+   * If used, will have the same meaning as componentKeys AND onComponentOnly=true.
+   *
+   * @deprecated since 5.1
+   */
+  @Deprecated
+  public SearchRequest setComponents(String components) {
+    this.components = components;
+    return this;
+  }
+
+  public String getComponents() {
+    return components;
+  }
+
+  /**
+   * To retrieve issues created after the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided. <br>If this parameter is set, createdSince must not be set
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public SearchRequest setCreatedAfter(String createdAfter) {
+    this.createdAfter = createdAfter;
+    return this;
+  }
+
+  public String getCreatedAfter() {
+    return createdAfter;
+  }
+
+  /**
+   * Datetime to retrieve issues created during a specific analysis
+   *
+   * Example value: "2017-10-19T13:00:00+0200"
+   */
+  public SearchRequest setCreatedAt(String createdAt) {
+    this.createdAt = createdAt;
+    return this;
+  }
+
+  public String getCreatedAt() {
+    return createdAt;
+  }
+
+  /**
+   * To retrieve issues created before the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided.
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public SearchRequest setCreatedBefore(String createdBefore) {
+    this.createdBefore = createdBefore;
+    return this;
+  }
+
+  public String getCreatedBefore() {
+    return createdBefore;
+  }
+
+  /**
+   * To retrieve issues created during a time span before the current time (exclusive). Accepted units are 'y' for year, 'm' for month, 'w' for week and 'd' for day. If this parameter is set, createdAfter must not be set
+   *
+   * Example value: "1m2w (1 month 2 weeks)"
+   */
+  public SearchRequest setCreatedInLast(String createdInLast) {
+    this.createdInLast = createdInLast;
+    return this;
+  }
+
+  public String getCreatedInLast() {
+    return createdInLast;
+  }
+
+  /**
+   * To retrieve issues associated to a specific list of directories (comma-separated list of directory paths). This parameter is only meaningful when a module is selected. This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. 
+   *
+   * This is part of the internal API.
+   * Example value: "src/main/java/org/sonar/server/"
+   */
+  public SearchRequest setDirectories(List<String> directories) {
+    this.directories = directories;
+    return this;
+  }
+
+  public List<String> getDirectories() {
+    return directories;
+  }
+
+  /**
+   * Choose the returned value for facet items, either count of issues or sum of debt.<br/>Since 5.5, 'debt' mode is deprecated and replaced by 'effort'
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"count"</li>
+   *   <li>"effort"</li>
+   *   <li>"debt"</li>
+   * </ul>
+   */
+  public SearchRequest setFacetMode(String facetMode) {
+    this.facetMode = facetMode;
+    return this;
+  }
+
+  public String getFacetMode() {
+    return facetMode;
+  }
+
+  /**
+   * Comma-separated list of the facets to be computed. No facet is computed by default.<br/>Since 5.5, facet 'actionPlans' is deprecated.<br/>Since 5.5, facet 'reporters' is deprecated.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"severities"</li>
+   *   <li>"statuses"</li>
+   *   <li>"resolutions"</li>
+   *   <li>"actionPlans"</li>
+   *   <li>"projectUuids"</li>
+   *   <li>"rules"</li>
+   *   <li>"assignees"</li>
+   *   <li>"assigned_to_me"</li>
+   *   <li>"reporters"</li>
+   *   <li>"authors"</li>
+   *   <li>"moduleUuids"</li>
+   *   <li>"fileUuids"</li>
+   *   <li>"directories"</li>
+   *   <li>"languages"</li>
+   *   <li>"tags"</li>
+   *   <li>"types"</li>
+   *   <li>"createdAt"</li>
+   * </ul>
+   */
+  public SearchRequest setFacets(List<String> facets) {
+    this.facets = facets;
+    return this;
+  }
+
+  public List<String> getFacets() {
+    return facets;
+  }
+
+  /**
+   * To retrieve issues associated to a specific list of files (comma-separated list of file IDs). This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. 
+   *
+   * This is part of the internal API.
+   * Example value: "bdd82933-3070-4903-9188-7d8749e8bb92"
+   */
+  public SearchRequest setFileUuids(List<String> fileUuids) {
+    this.fileUuids = fileUuids;
+    return this;
+  }
+
+  public List<String> getFileUuids() {
+    return fileUuids;
+  }
+
+  /**
+   * Comma-separated list of issue keys
+   *
+   * Example value: "5bccd6e8-f525-43a2-8d76-fcb13dde79ef"
+   */
+  public SearchRequest setIssues(List<String> issues) {
+    this.issues = issues;
+    return this;
+  }
+
+  public List<String> getIssues() {
+    return issues;
+  }
+
+  /**
+   * Comma-separated list of languages. Available since 4.4
+   *
+   * Example value: "java,js"
+   */
+  public SearchRequest setLanguages(List<String> languages) {
+    this.languages = languages;
+    return this;
+  }
+
+  public List<String> getLanguages() {
+    return languages;
+  }
+
+  /**
+   * To retrieve issues associated to a specific list of modules (comma-separated list of module IDs). This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. 
+   *
+   * This is part of the internal API.
+   * Example value: "7d8749e8-3070-4903-9188-bdd82933bb92"
+   */
+  public SearchRequest setModuleUuids(List<String> moduleUuids) {
+    this.moduleUuids = moduleUuids;
+    return this;
+  }
+
+  public List<String> getModuleUuids() {
+    return moduleUuids;
+  }
+
+  /**
+   * Return only issues at a component's level, not on its descendants (modules, directories, files, etc). This parameter is only considered when componentKeys or componentUuids is set. Using the deprecated componentRoots or componentRootUuids parameters will set this parameter to false. Using the deprecated components parameter will set this parameter to true.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setOnComponentOnly(String onComponentOnly) {
+    this.onComponentOnly = onComponentOnly;
+    return this;
+  }
+
+  public String getOnComponentOnly() {
+    return onComponentOnly;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * To retrieve issues associated to a specific list of projects (comma-separated list of project IDs). This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. Portfolios are not supported. If this parameter is set, 'projects' must not be set.
+   *
+   * This is part of the internal API.
+   * Example value: "7d8749e8-3070-4903-9188-bdd82933bb92"
+   */
+  public SearchRequest setProjectUuids(List<String> projectUuids) {
+    this.projectUuids = projectUuids;
+    return this;
+  }
+
+  public List<String> getProjectUuids() {
+    return projectUuids;
+  }
+
+  /**
+   * To retrieve issues associated to a specific list of projects (comma-separated list of project keys). This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. If this parameter is set, projectUuids must not be set.
+   *
+   * This is part of the internal API.
+   * Example value: "my_project"
+   */
+  public SearchRequest setProjects(List<String> projects) {
+    this.projects = projects;
+    return this;
+  }
+
+  public List<String> getProjects() {
+    return projects;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Comma-separated list of resolutions
+   *
+   * Example value: "FIXED,REMOVED"
+   * Possible values:
+   * <ul>
+   *   <li>"FALSE-POSITIVE"</li>
+   *   <li>"WONTFIX"</li>
+   *   <li>"FIXED"</li>
+   *   <li>"REMOVED"</li>
+   * </ul>
+   */
+  public SearchRequest setResolutions(List<String> resolutions) {
+    this.resolutions = resolutions;
+    return this;
+  }
+
+  public List<String> getResolutions() {
+    return resolutions;
+  }
+
+  /**
+   * To match resolved or unresolved issues
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setResolved(String resolved) {
+    this.resolved = resolved;
+    return this;
+  }
+
+  public String getResolved() {
+    return resolved;
+  }
+
+  /**
+   * Comma-separated list of coding rule keys. Format is &lt;repository&gt;:&lt;rule&gt;
+   *
+   * Example value: "squid:AvoidCycles"
+   */
+  public SearchRequest setRules(List<String> rules) {
+    this.rules = rules;
+    return this;
+  }
+
+  public List<String> getRules() {
+    return rules;
+  }
+
+  /**
+   * Sort field
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"CREATION_DATE"</li>
+   *   <li>"UPDATE_DATE"</li>
+   *   <li>"CLOSE_DATE"</li>
+   *   <li>"ASSIGNEE"</li>
+   *   <li>"SEVERITY"</li>
+   *   <li>"STATUS"</li>
+   *   <li>"FILE_LINE"</li>
+   * </ul>
+   */
+  public SearchRequest setS(String s) {
+    this.s = s;
+    return this;
+  }
+
+  public String getS() {
+    return s;
+  }
+
+  /**
+   * Comma-separated list of severities
+   *
+   * Example value: "BLOCKER,CRITICAL"
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public SearchRequest setSeverities(List<String> severities) {
+    this.severities = severities;
+    return this;
+  }
+
+  public List<String> getSeverities() {
+    return severities;
+  }
+
+  /**
+   * To retrieve issues created since the leak period.<br>If this parameter is set to a truthy value, createdAfter must not be set and one component id or key must be provided.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setSinceLeakPeriod(String sinceLeakPeriod) {
+    this.sinceLeakPeriod = sinceLeakPeriod;
+    return this;
+  }
+
+  public String getSinceLeakPeriod() {
+    return sinceLeakPeriod;
+  }
+
+  /**
+   * Comma-separated list of statuses
+   *
+   * Example value: "OPEN,REOPENED"
+   * Possible values:
+   * <ul>
+   *   <li>"OPEN"</li>
+   *   <li>"CONFIRMED"</li>
+   *   <li>"REOPENED"</li>
+   *   <li>"RESOLVED"</li>
+   *   <li>"CLOSED"</li>
+   * </ul>
+   */
+  public SearchRequest setStatuses(List<String> statuses) {
+    this.statuses = statuses;
+    return this;
+  }
+
+  public List<String> getStatuses() {
+    return statuses;
+  }
+
+  /**
+   * Comma-separated list of tags.
+   *
+   * Example value: "security,convention"
+   */
+  public SearchRequest setTags(List<String> tags) {
+    this.tags = tags;
+    return this;
+  }
+
+  public List<String> getTags() {
+    return tags;
+  }
+
+  /**
+   * Comma-separated list of types.
+   *
+   * Example value: "CODE_SMELL,BUG"
+   * Possible values:
+   * <ul>
+   *   <li>"CODE_SMELL"</li>
+   *   <li>"BUG"</li>
+   *   <li>"VULNERABILITY"</li>
+   * </ul>
+   */
+  public SearchRequest setTypes(List<String> types) {
+    this.types = types;
+    return this;
+  }
+
+  public List<String> getTypes() {
+    return types;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetSeverityRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetSeverityRequest.java
new file mode 100644 (file)
index 0000000..4553d2d
--- /dev/null
@@ -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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Change severity.<br/>Requires the following permissions:<ul>  <li>'Authentication'</li>  <li>'Browse' rights on project of the specified issue</li>  <li>'Administer Issues' rights on project of the specified issue</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/set_severity">Further information about this action online (including a response example)</a>
+ * @since 3.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetSeverityRequest {
+
+  private String issue;
+  private String severity;
+
+  /**
+   * Issue key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public SetSeverityRequest setIssue(String issue) {
+    this.issue = issue;
+    return this;
+  }
+
+  public String getIssue() {
+    return issue;
+  }
+
+  /**
+   * New severity
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public SetSeverityRequest setSeverity(String severity) {
+    this.severity = severity;
+    return this;
+  }
+
+  public String getSeverity() {
+    return severity;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetTagsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetTagsRequest.java
new file mode 100644 (file)
index 0000000..83b7f42
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Set tags on an issue. <br/>Requires authentication and Browse permission on project
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/set_tags">Further information about this action online (including a response example)</a>
+ * @since 5.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetTagsRequest {
+
+  private String issue;
+  private List<String> tags;
+
+  /**
+   * Issue key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public SetTagsRequest setIssue(String issue) {
+    this.issue = issue;
+    return this;
+  }
+
+  public String getIssue() {
+    return issue;
+  }
+
+  /**
+   * Comma-separated list of tags. All tags are removed if parameter is empty or not set.
+   *
+   * Example value: "security,cwe,misra-c"
+   */
+  public SetTagsRequest setTags(List<String> tags) {
+    this.tags = tags;
+    return this;
+  }
+
+  public List<String> getTags() {
+    return tags;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetTypeRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/SetTypeRequest.java
new file mode 100644 (file)
index 0000000..3150770
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * 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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Change type of issue, for instance from 'code smell' to 'bug'.<br/>Requires the following permissions:<ul>  <li>'Authentication'</li>  <li>'Browse' rights on project of the specified issue</li>  <li>'Administer Issues' rights on project of the specified issue</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/set_type">Further information about this action online (including a response example)</a>
+ * @since 5.5
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetTypeRequest {
+
+  private String issue;
+  private String type;
+
+  /**
+   * Issue key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public SetTypeRequest setIssue(String issue) {
+    this.issue = issue;
+    return this;
+  }
+
+  public String getIssue() {
+    return issue;
+  }
+
+  /**
+   * New type
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"CODE_SMELL"</li>
+   *   <li>"BUG"</li>
+   *   <li>"VULNERABILITY"</li>
+   * </ul>
+   */
+  public SetTypeRequest setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getType() {
+    return type;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/TagsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/TagsRequest.java
new file mode 100644 (file)
index 0000000..76e999b
--- /dev/null
@@ -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.issues;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List tags matching a given query
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/issues/tags">Further information about this action online (including a response example)</a>
+ * @since 5.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class TagsRequest {
+
+  private String organization;
+  private String ps;
+  private String q;
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public TagsRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 100
+   *
+   * Example value: "20"
+   */
+  public TagsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to tags that contain the supplied string.
+   *
+   * Example value: "misra"
+   */
+  public TagsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/issues/package-info.java
new file mode 100644 (file)
index 0000000..54bcbbb
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.issues;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/IndexRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/IndexRequest.java
new file mode 100644 (file)
index 0000000..c03da91
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.l10n;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get all localization messages for a given locale
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/l10n/index">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class IndexRequest {
+
+  private String locale;
+  private String ts;
+
+  /**
+   * BCP47 language tag, used to override the browser Accept-Language header
+   *
+   * Example value: "fr-CH"
+   */
+  public IndexRequest setLocale(String locale) {
+    this.locale = locale;
+    return this;
+  }
+
+  public String getLocale() {
+    return locale;
+  }
+
+  /**
+   * Date of the last cache update.
+   *
+   * Example value: "2014-06-04T09:31:42+0000"
+   */
+  public IndexRequest setTs(String ts) {
+    this.ts = ts;
+    return this;
+  }
+
+  public String getTs() {
+    return ts;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/L10nService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/L10nService.java
new file mode 100644 (file)
index 0000000..175d757
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.l10n;
+
+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;
+
+/**
+ * Manage localization.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/l10n">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class L10nService extends BaseService {
+
+  public L10nService(WsConnector wsConnector) {
+    super(wsConnector, "api/l10n");
+  }
+
+  /**
+   * Get all localization messages for a given locale
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/l10n/index">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public String index(IndexRequest request) {
+    return call(
+      new GetRequest(path("index"))
+        .setParam("locale", request.getLocale())
+        .setParam("ts", request.getTs())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/l10n/package-info.java
new file mode 100644 (file)
index 0000000..ee4983d
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.l10n;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/LanguagesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/LanguagesService.java
new file mode 100644 (file)
index 0000000..4b137c8
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.languages;
+
+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;
+
+/**
+ * Get the list of programming languages supported in this instance.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/languages">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class LanguagesService extends BaseService {
+
+  public LanguagesService(WsConnector wsConnector) {
+    super(wsConnector, "api/languages");
+  }
+
+  /**
+   * List supported programming languages
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/languages/list">Further information about this action online (including a response example)</a>
+   * @since 5.1
+   */
+  public String list(ListRequest request) {
+    return call(
+      new GetRequest(path("list"))
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/ListRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/ListRequest.java
new file mode 100644 (file)
index 0000000..4c490cc
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.languages;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List supported programming languages
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/languages/list">Further information about this action online (including a response example)</a>
+ * @since 5.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ListRequest {
+
+  private String ps;
+  private String q;
+
+  /**
+   * The size of the list to return, 0 for all languages
+   *
+   * Example value: "25"
+   */
+  public ListRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * A pattern to match language keys/names against
+   *
+   * Example value: "java"
+   */
+  public ListRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/languages/package-info.java
new file mode 100644 (file)
index 0000000..8dafd59
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.languages;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/ComponentRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/ComponentRequest.java
new file mode 100644 (file)
index 0000000..0c008a3
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ * 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.measures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Return component with specified measures. The componentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the project of specified component.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures/component">Further information about this action online (including a response example)</a>
+ * @since 5.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ComponentRequest {
+
+  private List<String> additionalFields;
+  private String branch;
+  private String component;
+  private String componentId;
+  private String developerId;
+  private String developerKey;
+  private String metricKeys;
+
+  /**
+   * Comma-separated list of additional fields that can be returned in the response.
+   *
+   * Example value: "periods,metrics"
+   * Possible values:
+   * <ul>
+   *   <li>"metrics"</li>
+   *   <li>"periods"</li>
+   * </ul>
+   */
+  public ComponentRequest setAdditionalFields(List<String> additionalFields) {
+    this.additionalFields = additionalFields;
+    return this;
+  }
+
+  public List<String> getAdditionalFields() {
+    return additionalFields;
+  }
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ComponentRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key
+   *
+   * Example value: "my_project"
+   */
+  public ComponentRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Component id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public ComponentRequest setComponentId(String componentId) {
+    this.componentId = componentId;
+    return this;
+  }
+
+  public String getComponentId() {
+    return componentId;
+  }
+
+  /**
+   * Deprecated parameter, used previously with the Developer Cockpit plugin. No measures are returned if parameter is set.
+   *
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public ComponentRequest setDeveloperId(String developerId) {
+    this.developerId = developerId;
+    return this;
+  }
+
+  public String getDeveloperId() {
+    return developerId;
+  }
+
+  /**
+   * Deprecated parameter, used previously with the Developer Cockpit plugin. No measures are returned if parameter is set.
+   *
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public ComponentRequest setDeveloperKey(String developerKey) {
+    this.developerKey = developerKey;
+    return this;
+  }
+
+  public String getDeveloperKey() {
+    return developerKey;
+  }
+
+  /**
+   * Metric keys
+   *
+   * This is a mandatory parameter.
+   * Example value: "ncloc,complexity,violations"
+   */
+  public ComponentRequest setMetricKeys(String metricKeys) {
+    this.metricKeys = metricKeys;
+    return this;
+  }
+
+  public String getMetricKeys() {
+    return metricKeys;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/ComponentTreeRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/ComponentTreeRequest.java
new file mode 100644 (file)
index 0000000..32818d1
--- /dev/null
@@ -0,0 +1,335 @@
+/*
+ * 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.measures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Navigate through components based on the chosen strategy with specified measures. The baseComponentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the specified project.<br>When limiting search with the q parameter, directories are not returned.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures/component_tree">Further information about this action online (including a response example)</a>
+ * @since 5.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ComponentTreeRequest {
+
+  private List<String> additionalFields;
+  private String asc;
+  private String baseComponentId;
+  private String branch;
+  private String component;
+  private String developerId;
+  private String developerKey;
+  private String metricKeys;
+  private String metricPeriodSort;
+  private String metricSort;
+  private String metricSortFilter;
+  private String p;
+  private String ps;
+  private String q;
+  private List<String> qualifiers;
+  private List<String> s;
+  private String strategy;
+
+  /**
+   * Comma-separated list of additional fields that can be returned in the response.
+   *
+   * Example value: "periods,metrics"
+   * Possible values:
+   * <ul>
+   *   <li>"metrics"</li>
+   *   <li>"periods"</li>
+   * </ul>
+   */
+  public ComponentTreeRequest setAdditionalFields(List<String> additionalFields) {
+    this.additionalFields = additionalFields;
+    return this;
+  }
+
+  public List<String> getAdditionalFields() {
+    return additionalFields;
+  }
+
+  /**
+   * Ascending sort
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ComponentTreeRequest setAsc(String asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  public String getAsc() {
+    return asc;
+  }
+
+  /**
+   * Base component id. The search is based on this component.
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public ComponentTreeRequest setBaseComponentId(String baseComponentId) {
+    this.baseComponentId = baseComponentId;
+    return this;
+  }
+
+  public String getBaseComponentId() {
+    return baseComponentId;
+  }
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ComponentTreeRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key. The search is based on this component.
+   *
+   * Example value: "my_project"
+   */
+  public ComponentTreeRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Deprecated parameter, used previously with the Developer Cockpit plugin. No measures are returned if parameter is set.
+   *
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public ComponentTreeRequest setDeveloperId(String developerId) {
+    this.developerId = developerId;
+    return this;
+  }
+
+  public String getDeveloperId() {
+    return developerId;
+  }
+
+  /**
+   * Deprecated parameter, used previously with the Developer Cockpit plugin. No measures are returned if parameter is set.
+   *
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public ComponentTreeRequest setDeveloperKey(String developerKey) {
+    this.developerKey = developerKey;
+    return this;
+  }
+
+  public String getDeveloperKey() {
+    return developerKey;
+  }
+
+  /**
+   * Metric keys. Types DISTRIB, DATA are not allowed
+   *
+   * This is a mandatory parameter.
+   * Example value: "ncloc,complexity,violations"
+   */
+  public ComponentTreeRequest setMetricKeys(String metricKeys) {
+    this.metricKeys = metricKeys;
+    return this;
+  }
+
+  public String getMetricKeys() {
+    return metricKeys;
+  }
+
+  /**
+   * Sort measures by leak period or not ?. The 's' parameter must contain the 'metricPeriod' value.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"1"</li>
+   * </ul>
+   */
+  public ComponentTreeRequest setMetricPeriodSort(String metricPeriodSort) {
+    this.metricPeriodSort = metricPeriodSort;
+    return this;
+  }
+
+  public String getMetricPeriodSort() {
+    return metricPeriodSort;
+  }
+
+  /**
+   * Metric key to sort by. The 's' parameter must contain the 'metric' or 'metricPeriod' value. It must be part of the 'metricKeys' parameter
+   *
+   * Example value: "ncloc"
+   */
+  public ComponentTreeRequest setMetricSort(String metricSort) {
+    this.metricSort = metricSort;
+    return this;
+  }
+
+  public String getMetricSort() {
+    return metricSort;
+  }
+
+  /**
+   * Filter components. Sort must be on a metric. Possible values are: <ul><li>all: return all components</li><li>withMeasuresOnly: filter out components that do not have a measure on the sorted metric</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"all"</li>
+   *   <li>"withMeasuresOnly"</li>
+   * </ul>
+   */
+  public ComponentTreeRequest setMetricSortFilter(String metricSortFilter) {
+    this.metricSortFilter = metricSortFilter;
+    return this;
+  }
+
+  public String getMetricSortFilter() {
+    return metricSortFilter;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public ComponentTreeRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public ComponentTreeRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that are exactly the same as the supplied string</li></ul>
+   *
+   * Example value: "FILE_NAM"
+   */
+  public ComponentTreeRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Comma-separated list of component qualifiers. Filter the results with the specified qualifiers. Possible values are:<ul><li>BRC - Sub-projects</li><li>DIR - Directories</li><li>FIL - Files</li><li>TRK - Projects</li><li>UTS - Test Files</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"BRC"</li>
+   *   <li>"DIR"</li>
+   *   <li>"FIL"</li>
+   *   <li>"TRK"</li>
+   *   <li>"UTS"</li>
+   * </ul>
+   */
+  public ComponentTreeRequest setQualifiers(List<String> qualifiers) {
+    this.qualifiers = qualifiers;
+    return this;
+  }
+
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  /**
+   * Comma-separated list of sort fields
+   *
+   * Example value: "name,path"
+   * Possible values:
+   * <ul>
+   *   <li>"metric"</li>
+   *   <li>"metricPeriod"</li>
+   *   <li>"name"</li>
+   *   <li>"path"</li>
+   *   <li>"qualifier"</li>
+   * </ul>
+   */
+  public ComponentTreeRequest setS(List<String> s) {
+    this.s = s;
+    return this;
+  }
+
+  public List<String> getS() {
+    return s;
+  }
+
+  /**
+   * Strategy to search for base component descendants:<ul><li>children: return the children components of the base component. Grandchildren components are not returned</li><li>all: return all the descendants components of the base component. Grandchildren are returned.</li><li>leaves: return all the descendant components (files, in general) which don't have other children. They are the leaves of the component tree.</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"all"</li>
+   *   <li>"children"</li>
+   *   <li>"leaves"</li>
+   * </ul>
+   */
+  public ComponentTreeRequest setStrategy(String strategy) {
+    this.strategy = strategy;
+    return this;
+  }
+
+  public String getStrategy() {
+    return strategy;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/MeasuresService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/MeasuresService.java
new file mode 100644 (file)
index 0000000..bae8d11
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * 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.measures;
+
+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.Measures.ComponentWsResponse;
+import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
+import org.sonarqube.ws.Measures.SearchWsResponse;
+import org.sonarqube.ws.Measures.SearchHistoryResponse;
+
+/**
+ * Get components or children with specified measures.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class MeasuresService extends BaseService {
+
+  public MeasuresService(WsConnector wsConnector) {
+    super(wsConnector, "api/measures");
+  }
+
+  /**
+   * Return component with specified measures. The componentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the project of specified component.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures/component">Further information about this action online (including a response example)</a>
+   * @since 5.4
+   */
+  public ComponentWsResponse component(ComponentRequest request) {
+    return call(
+      new GetRequest(path("component"))
+        .setParam("additionalFields", request.getAdditionalFields() == null ? null : request.getAdditionalFields().stream().collect(Collectors.joining(",")))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("componentId", request.getComponentId())
+        .setParam("developerId", request.getDeveloperId())
+        .setParam("developerKey", request.getDeveloperKey())
+        .setParam("metricKeys", request.getMetricKeys()),
+      ComponentWsResponse.parser());
+  }
+
+  /**
+   * Navigate through components based on the chosen strategy with specified measures. The baseComponentId or the component parameter must be provided.<br>Requires the following permission: 'Browse' on the specified project.<br>When limiting search with the q parameter, directories are not returned.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures/component_tree">Further information about this action online (including a response example)</a>
+   * @since 5.4
+   */
+  public ComponentTreeWsResponse componentTree(ComponentTreeRequest request) {
+    return call(
+      new GetRequest(path("component_tree"))
+        .setParam("additionalFields", request.getAdditionalFields() == null ? null : request.getAdditionalFields().stream().collect(Collectors.joining(",")))
+        .setParam("asc", request.getAsc())
+        .setParam("baseComponentId", request.getBaseComponentId())
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("developerId", request.getDeveloperId())
+        .setParam("developerKey", request.getDeveloperKey())
+        .setParam("metricKeys", request.getMetricKeys())
+        .setParam("metricPeriodSort", request.getMetricPeriodSort())
+        .setParam("metricSort", request.getMetricSort())
+        .setParam("metricSortFilter", request.getMetricSortFilter())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(",")))
+        .setParam("s", request.getS() == null ? null : request.getS().stream().collect(Collectors.joining(",")))
+        .setParam("strategy", request.getStrategy()),
+      ComponentTreeWsResponse.parser());
+  }
+
+  /**
+   * Search for project measures ordered by project names.<br>At most 100 projects can be provided.<br>Returns the projects with the 'Browse' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures/search">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public SearchWsResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("metricKeys", request.getMetricKeys())
+        .setParam("projectKeys", request.getProjectKeys() == null ? null : request.getProjectKeys().stream().collect(Collectors.joining(","))),
+      SearchWsResponse.parser());
+  }
+
+  /**
+   * Search measures history of a component.<br>Measures are ordered chronologically.<br>Pagination applies to the number of measures for each metric.<br>Requires the following permission: 'Browse' on the specified component
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures/search_history">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public SearchHistoryResponse searchHistory(SearchHistoryRequest request) {
+    return call(
+      new GetRequest(path("search_history"))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("from", request.getFrom())
+        .setParam("metrics", request.getMetrics() == null ? null : request.getMetrics().stream().collect(Collectors.joining(",")))
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("to", request.getTo()),
+      SearchHistoryResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/SearchHistoryRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/SearchHistoryRequest.java
new file mode 100644 (file)
index 0000000..5b468e8
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * 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.measures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search measures history of a component.<br>Measures are ordered chronologically.<br>Pagination applies to the number of measures for each metric.<br>Requires the following permission: 'Browse' on the specified component
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures/search_history">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchHistoryRequest {
+
+  private String branch;
+  private String component;
+  private String from;
+  private List<String> metrics;
+  private String p;
+  private String ps;
+  private String to;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public SearchHistoryRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public SearchHistoryRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Filter measures created after the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public SearchHistoryRequest setFrom(String from) {
+    this.from = from;
+    return this;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  /**
+   * Comma-separated list of metric keys
+   *
+   * This is a mandatory parameter.
+   * Example value: "ncloc,coverage,new_violations"
+   */
+  public SearchHistoryRequest setMetrics(List<String> metrics) {
+    this.metrics = metrics;
+    return this;
+  }
+
+  public List<String> getMetrics() {
+    return metrics;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchHistoryRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 1000
+   *
+   * Example value: "20"
+   */
+  public SearchHistoryRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Filter measures created before the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public SearchHistoryRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/SearchRequest.java
new file mode 100644 (file)
index 0000000..5d74b2d
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.measures;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for project measures ordered by project names.<br>At most 100 projects can be provided.<br>Returns the projects with the 'Browse' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/measures/search">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String metricKeys;
+  private List<String> projectKeys;
+
+  /**
+   * Metric keys
+   *
+   * This is a mandatory parameter.
+   * Example value: "ncloc,complexity,violations"
+   */
+  public SearchRequest setMetricKeys(String metricKeys) {
+    this.metricKeys = metricKeys;
+    return this;
+  }
+
+  public String getMetricKeys() {
+    return metricKeys;
+  }
+
+  /**
+   * Comma-separated list of project, view or sub-view keys
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project,another_project"
+   */
+  public SearchRequest setProjectKeys(List<String> projectKeys) {
+    this.projectKeys = projectKeys;
+    return this;
+  }
+
+  public List<String> getProjectKeys() {
+    return projectKeys;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/measures/package-info.java
new file mode 100644 (file)
index 0000000..9f1f8db
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.measures;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/CreateRequest.java
new file mode 100644 (file)
index 0000000..bdcb9ae
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * 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.metrics;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create custom metric.<br /> Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/create">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String description;
+  private String domain;
+  private String key;
+  private String name;
+  private String type;
+
+  /**
+   * Description
+   *
+   * Example value: "Size of the team"
+   */
+  public CreateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Domain
+   *
+   * Example value: "Tests"
+   */
+  public CreateRequest setDomain(String domain) {
+    this.domain = domain;
+    return this;
+  }
+
+  public String getDomain() {
+    return domain;
+  }
+
+  /**
+   * Key
+   *
+   * This is a mandatory parameter.
+   * Example value: "team_size"
+   */
+  public CreateRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Team Size"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Metric type key
+   *
+   * This is a mandatory parameter.
+   * Example value: "INT"
+   * Possible values:
+   * <ul>
+   *   <li>"INT"</li>
+   *   <li>"FLOAT"</li>
+   *   <li>"PERCENT"</li>
+   *   <li>"BOOL"</li>
+   *   <li>"STRING"</li>
+   *   <li>"MILLISEC"</li>
+   *   <li>"DATA"</li>
+   *   <li>"LEVEL"</li>
+   *   <li>"DISTRIB"</li>
+   *   <li>"RATING"</li>
+   *   <li>"WORK_DUR"</li>
+   * </ul>
+   */
+  public CreateRequest setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getType() {
+    return type;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/DeleteRequest.java
new file mode 100644 (file)
index 0000000..360f8e0
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.metrics;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete metrics and associated measures. Delete only custom metrics.<br />Ids or keys must be provided. <br />Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/delete">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String ids;
+  private String keys;
+
+  /**
+   * Metrics ids to delete.
+   *
+   * Example value: "5, 23, 42"
+   */
+  public DeleteRequest setIds(String ids) {
+    this.ids = ids;
+    return this;
+  }
+
+  public String getIds() {
+    return ids;
+  }
+
+  /**
+   * Metrics keys to delete
+   *
+   * Example value: "team_size, business_value"
+   */
+  public DeleteRequest setKeys(String keys) {
+    this.keys = keys;
+    return this;
+  }
+
+  public String getKeys() {
+    return keys;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/MetricsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/MetricsService.java
new file mode 100644 (file)
index 0000000..abbce25
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * 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.metrics;
+
+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;
+
+/**
+ * Get information on automatic metrics, and manage custom metrics. See also api/custom_measures.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class MetricsService extends BaseService {
+
+  public MetricsService(WsConnector wsConnector) {
+    super(wsConnector, "api/metrics");
+  }
+
+  /**
+   * Create custom metric.<br /> Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/create">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void create(CreateRequest request) {
+    call(
+      new PostRequest(path("create"))
+        .setParam("description", request.getDescription())
+        .setParam("domain", request.getDomain())
+        .setParam("key", request.getKey())
+        .setParam("name", request.getName())
+        .setParam("type", request.getType())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Delete metrics and associated measures. Delete only custom metrics.<br />Ids or keys must be provided. <br />Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/delete">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("ids", request.getIds())
+        .setParam("keys", request.getKeys())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List all custom metric domains.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/domains">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String domains() {
+    return call(
+      new GetRequest(path("domains"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for metrics
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/search">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
+        .setParam("isCustom", request.getIsCustom())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List all available metric types.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/types">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String types() {
+    return call(
+      new GetRequest(path("types"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Update a custom metric.<br /> Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/update">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void update(UpdateRequest request) {
+    call(
+      new PostRequest(path("update"))
+        .setParam("description", request.getDescription())
+        .setParam("domain", request.getDomain())
+        .setParam("id", request.getId())
+        .setParam("key", request.getKey())
+        .setParam("name", request.getName())
+        .setParam("type", request.getType())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/SearchRequest.java
new file mode 100644 (file)
index 0000000..9ef6d5a
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * 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.metrics;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for metrics
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/search">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private List<String> f;
+  private String isCustom;
+  private String p;
+  private String ps;
+
+  /**
+   * Comma-separated list of the fields to be returned in response. All the fields are returned by default.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"name"</li>
+   *   <li>"description"</li>
+   *   <li>"domain"</li>
+   *   <li>"direction"</li>
+   *   <li>"qualitative"</li>
+   *   <li>"hidden"</li>
+   *   <li>"custom"</li>
+   *   <li>"decimalScale"</li>
+   * </ul>
+   */
+  public SearchRequest setF(List<String> f) {
+    this.f = f;
+    return this;
+  }
+
+  public List<String> getF() {
+    return f;
+  }
+
+  /**
+   * Choose custom metrics following 3 cases:<ul><li>true: only custom metrics are returned</li><li>false: only non custom metrics are returned</li><li>not specified: all metrics are returned</li></ul>
+   *
+   * Example value: "true"
+   */
+  public SearchRequest setIsCustom(String isCustom) {
+    this.isCustom = isCustom;
+    return this;
+  }
+
+  public String getIsCustom() {
+    return isCustom;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/UpdateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/UpdateRequest.java
new file mode 100644 (file)
index 0000000..e532667
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * 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.metrics;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update a custom metric.<br /> Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/metrics/update">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateRequest {
+
+  private String description;
+  private String domain;
+  private String id;
+  private String key;
+  private String name;
+  private String type;
+
+  /**
+   * Description
+   *
+   * Example value: "Size of the team"
+   */
+  public UpdateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Domain
+   *
+   * Example value: "Tests"
+   */
+  public UpdateRequest setDomain(String domain) {
+    this.domain = domain;
+    return this;
+  }
+
+  public String getDomain() {
+    return domain;
+  }
+
+  /**
+   * Id of the custom metric to update
+   *
+   * This is a mandatory parameter.
+   * Example value: "42"
+   */
+  public UpdateRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * Key
+   *
+   * Example value: "team_size"
+   */
+  public UpdateRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Name
+   *
+   */
+  public UpdateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Metric type key
+   *
+   * Example value: "INT"
+   * Possible values:
+   * <ul>
+   *   <li>"INT"</li>
+   *   <li>"FLOAT"</li>
+   *   <li>"PERCENT"</li>
+   *   <li>"BOOL"</li>
+   *   <li>"STRING"</li>
+   *   <li>"MILLISEC"</li>
+   *   <li>"DATA"</li>
+   *   <li>"LEVEL"</li>
+   *   <li>"DISTRIB"</li>
+   *   <li>"RATING"</li>
+   *   <li>"WORK_DUR"</li>
+   * </ul>
+   */
+  public UpdateRequest setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getType() {
+    return type;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/metrics/package-info.java
new file mode 100644 (file)
index 0000000..fc02603
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.metrics;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/ComponentRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/ComponentRequest.java
new file mode 100644 (file)
index 0000000..81f4d90
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.navigation;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get information concerning component navigation for the current user. Requires the 'Browse' permission on the component's project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/navigation/component">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ComponentRequest {
+
+  private String branch;
+  private String component;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ComponentRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * A component key.
+   *
+   * Example value: "my_project"
+   */
+  public ComponentRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/NavigationService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/NavigationService.java
new file mode 100644 (file)
index 0000000..dab4f8b
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * 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.navigation;
+
+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;
+
+/**
+ * Get information required to build navigation UI components
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/navigation">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class NavigationService extends BaseService {
+
+  public NavigationService(WsConnector wsConnector) {
+    super(wsConnector, "api/navigation");
+  }
+
+  /**
+   * Get information concerning component navigation for the current user. Requires the 'Browse' permission on the component's project.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/navigation/component">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String component(ComponentRequest request) {
+    return call(
+      new GetRequest(path("component"))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get information concerning global navigation for the current user.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/navigation/global">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String global() {
+    return call(
+      new GetRequest(path("global"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get information concerning organization navigation for the current user
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/navigation/organization">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public String organization(OrganizationRequest request) {
+    return call(
+      new GetRequest(path("organization"))
+        .setParam("organization", request.getOrganization())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get configuration information for the settings page:<ul>  <li>List plugin-contributed pages</li>  <li>Show update center (or not)</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/navigation/settings">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String settings() {
+    return call(
+      new GetRequest(path("settings"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/OrganizationRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/OrganizationRequest.java
new file mode 100644 (file)
index 0000000..9479a10
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.navigation;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get information concerning organization navigation for the current user
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/navigation/organization">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class OrganizationRequest {
+
+  private String organization;
+
+  /**
+   * the organization key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my-org"
+   */
+  public OrganizationRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/navigation/package-info.java
new file mode 100644 (file)
index 0000000..c64db1d
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.navigation;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/AddRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/AddRequest.java
new file mode 100644 (file)
index 0000000..559a713
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * 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.notifications;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a notification for the authenticated user.<br>Requires one of the following permissions:<ul> <li>Authentication if no login is provided. If a project is provided, requires the 'Browse' permission on the specified project.</li> <li>System administration if a login is provided. If a project is provided, requires the 'Browse' permission on the specified project.</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/notifications/add">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddRequest {
+
+  private String channel;
+  private String login;
+  private String project;
+  private String type;
+
+  /**
+   * Channel through which the notification is sent. For example, notifications can be sent by email.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"EmailNotificationChannel"</li>
+   * </ul>
+   */
+  public AddRequest setChannel(String channel) {
+    this.channel = channel;
+    return this;
+  }
+
+  public String getChannel() {
+    return channel;
+  }
+
+  /**
+   * User login
+   *
+   */
+  public AddRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public AddRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Notification type. Possible values are for:<ul>  <li>Global notifications: CeReportTaskFailure, ChangesOnMyIssue, NewAlerts, NewFalsePositiveIssue, NewIssues, SQ-MyNewIssues</li>  <li>Per project notifications: CeReportTaskFailure, ChangesOnMyIssue, NewAlerts, NewFalsePositiveIssue, NewIssues, SQ-MyNewIssues</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Example value: "SQ-MyNewIssues"
+   */
+  public AddRequest setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getType() {
+    return type;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/ListRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/ListRequest.java
new file mode 100644 (file)
index 0000000..4210649
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * 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.notifications;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List notifications of the authenticated user.<br>Requires one of the following permissions:<ul>  <li>Authentication if no login is provided</li>  <li>System administration if a login is provided</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/notifications/list">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ListRequest {
+
+  private String login;
+
+  /**
+   * User login
+   *
+   */
+  public ListRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/NotificationsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/NotificationsService.java
new file mode 100644 (file)
index 0000000..6448223
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * 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.notifications;
+
+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.Notifications.ListResponse;
+
+/**
+ * Manage notifications of the authenticated user
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/notifications">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class NotificationsService extends BaseService {
+
+  public NotificationsService(WsConnector wsConnector) {
+    super(wsConnector, "api/notifications");
+  }
+
+  /**
+   * Add a notification for the authenticated user.<br>Requires one of the following permissions:<ul> <li>Authentication if no login is provided. If a project is provided, requires the 'Browse' permission on the specified project.</li> <li>System administration if a login is provided. If a project is provided, requires the 'Browse' permission on the specified project.</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/notifications/add">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public void add(AddRequest request) {
+    call(
+      new PostRequest(path("add"))
+        .setParam("channel", request.getChannel())
+        .setParam("login", request.getLogin())
+        .setParam("project", request.getProject())
+        .setParam("type", request.getType())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List notifications of the authenticated user.<br>Requires one of the following permissions:<ul>  <li>Authentication if no login is provided</li>  <li>System administration if a login is provided</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/notifications/list">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public ListResponse list(ListRequest request) {
+    return call(
+      new GetRequest(path("list"))
+        .setParam("login", request.getLogin()),
+      ListResponse.parser());
+  }
+
+  /**
+   * Remove a notification for the authenticated user.<br>Requires one of the following permissions:<ul>  <li>Authentication if no login is provided</li>  <li>System administration if a login is provided</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/notifications/remove">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public void remove(RemoveRequest request) {
+    call(
+      new PostRequest(path("remove"))
+        .setParam("channel", request.getChannel())
+        .setParam("login", request.getLogin())
+        .setParam("project", request.getProject())
+        .setParam("type", request.getType())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/RemoveRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/RemoveRequest.java
new file mode 100644 (file)
index 0000000..9454a1a
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * 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.notifications;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a notification for the authenticated user.<br>Requires one of the following permissions:<ul>  <li>Authentication if no login is provided</li>  <li>System administration if a login is provided</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/notifications/remove">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveRequest {
+
+  private String channel;
+  private String login;
+  private String project;
+  private String type;
+
+  /**
+   * Channel through which the notification is sent. For example, notifications can be sent by email.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"EmailNotificationChannel"</li>
+   * </ul>
+   */
+  public RemoveRequest setChannel(String channel) {
+    this.channel = channel;
+    return this;
+  }
+
+  public String getChannel() {
+    return channel;
+  }
+
+  /**
+   * User login
+   *
+   */
+  public RemoveRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public RemoveRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Notification type. Possible values are for:<ul>  <li>Global notifications: CeReportTaskFailure, ChangesOnMyIssue, NewAlerts, NewFalsePositiveIssue, NewIssues, SQ-MyNewIssues</li>  <li>Per project notifications: CeReportTaskFailure, ChangesOnMyIssue, NewAlerts, NewFalsePositiveIssue, NewIssues, SQ-MyNewIssues</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Example value: "SQ-MyNewIssues"
+   */
+  public RemoveRequest setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getType() {
+    return type;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/notifications/package-info.java
new file mode 100644 (file)
index 0000000..5123440
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.notifications;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/orchestrator/OrchestratorService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/orchestrator/OrchestratorService.java
new file mode 100644 (file)
index 0000000..1b3ab00
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * 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.orchestrator;
+
+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;
+
+/**
+ * Orchestrator web service
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/orchestrator">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class OrchestratorService extends BaseService {
+
+  public OrchestratorService(WsConnector wsConnector) {
+    super(wsConnector, "api/orchestrator");
+  }
+
+  /**
+   * Reset data
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/orchestrator/reset">Further information about this action online (including a response example)</a>
+   * @since Orchestrator 3.4
+   */
+  public void reset() {
+    call(
+      new PostRequest(path("reset"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/orchestrator/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/orchestrator/package-info.java
new file mode 100644 (file)
index 0000000..304ce77
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.orchestrator;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/AddMemberRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/AddMemberRequest.java
new file mode 100644 (file)
index 0000000..9ee8c8d
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.organizations;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a user as a member of an organization.<br>Requires 'Administer System' permission on the specified organization.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/add_member">Further information about this action online (including a response example)</a>
+ * @since 6.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddMemberRequest {
+
+  private String login;
+  private String organization;
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "ray.bradbury"
+   */
+  public AddMemberRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my-org"
+   */
+  public AddMemberRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/CreateRequest.java
new file mode 100644 (file)
index 0000000..ae52745
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * 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.organizations;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create an organization.<br />Requires 'Administer System' permission unless any logged in user is allowed to create an organization (see appropriate setting). Organization support must be enabled.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/create">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String avatar;
+  private String description;
+  private String key;
+  private String name;
+  private String url;
+
+  /**
+   * URL of the organization avatar.<br/> It must be less than 256 chars long.
+   *
+   * Example value: "https://www.foo.com/foo.png"
+   */
+  public CreateRequest setAvatar(String avatar) {
+    this.avatar = avatar;
+    return this;
+  }
+
+  public String getAvatar() {
+    return avatar;
+  }
+
+  /**
+   * Description of the organization.<br/> It must be less than 256 chars long.
+   *
+   * Example value: "The Foo company produces quality software for Bar."
+   */
+  public CreateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Key of the organization. <br />The key is unique to the whole SonarQube. <br/>When not specified, the key is computed from the name. <br />Otherwise, it must be between 2 and 32 chars long. All chars must be lower-case letters (a to z), digits or dash (but dash can neither be trailing nor heading)
+   *
+   * Example value: "foo-company"
+   */
+  public CreateRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Name of the organization. <br />It must be between 2 and 64 chars longs.
+   *
+   * This is a mandatory parameter.
+   * Example value: "Foo Company"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * URL of the organization.<br/> It must be less than 256 chars long.
+   *
+   * Example value: "https://www.foo.com"
+   */
+  public CreateRequest setUrl(String url) {
+    this.url = url;
+    return this;
+  }
+
+  public String getUrl() {
+    return url;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/DeleteRequest.java
new file mode 100644 (file)
index 0000000..9361c11
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.organizations;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete an organization.<br/>Require 'Administer System' permission on the specified organization. Organization support must be enabled.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/delete">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String organization;
+
+  /**
+   * Organization key
+   *
+   * This is a mandatory parameter.
+   * Example value: "foo-company"
+   */
+  public DeleteRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/OrganizationsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/OrganizationsService.java
new file mode 100644 (file)
index 0000000..9e3c8e8
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * 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.organizations;
+
+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.Organizations.AddMemberWsResponse;
+import org.sonarqube.ws.Organizations.CreateWsResponse;
+import org.sonarqube.ws.Organizations.SearchWsResponse;
+import org.sonarqube.ws.Organizations.SearchMembersWsResponse;
+import org.sonarqube.ws.Organizations.UpdateWsResponse;
+
+/**
+ * Manage organizations.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class OrganizationsService extends BaseService {
+
+  public OrganizationsService(WsConnector wsConnector) {
+    super(wsConnector, "api/organizations");
+  }
+
+  /**
+   * Add a user as a member of an organization.<br>Requires 'Administer System' permission on the specified organization.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/add_member">Further information about this action online (including a response example)</a>
+   * @since 6.4
+   */
+  public AddMemberWsResponse addMember(AddMemberRequest request) {
+    return call(
+      new PostRequest(path("add_member"))
+        .setParam("login", request.getLogin())
+        .setParam("organization", request.getOrganization()),
+      AddMemberWsResponse.parser());
+  }
+
+  /**
+   * Create an organization.<br />Requires 'Administer System' permission unless any logged in user is allowed to create an organization (see appropriate setting). Organization support must be enabled.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/create">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public CreateWsResponse create(CreateRequest request) {
+    return call(
+      new PostRequest(path("create"))
+        .setParam("avatar", request.getAvatar())
+        .setParam("description", request.getDescription())
+        .setParam("key", request.getKey())
+        .setParam("name", request.getName())
+        .setParam("url", request.getUrl()),
+      CreateWsResponse.parser());
+  }
+
+  /**
+   * Delete an organization.<br/>Require 'Administer System' permission on the specified organization. Organization support must be enabled.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/delete">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("organization", request.getOrganization())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Enable support of organizations.<br />'Administer System' permission is required. The logged-in user will be flagged as root and will be able to manage organizations and other root users.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/enable_support">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public void enableSupport() {
+    call(
+      new PostRequest(path("enable_support"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove a member from an organization.<br>Requires 'Administer System' permission on the specified organization.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/remove_member">Further information about this action online (including a response example)</a>
+   * @since 6.4
+   */
+  public void removeMember(RemoveMemberRequest request) {
+    call(
+      new PostRequest(path("remove_member"))
+        .setParam("login", request.getLogin())
+        .setParam("organization", request.getOrganization())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for organizations
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/search">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public SearchWsResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("organizations", request.getOrganizations() == null ? null : request.getOrganizations().stream().collect(Collectors.joining(",")))
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs()),
+      SearchWsResponse.parser());
+  }
+
+  /**
+   * Search members of an organization
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/search_members">Further information about this action online (including a response example)</a>
+   * @since 6.4
+   */
+  public SearchMembersWsResponse searchMembers(SearchMembersRequest request) {
+    return call(
+      new GetRequest(path("search_members"))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("selected", request.getSelected()),
+      SearchMembersWsResponse.parser());
+  }
+
+  /**
+   * List keys of the organizations for which the currently authenticated user has the System Administer permission for.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/search_my_organizations">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public String searchMyOrganizations() {
+    return call(
+      new GetRequest(path("search_my_organizations"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Update an organization.<br/>Require 'Administer System' permission. Organization support must be enabled.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/update">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public void update(UpdateRequest request) {
+    call(
+      new PostRequest(path("update"))
+        .setParam("avatar", request.getAvatar())
+        .setParam("description", request.getDescription())
+        .setParam("key", request.getKey())
+        .setParam("name", request.getName())
+        .setParam("url", request.getUrl()),
+      UpdateWsResponse.parser());
+  }
+
+  /**
+   * Update the default visibility for new projects of the specified organization.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/update_project_visibility">Further information about this action online (including a response example)</a>
+   * @since 6.4
+   */
+  public void updateProjectVisibility(UpdateProjectVisibilityRequest request) {
+    call(
+      new PostRequest(path("update_project_visibility"))
+        .setParam("organization", request.getOrganization())
+        .setParam("projectVisibility", request.getProjectVisibility())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/RemoveMemberRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/RemoveMemberRequest.java
new file mode 100644 (file)
index 0000000..f067f94
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.organizations;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a member from an organization.<br>Requires 'Administer System' permission on the specified organization.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/remove_member">Further information about this action online (including a response example)</a>
+ * @since 6.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveMemberRequest {
+
+  private String login;
+  private String organization;
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "ray.bradbury"
+   */
+  public RemoveMemberRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my-org"
+   */
+  public RemoveMemberRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/SearchMembersRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/SearchMembersRequest.java
new file mode 100644 (file)
index 0000000..8969f51
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * 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.organizations;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search members of an organization
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/search_members">Further information about this action online (including a response example)</a>
+ * @since 6.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchMembersRequest {
+
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+  private String selected;
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   */
+  public SearchMembersRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchMembersRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchMembersRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to names or logins that contain the supplied string.
+   *
+   * Example value: "orwe"
+   */
+  public SearchMembersRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Depending on the value, show only selected items (selected=selected) or deselected items (selected=deselected).
+   *
+   * This is part of the internal API.
+   * Possible values:
+   * <ul>
+   *   <li>"selected"</li>
+   *   <li>"deselected"</li>
+   * </ul>
+   */
+  public SearchMembersRequest setSelected(String selected) {
+    this.selected = selected;
+    return this;
+  }
+
+  public String getSelected() {
+    return selected;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/SearchRequest.java
new file mode 100644 (file)
index 0000000..9ad02a2
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * 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.organizations;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for organizations
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/search">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private List<String> organizations;
+  private String p;
+  private String ps;
+
+  /**
+   * Comma-separated list of organization keys
+   *
+   * Example value: "my-org-1,foocorp"
+   */
+  public SearchRequest setOrganizations(List<String> organizations) {
+    this.organizations = organizations;
+    return this;
+  }
+
+  public List<String> getOrganizations() {
+    return organizations;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0.
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/UpdateProjectVisibilityRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/UpdateProjectVisibilityRequest.java
new file mode 100644 (file)
index 0000000..7062eca
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * 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.organizations;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update the default visibility for new projects of the specified organization.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/update_project_visibility">Further information about this action online (including a response example)</a>
+ * @since 6.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateProjectVisibilityRequest {
+
+  private String organization;
+  private String projectVisibility;
+
+  /**
+   * Organization key
+   *
+   * This is a mandatory parameter.
+   * Example value: "foo-company"
+   */
+  public UpdateProjectVisibilityRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Default visibility for projects
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"private"</li>
+   *   <li>"public"</li>
+   * </ul>
+   */
+  public UpdateProjectVisibilityRequest setProjectVisibility(String projectVisibility) {
+    this.projectVisibility = projectVisibility;
+    return this;
+  }
+
+  public String getProjectVisibility() {
+    return projectVisibility;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/UpdateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/UpdateRequest.java
new file mode 100644 (file)
index 0000000..9f956aa
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * 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.organizations;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update an organization.<br/>Require 'Administer System' permission. Organization support must be enabled.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/organizations/update">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateRequest {
+
+  private String avatar;
+  private String description;
+  private String key;
+  private String name;
+  private String url;
+
+  /**
+   * URL of the organization avatar.<br/> It must be less than 256 chars long.
+   *
+   * Example value: "https://www.foo.com/foo.png"
+   */
+  public UpdateRequest setAvatar(String avatar) {
+    this.avatar = avatar;
+    return this;
+  }
+
+  public String getAvatar() {
+    return avatar;
+  }
+
+  /**
+   * Description of the organization.<br/> It must be less than 256 chars long.
+   *
+   * Example value: "The Foo company produces quality software for Bar."
+   */
+  public UpdateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is a mandatory parameter.
+   * Example value: "foo-company"
+   */
+  public UpdateRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Name of the organization. <br />It must be between 2 and 64 chars longs.
+   *
+   * Example value: "Foo Company"
+   */
+  public UpdateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * URL of the organization.<br/> It must be less than 256 chars long.
+   *
+   * Example value: "https://www.foo.com"
+   */
+  public UpdateRequest setUrl(String url) {
+    this.url = url;
+    return this;
+  }
+
+  public String getUrl() {
+    return url;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/organizations/package-info.java
new file mode 100644 (file)
index 0000000..73e9af0
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.organizations;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddGroupRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddGroupRequest.java
new file mode 100644 (file)
index 0000000..7c38e86
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add permission to a group.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> The group name or group id must be provided. <br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_group">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddGroupRequest {
+
+  private String groupId;
+  private String groupName;
+  private String organization;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * Group id
+   *
+   * Example value: "42"
+   */
+  public AddGroupRequest setGroupId(String groupId) {
+    this.groupId = groupId;
+    return this;
+  }
+
+  public String getGroupId() {
+    return groupId;
+  }
+
+  /**
+   * Group name or 'anyone' (case insensitive)
+   *
+   * Example value: "sonar-administrators"
+   */
+  public AddGroupRequest setGroupName(String groupName) {
+    this.groupName = groupName;
+    return this;
+  }
+
+  public String getGroupName() {
+    return groupName;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddGroupRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for global permissions: admin, profileadmin, gateadmin, scan, provisioning</li><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   */
+  public AddGroupRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public AddGroupRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public AddGroupRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddGroupToTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddGroupToTemplateRequest.java
new file mode 100644 (file)
index 0000000..900d2d1
--- /dev/null
@@ -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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a group to a permission template.<br /> The group id or group name must be provided. <br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_group_to_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddGroupToTemplateRequest {
+
+  private String groupId;
+  private String groupName;
+  private String organization;
+  private String permission;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Group id
+   *
+   * Example value: "42"
+   */
+  public AddGroupToTemplateRequest setGroupId(String groupId) {
+    this.groupId = groupId;
+    return this;
+  }
+
+  public String getGroupId() {
+    return groupId;
+  }
+
+  /**
+   * Group name or 'anyone' (case insensitive)
+   *
+   * Example value: "sonar-administrators"
+   */
+  public AddGroupToTemplateRequest setGroupName(String groupName) {
+    this.groupName = groupName;
+    return this;
+  }
+
+  public String getGroupName() {
+    return groupName;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddGroupToTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"admin"</li>
+   *   <li>"codeviewer"</li>
+   *   <li>"issueadmin"</li>
+   *   <li>"scan"</li>
+   *   <li>"user"</li>
+   * </ul>
+   */
+  public AddGroupToTemplateRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public AddGroupToTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public AddGroupToTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddProjectCreatorToTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddProjectCreatorToTemplateRequest.java
new file mode 100644 (file)
index 0000000..5bb4446
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a project creator to a permission template.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_project_creator_to_template">Further information about this action online (including a response example)</a>
+ * @since 6.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddProjectCreatorToTemplateRequest {
+
+  private String organization;
+  private String permission;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddProjectCreatorToTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"admin"</li>
+   *   <li>"codeviewer"</li>
+   *   <li>"issueadmin"</li>
+   *   <li>"scan"</li>
+   *   <li>"user"</li>
+   * </ul>
+   */
+  public AddProjectCreatorToTemplateRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public AddProjectCreatorToTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public AddProjectCreatorToTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddUserRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddUserRequest.java
new file mode 100644 (file)
index 0000000..231e96d
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add permission to a user.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_user">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddUserRequest {
+
+  private String login;
+  private String organization;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "g.hopper"
+   */
+  public AddUserRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Key of organization, cannot be used at the same time with projectId and projectKey
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddUserRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for global permissions: admin, profileadmin, gateadmin, scan, provisioning</li><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   */
+  public AddUserRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public AddUserRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public AddUserRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddUserToTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/AddUserToTemplateRequest.java
new file mode 100644 (file)
index 0000000..9f458d5
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a user to a permission template.<br /> Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_user_to_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddUserToTemplateRequest {
+
+  private String login;
+  private String organization;
+  private String permission;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "g.hopper"
+   */
+  public AddUserToTemplateRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddUserToTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"admin"</li>
+   *   <li>"codeviewer"</li>
+   *   <li>"issueadmin"</li>
+   *   <li>"scan"</li>
+   *   <li>"user"</li>
+   * </ul>
+   */
+  public AddUserToTemplateRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public AddUserToTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public AddUserToTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/ApplyTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/ApplyTemplateRequest.java
new file mode 100644 (file)
index 0000000..2989836
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Apply a permission template to one project.<br>The project id or project key must be provided.<br>The template id or name must be provided.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/apply_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ApplyTemplateRequest {
+
+  private String organization;
+  private String projectId;
+  private String projectKey;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public ApplyTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public ApplyTemplateRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public ApplyTemplateRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public ApplyTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public ApplyTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/BulkApplyTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/BulkApplyTemplateRequest.java
new file mode 100644 (file)
index 0000000..6579fcb
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Apply a permission template to several projects.<br />The template id or name must be provided.<br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/bulk_apply_template">Further information about this action online (including a response example)</a>
+ * @since 5.5
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class BulkApplyTemplateRequest {
+
+  private String analyzedBefore;
+  private String onProvisionedOnly;
+  private String organization;
+  private List<String> projects;
+  private String q;
+  private List<String> qualifiers;
+  private String templateId;
+  private String templateName;
+  private String visibility;
+
+  /**
+   * Filter the projects for which last analysis is older than the given date (exclusive).<br> Either a date (server timezone) or datetime can be provided.
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public BulkApplyTemplateRequest setAnalyzedBefore(String analyzedBefore) {
+    this.analyzedBefore = analyzedBefore;
+    return this;
+  }
+
+  public String getAnalyzedBefore() {
+    return analyzedBefore;
+  }
+
+  /**
+   * Filter the projects that are provisioned
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public BulkApplyTemplateRequest setOnProvisionedOnly(String onProvisionedOnly) {
+    this.onProvisionedOnly = onProvisionedOnly;
+    return this;
+  }
+
+  public String getOnProvisionedOnly() {
+    return onProvisionedOnly;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public BulkApplyTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Comma-separated list of project keys
+   *
+   * Example value: "my_project,another_project"
+   */
+  public BulkApplyTemplateRequest setProjects(List<String> projects) {
+    this.projects = projects;
+    return this;
+  }
+
+  public List<String> getProjects() {
+    return projects;
+  }
+
+  /**
+   * Limit search to: <ul><li>project names that contain the supplied string</li><li>project keys that are exactly the same as the supplied string</li></ul>
+   *
+   * Example value: "apac"
+   */
+  public BulkApplyTemplateRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Comma-separated list of component qualifiers. Filter the results with the specified qualifiers. Possible values are:<ul><li>TRK - Projects</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"TRK"</li>
+   * </ul>
+   */
+  public BulkApplyTemplateRequest setQualifiers(List<String> qualifiers) {
+    this.qualifiers = qualifiers;
+    return this;
+  }
+
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public BulkApplyTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public BulkApplyTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+
+  /**
+   * Filter the projects that should be visible to everyone (public), or only specific user/groups (private).<br/>If no visibility is specified, the default project visibility of the organization will be used.
+   *
+   * This is part of the internal API.
+   * Possible values:
+   * <ul>
+   *   <li>"private"</li>
+   *   <li>"public"</li>
+   * </ul>
+   */
+  public BulkApplyTemplateRequest setVisibility(String visibility) {
+    this.visibility = visibility;
+    return this;
+  }
+
+  public String getVisibility() {
+    return visibility;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/CreateTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/CreateTemplateRequest.java
new file mode 100644 (file)
index 0000000..09c714c
--- /dev/null
@@ -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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a permission template.<br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/create_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateTemplateRequest {
+
+  private String description;
+  private String name;
+  private String organization;
+  private String projectKeyPattern;
+
+  /**
+   * Description
+   *
+   * Example value: "Permissions for all projects related to the financial service"
+   */
+  public CreateTemplateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Financial Service Permissions"
+   */
+  public CreateTemplateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public CreateTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Project key pattern. Must be a valid Java regular expression
+   *
+   * Example value: ".*\\.finance\\..*"
+   */
+  public CreateTemplateRequest setProjectKeyPattern(String projectKeyPattern) {
+    this.projectKeyPattern = projectKeyPattern;
+    return this;
+  }
+
+  public String getProjectKeyPattern() {
+    return projectKeyPattern;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/DeleteTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/DeleteTemplateRequest.java
new file mode 100644 (file)
index 0000000..e50d616
--- /dev/null
@@ -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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a permission template.<br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/delete_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteTemplateRequest {
+
+  private String organization;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public DeleteTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public DeleteTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public DeleteTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/GroupsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/GroupsRequest.java
new file mode 100644 (file)
index 0000000..777a656
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Lists the groups with their permissions.<br>This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br> This service defaults to all groups, but can be limited to groups with a specific permission by providing the desired permission.<br>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/groups">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class GroupsRequest {
+
+  private String organization;
+  private String p;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+  private String ps;
+  private String q;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * 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;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public GroupsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for global permissions: admin, profileadmin, gateadmin, scan, provisioning</li><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   */
+  public GroupsRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public GroupsRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public GroupsRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 100
+   *
+   * Example value: "20"
+   */
+  public GroupsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to group names that contain the supplied string. When this parameter is not set, only groups having at least one permission are returned.
+   *
+   * Example value: "sonar"
+   */
+  public GroupsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/PermissionsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/PermissionsService.java
new file mode 100644 (file)
index 0000000..b5dda37
--- /dev/null
@@ -0,0 +1,507 @@
+/*
+ * 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.permissions;
+
+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.Permissions.CreateTemplateWsResponse;
+import org.sonarqube.ws.Permissions.WsGroupsResponse;
+import org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse;
+import org.sonarqube.ws.Permissions.SearchProjectPermissionsWsResponse;
+import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse;
+import org.sonarqube.ws.Permissions.WsTemplateGroupsResponse;
+import org.sonarqube.ws.Permissions.UpdateTemplateWsResponse;
+import org.sonarqube.ws.Permissions.UsersWsResponse;
+
+/**
+ * Manage permission templates, and the granting and revoking of permissions at the global and project levels.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class PermissionsService extends BaseService {
+
+  public PermissionsService(WsConnector wsConnector) {
+    super(wsConnector, "api/permissions");
+  }
+
+  /**
+   * Add permission to a group.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> The group name or group id must be provided. <br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_group">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void addGroup(AddGroupRequest request) {
+    call(
+      new PostRequest(path("add_group"))
+        .setParam("groupId", request.getGroupId())
+        .setParam("groupName", request.getGroupName())
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Add a group to a permission template.<br /> The group id or group name must be provided. <br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_group_to_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void addGroupToTemplate(AddGroupToTemplateRequest request) {
+    call(
+      new PostRequest(path("add_group_to_template"))
+        .setParam("groupId", request.getGroupId())
+        .setParam("groupName", request.getGroupName())
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Add a project creator to a permission template.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_project_creator_to_template">Further information about this action online (including a response example)</a>
+   * @since 6.0
+   */
+  public void addProjectCreatorToTemplate(AddProjectCreatorToTemplateRequest request) {
+    call(
+      new PostRequest(path("add_project_creator_to_template"))
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Add permission to a user.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_user">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void addUser(AddUserRequest request) {
+    call(
+      new PostRequest(path("add_user"))
+        .setParam("login", request.getLogin())
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Add a user to a permission template.<br /> Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/add_user_to_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void addUserToTemplate(AddUserToTemplateRequest request) {
+    call(
+      new PostRequest(path("add_user_to_template"))
+        .setParam("login", request.getLogin())
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Apply a permission template to one project.<br>The project id or project key must be provided.<br>The template id or name must be provided.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/apply_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void applyTemplate(ApplyTemplateRequest request) {
+    call(
+      new PostRequest(path("apply_template"))
+        .setParam("organization", request.getOrganization())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Apply a permission template to several projects.<br />The template id or name must be provided.<br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/bulk_apply_template">Further information about this action online (including a response example)</a>
+   * @since 5.5
+   */
+  public void bulkApplyTemplate(BulkApplyTemplateRequest request) {
+    call(
+      new PostRequest(path("bulk_apply_template"))
+        .setParam("analyzedBefore", request.getAnalyzedBefore())
+        .setParam("onProvisionedOnly", request.getOnProvisionedOnly())
+        .setParam("organization", request.getOrganization())
+        .setParam("projects", request.getProjects() == null ? null : request.getProjects().stream().collect(Collectors.joining(",")))
+        .setParam("q", request.getQ())
+        .setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(",")))
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setParam("visibility", request.getVisibility())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Create a permission template.<br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/create_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public CreateTemplateWsResponse createTemplate(CreateTemplateRequest request) {
+    return call(
+      new PostRequest(path("create_template"))
+        .setParam("description", request.getDescription())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization())
+        .setParam("projectKeyPattern", request.getProjectKeyPattern()),
+      CreateTemplateWsResponse.parser());
+  }
+
+  /**
+   * Delete a permission template.<br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/delete_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void deleteTemplate(DeleteTemplateRequest request) {
+    call(
+      new PostRequest(path("delete_template"))
+        .setParam("organization", request.getOrganization())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Lists the groups with their permissions.<br>This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br> This service defaults to all groups, but can be limited to groups with a specific permission by providing the desired permission.<br>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/groups">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public WsGroupsResponse groups(GroupsRequest request) {
+    return call(
+      new GetRequest(path("groups"))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("permission", request.getPermission())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ()),
+      WsGroupsResponse.parser());
+  }
+
+  /**
+   * Remove a permission from a group.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> The group id or group name must be provided, not both.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_group">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void removeGroup(RemoveGroupRequest request) {
+    call(
+      new PostRequest(path("remove_group"))
+        .setParam("groupId", request.getGroupId())
+        .setParam("groupName", request.getGroupName())
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove a group from a permission template.<br /> The group id or group name must be provided. <br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_group_from_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void removeGroupFromTemplate(RemoveGroupFromTemplateRequest request) {
+    call(
+      new PostRequest(path("remove_group_from_template"))
+        .setParam("groupId", request.getGroupId())
+        .setParam("groupName", request.getGroupName())
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove a project creator from a permission template.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_project_creator_from_template">Further information about this action online (including a response example)</a>
+   * @since 6.0
+   */
+  public void removeProjectCreatorFromTemplate(RemoveProjectCreatorFromTemplateRequest request) {
+    call(
+      new PostRequest(path("remove_project_creator_from_template"))
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove permission from a user.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_user">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void removeUser(RemoveUserRequest request) {
+    call(
+      new PostRequest(path("remove_user"))
+        .setParam("login", request.getLogin())
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove a user from a permission template.<br /> Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_user_from_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void removeUserFromTemplate(RemoveUserFromTemplateRequest request) {
+    call(
+      new PostRequest(path("remove_user_from_template"))
+        .setParam("login", request.getLogin())
+        .setParam("organization", request.getOrganization())
+        .setParam("permission", request.getPermission())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List global permissions. <br />Requires the following permission: 'Administer System'
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/search_global_permissions">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   * @deprecated since 6.5
+   */
+  @Deprecated
+  public WsSearchGlobalPermissionsResponse searchGlobalPermissions(SearchGlobalPermissionsRequest request) {
+    return call(
+      new GetRequest(path("search_global_permissions"))
+        .setParam("organization", request.getOrganization()),
+      WsSearchGlobalPermissionsResponse.parser());
+  }
+
+  /**
+   * List project permissions. A project can be a technical project, a view or a developer.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/search_project_permissions">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   * @deprecated since 6.5
+   */
+  @Deprecated
+  public SearchProjectPermissionsWsResponse searchProjectPermissions(SearchProjectPermissionsRequest request) {
+    return call(
+      new GetRequest(path("search_project_permissions"))
+        .setParam("p", request.getP())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("qualifier", request.getQualifier()),
+      SearchProjectPermissionsWsResponse.parser());
+  }
+
+  /**
+   * List permission templates.<br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/search_templates">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public SearchTemplatesWsResponse searchTemplates(SearchTemplatesRequest request) {
+    return call(
+      new GetRequest(path("search_templates"))
+        .setParam("organization", request.getOrganization())
+        .setParam("q", request.getQ()),
+      SearchTemplatesWsResponse.parser());
+  }
+
+  /**
+   * Set a permission template as default.<br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/set_default_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void setDefaultTemplate(SetDefaultTemplateRequest request) {
+    call(
+      new PostRequest(path("set_default_template"))
+        .setParam("organization", request.getOrganization())
+        .setParam("qualifier", request.getQualifier())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Lists the groups with their permission as individual groups rather than through user affiliation on the chosen template.<br />This service defaults to all groups, but can be limited to groups with a specific permission by providing the desired permission.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/template_groups">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public WsTemplateGroupsResponse templateGroups(TemplateGroupsRequest request) {
+    return call(
+      new GetRequest(path("template_groups"))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("permission", request.getPermission())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName()),
+      WsTemplateGroupsResponse.parser());
+  }
+
+  /**
+   * Lists the users with their permission as individual users rather than through group affiliation on the chosen template. <br />This service defaults to all users, but can be limited to users with a specific permission by providing the desired permission.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/template_users">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String templateUsers(TemplateUsersRequest request) {
+    return call(
+      new GetRequest(path("template_users"))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("permission", request.getPermission())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("templateId", request.getTemplateId())
+        .setParam("templateName", request.getTemplateName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Update a permission template.<br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/update_template">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public UpdateTemplateWsResponse updateTemplate(UpdateTemplateRequest request) {
+    return call(
+      new PostRequest(path("update_template"))
+        .setParam("description", request.getDescription())
+        .setParam("id", request.getId())
+        .setParam("name", request.getName())
+        .setParam("projectKeyPattern", request.getProjectKeyPattern()),
+      UpdateTemplateWsResponse.parser());
+  }
+
+  /**
+   * Lists the users with their permissions as individual users rather than through group affiliation.<br>This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br> This service defaults to all users, but can be limited to users with a specific permission by providing the desired permission.<br>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/users">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public UsersWsResponse users(UsersRequest request) {
+    return call(
+      new GetRequest(path("users"))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("permission", request.getPermission())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ()),
+      UsersWsResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveGroupFromTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveGroupFromTemplateRequest.java
new file mode 100644 (file)
index 0000000..69bf713
--- /dev/null
@@ -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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a group from a permission template.<br /> The group id or group name must be provided. <br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_group_from_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveGroupFromTemplateRequest {
+
+  private String groupId;
+  private String groupName;
+  private String organization;
+  private String permission;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Group id
+   *
+   * Example value: "42"
+   */
+  public RemoveGroupFromTemplateRequest setGroupId(String groupId) {
+    this.groupId = groupId;
+    return this;
+  }
+
+  public String getGroupId() {
+    return groupId;
+  }
+
+  /**
+   * Group name or 'anyone' (case insensitive)
+   *
+   * Example value: "sonar-administrators"
+   */
+  public RemoveGroupFromTemplateRequest setGroupName(String groupName) {
+    this.groupName = groupName;
+    return this;
+  }
+
+  public String getGroupName() {
+    return groupName;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveGroupFromTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"admin"</li>
+   *   <li>"codeviewer"</li>
+   *   <li>"issueadmin"</li>
+   *   <li>"scan"</li>
+   *   <li>"user"</li>
+   * </ul>
+   */
+  public RemoveGroupFromTemplateRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public RemoveGroupFromTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public RemoveGroupFromTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveGroupRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveGroupRequest.java
new file mode 100644 (file)
index 0000000..6bd141b
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a permission from a group.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> The group id or group name must be provided, not both.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_group">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveGroupRequest {
+
+  private String groupId;
+  private String groupName;
+  private String organization;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * Group id
+   *
+   * Example value: "42"
+   */
+  public RemoveGroupRequest setGroupId(String groupId) {
+    this.groupId = groupId;
+    return this;
+  }
+
+  public String getGroupId() {
+    return groupId;
+  }
+
+  /**
+   * Group name or 'anyone' (case insensitive)
+   *
+   * Example value: "sonar-administrators"
+   */
+  public RemoveGroupRequest setGroupName(String groupName) {
+    this.groupName = groupName;
+    return this;
+  }
+
+  public String getGroupName() {
+    return groupName;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveGroupRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for global permissions: admin, profileadmin, gateadmin, scan, provisioning</li><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   */
+  public RemoveGroupRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public RemoveGroupRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public RemoveGroupRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveProjectCreatorFromTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveProjectCreatorFromTemplateRequest.java
new file mode 100644 (file)
index 0000000..b7670c1
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a project creator from a permission template.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_project_creator_from_template">Further information about this action online (including a response example)</a>
+ * @since 6.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveProjectCreatorFromTemplateRequest {
+
+  private String organization;
+  private String permission;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveProjectCreatorFromTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"admin"</li>
+   *   <li>"codeviewer"</li>
+   *   <li>"issueadmin"</li>
+   *   <li>"scan"</li>
+   *   <li>"user"</li>
+   * </ul>
+   */
+  public RemoveProjectCreatorFromTemplateRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public RemoveProjectCreatorFromTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public RemoveProjectCreatorFromTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveUserFromTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveUserFromTemplateRequest.java
new file mode 100644 (file)
index 0000000..125e3fc
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a user from a permission template.<br /> Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_user_from_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveUserFromTemplateRequest {
+
+  private String login;
+  private String organization;
+  private String permission;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "g.hopper"
+   */
+  public RemoveUserFromTemplateRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveUserFromTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"admin"</li>
+   *   <li>"codeviewer"</li>
+   *   <li>"issueadmin"</li>
+   *   <li>"scan"</li>
+   *   <li>"user"</li>
+   * </ul>
+   */
+  public RemoveUserFromTemplateRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public RemoveUserFromTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public RemoveUserFromTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveUserRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/RemoveUserRequest.java
new file mode 100644 (file)
index 0000000..c96968a
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove permission from a user.<br /> This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br /> Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/remove_user">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveUserRequest {
+
+  private String login;
+  private String organization;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "g.hopper"
+   */
+  public RemoveUserRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveUserRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for global permissions: admin, profileadmin, gateadmin, scan, provisioning</li><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   */
+  public RemoveUserRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public RemoveUserRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public RemoveUserRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchGlobalPermissionsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchGlobalPermissionsRequest.java
new file mode 100644 (file)
index 0000000..984e7eb
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List global permissions. <br />Requires the following permission: 'Administer System'
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/search_global_permissions">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchGlobalPermissionsRequest {
+
+  private String organization;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchGlobalPermissionsRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchProjectPermissionsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchProjectPermissionsRequest.java
new file mode 100644 (file)
index 0000000..8681ac8
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List project permissions. A project can be a technical project, a view or a developer.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/search_project_permissions">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchProjectPermissionsRequest {
+
+  private String p;
+  private String projectId;
+  private String projectKey;
+  private String ps;
+  private String q;
+  private String qualifier;
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchProjectPermissionsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public SearchProjectPermissionsRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public SearchProjectPermissionsRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  /**
+   * Page size. Must be greater than 0.
+   *
+   * Example value: "20"
+   */
+  public SearchProjectPermissionsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to: <ul><li>project names that contain the supplied string</li><li>project keys that are exactly the same as the supplied string</li></ul>
+   *
+   * Example value: "apac"
+   */
+  public SearchProjectPermissionsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Project qualifier. Filter the results with the specified qualifier. Possible values are:<ul><li>TRK - Projects</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"TRK"</li>
+   * </ul>
+   */
+  public SearchProjectPermissionsRequest setQualifier(String qualifier) {
+    this.qualifier = qualifier;
+    return this;
+  }
+
+  public String getQualifier() {
+    return qualifier;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchTemplatesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SearchTemplatesRequest.java
new file mode 100644 (file)
index 0000000..ddfaa9a
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List permission templates.<br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/search_templates">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchTemplatesRequest {
+
+  private String organization;
+  private String q;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchTemplatesRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Limit search to permission template names that contain the supplied string.
+   *
+   * Example value: "defau"
+   */
+  public SearchTemplatesRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SetDefaultTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/SetDefaultTemplateRequest.java
new file mode 100644 (file)
index 0000000..bfe2695
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Set a permission template as default.<br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/set_default_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetDefaultTemplateRequest {
+
+  private String organization;
+  private String qualifier;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SetDefaultTemplateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Project qualifier. Filter the results with the specified qualifier. Possible values are:<ul><li>TRK - Projects</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"TRK"</li>
+   * </ul>
+   */
+  public SetDefaultTemplateRequest setQualifier(String qualifier) {
+    this.qualifier = qualifier;
+    return this;
+  }
+
+  public String getQualifier() {
+    return qualifier;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public SetDefaultTemplateRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public SetDefaultTemplateRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/TemplateGroupsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/TemplateGroupsRequest.java
new file mode 100644 (file)
index 0000000..3f25827
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Lists the groups with their permission as individual groups rather than through user affiliation on the chosen template.<br />This service defaults to all groups, but can be limited to groups with a specific permission by providing the desired permission.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/template_groups">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class TemplateGroupsRequest {
+
+  private String organization;
+  private String p;
+  private String permission;
+  private String ps;
+  private String q;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public TemplateGroupsRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public TemplateGroupsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"admin"</li>
+   *   <li>"codeviewer"</li>
+   *   <li>"issueadmin"</li>
+   *   <li>"scan"</li>
+   *   <li>"user"</li>
+   * </ul>
+   */
+  public TemplateGroupsRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 100
+   *
+   * Example value: "20"
+   */
+  public TemplateGroupsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to group names that contain the supplied string. <br/>When this parameter is not set, only group having at least one permission are returned.
+   *
+   * Example value: "eri"
+   */
+  public TemplateGroupsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public TemplateGroupsRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public TemplateGroupsRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/TemplateUsersRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/TemplateUsersRequest.java
new file mode 100644 (file)
index 0000000..78072d2
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Lists the users with their permission as individual users rather than through group affiliation on the chosen template. <br />This service defaults to all users, but can be limited to users with a specific permission by providing the desired permission.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/template_users">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class TemplateUsersRequest {
+
+  private String organization;
+  private String p;
+  private String permission;
+  private String ps;
+  private String q;
+  private String templateId;
+  private String templateName;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public TemplateUsersRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public TemplateUsersRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"admin"</li>
+   *   <li>"codeviewer"</li>
+   *   <li>"issueadmin"</li>
+   *   <li>"scan"</li>
+   *   <li>"user"</li>
+   * </ul>
+   */
+  public TemplateUsersRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 100
+   *
+   * Example value: "20"
+   */
+  public TemplateUsersRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to user names that contain the supplied string. <br/>When this parameter is not set, only users having at least one permission are returned.
+   *
+   * Example value: "eri"
+   */
+  public TemplateUsersRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Template id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public TemplateUsersRequest setTemplateId(String templateId) {
+    this.templateId = templateId;
+    return this;
+  }
+
+  public String getTemplateId() {
+    return templateId;
+  }
+
+  /**
+   * Template name
+   *
+   * Example value: "Default Permission Template for Projects"
+   */
+  public TemplateUsersRequest setTemplateName(String templateName) {
+    this.templateName = templateName;
+    return this;
+  }
+
+  public String getTemplateName() {
+    return templateName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/UpdateTemplateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/UpdateTemplateRequest.java
new file mode 100644 (file)
index 0000000..2b1d93a
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update a permission template.<br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/update_template">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateTemplateRequest {
+
+  private String description;
+  private String id;
+  private String name;
+  private String projectKeyPattern;
+
+  /**
+   * Description
+   *
+   * Example value: "Permissions for all projects related to the financial service"
+   */
+  public UpdateTemplateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Id
+   *
+   * This is a mandatory parameter.
+   * Example value: "af8cb8cc-1e78-4c4e-8c00-ee8e814009a5"
+   */
+  public UpdateTemplateRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * Name
+   *
+   * Example value: "Financial Service Permissions"
+   */
+  public UpdateTemplateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Project key pattern. Must be a valid Java regular expression
+   *
+   * Example value: ".*\\.finance\\..*"
+   */
+  public UpdateTemplateRequest setProjectKeyPattern(String projectKeyPattern) {
+    this.projectKeyPattern = projectKeyPattern;
+    return this;
+  }
+
+  public String getProjectKeyPattern() {
+    return projectKeyPattern;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/UsersRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/UsersRequest.java
new file mode 100644 (file)
index 0000000..c5a9dae
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * 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.permissions;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Lists the users with their permissions as individual users rather than through group affiliation.<br>This service defaults to global permissions, but can be limited to project permissions by providing project id or project key.<br> This service defaults to all users, but can be limited to users with a specific permission by providing the desired permission.<br>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/permissions/users">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UsersRequest {
+
+  private String organization;
+  private String p;
+  private String permission;
+  private String projectId;
+  private String projectKey;
+  private String ps;
+  private String q;
+
+  /**
+   * Key of organization, used when group name is set
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public UsersRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public UsersRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Permission<ul><li>Possible values for global permissions: admin, profileadmin, gateadmin, scan, provisioning</li><li>Possible values for project permissions admin, codeviewer, issueadmin, scan, user</li></ul>
+   *
+   */
+  public UsersRequest setPermission(String permission) {
+    this.permission = permission;
+    return this;
+  }
+
+  public String getPermission() {
+    return permission;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   */
+  public UsersRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public UsersRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 100
+   *
+   * Example value: "20"
+   */
+  public UsersRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to user names that contain the supplied string. <br/>When this parameter is not set, only users having at least one permission are returned.
+   *
+   * Example value: "eri"
+   */
+  public UsersRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/permissions/package-info.java
new file mode 100644 (file)
index 0000000..c2d9216
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.permissions;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/InstallRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/InstallRequest.java
new file mode 100644 (file)
index 0000000..1d3a579
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.plugins;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Installs the latest version of a plugin specified by its key.<br/>Plugin information is retrieved from Update Center.<br/>Requires user to be authenticated with Administer System permissions
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/install">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class InstallRequest {
+
+  private String key;
+
+  /**
+   * The key identifying the plugin to install
+   *
+   * This is a mandatory parameter.
+   */
+  public InstallRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/InstalledRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/InstalledRequest.java
new file mode 100644 (file)
index 0000000..07ae1d5
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * 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.plugins;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the list of all the plugins installed on the SonarQube instance, sorted by plugin name.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/installed">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class InstalledRequest {
+
+  private List<String> f;
+
+  /**
+   * Comma-separated list of the additional fields to be returned in response. No additional field is returned by default. Possible values are:<ul><li>category - category as defined in the Update Center. A connection to the Update Center is needed</li></lu>
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"category"</li>
+   * </ul>
+   */
+  public InstalledRequest setF(List<String> f) {
+    this.f = f;
+    return this;
+  }
+
+  public List<String> getF() {
+    return f;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/PluginsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/PluginsService.java
new file mode 100644 (file)
index 0000000..0a9dbe0
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * 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.plugins;
+
+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;
+
+/**
+ * Manage the plugins on the server, including installing, uninstalling, and upgrading.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class PluginsService extends BaseService {
+
+  public PluginsService(WsConnector wsConnector) {
+    super(wsConnector, "api/plugins");
+  }
+
+  /**
+   * Get the list of all the plugins available for installation on the SonarQube instance, sorted by plugin name.<br/>Plugin information is retrieved from Update Center. Date and time at which Update Center was last refreshed is provided in the response.<br/>Update status values are: <ul><li>COMPATIBLE: plugin is compatible with current SonarQube instance.</li><li>INCOMPATIBLE: plugin is not compatible with current SonarQube instance.</li><li>REQUIRES_SYSTEM_UPGRADE: plugin requires SonarQube to be upgraded before being installed.</li><li>DEPS_REQUIRE_SYSTEM_UPGRADE: at least one plugin on which the plugin is dependent requires SonarQube to be upgraded.</li></ul>Require 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/available">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String available() {
+    return call(
+      new GetRequest(path("available"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Cancels any operation pending on any plugin (install, update or uninstall)<br/>Requires user to be authenticated with Administer System permissions
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/cancel_all">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void cancelAll() {
+    call(
+      new PostRequest(path("cancel_all"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Installs the latest version of a plugin specified by its key.<br/>Plugin information is retrieved from Update Center.<br/>Requires user to be authenticated with Administer System permissions
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/install">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void install(InstallRequest request) {
+    call(
+      new PostRequest(path("install"))
+        .setParam("key", request.getKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get the list of all the plugins installed on the SonarQube instance, sorted by plugin name.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/installed">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String installed(InstalledRequest request) {
+    return call(
+      new GetRequest(path("installed"))
+        .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get the list of plugins which will either be installed or removed at the next startup of the SonarQube instance, sorted by plugin name.<br/>Require 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/pending">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String pending() {
+    return call(
+      new GetRequest(path("pending"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Uninstalls the plugin specified by its key.<br/>Requires user to be authenticated with Administer System permissions.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/uninstall">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void uninstall(UninstallRequest request) {
+    call(
+      new PostRequest(path("uninstall"))
+        .setParam("key", request.getKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Updates a plugin specified by its key to the latest version compatible with the SonarQube instance.<br/>Plugin information is retrieved from Update Center.<br/>Requires user to be authenticated with Administer System permissions
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/update">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void update(UpdateRequest request) {
+    call(
+      new PostRequest(path("update"))
+        .setParam("key", request.getKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Lists plugins installed on the SonarQube instance for which at least one newer version is available, sorted by plugin name.<br/>Each newer version is listed, ordered from the oldest to the newest, with its own update/compatibility status.<br/>Plugin information is retrieved from Update Center. Date and time at which Update Center was last refreshed is provided in the response.<br/>Update status values are: [COMPATIBLE, INCOMPATIBLE, REQUIRES_UPGRADE, DEPS_REQUIRE_UPGRADE].<br/>Require 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/updates">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String updates() {
+    return call(
+      new GetRequest(path("updates"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/UninstallRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/UninstallRequest.java
new file mode 100644 (file)
index 0000000..dc6e0f5
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.plugins;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Uninstalls the plugin specified by its key.<br/>Requires user to be authenticated with Administer System permissions.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/uninstall">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UninstallRequest {
+
+  private String key;
+
+  /**
+   * The key identifying the plugin to uninstall
+   *
+   * This is a mandatory parameter.
+   */
+  public UninstallRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/UpdateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/UpdateRequest.java
new file mode 100644 (file)
index 0000000..e2a91d1
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.plugins;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Updates a plugin specified by its key to the latest version compatible with the SonarQube instance.<br/>Plugin information is retrieved from Update Center.<br/>Requires user to be authenticated with Administer System permissions
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/plugins/update">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateRequest {
+
+  private String key;
+
+  /**
+   * The key identifying the plugin to update
+   *
+   * This is a mandatory parameter.
+   */
+  public UpdateRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/plugins/package-info.java
new file mode 100644 (file)
index 0000000..d5fcdab
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.plugins;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/profiles/ProfilesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/profiles/ProfilesService.java
new file mode 100644 (file)
index 0000000..e533a50
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * 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.profiles;
+
+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;
+
+/**
+ * Removed since 6.3, please use api/qualityprofiles instead
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/profiles">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProfilesService extends BaseService {
+
+  public ProfilesService(WsConnector wsConnector) {
+    super(wsConnector, "api/profiles");
+  }
+
+  /**
+   * Get a profile.<br/>The web service is removed and you're invited to use api/qualityprofiles/search instead
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/profiles/index">Further information about this action online (including a response example)</a>
+   * @since 3.3
+   * @deprecated since 5.2
+   */
+  @Deprecated
+  public String index() {
+    return call(
+      new GetRequest(path("index"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get a list of profiles.<br/>The web service is removed and you're invited to use api/qualityprofiles/search instead
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/profiles/list">Further information about this action online (including a response example)</a>
+   * @since 3.3
+   * @deprecated since 5.2
+   */
+  @Deprecated
+  public String list() {
+    return call(
+      new GetRequest(path("list"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/profiles/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/profiles/package-info.java
new file mode 100644 (file)
index 0000000..1d4569b
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.profiles;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/CreateEventRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/CreateEventRequest.java
new file mode 100644 (file)
index 0000000..1cd2ab1
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * 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.projectanalyses;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a project analysis event.<br>Only event of category 'VERSION' and 'OTHER' can be created.<br>Requires one of the following permissions:<ul>  <li>'Administer System'</li>  <li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/create_event">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateEventRequest {
+
+  private String analysis;
+  private String category;
+  private String name;
+
+  /**
+   * Analysis key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public CreateEventRequest setAnalysis(String analysis) {
+    this.analysis = analysis;
+    return this;
+  }
+
+  public String getAnalysis() {
+    return analysis;
+  }
+
+  /**
+   * Category
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"VERSION"</li>
+   *   <li>"OTHER"</li>
+   * </ul>
+   */
+  public CreateEventRequest setCategory(String category) {
+    this.category = category;
+    return this;
+  }
+
+  public String getCategory() {
+    return category;
+  }
+
+  /**
+   * Name
+   *
+   * This is a mandatory parameter.
+   * Example value: "5.6"
+   */
+  public CreateEventRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/DeleteEventRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/DeleteEventRequest.java
new file mode 100644 (file)
index 0000000..eafd06f
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.projectanalyses;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a project analysis event.<br>Only event of category 'VERSION' and 'OTHER' can be deleted.<br>Requires one of the following permissions:<ul>  <li>'Administer System'</li>  <li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/delete_event">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteEventRequest {
+
+  private String event;
+
+  /**
+   * Event key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   */
+  public DeleteEventRequest setEvent(String event) {
+    this.event = event;
+    return this;
+  }
+
+  public String getEvent() {
+    return event;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/DeleteRequest.java
new file mode 100644 (file)
index 0000000..1691f6a
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.projectanalyses;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a project analysis.<br>Requires one of the following permissions:<ul>  <li>'Administer System'</li>  <li>'Administer' rights on the project of the specified analysis</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/delete">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String analysis;
+
+  /**
+   * Analysis key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-TpxcA-iU5OvuD2FL1"
+   */
+  public DeleteRequest setAnalysis(String analysis) {
+    this.analysis = analysis;
+    return this;
+  }
+
+  public String getAnalysis() {
+    return analysis;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/ProjectAnalysesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/ProjectAnalysesService.java
new file mode 100644 (file)
index 0000000..6538f88
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * 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.projectanalyses;
+
+import javax.annotation.Generated;
+import org.sonarqube.ws.MediaTypes;
+import org.sonarqube.ws.ProjectAnalyses.CreateEventResponse;
+import org.sonarqube.ws.ProjectAnalyses.SearchResponse;
+import org.sonarqube.ws.ProjectAnalyses.UpdateEventResponse;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.PostRequest;
+import org.sonarqube.ws.client.WsConnector;
+
+/**
+ * Manage project analyses.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProjectAnalysesService extends BaseService {
+
+  public ProjectAnalysesService(WsConnector wsConnector) {
+    super(wsConnector, "api/project_analyses");
+  }
+
+  /**
+   * Create a project analysis event.<br>Only event of category 'VERSION' and 'OTHER' can be created.<br>Requires one of the following permissions:<ul>  <li>'Administer System'</li>  <li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/create_event">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public CreateEventResponse createEvent(CreateEventRequest request) {
+    return call(
+      new PostRequest(path("create_event"))
+        .setParam("analysis", request.getAnalysis())
+        .setParam("category", request.getCategory())
+        .setParam("name", request.getName()),
+      CreateEventResponse.parser());
+  }
+
+  /**
+   * Delete a project analysis.<br>Requires one of the following permissions:<ul>  <li>'Administer System'</li>  <li>'Administer' rights on the project of the specified analysis</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/delete">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("analysis", request.getAnalysis())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Delete a project analysis event.<br>Only event of category 'VERSION' and 'OTHER' can be deleted.<br>Requires one of the following permissions:<ul>  <li>'Administer System'</li>  <li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/delete_event">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public void deleteEvent(DeleteEventRequest request) {
+    call(
+      new PostRequest(path("delete_event"))
+        .setParam("event", request.getEvent())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search a project analyses and attached events.<br>Requires the following permission: 'Browse' on the specified project
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/search">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public SearchResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("branch", request.getBranch())
+        .setParam("category", request.getCategory())
+        .setParam("from", request.getFrom())
+        .setParam("p", request.getP())
+        .setParam("project", request.getProject())
+        .setParam("ps", request.getPs())
+        .setParam("to", request.getTo()),
+      SearchResponse.parser());
+  }
+
+  /**
+   * Update a project analysis event.<br>Only events of category 'VERSION' and 'OTHER' can be updated.<br>Requires one of the following permissions:<ul>  <li>'Administer System'</li>  <li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/update_event">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public UpdateEventResponse updateEvent(UpdateEventRequest request) {
+    return call(
+      new PostRequest(path("update_event"))
+        .setParam("event", request.getEvent())
+        .setParam("name", request.getName()),
+      UpdateEventResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/SearchRequest.java
new file mode 100644 (file)
index 0000000..3e2c610
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * 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.projectanalyses;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search a project analyses and attached events.<br>Requires the following permission: 'Browse' on the specified project
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/search">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String branch;
+  private String category;
+  private String from;
+  private String p;
+  private String project;
+  private String ps;
+  private String to;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public SearchRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Event category. Filter analyses that have at least one event of the category specified.
+   *
+   * Example value: "OTHER"
+   * Possible values:
+   * <ul>
+   *   <li>"VERSION"</li>
+   *   <li>"OTHER"</li>
+   *   <li>"QUALITY_PROFILE"</li>
+   *   <li>"QUALITY_GATE"</li>
+   * </ul>
+   */
+  public SearchRequest setCategory(String category) {
+    this.category = category;
+    return this;
+  }
+
+  public String getCategory() {
+    return category;
+  }
+
+  /**
+   * Filter analyses created after the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided
+   *
+   * Example value: "2013-05-01"
+   */
+  public SearchRequest setFrom(String from) {
+    this.from = from;
+    return this;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Project key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public SearchRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Filter analyses created before the given date (inclusive). <br>Either a date (server timezone) or datetime can be provided
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public SearchRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/UpdateEventRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/UpdateEventRequest.java
new file mode 100644 (file)
index 0000000..a2de46e
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.projectanalyses;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update a project analysis event.<br>Only events of category 'VERSION' and 'OTHER' can be updated.<br>Requires one of the following permissions:<ul>  <li>'Administer System'</li>  <li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_analyses/update_event">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateEventRequest {
+
+  private String event;
+  private String name;
+
+  /**
+   * Event key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-TpxcA-iU5OvuD2FL5"
+   */
+  public UpdateEventRequest setEvent(String event) {
+    this.event = event;
+    return this;
+  }
+
+  public String getEvent() {
+    return event;
+  }
+
+  /**
+   * New name
+   *
+   * Example value: "5.6"
+   */
+  public UpdateEventRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectanalyses/package-info.java
new file mode 100644 (file)
index 0000000..81b12f7
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.projectanalyses;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/DeleteRequest.java
new file mode 100644 (file)
index 0000000..5ad926e
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.projectbranches;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a non-main branch of a project.<br/>Requires 'Administer' rights on the specified project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_branches/delete">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String branch;
+  private String project;
+
+  /**
+   * Name of the branch
+   *
+   * This is a mandatory parameter.
+   * Example value: "branch1"
+   */
+  public DeleteRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Project key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public DeleteRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/ListRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/ListRequest.java
new file mode 100644 (file)
index 0000000..fe0e8d6
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.projectbranches;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List the branches of a project.<br/>Requires 'Administer' rights on the specified project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_branches/list">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ListRequest {
+
+  private String project;
+
+  /**
+   * Project key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public ListRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java
new file mode 100644 (file)
index 0000000..88574ee
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * 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.projectbranches;
+
+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.ProjectBranches.ListWsResponse;
+
+/**
+ * Manage branch (only available when the Branch plugin is installed)
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_branches">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProjectBranchesService extends BaseService {
+
+  public ProjectBranchesService(WsConnector wsConnector) {
+    super(wsConnector, "api/project_branches");
+  }
+
+  /**
+   * Delete a non-main branch of a project.<br/>Requires 'Administer' rights on the specified project.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_branches/delete">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public String delete(DeleteRequest request) {
+    return call(
+      new PostRequest(path("delete"))
+        .setParam("branch", request.getBranch())
+        .setParam("project", request.getProject())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List the branches of a project.<br/>Requires 'Administer' rights on the specified project.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_branches/list">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public ListWsResponse list(ListRequest request) {
+    return call(
+      new GetRequest(path("list"))
+        .setParam("project", request.getProject()),
+      ListWsResponse.parser());
+  }
+
+  /**
+   * Rename the main branch of a project.<br/>Requires 'Administer' permission on the specified project.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_branches/rename">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public void rename(RenameRequest request) {
+    call(
+      new PostRequest(path("rename"))
+        .setParam("name", request.getName())
+        .setParam("project", request.getProject())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/RenameRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/RenameRequest.java
new file mode 100644 (file)
index 0000000..8e46ea6
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.projectbranches;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Rename the main branch of a project.<br/>Requires 'Administer' permission on the specified project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_branches/rename">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RenameRequest {
+
+  private String name;
+  private String project;
+
+  /**
+   * New name of the main branch
+   *
+   * This is a mandatory parameter.
+   * Example value: "branch1"
+   */
+  public RenameRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Project key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public RenameRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectbranches/package-info.java
new file mode 100644 (file)
index 0000000..148ff98
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.projectbranches;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/CreateRequest.java
new file mode 100644 (file)
index 0000000..3bc7227
--- /dev/null
@@ -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.projectlinks;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a new project link.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_links/create">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String name;
+  private String projectId;
+  private String projectKey;
+  private String url;
+
+  /**
+   * Link name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Custom"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public CreateRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public CreateRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+
+  /**
+   * Link url
+   *
+   * This is a mandatory parameter.
+   * Example value: "http://example.com"
+   */
+  public CreateRequest setUrl(String url) {
+    this.url = url;
+    return this;
+  }
+
+  public String getUrl() {
+    return url;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/DeleteRequest.java
new file mode 100644 (file)
index 0000000..c2f57ce
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.projectlinks;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete existing project link.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_links/delete">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String id;
+
+  /**
+   * Link id
+   *
+   * This is a mandatory parameter.
+   * Example value: "17"
+   */
+  public DeleteRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/ProjectLinksService.java
new file mode 100644 (file)
index 0000000..c452f73
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * 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.projectlinks;
+
+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.ProjectLinks.CreateWsResponse;
+import org.sonarqube.ws.ProjectLinks.SearchWsResponse;
+
+/**
+ * Manage projects links.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_links">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProjectLinksService extends BaseService {
+
+  public ProjectLinksService(WsConnector wsConnector) {
+    super(wsConnector, "api/project_links");
+  }
+
+  /**
+   * Create a new project link.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_links/create">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public CreateWsResponse create(CreateRequest request) {
+    return call(
+      new PostRequest(path("create"))
+        .setParam("name", request.getName())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setParam("url", request.getUrl()),
+      CreateWsResponse.parser());
+  }
+
+  /**
+   * Delete existing project link.<br>Requires 'Administer' permission on the specified project, or global 'Administer' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_links/delete">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("id", request.getId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List links of a project.<br>The 'projectId' or 'projectKey' must be provided.<br>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_links/search">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public SearchWsResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey()),
+      SearchWsResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/SearchRequest.java
new file mode 100644 (file)
index 0000000..03a06ff
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.projectlinks;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List links of a project.<br>The 'projectId' or 'projectKey' must be provided.<br>Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_links/search">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * Project Id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public SearchRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project Key
+   *
+   * Example value: "my_project"
+   */
+  public SearchRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projectlinks/package-info.java
new file mode 100644 (file)
index 0000000..01d51ff
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.projectlinks;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/BulkDeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/BulkDeleteRequest.java
new file mode 100644 (file)
index 0000000..1bcfada
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete one or several projects.<br />Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/bulk_delete">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class BulkDeleteRequest {
+
+  private String analyzedBefore;
+  private String onProvisionedOnly;
+  private String organization;
+  private List<String> projectIds;
+  private List<String> projects;
+  private String q;
+  private List<String> qualifiers;
+  private String visibility;
+
+  /**
+   * Filter the projects for which last analysis is older than the given date (exclusive).<br> Either a date (server timezone) or datetime can be provided.
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public BulkDeleteRequest setAnalyzedBefore(String analyzedBefore) {
+    this.analyzedBefore = analyzedBefore;
+    return this;
+  }
+
+  public String getAnalyzedBefore() {
+    return analyzedBefore;
+  }
+
+  /**
+   * Filter the projects that are provisioned
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public BulkDeleteRequest setOnProvisionedOnly(String onProvisionedOnly) {
+    this.onProvisionedOnly = onProvisionedOnly;
+    return this;
+  }
+
+  public String getOnProvisionedOnly() {
+    return onProvisionedOnly;
+  }
+
+  /**
+   * The key of the organization
+   *
+   * This is part of the internal API.
+   */
+  public BulkDeleteRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Comma-separated list of project ids
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy,AU-TpxcA-iU5OvuD2FLz"
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public BulkDeleteRequest setProjectIds(List<String> projectIds) {
+    this.projectIds = projectIds;
+    return this;
+  }
+
+  public List<String> getProjectIds() {
+    return projectIds;
+  }
+
+  /**
+   * Comma-separated list of project keys
+   *
+   * Example value: "my_project,another_project"
+   */
+  public BulkDeleteRequest setProjects(List<String> projects) {
+    this.projects = projects;
+    return this;
+  }
+
+  public List<String> getProjects() {
+    return projects;
+  }
+
+  /**
+   * Limit to: <ul><li>component names that contain the supplied string</li><li>component keys that contain the supplied string</li></ul>
+   *
+   * Example value: "sonar"
+   */
+  public BulkDeleteRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Comma-separated list of component qualifiers. Filter the results with the specified qualifiers
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"TRK"</li>
+   *   <li>"VW"</li>
+   *   <li>"APP"</li>
+   * </ul>
+   */
+  public BulkDeleteRequest setQualifiers(List<String> qualifiers) {
+    this.qualifiers = qualifiers;
+    return this;
+  }
+
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  /**
+   * Filter the projects that should be visible to everyone (public), or only specific user/groups (private).<br/>If no visibility is specified, the default project visibility of the organization will be used.
+   *
+   * This is part of the internal API.
+   * Possible values:
+   * <ul>
+   *   <li>"private"</li>
+   *   <li>"public"</li>
+   * </ul>
+   */
+  public BulkDeleteRequest setVisibility(String visibility) {
+    this.visibility = visibility;
+    return this;
+  }
+
+  public String getVisibility() {
+    return visibility;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/BulkUpdateKeyRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/BulkUpdateKeyRequest.java
new file mode 100644 (file)
index 0000000..29cc0fc
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Bulk update a project or module key and all its sub-components keys. The bulk update allows to replace a part of the current key by another string on the current project and all its sub-modules.<br>It's possible to simulate the bulk update by setting the parameter 'dryRun' at true. No key is updated with a dry run.<br>Ex: to rename a project with key 'my_project' to 'my_new_project' and all its sub-components keys, call the WS with parameters:<ul>  <li>project: my_project</li>  <li>from: my_</li>  <li>to: my_new_</li></ul>Either 'projectId' or 'project' must be provided.<br> Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/bulk_update_key">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class BulkUpdateKeyRequest {
+
+  private String dryRun;
+  private String from;
+  private String project;
+  private String projectId;
+  private String to;
+
+  /**
+   * Simulate bulk update. No component key is updated.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public BulkUpdateKeyRequest setDryRun(String dryRun) {
+    this.dryRun = dryRun;
+    return this;
+  }
+
+  public String getDryRun() {
+    return dryRun;
+  }
+
+  /**
+   * String to match in components keys
+   *
+   * This is a mandatory parameter.
+   * Example value: "_old"
+   */
+  public BulkUpdateKeyRequest setFrom(String from) {
+    this.from = from;
+    return this;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  /**
+   * Project or module key
+   *
+   * Example value: "my_old_project"
+   */
+  public BulkUpdateKeyRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Project or module ID
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public BulkUpdateKeyRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * String replacement in components keys
+   *
+   * This is a mandatory parameter.
+   * Example value: "_new"
+   */
+  public BulkUpdateKeyRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/CreateRequest.java
new file mode 100644 (file)
index 0000000..c5b802f
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a project.<br/>Requires 'Create Projects' permission
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/create">Further information about this action online (including a response example)</a>
+ * @since 4.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String branch;
+  private String name;
+  private String organization;
+  private String project;
+  private String visibility;
+
+  /**
+   * SCM Branch of the project. The key of the project will become key:branch, for instance 'SonarQube:branch-5.0'
+   *
+   * Example value: "branch-5.0"
+   */
+  public CreateRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Name of the project
+   *
+   * This is a mandatory parameter.
+   * Example value: "SonarQube"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * The key of the organization
+   *
+   * This is part of the internal API.
+   */
+  public CreateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Key of the project
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public CreateRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Whether the created project should be visible to everyone, or only specific user/groups.<br/>If no visibility is specified, the default project visibility of the organization will be used.
+   *
+   * This is part of the internal API.
+   * Possible values:
+   * <ul>
+   *   <li>"private"</li>
+   *   <li>"public"</li>
+   * </ul>
+   */
+  public CreateRequest setVisibility(String visibility) {
+    this.visibility = visibility;
+    return this;
+  }
+
+  public String getVisibility() {
+    return visibility;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/DeleteRequest.java
new file mode 100644 (file)
index 0000000..8db8004
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a project.<br> Requires 'Administer System' permission or 'Administer' permission on the project.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/delete">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String project;
+  private String projectId;
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public DeleteRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Project ID
+   *
+   * Example value: "ce4c03d6-430f-40a9-b777-ad877c00aa4d"
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public DeleteRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/GhostsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/GhostsRequest.java
new file mode 100644 (file)
index 0000000..cd8bd1b
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List ghost projects.<br> With the current architecture, it's no more possible to have invisible ghost projects. Therefore, the web service is deprecated.<br> Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/ghosts">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class GhostsRequest {
+
+  private List<String> f;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+
+  /**
+   * Comma-separated list of the fields to be returned in response. All the fields are returned by default.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"name"</li>
+   *   <li>"creationDate"</li>
+   *   <li>"visibility"</li>
+   *   <li>"uuid"</li>
+   *   <li>"key"</li>
+   * </ul>
+   */
+  public GhostsRequest setF(List<String> f) {
+    this.f = f;
+    return this;
+  }
+
+  public List<String> getF() {
+    return f;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   */
+  public GhostsRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public GhostsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public GhostsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to names or keys that contain the supplied string.
+   *
+   * Example value: "sonar"
+   */
+  public GhostsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/IndexRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/IndexRequest.java
new file mode 100644 (file)
index 0000000..1c6f694
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This web service is deprecated, please use api/components/search instead
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/index">Further information about this action online (including a response example)</a>
+ * @since 2.10
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class IndexRequest {
+
+  private String desc;
+  private String format;
+  private String libs;
+  private String project;
+  private String search;
+  private String subprojects;
+  private String versions;
+  private String views;
+
+  /**
+   * Since 6.3, this parameter has no effect
+   *
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public IndexRequest setDesc(String desc) {
+    this.desc = desc;
+    return this;
+  }
+
+  public String getDesc() {
+    return desc;
+  }
+
+  /**
+   * Only json response format is available
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"json"</li>
+   * </ul>
+   */
+  public IndexRequest setFormat(String format) {
+    this.format = format;
+    return this;
+  }
+
+  public String getFormat() {
+    return format;
+  }
+
+  /**
+   * Since 6.3, this parameter has no effect
+   *
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public IndexRequest setLibs(String libs) {
+    this.libs = libs;
+    return this;
+  }
+
+  public String getLibs() {
+    return libs;
+  }
+
+  /**
+   * key or ID of the project
+   *
+   * Example value: "my_project"
+   */
+  public IndexRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Substring of project name, case insensitive. Ignored if the parameter key is set
+   *
+   * Example value: "Sonar"
+   */
+  public IndexRequest setSearch(String search) {
+    this.search = search;
+    return this;
+  }
+
+  public String getSearch() {
+    return search;
+  }
+
+  /**
+   * Load sub-projects. Ignored if the parameter key is set
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public IndexRequest setSubprojects(String subprojects) {
+    this.subprojects = subprojects;
+    return this;
+  }
+
+  public String getSubprojects() {
+    return subprojects;
+  }
+
+  /**
+   * Since 6.3, this parameter has no effect
+   *
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public IndexRequest setVersions(String versions) {
+    this.versions = versions;
+    return this;
+  }
+
+  public String getVersions() {
+    return versions;
+  }
+
+  /**
+   * Since 6.3, this parameter has no effect
+   *
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public IndexRequest setViews(String views) {
+    this.views = views;
+    return this;
+  }
+
+  public String getViews() {
+    return views;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/ProjectsService.java
new file mode 100644 (file)
index 0000000..b5b1a5a
--- /dev/null
@@ -0,0 +1,266 @@
+/*
+ * 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.projects;
+
+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.Projects.BulkUpdateKeyWsResponse;
+import org.sonarqube.ws.Projects.CreateWsResponse;
+import org.sonarqube.ws.Projects.SearchWsResponse;
+import org.sonarqube.ws.Projects.SearchMyProjectsWsResponse;
+
+/**
+ * Manage project existence.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProjectsService extends BaseService {
+
+  public ProjectsService(WsConnector wsConnector) {
+    super(wsConnector, "api/projects");
+  }
+
+  /**
+   * Delete one or several projects.<br />Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/bulk_delete">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void bulkDelete(BulkDeleteRequest request) {
+    call(
+      new PostRequest(path("bulk_delete"))
+        .setParam("analyzedBefore", request.getAnalyzedBefore())
+        .setParam("onProvisionedOnly", request.getOnProvisionedOnly())
+        .setParam("organization", request.getOrganization())
+        .setParam("projectIds", request.getProjectIds() == null ? null : request.getProjectIds().stream().collect(Collectors.joining(",")))
+        .setParam("projects", request.getProjects() == null ? null : request.getProjects().stream().collect(Collectors.joining(",")))
+        .setParam("q", request.getQ())
+        .setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(",")))
+        .setParam("visibility", request.getVisibility())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Bulk update a project or module key and all its sub-components keys. The bulk update allows to replace a part of the current key by another string on the current project and all its sub-modules.<br>It's possible to simulate the bulk update by setting the parameter 'dryRun' at true. No key is updated with a dry run.<br>Ex: to rename a project with key 'my_project' to 'my_new_project' and all its sub-components keys, call the WS with parameters:<ul>  <li>project: my_project</li>  <li>from: my_</li>  <li>to: my_new_</li></ul>Either 'projectId' or 'project' must be provided.<br> Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/bulk_update_key">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public BulkUpdateKeyWsResponse bulkUpdateKey(BulkUpdateKeyRequest request) {
+    return call(
+      new PostRequest(path("bulk_update_key"))
+        .setParam("dryRun", request.getDryRun())
+        .setParam("from", request.getFrom())
+        .setParam("project", request.getProject())
+        .setParam("projectId", request.getProjectId())
+        .setParam("to", request.getTo()),
+      BulkUpdateKeyWsResponse.parser());
+  }
+
+  /**
+   * Create a project.<br/>Requires 'Create Projects' permission
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/create">Further information about this action online (including a response example)</a>
+   * @since 4.0
+   */
+  public CreateWsResponse create(CreateRequest request) {
+    return call(
+      new PostRequest(path("create"))
+        .setParam("branch", request.getBranch())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization())
+        .setParam("project", request.getProject())
+        .setParam("visibility", request.getVisibility()),
+      CreateWsResponse.parser());
+  }
+
+  /**
+   * Delete a project.<br> Requires 'Administer System' permission or 'Administer' permission on the project.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/delete">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("project", request.getProject())
+        .setParam("projectId", request.getProjectId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List ghost projects.<br> With the current architecture, it's no more possible to have invisible ghost projects. Therefore, the web service is deprecated.<br> Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/ghosts">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public String ghosts(GhostsRequest request) {
+    return call(
+      new GetRequest(path("ghosts"))
+        .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * This web service is deprecated, please use api/components/search instead
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/index">Further information about this action online (including a response example)</a>
+   * @since 2.10
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public String index(IndexRequest request) {
+    return call(
+      new GetRequest(path("index"))
+        .setParam("desc", request.getDesc())
+        .setParam("format", request.getFormat())
+        .setParam("libs", request.getLibs())
+        .setParam("project", request.getProject())
+        .setParam("search", request.getSearch())
+        .setParam("subprojects", request.getSubprojects())
+        .setParam("versions", request.getVersions())
+        .setParam("views", request.getViews())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get the list of provisioned projects.<br> Web service is deprecated. Use api/projects/search instead, with onProvisionedOnly=true.<br> Require 'Create Projects' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/provisioned">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public String provisioned(ProvisionedRequest request) {
+    return call(
+      new GetRequest(path("provisioned"))
+        .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for projects or views to administrate them.<br>Requires 'System Administrator' permission
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/search">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public SearchWsResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("analyzedBefore", request.getAnalyzedBefore())
+        .setParam("onProvisionedOnly", request.getOnProvisionedOnly())
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("projectIds", request.getProjectIds() == null ? null : request.getProjectIds().stream().collect(Collectors.joining(",")))
+        .setParam("projects", request.getProjects() == null ? null : request.getProjects().stream().collect(Collectors.joining(",")))
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("qualifiers", request.getQualifiers() == null ? null : request.getQualifiers().stream().collect(Collectors.joining(",")))
+        .setParam("visibility", request.getVisibility()),
+      SearchWsResponse.parser());
+  }
+
+  /**
+   * Return list of projects for which the current user has 'Administer' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/search_my_projects">Further information about this action online (including a response example)</a>
+   * @since 6.0
+   */
+  public SearchMyProjectsWsResponse searchMyProjects(SearchMyProjectsRequest request) {
+    return call(
+      new GetRequest(path("search_my_projects"))
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs()),
+      SearchMyProjectsWsResponse.parser());
+  }
+
+  /**
+   * Update a project or module key and all its sub-components keys.<br>Either 'from' or 'projectId' must be provided.<br> Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/update_key">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public void updateKey(UpdateKeyRequest request) {
+    call(
+      new PostRequest(path("update_key"))
+        .setParam("from", request.getFrom())
+        .setParam("projectId", request.getProjectId())
+        .setParam("to", request.getTo())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Updates visibility of a project.<br>Requires 'Project administer' permission on the specified project
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/update_visibility">Further information about this action online (including a response example)</a>
+   * @since 6.4
+   */
+  public void updateVisibility(UpdateVisibilityRequest request) {
+    call(
+      new PostRequest(path("update_visibility"))
+        .setParam("project", request.getProject())
+        .setParam("visibility", request.getVisibility())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/ProvisionedRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/ProvisionedRequest.java
new file mode 100644 (file)
index 0000000..e382c21
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the list of provisioned projects.<br> Web service is deprecated. Use api/projects/search instead, with onProvisionedOnly=true.<br> Require 'Create Projects' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/provisioned">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProvisionedRequest {
+
+  private List<String> f;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+
+  /**
+   * Comma-separated list of the fields to be returned in response. All the fields are returned by default.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"name"</li>
+   *   <li>"creationDate"</li>
+   *   <li>"visibility"</li>
+   *   <li>"uuid"</li>
+   *   <li>"key"</li>
+   * </ul>
+   */
+  public ProvisionedRequest setF(List<String> f) {
+    this.f = f;
+    return this;
+  }
+
+  public List<String> getF() {
+    return f;
+  }
+
+  /**
+   * The key of the organization
+   *
+   * This is part of the internal API.
+   */
+  public ProvisionedRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public ProvisionedRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public ProvisionedRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to names or keys that contain the supplied string.
+   *
+   * Example value: "sonar"
+   */
+  public ProvisionedRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/SearchMyProjectsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/SearchMyProjectsRequest.java
new file mode 100644 (file)
index 0000000..345becd
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Return list of projects for which the current user has 'Administer' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/search_my_projects">Further information about this action online (including a response example)</a>
+ * @since 6.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchMyProjectsRequest {
+
+  private String p;
+  private String ps;
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchMyProjectsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchMyProjectsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/SearchRequest.java
new file mode 100644 (file)
index 0000000..b40a5ad
--- /dev/null
@@ -0,0 +1,204 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for projects or views to administrate them.<br>Requires 'System Administrator' permission
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/search">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String analyzedBefore;
+  private String onProvisionedOnly;
+  private String organization;
+  private String p;
+  private List<String> projectIds;
+  private List<String> projects;
+  private String ps;
+  private String q;
+  private List<String> qualifiers;
+  private String visibility;
+
+  /**
+   * Filter the projects for which last analysis is older than the given date (exclusive).<br> Either a date (server timezone) or datetime can be provided.
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public SearchRequest setAnalyzedBefore(String analyzedBefore) {
+    this.analyzedBefore = analyzedBefore;
+    return this;
+  }
+
+  public String getAnalyzedBefore() {
+    return analyzedBefore;
+  }
+
+  /**
+   * Filter the projects that are provisioned
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setOnProvisionedOnly(String onProvisionedOnly) {
+    this.onProvisionedOnly = onProvisionedOnly;
+    return this;
+  }
+
+  public String getOnProvisionedOnly() {
+    return onProvisionedOnly;
+  }
+
+  /**
+   * The key of the organization
+   *
+   * This is part of the internal API.
+   */
+  public SearchRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Comma-separated list of project ids
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy,AU-TpxcA-iU5OvuD2FLz"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public SearchRequest setProjectIds(List<String> projectIds) {
+    this.projectIds = projectIds;
+    return this;
+  }
+
+  public List<String> getProjectIds() {
+    return projectIds;
+  }
+
+  /**
+   * Comma-separated list of project keys
+   *
+   * Example value: "my_project,another_project"
+   */
+  public SearchRequest setProjects(List<String> projects) {
+    this.projects = projects;
+    return this;
+  }
+
+  public List<String> getProjects() {
+    return projects;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to: <ul><li>component names that contain the supplied string</li><li>component keys that contain the supplied string</li></ul>
+   *
+   * Example value: "sonar"
+   */
+  public SearchRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Comma-separated list of component qualifiers. Filter the results with the specified qualifiers
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"TRK"</li>
+   *   <li>"VW"</li>
+   *   <li>"APP"</li>
+   * </ul>
+   */
+  public SearchRequest setQualifiers(List<String> qualifiers) {
+    this.qualifiers = qualifiers;
+    return this;
+  }
+
+  public List<String> getQualifiers() {
+    return qualifiers;
+  }
+
+  /**
+   * Filter the projects that should be visible to everyone (public), or only specific user/groups (private).<br/>If no visibility is specified, the default project visibility of the organization will be used.
+   *
+   * This is part of the internal API.
+   * Possible values:
+   * <ul>
+   *   <li>"private"</li>
+   *   <li>"public"</li>
+   * </ul>
+   */
+  public SearchRequest setVisibility(String visibility) {
+    this.visibility = visibility;
+    return this;
+  }
+
+  public String getVisibility() {
+    return visibility;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/UpdateKeyRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/UpdateKeyRequest.java
new file mode 100644 (file)
index 0000000..afd408e
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update a project or module key and all its sub-components keys.<br>Either 'from' or 'projectId' must be provided.<br> Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/update_key">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateKeyRequest {
+
+  private String from;
+  private String projectId;
+  private String to;
+
+  /**
+   * Project or module key
+   *
+   * Example value: "my_old_project"
+   */
+  public UpdateKeyRequest setFrom(String from) {
+    this.from = from;
+    return this;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  /**
+   * Project or module id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public UpdateKeyRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * New component key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_new_project"
+   */
+  public UpdateKeyRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/UpdateVisibilityRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/UpdateVisibilityRequest.java
new file mode 100644 (file)
index 0000000..91a3bd4
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * 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.projects;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Updates visibility of a project.<br>Requires 'Project administer' permission on the specified project
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/projects/update_visibility">Further information about this action online (including a response example)</a>
+ * @since 6.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateVisibilityRequest {
+
+  private String project;
+  private String visibility;
+
+  /**
+   * Project key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public UpdateVisibilityRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * New visibility
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"private"</li>
+   *   <li>"public"</li>
+   * </ul>
+   */
+  public UpdateVisibilityRequest setVisibility(String visibility) {
+    this.visibility = visibility;
+    return this;
+  }
+
+  public String getVisibility() {
+    return visibility;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projects/package-info.java
new file mode 100644 (file)
index 0000000..0e38452
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.projects;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/ProjectTagsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/ProjectTagsService.java
new file mode 100644 (file)
index 0000000..f529921
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * 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.projecttags;
+
+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.ProjectTags.SearchResponse;
+
+/**
+ * Manage project tags
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_tags">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProjectTagsService extends BaseService {
+
+  public ProjectTagsService(WsConnector wsConnector) {
+    super(wsConnector, "api/project_tags");
+  }
+
+  /**
+   * Search tags
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_tags/search">Further information about this action online (including a response example)</a>
+   * @since 6.4
+   */
+  public SearchResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ()),
+      SearchResponse.parser());
+  }
+
+  /**
+   * Set tags on a project.<br>Requires the following permission: 'Administer' rights on the specified project
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_tags/set">Further information about this action online (including a response example)</a>
+   * @since 6.4
+   */
+  public void set(SetRequest request) {
+    call(
+      new PostRequest(path("set"))
+        .setParam("project", request.getProject())
+        .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/SearchRequest.java
new file mode 100644 (file)
index 0000000..77739b8
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.projecttags;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search tags
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_tags/search">Further information about this action online (including a response example)</a>
+ * @since 6.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String ps;
+  private String q;
+
+  /**
+   * Page size. Must be greater than 0 and less than 100
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to tags that contain the supplied string.
+   *
+   * Example value: "off"
+   */
+  public SearchRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/SetRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/SetRequest.java
new file mode 100644 (file)
index 0000000..ddb582a
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.projecttags;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Set tags on a project.<br>Requires the following permission: 'Administer' rights on the specified project
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/project_tags/set">Further information about this action online (including a response example)</a>
+ * @since 6.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetRequest {
+
+  private String project;
+  private List<String> tags;
+
+  /**
+   * Project key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public SetRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Comma-separated list of tags
+   *
+   * This is a mandatory parameter.
+   * Example value: "finance, offshore"
+   */
+  public SetRequest setTags(List<String> tags) {
+    this.tags = tags;
+    return this;
+  }
+
+  public List<String> getTags() {
+    return tags;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/projecttags/package-info.java
new file mode 100644 (file)
index 0000000..f2bb28b
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.projecttags;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/IndexRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/IndexRequest.java
new file mode 100644 (file)
index 0000000..632277b
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * 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.properties;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * This web service is deprecated, please use api/settings/values instead.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/properties/index">Further information about this action online (including a response example)</a>
+ * @since 2.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class IndexRequest {
+
+  private String format;
+  private String id;
+  private String resource;
+
+  /**
+   * Only json response format is available
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"json"</li>
+   * </ul>
+   */
+  public IndexRequest setFormat(String format) {
+    this.format = format;
+    return this;
+  }
+
+  public String getFormat() {
+    return format;
+  }
+
+  /**
+   * Setting key
+   *
+   * Example value: "sonar.test.inclusions"
+   */
+  public IndexRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * Component key or database id
+   *
+   * Example value: "my_project"
+   */
+  public IndexRequest setResource(String resource) {
+    this.resource = resource;
+    return this;
+  }
+
+  public String getResource() {
+    return resource;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/PropertiesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/PropertiesService.java
new file mode 100644 (file)
index 0000000..d815029
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * 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.properties;
+
+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;
+
+/**
+ * This web service is deprecated, please use api/settings instead.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/properties">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class PropertiesService extends BaseService {
+
+  public PropertiesService(WsConnector wsConnector) {
+    super(wsConnector, "api/properties");
+  }
+
+  /**
+   * This web service is deprecated, please use api/settings/values instead.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/properties/index">Further information about this action online (including a response example)</a>
+   * @since 2.6
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public String index(IndexRequest request) {
+    return call(
+      new GetRequest(path("index"))
+        .setParam("format", request.getFormat())
+        .setParam("id", request.getId())
+        .setParam("resource", request.getResource())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/properties/package-info.java
new file mode 100644 (file)
index 0000000..9c38b2f
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.properties;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CopyRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CopyRequest.java
new file mode 100644 (file)
index 0000000..64df473
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Copy a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * 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
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CopyRequest {
+
+  private String id;
+  private String name;
+
+  /**
+   * The ID of the source quality gate
+   *
+   * This is a mandatory parameter.
+   * Example value: "1"
+   */
+  public CopyRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * The name of the quality gate to create
+   *
+   * This is a mandatory parameter.
+   * Example value: "My Quality Gate"
+   */
+  public CopyRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CreateConditionRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CreateConditionRequest.java
new file mode 100644 (file)
index 0000000..c91aa6b
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a new condition to a quality gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/create_condition">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateConditionRequest {
+
+  private String error;
+  private String gateId;
+  private String metric;
+  private String op;
+  private String period;
+  private String warning;
+
+  /**
+   * Condition error threshold
+   *
+   * Example value: "10"
+   */
+  public CreateConditionRequest setError(String error) {
+    this.error = error;
+    return this;
+  }
+
+  public String getError() {
+    return error;
+  }
+
+  /**
+   * ID of the quality gate
+   *
+   * This is a mandatory parameter.
+   * Example value: "1"
+   */
+  public CreateConditionRequest setGateId(String gateId) {
+    this.gateId = gateId;
+    return this;
+  }
+
+  public String getGateId() {
+    return gateId;
+  }
+
+  /**
+   * Condition metric
+   *
+   * This is a mandatory parameter.
+   * Example value: "blocker_violations"
+   */
+  public CreateConditionRequest setMetric(String metric) {
+    this.metric = metric;
+    return this;
+  }
+
+  public String getMetric() {
+    return metric;
+  }
+
+  /**
+   * Condition operator:<br/><ul><li>EQ = equals</li><li>NE = is not</li><li>LT = is lower than</li><li>GT = is greater than</li></ui>
+   *
+   * Example value: "EQ"
+   * Possible values:
+   * <ul>
+   *   <li>"LT"</li>
+   *   <li>"GT"</li>
+   *   <li>"EQ"</li>
+   *   <li>"NE"</li>
+   * </ul>
+   */
+  public CreateConditionRequest setOp(String op) {
+    this.op = op;
+    return this;
+  }
+
+  public String getOp() {
+    return op;
+  }
+
+  /**
+   * Condition period. If not set, the absolute value is considered.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"1"</li>
+   * </ul>
+   */
+  public CreateConditionRequest setPeriod(String period) {
+    this.period = period;
+    return this;
+  }
+
+  public String getPeriod() {
+    return period;
+  }
+
+  /**
+   * Condition warning threshold
+   *
+   * Example value: "5"
+   */
+  public CreateConditionRequest setWarning(String warning) {
+    this.warning = warning;
+    return this;
+  }
+
+  public String getWarning() {
+    return warning;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/CreateRequest.java
new file mode 100644 (file)
index 0000000..72bbe43
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/create">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String name;
+
+  /**
+   * The name of the quality gate to create
+   *
+   * This is a mandatory parameter.
+   * Example value: "My Quality Gate"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DeleteConditionRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DeleteConditionRequest.java
new file mode 100644 (file)
index 0000000..cfff0bd
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a condition from a quality gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/delete_condition">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteConditionRequest {
+
+  private String id;
+
+  /**
+   * Condition ID
+   *
+   * This is a mandatory parameter.
+   * Example value: "2"
+   */
+  public DeleteConditionRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DeselectRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DeselectRequest.java
new file mode 100644 (file)
index 0000000..ee4cb90
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove the association of a project from a quality gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/deselect">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeselectRequest {
+
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * Project id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.1
+   */
+  @Deprecated
+  public DeselectRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public DeselectRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DestroyRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/DestroyRequest.java
new file mode 100644 (file)
index 0000000..3550938
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/destroy">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DestroyRequest {
+
+  private String id;
+
+  /**
+   * ID of the quality gate to delete
+   *
+   * This is a mandatory parameter.
+   * Example value: "1"
+   */
+  public DestroyRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/GetByProjectRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/GetByProjectRequest.java
new file mode 100644 (file)
index 0000000..bdcfa5c
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the quality gate of a project.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/get_by_project">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class GetByProjectRequest {
+
+  private String project;
+
+  /**
+   * Project key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project"
+   */
+  public GetByProjectRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/ProjectStatusRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/ProjectStatusRequest.java
new file mode 100644 (file)
index 0000000..1b1bcdd
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the quality gate status of a project or a Compute Engine task.<br />Either 'analysisId', 'projectId' or 'projectKey' must be provided<br />The different statuses returned are: OK, WARN, ERROR, NONE. The NONE status is returned when there is no quality gate associated with the analysis.<br />Returns an HTTP code 404 if the analysis associated with the task is not found or does not exist.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/project_status">Further information about this action online (including a response example)</a>
+ * @since 5.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProjectStatusRequest {
+
+  private String analysisId;
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * Analysis id
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FL1"
+   */
+  public ProjectStatusRequest setAnalysisId(String analysisId) {
+    this.analysisId = analysisId;
+    return this;
+  }
+
+  public String getAnalysisId() {
+    return analysisId;
+  }
+
+  /**
+   * Project id
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public ProjectStatusRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public ProjectStatusRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/QualitygatesService.java
new file mode 100644 (file)
index 0000000..f37cd94
--- /dev/null
@@ -0,0 +1,331 @@
+/*
+ * 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.qualitygates;
+
+import javax.annotation.Generated;
+import org.sonarqube.ws.MediaTypes;
+import org.sonarqube.ws.Qualitygates.AppWsResponse;
+import org.sonarqube.ws.Qualitygates.CreateConditionWsResponse;
+import org.sonarqube.ws.Qualitygates.CreateWsResponse;
+import org.sonarqube.ws.Qualitygates.GetByProjectWsResponse;
+import org.sonarqube.ws.Qualitygates.ProjectStatusWsResponse;
+import org.sonarqube.ws.Qualitygates.UpdateConditionWsResponse;
+import org.sonarqube.ws.client.BaseService;
+import org.sonarqube.ws.client.GetRequest;
+import org.sonarqube.ws.client.PostRequest;
+import org.sonarqube.ws.client.WsConnector;
+
+/**
+ * Manage quality gates, including conditions and project association.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class QualitygatesService extends BaseService {
+
+  public QualitygatesService(WsConnector wsConnector) {
+    super(wsConnector, "api/qualitygates");
+  }
+
+  /**
+   * Get initialization items for the admin UI. For internal use
+   *
+   * 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 AppWsResponse app() {
+    return call(
+      new GetRequest(path("app")),
+      AppWsResponse.parser());
+  }
+
+  /**
+   * Copy a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * 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
+   */
+  public void copy(CopyRequest request) {
+    call(
+      new PostRequest(path("copy"))
+        .setParam("id", request.getId())
+        .setParam("name", request.getName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Create a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/create">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public CreateWsResponse create(CreateRequest request) {
+    return call(
+      new PostRequest(path("create"))
+        .setParam("name", request.getName()),
+      CreateWsResponse.parser());
+  }
+
+  /**
+   * Add a new condition to a quality gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/create_condition">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public CreateConditionWsResponse createCondition(CreateConditionRequest request) {
+    return call(
+      new PostRequest(path("create_condition"))
+        .setParam("error", request.getError())
+        .setParam("gateId", request.getGateId())
+        .setParam("metric", request.getMetric())
+        .setParam("op", request.getOp())
+        .setParam("period", request.getPeriod())
+        .setParam("warning", request.getWarning()),
+      CreateConditionWsResponse.parser());
+  }
+
+  /**
+   * Delete a condition from a quality gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/delete_condition">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public void deleteCondition(DeleteConditionRequest request) {
+    call(
+      new PostRequest(path("delete_condition"))
+        .setParam("id", request.getId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove the association of a project from a quality gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/deselect">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public void deselect(DeselectRequest request) {
+    call(
+      new PostRequest(path("deselect"))
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Delete a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/destroy">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public void destroy(DestroyRequest request) {
+    call(
+      new PostRequest(path("destroy"))
+        .setParam("id", request.getId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get the quality gate of a project.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/get_by_project">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public GetByProjectWsResponse getByProject(GetByProjectRequest request) {
+    return call(
+      new GetRequest(path("get_by_project"))
+        .setParam("project", request.getProject()),
+      GetByProjectWsResponse.parser());
+  }
+
+  /**
+   * Get a list of quality gates
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @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() {
+    return call(
+      new GetRequest(path("list"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get the quality gate status of a project or a Compute Engine task.<br />Either 'analysisId', 'projectId' or 'projectKey' must be provided<br />The different statuses returned are: OK, WARN, ERROR, NONE. The NONE status is returned when there is no quality gate associated with the analysis.<br />Returns an HTTP code 404 if the analysis associated with the task is not found or does not exist.<br />Requires one of the following permissions:<ul><li>'Administer System'</li><li>'Administer' rights on the specified project</li><li>'Browse' on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/project_status">Further information about this action online (including a response example)</a>
+   * @since 5.3
+   */
+  public ProjectStatusWsResponse projectStatus(ProjectStatusRequest request) {
+    return call(
+      new GetRequest(path("project_status"))
+        .setParam("analysisId", request.getAnalysisId())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey()),
+      ProjectStatusWsResponse.parser());
+  }
+
+  /**
+   * Rename a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/rename">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public void rename(RenameRequest request) {
+    call(
+      new PostRequest(path("rename"))
+        .setParam("id", request.getId())
+        .setParam("name", request.getName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for projects associated (or not) to a quality gate.<br/>Only authorized projects for current user will be returned.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/search">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public String search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("gateId", request.getGateId())
+        .setParam("page", request.getPage())
+        .setParam("pageSize", request.getPageSize())
+        .setParam("query", request.getQuery())
+        .setParam("selected", request.getSelected())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Associate a project to a quality gate.<br>The 'projectId' or 'projectKey' must be provided.<br>Project id as a numeric value is deprecated since 6.1. Please use the id similar to 'AU-TpxcA-iU5OvuD2FLz'.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/select">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public void select(SelectRequest request) {
+    call(
+      new PostRequest(path("select"))
+        .setParam("gateId", request.getGateId())
+        .setParam("projectId", request.getProjectId())
+        .setParam("projectKey", request.getProjectKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Set a quality gate as the default quality gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/set_as_default">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public void setAsDefault(SetAsDefaultRequest request) {
+    call(
+      new PostRequest(path("set_as_default"))
+        .setParam("id", request.getId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Display the details of a quality gate
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @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) {
+    return call(
+      new GetRequest(path("show"))
+        .setParam("id", request.getId())
+        .setParam("name", request.getName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Unset a quality gate as the default quality gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * 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
+   */
+  public void unsetDefault(UnsetDefaultRequest request) {
+    call(
+      new PostRequest(path("unset_default"))
+        .setParam("id", request.getId())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Update a condition attached to a quality gate.<br>Requires the 'Administer Quality Gates' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/update_condition">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public void updateCondition(UpdateConditionRequest request) {
+    call(
+      new PostRequest(path("update_condition"))
+        .setParam("error", request.getError())
+        .setParam("id", request.getId())
+        .setParam("metric", request.getMetric())
+        .setParam("op", request.getOp())
+        .setParam("period", request.getPeriod())
+        .setParam("warning", request.getWarning()),
+      UpdateConditionWsResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/RenameRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/RenameRequest.java
new file mode 100644 (file)
index 0000000..8d34eca
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Rename a Quality Gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/rename">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RenameRequest {
+
+  private String id;
+  private String name;
+
+  /**
+   * ID of the quality gate to rename
+   *
+   * This is a mandatory parameter.
+   * Example value: "1"
+   */
+  public RenameRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * New name of the quality gate
+   *
+   * This is a mandatory parameter.
+   * Example value: "My Quality Gate"
+   */
+  public RenameRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SearchRequest.java
new file mode 100644 (file)
index 0000000..0a89b6b
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for projects associated (or not) to a quality gate.<br/>Only authorized projects for current user will be returned.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/search">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String gateId;
+  private String page;
+  private String pageSize;
+  private String query;
+  private String selected;
+
+  /**
+   * Quality Gate ID
+   *
+   * This is a mandatory parameter.
+   * Example value: "1"
+   */
+  public SearchRequest setGateId(String gateId) {
+    this.gateId = gateId;
+    return this;
+  }
+
+  public String getGateId() {
+    return gateId;
+  }
+
+  /**
+   * Page number
+   *
+   * Example value: "2"
+   */
+  public SearchRequest setPage(String page) {
+    this.page = page;
+    return this;
+  }
+
+  public String getPage() {
+    return page;
+  }
+
+  /**
+   * Page size
+   *
+   * Example value: "10"
+   */
+  public SearchRequest setPageSize(String pageSize) {
+    this.pageSize = pageSize;
+    return this;
+  }
+
+  public String getPageSize() {
+    return pageSize;
+  }
+
+  /**
+   * To search for projects containing this string. If this parameter is set, "selected" is set to "all".
+   *
+   * Example value: "abc"
+   */
+  public SearchRequest setQuery(String query) {
+    this.query = query;
+    return this;
+  }
+
+  public String getQuery() {
+    return query;
+  }
+
+  /**
+   * Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"all"</li>
+   *   <li>"deselected"</li>
+   *   <li>"selected"</li>
+   * </ul>
+   */
+  public SearchRequest setSelected(String selected) {
+    this.selected = selected;
+    return this;
+  }
+
+  public String getSelected() {
+    return selected;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SelectRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SelectRequest.java
new file mode 100644 (file)
index 0000000..be1fb81
--- /dev/null
@@ -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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Associate a project to a quality gate.<br>The 'projectId' or 'projectKey' must be provided.<br>Project id as a numeric value is deprecated since 6.1. Please use the id similar to 'AU-TpxcA-iU5OvuD2FLz'.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/select">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SelectRequest {
+
+  private String gateId;
+  private String projectId;
+  private String projectKey;
+
+  /**
+   * Quality gate id
+   *
+   * This is a mandatory parameter.
+   * Example value: "1"
+   */
+  public SelectRequest setGateId(String gateId) {
+    this.gateId = gateId;
+    return this;
+  }
+
+  public String getGateId() {
+    return gateId;
+  }
+
+  /**
+   * Project id. Project id as an numeric value is deprecated since 6.1
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public SelectRequest setProjectId(String projectId) {
+    this.projectId = projectId;
+    return this;
+  }
+
+  public String getProjectId() {
+    return projectId;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public SelectRequest setProjectKey(String projectKey) {
+    this.projectKey = projectKey;
+    return this;
+  }
+
+  public String getProjectKey() {
+    return projectKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SetAsDefaultRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/SetAsDefaultRequest.java
new file mode 100644 (file)
index 0000000..b71bfba
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Set a quality gate as the default quality gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/set_as_default">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetAsDefaultRequest {
+
+  private String id;
+
+  /**
+   * ID of the quality gate to set as default
+   *
+   * This is a mandatory parameter.
+   * Example value: "1"
+   */
+  public SetAsDefaultRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/ShowRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/ShowRequest.java
new file mode 100644 (file)
index 0000000..c14c39f
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Display the details of a quality gate
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @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
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ShowRequest {
+
+  private String id;
+  private String name;
+
+  /**
+   * ID of the quality gate. Either id or name must be set
+   *
+   * Example value: "1"
+   */
+  public ShowRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * Name of the quality gate. Either id or name must be set
+   *
+   * Example value: "My Quality Gate"
+   */
+  public ShowRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/UnsetDefaultRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/UnsetDefaultRequest.java
new file mode 100644 (file)
index 0000000..ab0e72e
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Unset a quality gate as the default quality gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * 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
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UnsetDefaultRequest {
+
+  private String id;
+
+  /**
+   * ID of the quality gate to unset as default
+   *
+   * This is a mandatory parameter.
+   * Example value: "1"
+   */
+  public UnsetDefaultRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/UpdateConditionRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/UpdateConditionRequest.java
new file mode 100644 (file)
index 0000000..96b49d8
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * 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.qualitygates;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update a condition attached to a quality gate.<br>Requires the 'Administer Quality Gates' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualitygates/update_condition">Further information about this action online (including a response example)</a>
+ * @since 4.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateConditionRequest {
+
+  private String error;
+  private String id;
+  private String metric;
+  private String op;
+  private String period;
+  private String warning;
+
+  /**
+   * Condition error threshold
+   *
+   * Example value: "10"
+   */
+  public UpdateConditionRequest setError(String error) {
+    this.error = error;
+    return this;
+  }
+
+  public String getError() {
+    return error;
+  }
+
+  /**
+   * Condition ID
+   *
+   * This is a mandatory parameter.
+   * Example value: "10"
+   */
+  public UpdateConditionRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * Condition metric
+   *
+   * This is a mandatory parameter.
+   * Example value: "blocker_violations"
+   */
+  public UpdateConditionRequest setMetric(String metric) {
+    this.metric = metric;
+    return this;
+  }
+
+  public String getMetric() {
+    return metric;
+  }
+
+  /**
+   * Condition operator:<br/><ul><li>EQ = equals</li><li>NE = is not</li><li>LT = is lower than</li><li>GT = is greater than</li></ui>
+   *
+   * Example value: "EQ"
+   * Possible values:
+   * <ul>
+   *   <li>"LT"</li>
+   *   <li>"GT"</li>
+   *   <li>"EQ"</li>
+   *   <li>"NE"</li>
+   * </ul>
+   */
+  public UpdateConditionRequest setOp(String op) {
+    this.op = op;
+    return this;
+  }
+
+  public String getOp() {
+    return op;
+  }
+
+  /**
+   * Condition period. If not set, the absolute value is considered.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"1"</li>
+   * </ul>
+   */
+  public UpdateConditionRequest setPeriod(String period) {
+    this.period = period;
+    return this;
+  }
+
+  public String getPeriod() {
+    return period;
+  }
+
+  /**
+   * Condition warning threshold
+   *
+   * Example value: "5"
+   */
+  public UpdateConditionRequest setWarning(String warning) {
+    this.warning = warning;
+    return this;
+  }
+
+  public String getWarning() {
+    return warning;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualitygates/package-info.java
new file mode 100644 (file)
index 0000000..130a03c
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.qualitygates;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ActivateRuleRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ActivateRuleRequest.java
new file mode 100644 (file)
index 0000000..d4e48fa
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Activate a rule on a Quality Profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/activate_rule">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ActivateRuleRequest {
+
+  private String key;
+  private String params;
+  private String reset;
+  private String rule;
+  private String severity;
+
+  /**
+   * Quality Profile key. Can be obtained through <code>api/qualityprofiles/search</code>
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public ActivateRuleRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Parameters as semi-colon list of <code>key=value</code>. Ignored if parameter reset is true.
+   *
+   * Example value: "params=key1=v1;key2=v2"
+   */
+  public ActivateRuleRequest setParams(String params) {
+    this.params = params;
+    return this;
+  }
+
+  public String getParams() {
+    return params;
+  }
+
+  /**
+   * Reset severity and parameters of activated rule. Set the values defined on parent profile or from rule default values.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ActivateRuleRequest setReset(String reset) {
+    this.reset = reset;
+    return this;
+  }
+
+  public String getReset() {
+    return reset;
+  }
+
+  /**
+   * Rule key
+   *
+   * This is a mandatory parameter.
+   * Example value: "squid:AvoidCycles"
+   */
+  public ActivateRuleRequest setRule(String rule) {
+    this.rule = rule;
+    return this;
+  }
+
+  public String getRule() {
+    return rule;
+  }
+
+  /**
+   * Severity. Ignored if parameter reset is true.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public ActivateRuleRequest setSeverity(String severity) {
+    this.severity = severity;
+    return this;
+  }
+
+  public String getSeverity() {
+    return severity;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ActivateRulesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ActivateRulesRequest.java
new file mode 100644 (file)
index 0000000..3dfd829
--- /dev/null
@@ -0,0 +1,421 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Bulk-activate rules on one quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/activate_rules">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ActivateRulesRequest {
+
+  private String activation;
+  private List<String> activeSeverities;
+  private String asc;
+  private String availableSince;
+  private String compareToProfile;
+  private List<String> inheritance;
+  private String isTemplate;
+  private List<String> languages;
+  private String organization;
+  private String q;
+  private String qprofile;
+  private List<String> repositories;
+  private String ruleKey;
+  private String s;
+  private List<String> severities;
+  private List<String> statuses;
+  private List<String> tags;
+  private String targetKey;
+  private String targetSeverity;
+  private String templateKey;
+  private List<String> types;
+
+  /**
+   * Filter rules that are activated or deactivated on the selected Quality profile. Ignored if the parameter 'qprofile' is not set.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setActivation(String activation) {
+    this.activation = activation;
+    return this;
+  }
+
+  public String getActivation() {
+    return activation;
+  }
+
+  /**
+   * Comma-separated list of activation severities, i.e the severity of rules in Quality profiles.
+   *
+   * Example value: "CRITICAL,BLOCKER"
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setActiveSeverities(List<String> activeSeverities) {
+    this.activeSeverities = activeSeverities;
+    return this;
+  }
+
+  public List<String> getActiveSeverities() {
+    return activeSeverities;
+  }
+
+  /**
+   * Ascending sort
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setAsc(String asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  public String getAsc() {
+    return asc;
+  }
+
+  /**
+   * Filters rules added since date. Format is yyyy-MM-dd
+   *
+   * Example value: "2014-06-22"
+   */
+  public ActivateRulesRequest setAvailableSince(String availableSince) {
+    this.availableSince = availableSince;
+    return this;
+  }
+
+  public String getAvailableSince() {
+    return availableSince;
+  }
+
+  /**
+   * Quality profile key to filter rules that are activated. Meant to compare easily to profile set in 'qprofile'
+   *
+   * This is part of the internal API.
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   */
+  public ActivateRulesRequest setCompareToProfile(String compareToProfile) {
+    this.compareToProfile = compareToProfile;
+    return this;
+  }
+
+  public String getCompareToProfile() {
+    return compareToProfile;
+  }
+
+  /**
+   * Comma-separated list of values of inheritance for a rule within a quality profile. Used only if the parameter 'activation' is set.
+   *
+   * Example value: "INHERITED,OVERRIDES"
+   * Possible values:
+   * <ul>
+   *   <li>"NONE"</li>
+   *   <li>"INHERITED"</li>
+   *   <li>"OVERRIDES"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setInheritance(List<String> inheritance) {
+    this.inheritance = inheritance;
+    return this;
+  }
+
+  public List<String> getInheritance() {
+    return inheritance;
+  }
+
+  /**
+   * Filter template rules
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setIsTemplate(String isTemplate) {
+    this.isTemplate = isTemplate;
+    return this;
+  }
+
+  public String getIsTemplate() {
+    return isTemplate;
+  }
+
+  /**
+   * Comma-separated list of languages
+   *
+   * Example value: "java,js"
+   */
+  public ActivateRulesRequest setLanguages(List<String> languages) {
+    this.languages = languages;
+    return this;
+  }
+
+  public List<String> getLanguages() {
+    return languages;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public ActivateRulesRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * UTF-8 search query
+   *
+   * Example value: "xpath"
+   */
+  public ActivateRulesRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Quality profile key to filter on. Used only if the parameter 'activation' is set.
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public ActivateRulesRequest setQprofile(String qprofile) {
+    this.qprofile = qprofile;
+    return this;
+  }
+
+  public String getQprofile() {
+    return qprofile;
+  }
+
+  /**
+   * Comma-separated list of repositories
+   *
+   * Example value: "checkstyle,findbugs"
+   */
+  public ActivateRulesRequest setRepositories(List<String> repositories) {
+    this.repositories = repositories;
+    return this;
+  }
+
+  public List<String> getRepositories() {
+    return repositories;
+  }
+
+  /**
+   * Key of rule to search for
+   *
+   * Example value: "squid:S001"
+   */
+  public ActivateRulesRequest setRuleKey(String ruleKey) {
+    this.ruleKey = ruleKey;
+    return this;
+  }
+
+  public String getRuleKey() {
+    return ruleKey;
+  }
+
+  /**
+   * Sort field
+   *
+   * Example value: "name"
+   * Possible values:
+   * <ul>
+   *   <li>"name"</li>
+   *   <li>"updatedAt"</li>
+   *   <li>"createdAt"</li>
+   *   <li>"key"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setS(String s) {
+    this.s = s;
+    return this;
+  }
+
+  public String getS() {
+    return s;
+  }
+
+  /**
+   * Comma-separated list of default severities. Not the same than severity of rules in Quality profiles.
+   *
+   * Example value: "CRITICAL,BLOCKER"
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setSeverities(List<String> severities) {
+    this.severities = severities;
+    return this;
+  }
+
+  public List<String> getSeverities() {
+    return severities;
+  }
+
+  /**
+   * Comma-separated list of status codes
+   *
+   * Example value: "READY"
+   * Possible values:
+   * <ul>
+   *   <li>"BETA"</li>
+   *   <li>"DEPRECATED"</li>
+   *   <li>"READY"</li>
+   *   <li>"REMOVED"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setStatuses(List<String> statuses) {
+    this.statuses = statuses;
+    return this;
+  }
+
+  public List<String> getStatuses() {
+    return statuses;
+  }
+
+  /**
+   * Comma-separated list of tags. Returned rules match any of the tags (OR operator)
+   *
+   * Example value: "security,java8"
+   */
+  public ActivateRulesRequest setTags(List<String> tags) {
+    this.tags = tags;
+    return this;
+  }
+
+  public List<String> getTags() {
+    return tags;
+  }
+
+  /**
+   * Quality Profile key on which the rule activation is done. To retrieve a quality profile key please see <code>api/qualityprofiles/search</code>
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-TpxcA-iU5OvuD2FL0"
+   */
+  public ActivateRulesRequest setTargetKey(String targetKey) {
+    this.targetKey = targetKey;
+    return this;
+  }
+
+  public String getTargetKey() {
+    return targetKey;
+  }
+
+  /**
+   * Severity to set on the activated rules
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setTargetSeverity(String targetSeverity) {
+    this.targetSeverity = targetSeverity;
+    return this;
+  }
+
+  public String getTargetSeverity() {
+    return targetSeverity;
+  }
+
+  /**
+   * Key of the template rule to filter on. Used to search for the custom rules based on this template.
+   *
+   * Example value: "java:S001"
+   */
+  public ActivateRulesRequest setTemplateKey(String templateKey) {
+    this.templateKey = templateKey;
+    return this;
+  }
+
+  public String getTemplateKey() {
+    return templateKey;
+  }
+
+  /**
+   * Comma-separated list of types. Returned rules match any of the tags (OR operator)
+   *
+   * Example value: "BUG"
+   * Possible values:
+   * <ul>
+   *   <li>"CODE_SMELL"</li>
+   *   <li>"BUG"</li>
+   *   <li>"VULNERABILITY"</li>
+   * </ul>
+   */
+  public ActivateRulesRequest setTypes(List<String> types) {
+    this.types = types;
+    return this;
+  }
+
+  public List<String> getTypes() {
+    return types;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddGroupRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddGroupRequest.java
new file mode 100644 (file)
index 0000000..6418e4d
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Allow a group to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/add_group">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddGroupRequest {
+
+  private String group;
+  private String language;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Group name
+   *
+   * This is a mandatory parameter.
+   * Example value: "sonar-administrators"
+   */
+  public AddGroupRequest setGroup(String group) {
+    this.group = group;
+    return this;
+  }
+
+  public String getGroup() {
+    return group;
+  }
+
+  /**
+   * Quality profile language
+   *
+   * This is a mandatory parameter.
+   */
+  public AddGroupRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddGroupRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality Profile name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Recommended quality profile"
+   */
+  public AddGroupRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddProjectRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddProjectRequest.java
new file mode 100644 (file)
index 0000000..17641c0
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Associate a project with a quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li>  <li>Administer right on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/add_project">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddProjectRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String project;
+  private String projectUuid;
+  private String qualityProfile;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public AddProjectRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   */
+  public AddProjectRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddProjectRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public AddProjectRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Project ID. Either this parameter or 'project' must be set.
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FL5"
+   * @deprecated since 6.5
+   */
+  @Deprecated
+  public AddProjectRequest setProjectUuid(String projectUuid) {
+    this.projectUuid = projectUuid;
+    return this;
+  }
+
+  public String getProjectUuid() {
+    return projectUuid;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public AddProjectRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddUserRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/AddUserRequest.java
new file mode 100644 (file)
index 0000000..4d8e684
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Allow a user to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/add_user">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddUserRequest {
+
+  private String language;
+  private String login;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Quality profile language
+   *
+   * This is a mandatory parameter.
+   */
+  public AddUserRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "john.doe"
+   */
+  public AddUserRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddUserRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality Profile name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Recommended quality profile"
+   */
+  public AddUserRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/BackupRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/BackupRequest.java
new file mode 100644 (file)
index 0000000..d6cadd4
--- /dev/null
@@ -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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Backup a quality profile in XML form. The exported profile can be restored through api/qualityprofiles/restore.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/backup">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class BackupRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public BackupRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   */
+  public BackupRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public BackupRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public BackupRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ChangeParentRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ChangeParentRequest.java
new file mode 100644 (file)
index 0000000..6d1385b
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Change a quality profile's parent.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/change_parent">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ChangeParentRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String parentKey;
+  private String parentQualityProfile;
+  private String qualityProfile;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public ChangeParentRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   */
+  public ChangeParentRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public ChangeParentRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * New parent profile key.<br> If no profile is provided, the inheritance link with current parent profile (if any) is broken, which deactivates all rules which come from the parent and are not overridden.
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public ChangeParentRequest setParentKey(String parentKey) {
+    this.parentKey = parentKey;
+    return this;
+  }
+
+  public String getParentKey() {
+    return parentKey;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'parentKey' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public ChangeParentRequest setParentQualityProfile(String parentQualityProfile) {
+    this.parentQualityProfile = parentQualityProfile;
+    return this;
+  }
+
+  public String getParentQualityProfile() {
+    return parentQualityProfile;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public ChangeParentRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ChangelogRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ChangelogRequest.java
new file mode 100644 (file)
index 0000000..2f4ab9a
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the history of changes on a quality profile: rule activation/deactivation, change in parameters/severity. Events are ordered by date in descending order (most recent first).
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/changelog">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ChangelogRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String p;
+  private String ps;
+  private String qualityProfile;
+  private String since;
+  private String to;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public ChangelogRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   */
+  public ChangelogRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public ChangelogRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public ChangelogRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public ChangelogRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public ChangelogRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+
+  /**
+   * Start date for the changelog. <br>Either a date (server timezone) or datetime can be provided.
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public ChangelogRequest setSince(String since) {
+    this.since = since;
+    return this;
+  }
+
+  public String getSince() {
+    return since;
+  }
+
+  /**
+   * End date for the changelog. <br>Either a date (server timezone) or datetime can be provided.
+   *
+   * Example value: "2017-10-19 or 2017-10-19T13:00:00+0200"
+   */
+  public ChangelogRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CompareRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CompareRequest.java
new file mode 100644 (file)
index 0000000..267fc4d
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Compare two quality profiles.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/compare">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CompareRequest {
+
+  private String leftKey;
+  private String rightKey;
+
+  /**
+   * Profile key.
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public CompareRequest setLeftKey(String leftKey) {
+    this.leftKey = leftKey;
+    return this;
+  }
+
+  public String getLeftKey() {
+    return leftKey;
+  }
+
+  /**
+   * Another profile key.
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   */
+  public CompareRequest setRightKey(String rightKey) {
+    this.rightKey = rightKey;
+    return this;
+  }
+
+  public String getRightKey() {
+    return rightKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CopyRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CopyRequest.java
new file mode 100644 (file)
index 0000000..e960b0f
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Copy a quality profile.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/copy">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CopyRequest {
+
+  private String fromKey;
+  private String toName;
+
+  /**
+   * Quality profile key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public CopyRequest setFromKey(String fromKey) {
+    this.fromKey = fromKey;
+    return this;
+  }
+
+  public String getFromKey() {
+    return fromKey;
+  }
+
+  /**
+   * Name for the new quality profile.
+   *
+   * This is a mandatory parameter.
+   * Example value: "My Sonar way"
+   */
+  public CopyRequest setToName(String toName) {
+    this.toName = toName;
+    return this;
+  }
+
+  public String getToName() {
+    return toName;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/CreateRequest.java
new file mode 100644 (file)
index 0000000..4e503bf
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a quality profile.<br>Requires to be logged in and the 'Administer Quality Profiles' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/create">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String language;
+  private String name;
+  private String organization;
+
+  /**
+   * Quality profile language
+   *
+   * This is a mandatory parameter.
+   * Example value: "js"
+   */
+  public CreateRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Quality profile name
+   *
+   * This is a mandatory parameter.
+   * Example value: "My Sonar way"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public CreateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeactivateRuleRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeactivateRuleRequest.java
new file mode 100644 (file)
index 0000000..48ab5ef
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Deactivate a rule on a quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/deactivate_rule">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeactivateRuleRequest {
+
+  private String key;
+  private String rule;
+
+  /**
+   * Quality Profile key. Can be obtained through <code>api/qualityprofiles/search</code>
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public DeactivateRuleRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Rule key
+   *
+   * This is a mandatory parameter.
+   * Example value: "squid:AvoidCycles"
+   */
+  public DeactivateRuleRequest setRule(String rule) {
+    this.rule = rule;
+    return this;
+  }
+
+  public String getRule() {
+    return rule;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeactivateRulesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeactivateRulesRequest.java
new file mode 100644 (file)
index 0000000..df5d0d9
--- /dev/null
@@ -0,0 +1,399 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Bulk deactivate rules on Quality profiles.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/deactivate_rules">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeactivateRulesRequest {
+
+  private String activation;
+  private List<String> activeSeverities;
+  private String asc;
+  private String availableSince;
+  private String compareToProfile;
+  private List<String> inheritance;
+  private String isTemplate;
+  private List<String> languages;
+  private String organization;
+  private String q;
+  private String qprofile;
+  private List<String> repositories;
+  private String ruleKey;
+  private String s;
+  private List<String> severities;
+  private List<String> statuses;
+  private List<String> tags;
+  private String targetKey;
+  private String templateKey;
+  private List<String> types;
+
+  /**
+   * Filter rules that are activated or deactivated on the selected Quality profile. Ignored if the parameter 'qprofile' is not set.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setActivation(String activation) {
+    this.activation = activation;
+    return this;
+  }
+
+  public String getActivation() {
+    return activation;
+  }
+
+  /**
+   * Comma-separated list of activation severities, i.e the severity of rules in Quality profiles.
+   *
+   * Example value: "CRITICAL,BLOCKER"
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setActiveSeverities(List<String> activeSeverities) {
+    this.activeSeverities = activeSeverities;
+    return this;
+  }
+
+  public List<String> getActiveSeverities() {
+    return activeSeverities;
+  }
+
+  /**
+   * Ascending sort
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setAsc(String asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  public String getAsc() {
+    return asc;
+  }
+
+  /**
+   * Filters rules added since date. Format is yyyy-MM-dd
+   *
+   * Example value: "2014-06-22"
+   */
+  public DeactivateRulesRequest setAvailableSince(String availableSince) {
+    this.availableSince = availableSince;
+    return this;
+  }
+
+  public String getAvailableSince() {
+    return availableSince;
+  }
+
+  /**
+   * Quality profile key to filter rules that are activated. Meant to compare easily to profile set in 'qprofile'
+   *
+   * This is part of the internal API.
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   */
+  public DeactivateRulesRequest setCompareToProfile(String compareToProfile) {
+    this.compareToProfile = compareToProfile;
+    return this;
+  }
+
+  public String getCompareToProfile() {
+    return compareToProfile;
+  }
+
+  /**
+   * Comma-separated list of values of inheritance for a rule within a quality profile. Used only if the parameter 'activation' is set.
+   *
+   * Example value: "INHERITED,OVERRIDES"
+   * Possible values:
+   * <ul>
+   *   <li>"NONE"</li>
+   *   <li>"INHERITED"</li>
+   *   <li>"OVERRIDES"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setInheritance(List<String> inheritance) {
+    this.inheritance = inheritance;
+    return this;
+  }
+
+  public List<String> getInheritance() {
+    return inheritance;
+  }
+
+  /**
+   * Filter template rules
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setIsTemplate(String isTemplate) {
+    this.isTemplate = isTemplate;
+    return this;
+  }
+
+  public String getIsTemplate() {
+    return isTemplate;
+  }
+
+  /**
+   * Comma-separated list of languages
+   *
+   * Example value: "java,js"
+   */
+  public DeactivateRulesRequest setLanguages(List<String> languages) {
+    this.languages = languages;
+    return this;
+  }
+
+  public List<String> getLanguages() {
+    return languages;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public DeactivateRulesRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * UTF-8 search query
+   *
+   * Example value: "xpath"
+   */
+  public DeactivateRulesRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Quality profile key to filter on. Used only if the parameter 'activation' is set.
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public DeactivateRulesRequest setQprofile(String qprofile) {
+    this.qprofile = qprofile;
+    return this;
+  }
+
+  public String getQprofile() {
+    return qprofile;
+  }
+
+  /**
+   * Comma-separated list of repositories
+   *
+   * Example value: "checkstyle,findbugs"
+   */
+  public DeactivateRulesRequest setRepositories(List<String> repositories) {
+    this.repositories = repositories;
+    return this;
+  }
+
+  public List<String> getRepositories() {
+    return repositories;
+  }
+
+  /**
+   * Key of rule to search for
+   *
+   * Example value: "squid:S001"
+   */
+  public DeactivateRulesRequest setRuleKey(String ruleKey) {
+    this.ruleKey = ruleKey;
+    return this;
+  }
+
+  public String getRuleKey() {
+    return ruleKey;
+  }
+
+  /**
+   * Sort field
+   *
+   * Example value: "name"
+   * Possible values:
+   * <ul>
+   *   <li>"name"</li>
+   *   <li>"updatedAt"</li>
+   *   <li>"createdAt"</li>
+   *   <li>"key"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setS(String s) {
+    this.s = s;
+    return this;
+  }
+
+  public String getS() {
+    return s;
+  }
+
+  /**
+   * Comma-separated list of default severities. Not the same than severity of rules in Quality profiles.
+   *
+   * Example value: "CRITICAL,BLOCKER"
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setSeverities(List<String> severities) {
+    this.severities = severities;
+    return this;
+  }
+
+  public List<String> getSeverities() {
+    return severities;
+  }
+
+  /**
+   * Comma-separated list of status codes
+   *
+   * Example value: "READY"
+   * Possible values:
+   * <ul>
+   *   <li>"BETA"</li>
+   *   <li>"DEPRECATED"</li>
+   *   <li>"READY"</li>
+   *   <li>"REMOVED"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setStatuses(List<String> statuses) {
+    this.statuses = statuses;
+    return this;
+  }
+
+  public List<String> getStatuses() {
+    return statuses;
+  }
+
+  /**
+   * Comma-separated list of tags. Returned rules match any of the tags (OR operator)
+   *
+   * Example value: "security,java8"
+   */
+  public DeactivateRulesRequest setTags(List<String> tags) {
+    this.tags = tags;
+    return this;
+  }
+
+  public List<String> getTags() {
+    return tags;
+  }
+
+  /**
+   * Quality Profile key on which the rule deactivation is done. To retrieve a profile key please see <code>api/qualityprofiles/search</code>
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-TpxcA-iU5OvuD2FL1"
+   */
+  public DeactivateRulesRequest setTargetKey(String targetKey) {
+    this.targetKey = targetKey;
+    return this;
+  }
+
+  public String getTargetKey() {
+    return targetKey;
+  }
+
+  /**
+   * Key of the template rule to filter on. Used to search for the custom rules based on this template.
+   *
+   * Example value: "java:S001"
+   */
+  public DeactivateRulesRequest setTemplateKey(String templateKey) {
+    this.templateKey = templateKey;
+    return this;
+  }
+
+  public String getTemplateKey() {
+    return templateKey;
+  }
+
+  /**
+   * Comma-separated list of types. Returned rules match any of the tags (OR operator)
+   *
+   * Example value: "BUG"
+   * Possible values:
+   * <ul>
+   *   <li>"CODE_SMELL"</li>
+   *   <li>"BUG"</li>
+   *   <li>"VULNERABILITY"</li>
+   * </ul>
+   */
+  public DeactivateRulesRequest setTypes(List<String> types) {
+    this.types = types;
+    return this;
+  }
+
+  public List<String> getTypes() {
+    return types;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/DeleteRequest.java
new file mode 100644 (file)
index 0000000..b387c1c
--- /dev/null
@@ -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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a quality profile and all its descendants. The default quality profile cannot be deleted.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/delete">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public DeleteRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   */
+  public DeleteRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public DeleteRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public DeleteRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ExportRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ExportRequest.java
new file mode 100644 (file)
index 0000000..6402b04
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Export a quality profile.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/export">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ExportRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public ExportRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language.  If this parameter is set, 'key' must not be set.
+   *
+   * Example value: ""
+   */
+  public ExportRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public ExportRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality profile name to export. If left empty, the default profile for the language is exported. If this parameter is set, 'key' must not be set.
+   *
+   * Example value: "My Sonar way"
+   */
+  public ExportRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/InheritanceRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/InheritanceRequest.java
new file mode 100644 (file)
index 0000000..5116110
--- /dev/null
@@ -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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Show a quality profile's ancestors and children.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/inheritance">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class InheritanceRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public InheritanceRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   */
+  public InheritanceRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public InheritanceRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public InheritanceRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ProjectsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ProjectsRequest.java
new file mode 100644 (file)
index 0000000..a1dfac3
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List projects with their association status regarding a quality profile
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/projects">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ProjectsRequest {
+
+  private String key;
+  private String p;
+  private String ps;
+  private String q;
+  private String selected;
+
+  /**
+   * Quality profile key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public ProjectsRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public ProjectsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public ProjectsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to projects that contain the supplied string.
+   *
+   * Example value: "sonar"
+   */
+  public ProjectsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"all"</li>
+   *   <li>"deselected"</li>
+   *   <li>"selected"</li>
+   * </ul>
+   */
+  public ProjectsRequest setSelected(String selected) {
+    this.selected = selected;
+    return this;
+  }
+
+  public String getSelected() {
+    return selected;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/QualityprofilesService.java
new file mode 100644 (file)
index 0000000..b7a6900
--- /dev/null
@@ -0,0 +1,639 @@
+/*
+ * 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.qualityprofiles;
+
+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.Qualityprofiles.CopyWsResponse;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
+import org.sonarqube.ws.Qualityprofiles.InheritanceWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchGroupsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchUsersResponse;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse;
+
+/**
+ * Manage quality profiles.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class QualityprofilesService extends BaseService {
+
+  public QualityprofilesService(WsConnector wsConnector) {
+    super(wsConnector, "api/qualityprofiles");
+  }
+
+  /**
+   * Activate a rule on a Quality Profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/activate_rule">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public void activateRule(ActivateRuleRequest request) {
+    call(
+      new PostRequest(path("activate_rule"))
+        .setParam("key", request.getKey())
+        .setParam("params", request.getParams())
+        .setParam("reset", request.getReset())
+        .setParam("rule", request.getRule())
+        .setParam("severity", request.getSeverity())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Bulk-activate rules on one quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/activate_rules">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public void activateRules(ActivateRulesRequest request) {
+    call(
+      new PostRequest(path("activate_rules"))
+        .setParam("activation", request.getActivation())
+        .setParam("active_severities", request.getActiveSeverities() == null ? null : request.getActiveSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("asc", request.getAsc())
+        .setParam("available_since", request.getAvailableSince())
+        .setParam("compareToProfile", request.getCompareToProfile())
+        .setParam("inheritance", request.getInheritance() == null ? null : request.getInheritance().stream().collect(Collectors.joining(",")))
+        .setParam("is_template", request.getIsTemplate())
+        .setParam("languages", request.getLanguages() == null ? null : request.getLanguages().stream().collect(Collectors.joining(",")))
+        .setParam("organization", request.getOrganization())
+        .setParam("q", request.getQ())
+        .setParam("qprofile", request.getQprofile())
+        .setParam("repositories", request.getRepositories() == null ? null : request.getRepositories().stream().collect(Collectors.joining(",")))
+        .setParam("rule_key", request.getRuleKey())
+        .setParam("s", request.getS())
+        .setParam("severities", request.getSeverities() == null ? null : request.getSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("statuses", request.getStatuses() == null ? null : request.getStatuses().stream().collect(Collectors.joining(",")))
+        .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
+        .setParam("targetKey", request.getTargetKey())
+        .setParam("targetSeverity", request.getTargetSeverity())
+        .setParam("template_key", request.getTemplateKey())
+        .setParam("types", request.getTypes() == null ? null : request.getTypes().stream().collect(Collectors.joining(",")))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Allow a group to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/add_group">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public void addGroup(AddGroupRequest request) {
+    call(
+      new PostRequest(path("add_group"))
+        .setParam("group", request.getGroup())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Associate a project with a quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li>  <li>Administer right on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/add_project">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void addProject(AddProjectRequest request) {
+    call(
+      new PostRequest(path("add_project"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("project", request.getProject())
+        .setParam("projectUuid", request.getProjectUuid())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Allow a user to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/add_user">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public void addUser(AddUserRequest request) {
+    call(
+      new PostRequest(path("add_user"))
+        .setParam("language", request.getLanguage())
+        .setParam("login", request.getLogin())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Backup a quality profile in XML form. The exported profile can be restored through api/qualityprofiles/restore.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/backup">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String backup(BackupRequest request) {
+    return call(
+      new GetRequest(path("backup"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Change a quality profile's parent.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/change_parent">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void changeParent(ChangeParentRequest request) {
+    call(
+      new PostRequest(path("change_parent"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("parentKey", request.getParentKey())
+        .setParam("parentQualityProfile", request.getParentQualityProfile())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get the history of changes on a quality profile: rule activation/deactivation, change in parameters/severity. Events are ordered by date in descending order (most recent first).
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/changelog">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String changelog(ChangelogRequest request) {
+    return call(
+      new GetRequest(path("changelog"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setParam("since", request.getSince())
+        .setParam("to", request.getTo())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Compare two quality profiles.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/compare">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String compare(CompareRequest request) {
+    return call(
+      new GetRequest(path("compare"))
+        .setParam("leftKey", request.getLeftKey())
+        .setParam("rightKey", request.getRightKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Copy a quality profile.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/copy">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void copy(CopyRequest request) {
+    call(
+      new PostRequest(path("copy"))
+        .setParam("fromKey", request.getFromKey())
+        .setParam("toName", request.getToName()),
+      CopyWsResponse.parser());
+  }
+
+  /**
+   * Create a quality profile.<br>Requires to be logged in and the 'Administer Quality Profiles' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/create">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public CreateWsResponse create(CreateRequest request) {
+    return call(
+      new PostRequest(path("create"))
+        .setParam("language", request.getLanguage())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization()),
+      CreateWsResponse.parser());
+  }
+
+  /**
+   * Deactivate a rule on a quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/deactivate_rule">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public void deactivateRule(DeactivateRuleRequest request) {
+    call(
+      new PostRequest(path("deactivate_rule"))
+        .setParam("key", request.getKey())
+        .setParam("rule", request.getRule())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Bulk deactivate rules on Quality profiles.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/deactivate_rules">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public void deactivateRules(DeactivateRulesRequest request) {
+    call(
+      new PostRequest(path("deactivate_rules"))
+        .setParam("activation", request.getActivation())
+        .setParam("active_severities", request.getActiveSeverities() == null ? null : request.getActiveSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("asc", request.getAsc())
+        .setParam("available_since", request.getAvailableSince())
+        .setParam("compareToProfile", request.getCompareToProfile())
+        .setParam("inheritance", request.getInheritance() == null ? null : request.getInheritance().stream().collect(Collectors.joining(",")))
+        .setParam("is_template", request.getIsTemplate())
+        .setParam("languages", request.getLanguages() == null ? null : request.getLanguages().stream().collect(Collectors.joining(",")))
+        .setParam("organization", request.getOrganization())
+        .setParam("q", request.getQ())
+        .setParam("qprofile", request.getQprofile())
+        .setParam("repositories", request.getRepositories() == null ? null : request.getRepositories().stream().collect(Collectors.joining(",")))
+        .setParam("rule_key", request.getRuleKey())
+        .setParam("s", request.getS())
+        .setParam("severities", request.getSeverities() == null ? null : request.getSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("statuses", request.getStatuses() == null ? null : request.getStatuses().stream().collect(Collectors.joining(",")))
+        .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
+        .setParam("targetKey", request.getTargetKey())
+        .setParam("template_key", request.getTemplateKey())
+        .setParam("types", request.getTypes() == null ? null : request.getTypes().stream().collect(Collectors.joining(",")))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Delete a quality profile and all its descendants. The default quality profile cannot be deleted.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/delete">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Export a quality profile.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/export">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String export(ExportRequest request) {
+    return call(
+      new GetRequest(path("export"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Lists available profile export formats.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/exporters">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String exporters() {
+    return call(
+      new GetRequest(path("exporters"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List supported importers.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/importers">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String importers() {
+    return call(
+      new GetRequest(path("importers"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Show a quality profile's ancestors and children.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/inheritance">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public InheritanceWsResponse inheritance(InheritanceRequest request) {
+    return call(
+      new GetRequest(path("inheritance"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile()),
+      InheritanceWsResponse.parser());
+  }
+
+  /**
+   * List projects with their association status regarding a quality profile
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/projects">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String projects(ProjectsRequest request) {
+    return call(
+      new GetRequest(path("projects"))
+        .setParam("key", request.getKey())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("selected", request.getSelected())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove the ability from a group to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/remove_group">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public void removeGroup(RemoveGroupRequest request) {
+    call(
+      new PostRequest(path("remove_group"))
+        .setParam("group", request.getGroup())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove a project's association with a quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li>  <li>Administer right on the specified project</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/remove_project">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void removeProject(RemoveProjectRequest request) {
+    call(
+      new PostRequest(path("remove_project"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("project", request.getProject())
+        .setParam("projectUuid", request.getProjectUuid())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove the ability from a user to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/remove_user">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public void removeUser(RemoveUserRequest request) {
+    call(
+      new PostRequest(path("remove_user"))
+        .setParam("language", request.getLanguage())
+        .setParam("login", request.getLogin())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Rename a quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/rename">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void rename(RenameRequest request) {
+    call(
+      new PostRequest(path("rename"))
+        .setParam("key", request.getKey())
+        .setParam("name", request.getName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Restore a quality profile using an XML file. The restored profile name is taken from the backup file, so if a profile with the same name and language already exists, it will be overwritten.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/restore">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void restore(RestoreRequest request) {
+    call(
+      new PostRequest(path("restore"))
+        .setParam("backup", request.getBackup())
+        .setParam("organization", request.getOrganization())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * This web service has no effect since 6.4. It's no more possible to restore built-in quality profiles because they are automatically updated and read only. Returns HTTP code 410.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/restore_built_in">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   * @deprecated since 6.4
+   */
+  @Deprecated
+  public void restoreBuiltIn() {
+    call(
+      new PostRequest(path("restore_built_in"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search quality profiles
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/search">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public SearchWsResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("defaults", request.getDefaults())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("project", request.getProject())
+        .setParam("qualityProfile", request.getQualityProfile()),
+      SearchWsResponse.parser());
+  }
+
+  /**
+   * List the groups that are allowed to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/search_groups">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public SearchGroupsResponse searchGroups(SearchGroupsRequest request) {
+    return call(
+      new GetRequest(path("search_groups"))
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setParam("selected", request.getSelected()),
+      SearchGroupsResponse.parser());
+  }
+
+  /**
+   * List the users that are allowed to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/search_users">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public SearchUsersResponse searchUsers(SearchUsersRequest request) {
+    return call(
+      new GetRequest(path("search_users"))
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setParam("selected", request.getSelected()),
+      SearchUsersResponse.parser());
+  }
+
+  /**
+   * Select the default profile for a given language.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/set_default">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void setDefault(SetDefaultRequest request) {
+    call(
+      new PostRequest(path("set_default"))
+        .setParam("key", request.getKey())
+        .setParam("language", request.getLanguage())
+        .setParam("organization", request.getOrganization())
+        .setParam("qualityProfile", request.getQualityProfile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Show a quality profile
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/show">Further information about this action online (including a response example)</a>
+   * @since 6.5
+   */
+  public ShowResponse show(ShowRequest request) {
+    return call(
+      new GetRequest(path("show"))
+        .setParam("compareToSonarWay", request.getCompareToSonarWay())
+        .setParam("key", request.getKey()),
+      ShowResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveGroupRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveGroupRequest.java
new file mode 100644 (file)
index 0000000..1ce019a
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove the ability from a group to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/remove_group">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveGroupRequest {
+
+  private String group;
+  private String language;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Group name
+   *
+   * This is a mandatory parameter.
+   * Example value: "sonar-administrators"
+   */
+  public RemoveGroupRequest setGroup(String group) {
+    this.group = group;
+    return this;
+  }
+
+  public String getGroup() {
+    return group;
+  }
+
+  /**
+   * Quality profile language
+   *
+   * This is a mandatory parameter.
+   */
+  public RemoveGroupRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveGroupRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality Profile name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Recommended quality profile"
+   */
+  public RemoveGroupRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveProjectRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveProjectRequest.java
new file mode 100644 (file)
index 0000000..33e13a8
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a project's association with a quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li>  <li>Administer right on the specified project</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/remove_project">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveProjectRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String project;
+  private String projectUuid;
+  private String qualityProfile;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public RemoveProjectRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   */
+  public RemoveProjectRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveProjectRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public RemoveProjectRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Project ID. Either this parameter, or 'project' must be set.
+   *
+   * Example value: "AU-TpxcB-iU5OvuD2FL6"
+   * @deprecated since 6.5
+   */
+  @Deprecated
+  public RemoveProjectRequest setProjectUuid(String projectUuid) {
+    this.projectUuid = projectUuid;
+    return this;
+  }
+
+  public String getProjectUuid() {
+    return projectUuid;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public RemoveProjectRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveUserRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RemoveUserRequest.java
new file mode 100644 (file)
index 0000000..4ac207f
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove the ability from a user to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/remove_user">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveUserRequest {
+
+  private String language;
+  private String login;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Quality profile language
+   *
+   * This is a mandatory parameter.
+   */
+  public RemoveUserRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "john.doe"
+   */
+  public RemoveUserRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveUserRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality Profile name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Recommended quality profile"
+   */
+  public RemoveUserRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RenameRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RenameRequest.java
new file mode 100644 (file)
index 0000000..089a27b
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Rename a quality profile.<br> Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/rename">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RenameRequest {
+
+  private String key;
+  private String name;
+
+  /**
+   * Quality profile key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public RenameRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * New quality profile name
+   *
+   * This is a mandatory parameter.
+   * Example value: "My Sonar way"
+   */
+  public RenameRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RestoreRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/RestoreRequest.java
new file mode 100644 (file)
index 0000000..881af40
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Restore a quality profile using an XML file. The restored profile name is taken from the backup file, so if a profile with the same name and language already exists, it will be overwritten.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/restore">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RestoreRequest {
+
+  private String backup;
+  private String organization;
+
+  /**
+   * A profile backup file in XML format, as generated by api/qualityprofiles/backup or the former api/profiles/backup.
+   *
+   * This is a mandatory parameter.
+   */
+  public RestoreRequest setBackup(String backup) {
+    this.backup = backup;
+    return this;
+  }
+
+  public String getBackup() {
+    return backup;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RestoreRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchGroupsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchGroupsRequest.java
new file mode 100644 (file)
index 0000000..ad4be2f
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List the groups that are allowed to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/search_groups">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchGroupsRequest {
+
+  private String language;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+  private String qualityProfile;
+  private String selected;
+
+  /**
+   * Quality profile language
+   *
+   * This is a mandatory parameter.
+   */
+  public SearchGroupsRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchGroupsRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchGroupsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0.
+   *
+   * Example value: "20"
+   */
+  public SearchGroupsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to group names that contain the supplied string.
+   *
+   * Example value: "sonar"
+   */
+  public SearchGroupsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Quality Profile name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Recommended quality profile"
+   */
+  public SearchGroupsRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+
+  /**
+   * Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"all"</li>
+   *   <li>"deselected"</li>
+   *   <li>"selected"</li>
+   * </ul>
+   */
+  public SearchGroupsRequest setSelected(String selected) {
+    this.selected = selected;
+    return this;
+  }
+
+  public String getSelected() {
+    return selected;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchRequest.java
new file mode 100644 (file)
index 0000000..08d2621
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search quality profiles
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/search">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String defaults;
+  private String language;
+  private String organization;
+  private String project;
+  private String qualityProfile;
+
+  /**
+   * If set to true, return only the quality profiles marked as default for each language
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setDefaults(String defaults) {
+    this.defaults = defaults;
+    return this;
+  }
+
+  public String getDefaults() {
+    return defaults;
+  }
+
+  /**
+   * Language key. If provided, only profiles for the given language are returned.
+   *
+   */
+  public SearchRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Project key
+   *
+   * Example value: "my_project"
+   */
+  public SearchRequest setProject(String project) {
+    this.project = project;
+    return this;
+  }
+
+  public String getProject() {
+    return project;
+  }
+
+  /**
+   * Quality profile name
+   *
+   * Example value: "SonarQube Way"
+   */
+  public SearchRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchUsersRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SearchUsersRequest.java
new file mode 100644 (file)
index 0000000..ed87489
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List the users that are allowed to edit a Quality Profile.<br>Requires one of the following permissions:<ul>  <li>'Administer Quality Profiles'</li>  <li>Edit right on the specified quality profile</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/search_users">Further information about this action online (including a response example)</a>
+ * @since 6.6
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchUsersRequest {
+
+  private String language;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+  private String qualityProfile;
+  private String selected;
+
+  /**
+   * Quality profile language
+   *
+   * This is a mandatory parameter.
+   */
+  public SearchUsersRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchUsersRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchUsersRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0.
+   *
+   * Example value: "20"
+   */
+  public SearchUsersRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to names or logins that contain the supplied string.
+   *
+   * Example value: "freddy"
+   */
+  public SearchUsersRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Quality Profile name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Recommended quality profile"
+   */
+  public SearchUsersRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+
+  /**
+   * Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"all"</li>
+   *   <li>"deselected"</li>
+   *   <li>"selected"</li>
+   * </ul>
+   */
+  public SearchUsersRequest setSelected(String selected) {
+    this.selected = selected;
+    return this;
+  }
+
+  public String getSelected() {
+    return selected;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SetDefaultRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/SetDefaultRequest.java
new file mode 100644 (file)
index 0000000..66f1d57
--- /dev/null
@@ -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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Select the default profile for a given language.<br> Requires to be logged in and the 'Administer Quality Profiles' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/set_default">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetDefaultRequest {
+
+  private String key;
+  private String language;
+  private String organization;
+  private String qualityProfile;
+
+  /**
+   * Quality profile key
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   * @deprecated since 6.6
+   */
+  @Deprecated
+  public SetDefaultRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Quality profile language. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   */
+  public SetDefaultRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * Organization key. If no organization is provided, the default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SetDefaultRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Quality profile name. If this parameter is set, 'key' must not be set and 'language' must be set to disambiguate.
+   *
+   * Example value: "Sonar way"
+   */
+  public SetDefaultRequest setQualityProfile(String qualityProfile) {
+    this.qualityProfile = qualityProfile;
+    return this;
+  }
+
+  public String getQualityProfile() {
+    return qualityProfile;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ShowRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/ShowRequest.java
new file mode 100644 (file)
index 0000000..68e84c4
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * 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.qualityprofiles;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Show a quality profile
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/qualityprofiles/show">Further information about this action online (including a response example)</a>
+ * @since 6.5
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ShowRequest {
+
+  private String compareToSonarWay;
+  private String key;
+
+  /**
+   * Add the number of missing rules from the related Sonar way profile in the response
+   *
+   * This is part of the internal API.
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ShowRequest setCompareToSonarWay(String compareToSonarWay) {
+    this.compareToSonarWay = compareToSonarWay;
+    return this;
+  }
+
+  public String getCompareToSonarWay() {
+    return compareToSonarWay;
+  }
+
+  /**
+   * Quality profile key
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public ShowRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/qualityprofiles/package-info.java
new file mode 100644 (file)
index 0000000..a86e3fb
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.qualityprofiles;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/resources/ResourcesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/resources/ResourcesService.java
new file mode 100644 (file)
index 0000000..2691016
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.resources;
+
+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;
+
+/**
+ * Removed since 6.3, please use api/components and api/measures instead
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/resources">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ResourcesService extends BaseService {
+
+  public ResourcesService(WsConnector wsConnector) {
+    super(wsConnector, "api/resources");
+  }
+
+  /**
+   * The web service is removed and you're invited to use the alternatives: <ul><li>if you need one component without measures: api/components/show</li><li>if you need one component with measures: api/measures/component</li><li>if you need several components without measures: api/components/tree</li><li>if you need several components with measures: api/measures/component_tree</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/resources/index">Further information about this action online (including a response example)</a>
+   * @since 2.10
+   * @deprecated since 5.4
+   */
+  @Deprecated
+  public String index() {
+    return call(
+      new GetRequest(path("index"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/resources/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/resources/package-info.java
new file mode 100644 (file)
index 0000000..4d0c676
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.resources;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/RootsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/RootsService.java
new file mode 100644 (file)
index 0000000..a1dc93f
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * 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.roots;
+
+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;
+
+/**
+ * Manage root users
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/roots">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RootsService extends BaseService {
+
+  public RootsService(WsConnector wsConnector) {
+    super(wsConnector, "api/roots");
+  }
+
+  /**
+   * Search for root users.<br/>Requires to be root.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/roots/search">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public String search() {
+    return call(
+      new GetRequest(path("search"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Make the specified user root.<br/>Requires to be root.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/roots/set_root">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public void setRoot(SetRootRequest request) {
+    call(
+      new PostRequest(path("set_root"))
+        .setParam("login", request.getLogin())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Make the specified user not root.<br/>Requires to be root.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/roots/unset_root">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public void unsetRoot(UnsetRootRequest request) {
+    call(
+      new PostRequest(path("unset_root"))
+        .setParam("login", request.getLogin())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/SetRootRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/SetRootRequest.java
new file mode 100644 (file)
index 0000000..1daa9a5
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.roots;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Make the specified user root.<br/>Requires to be root.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/roots/set_root">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetRootRequest {
+
+  private String login;
+
+  /**
+   * A user login
+   *
+   * This is a mandatory parameter.
+   * Example value: "admin"
+   */
+  public SetRootRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/UnsetRootRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/UnsetRootRequest.java
new file mode 100644 (file)
index 0000000..861c6a8
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.roots;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Make the specified user not root.<br/>Requires to be root.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/roots/unset_root">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UnsetRootRequest {
+
+  private String login;
+
+  /**
+   * A user login
+   *
+   * This is a mandatory parameter.
+   * Example value: "admin"
+   */
+  public UnsetRootRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/roots/package-info.java
new file mode 100644 (file)
index 0000000..5867569
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.roots;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/AppRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/AppRequest.java
new file mode 100644 (file)
index 0000000..7123eb6
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.rules;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get data required for rendering the page 'Coding Rules'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/app">Further information about this action online (including a response example)</a>
+ * @since 4.5
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AppRequest {
+
+  private String organization;
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AppRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/CreateRequest.java
new file mode 100644 (file)
index 0000000..8b8a123
--- /dev/null
@@ -0,0 +1,214 @@
+/*
+ * 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.rules;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a custom rule.<br>Requires the 'Administer Quality Profiles' permission
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/create">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String customKey;
+  private String manualKey;
+  private String markdownDescription;
+  private String name;
+  private String params;
+  private String preventReactivation;
+  private String severity;
+  private String status;
+  private String templateKey;
+  private String type;
+
+  /**
+   * Key of the custom rule
+   *
+   * This is a mandatory parameter.
+   * Example value: "Todo_should_not_be_used"
+   */
+  public CreateRequest setCustomKey(String customKey) {
+    this.customKey = customKey;
+    return this;
+  }
+
+  public String getCustomKey() {
+    return customKey;
+  }
+
+  /**
+   * Manual rules are no more supported. This parameter is ignored
+   *
+   * Example value: "Error_handling"
+   * @deprecated since 5.5
+   */
+  @Deprecated
+  public CreateRequest setManualKey(String manualKey) {
+    this.manualKey = manualKey;
+    return this;
+  }
+
+  public String getManualKey() {
+    return manualKey;
+  }
+
+  /**
+   * Rule description
+   *
+   * This is a mandatory parameter.
+   * Example value: "Description of my custom rule"
+   */
+  public CreateRequest setMarkdownDescription(String markdownDescription) {
+    this.markdownDescription = markdownDescription;
+    return this;
+  }
+
+  public String getMarkdownDescription() {
+    return markdownDescription;
+  }
+
+  /**
+   * Rule name
+   *
+   * This is a mandatory parameter.
+   * Example value: "My custom rule"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Parameters as semi-colon list of <key>=<value>, for example 'params=key1=v1;key2=v2' (Only for custom rule)
+   *
+   */
+  public CreateRequest setParams(String params) {
+    this.params = params;
+    return this;
+  }
+
+  public String getParams() {
+    return params;
+  }
+
+  /**
+   * If set to true and if the rule has been deactivated (status 'REMOVED'), a status 409 will be returned
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public CreateRequest setPreventReactivation(String preventReactivation) {
+    this.preventReactivation = preventReactivation;
+    return this;
+  }
+
+  public String getPreventReactivation() {
+    return preventReactivation;
+  }
+
+  /**
+   * Rule severity
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public CreateRequest setSeverity(String severity) {
+    this.severity = severity;
+    return this;
+  }
+
+  public String getSeverity() {
+    return severity;
+  }
+
+  /**
+   * Rule status
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"BETA"</li>
+   *   <li>"DEPRECATED"</li>
+   *   <li>"READY"</li>
+   *   <li>"REMOVED"</li>
+   * </ul>
+   */
+  public CreateRequest setStatus(String status) {
+    this.status = status;
+    return this;
+  }
+
+  public String getStatus() {
+    return status;
+  }
+
+  /**
+   * Key of the template rule in order to create a custom rule (mandatory for custom rule)
+   *
+   * Example value: "java:XPath"
+   */
+  public CreateRequest setTemplateKey(String templateKey) {
+    this.templateKey = templateKey;
+    return this;
+  }
+
+  public String getTemplateKey() {
+    return templateKey;
+  }
+
+  /**
+   * Rule type
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"CODE_SMELL"</li>
+   *   <li>"BUG"</li>
+   *   <li>"VULNERABILITY"</li>
+   * </ul>
+   */
+  public CreateRequest setType(String type) {
+    this.type = type;
+    return this;
+  }
+
+  public String getType() {
+    return type;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/DeleteRequest.java
new file mode 100644 (file)
index 0000000..b40e4d8
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.rules;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete custom rule.<br/>Requires the 'Administer Quality Profiles' permission
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/delete">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String key;
+
+  /**
+   * Rule key
+   *
+   * This is a mandatory parameter.
+   * Example value: "squid:XPath_1402065390816"
+   */
+  public DeleteRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/RepositoriesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/RepositoriesRequest.java
new file mode 100644 (file)
index 0000000..bcdf91d
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.rules;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List available rule repositories
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/repositories">Further information about this action online (including a response example)</a>
+ * @since 4.5
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RepositoriesRequest {
+
+  private String language;
+  private String q;
+
+  /**
+   * A language key; if provided, only repositories for the given language will be returned
+   *
+   * Example value: "java"
+   */
+  public RepositoriesRequest setLanguage(String language) {
+    this.language = language;
+    return this;
+  }
+
+  public String getLanguage() {
+    return language;
+  }
+
+  /**
+   * A pattern to match repository keys/names against
+   *
+   * Example value: "squid"
+   */
+  public RepositoriesRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/RulesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/RulesService.java
new file mode 100644 (file)
index 0000000..128eedf
--- /dev/null
@@ -0,0 +1,234 @@
+/*
+ * 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.rules;
+
+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.Rules.CreateResponse;
+import org.sonarqube.ws.Rules.ListResponse;
+import org.sonarqube.ws.Rules.SearchResponse;
+import org.sonarqube.ws.Rules.ShowResponse;
+import org.sonarqube.ws.Rules.UpdateResponse;
+
+/**
+ * Get and update some details of automatic rules, and manage custom rules.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RulesService extends BaseService {
+
+  public RulesService(WsConnector wsConnector) {
+    super(wsConnector, "api/rules");
+  }
+
+  /**
+   * Get data required for rendering the page 'Coding Rules'.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/app">Further information about this action online (including a response example)</a>
+   * @since 4.5
+   */
+  public String app(AppRequest request) {
+    return call(
+      new GetRequest(path("app"))
+        .setParam("organization", request.getOrganization())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Create a custom rule.<br>Requires the 'Administer Quality Profiles' permission
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/create">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public void create(CreateRequest request) {
+    call(
+      new PostRequest(path("create"))
+        .setParam("custom_key", request.getCustomKey())
+        .setParam("manual_key", request.getManualKey())
+        .setParam("markdown_description", request.getMarkdownDescription())
+        .setParam("name", request.getName())
+        .setParam("params", request.getParams())
+        .setParam("prevent_reactivation", request.getPreventReactivation())
+        .setParam("severity", request.getSeverity())
+        .setParam("status", request.getStatus())
+        .setParam("template_key", request.getTemplateKey())
+        .setParam("type", request.getType()),
+      CreateResponse.parser());
+  }
+
+  /**
+   * Delete custom rule.<br/>Requires the 'Administer Quality Profiles' permission
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/delete">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("key", request.getKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List rules, excluding the manual rules and the rules with status REMOVED. JSON format is not supported for response.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/list">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public ListResponse list() {
+    return call(
+      new GetRequest(path("list")),
+      ListResponse.parser());
+  }
+
+  /**
+   * List available rule repositories
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/repositories">Further information about this action online (including a response example)</a>
+   * @since 4.5
+   */
+  public String repositories(RepositoriesRequest request) {
+    return call(
+      new GetRequest(path("repositories"))
+        .setParam("language", request.getLanguage())
+        .setParam("q", request.getQ())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for a collection of relevant rules matching a specified query.<br/>Since 5.5, following fields in the response have been deprecated :<ul><li>"effortToFixDescription" becomes "gapDescription"</li><li>"debtRemFnCoeff" becomes "remFnGapMultiplier"</li><li>"defaultDebtRemFnCoeff" becomes "defaultRemFnGapMultiplier"</li><li>"debtRemFnOffset" becomes "remFnBaseEffort"</li><li>"defaultDebtRemFnOffset" becomes "defaultRemFnBaseEffort"</li><li>"debtOverloaded" becomes "remFnOverloaded"</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/search">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public SearchResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("activation", request.getActivation())
+        .setParam("active_severities", request.getActiveSeverities() == null ? null : request.getActiveSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("asc", request.getAsc())
+        .setParam("available_since", request.getAvailableSince())
+        .setParam("compareToProfile", request.getCompareToProfile())
+        .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
+        .setParam("facets", request.getFacets() == null ? null : request.getFacets().stream().collect(Collectors.joining(",")))
+        .setParam("inheritance", request.getInheritance() == null ? null : request.getInheritance().stream().collect(Collectors.joining(",")))
+        .setParam("is_template", request.getIsTemplate())
+        .setParam("languages", request.getLanguages() == null ? null : request.getLanguages().stream().collect(Collectors.joining(",")))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("qprofile", request.getQprofile())
+        .setParam("repositories", request.getRepositories() == null ? null : request.getRepositories().stream().collect(Collectors.joining(",")))
+        .setParam("rule_key", request.getRuleKey())
+        .setParam("s", request.getS())
+        .setParam("severities", request.getSeverities() == null ? null : request.getSeverities().stream().collect(Collectors.joining(",")))
+        .setParam("statuses", request.getStatuses() == null ? null : request.getStatuses().stream().collect(Collectors.joining(",")))
+        .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(",")))
+        .setParam("template_key", request.getTemplateKey())
+        .setParam("types", request.getTypes() == null ? null : request.getTypes().stream().collect(Collectors.joining(","))),
+      SearchResponse.parser());
+  }
+
+  /**
+   * Get detailed information about a rule<br>Since 5.5, following fields in the response have been deprecated :<ul><li>"effortToFixDescription" becomes "gapDescription"</li><li>"debtRemFnCoeff" becomes "remFnGapMultiplier"</li><li>"defaultDebtRemFnCoeff" becomes "defaultRemFnGapMultiplier"</li><li>"debtRemFnOffset" becomes "remFnBaseEffort"</li><li>"defaultDebtRemFnOffset" becomes "defaultRemFnBaseEffort"</li><li>"debtOverloaded" becomes "remFnOverloaded"</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/show">Further information about this action online (including a response example)</a>
+   * @since 4.2
+   */
+  public ShowResponse show(ShowRequest request) {
+    return call(
+      new GetRequest(path("show"))
+        .setParam("actives", request.getActives())
+        .setParam("key", request.getKey())
+        .setParam("organization", request.getOrganization()),
+      ShowResponse.parser());
+  }
+
+  /**
+   * List rule tags
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/tags">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public String tags(TagsRequest request) {
+    return call(
+      new GetRequest(path("tags"))
+        .setParam("organization", request.getOrganization())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Update an existing rule.<br>Requires the 'Administer Quality Profiles' permission
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/update">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public void update(UpdateRequest request) {
+    call(
+      new PostRequest(path("update"))
+        .setParam("debt_remediation_fn_offset", request.getDebtRemediationFnOffset())
+        .setParam("debt_remediation_fn_type", request.getDebtRemediationFnType())
+        .setParam("debt_remediation_fy_coeff", request.getDebtRemediationFyCoeff())
+        .setParam("debt_sub_characteristic", request.getDebtSubCharacteristic())
+        .setParam("key", request.getKey())
+        .setParam("markdown_description", request.getMarkdownDescription())
+        .setParam("markdown_note", request.getMarkdownNote())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization())
+        .setParam("params", request.getParams())
+        .setParam("remediation_fn_base_effort", request.getRemediationFnBaseEffort())
+        .setParam("remediation_fn_type", request.getRemediationFnType())
+        .setParam("remediation_fy_gap_multiplier", request.getRemediationFyGapMultiplier())
+        .setParam("severity", request.getSeverity())
+        .setParam("status", request.getStatus())
+        .setParam("tags", request.getTags() == null ? null : request.getTags().stream().collect(Collectors.joining(","))),
+      UpdateResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/SearchRequest.java
new file mode 100644 (file)
index 0000000..c732e6f
--- /dev/null
@@ -0,0 +1,484 @@
+/*
+ * 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.rules;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for a collection of relevant rules matching a specified query.<br/>Since 5.5, following fields in the response have been deprecated :<ul><li>"effortToFixDescription" becomes "gapDescription"</li><li>"debtRemFnCoeff" becomes "remFnGapMultiplier"</li><li>"defaultDebtRemFnCoeff" becomes "defaultRemFnGapMultiplier"</li><li>"debtRemFnOffset" becomes "remFnBaseEffort"</li><li>"defaultDebtRemFnOffset" becomes "defaultRemFnBaseEffort"</li><li>"debtOverloaded" becomes "remFnOverloaded"</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/search">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String activation;
+  private List<String> activeSeverities;
+  private String asc;
+  private String availableSince;
+  private String compareToProfile;
+  private List<String> f;
+  private List<String> facets;
+  private List<String> inheritance;
+  private String isTemplate;
+  private List<String> languages;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+  private String qprofile;
+  private List<String> repositories;
+  private String ruleKey;
+  private String s;
+  private List<String> severities;
+  private List<String> statuses;
+  private List<String> tags;
+  private String templateKey;
+  private List<String> types;
+
+  /**
+   * Filter rules that are activated or deactivated on the selected Quality profile. Ignored if the parameter 'qprofile' is not set.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setActivation(String activation) {
+    this.activation = activation;
+    return this;
+  }
+
+  public String getActivation() {
+    return activation;
+  }
+
+  /**
+   * Comma-separated list of activation severities, i.e the severity of rules in Quality profiles.
+   *
+   * Example value: "CRITICAL,BLOCKER"
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public SearchRequest setActiveSeverities(List<String> activeSeverities) {
+    this.activeSeverities = activeSeverities;
+    return this;
+  }
+
+  public List<String> getActiveSeverities() {
+    return activeSeverities;
+  }
+
+  /**
+   * Ascending sort
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setAsc(String asc) {
+    this.asc = asc;
+    return this;
+  }
+
+  public String getAsc() {
+    return asc;
+  }
+
+  /**
+   * Filters rules added since date. Format is yyyy-MM-dd
+   *
+   * Example value: "2014-06-22"
+   */
+  public SearchRequest setAvailableSince(String availableSince) {
+    this.availableSince = availableSince;
+    return this;
+  }
+
+  public String getAvailableSince() {
+    return availableSince;
+  }
+
+  /**
+   * Quality profile key to filter rules that are activated. Meant to compare easily to profile set in 'qprofile'
+   *
+   * This is part of the internal API.
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   */
+  public SearchRequest setCompareToProfile(String compareToProfile) {
+    this.compareToProfile = compareToProfile;
+    return this;
+  }
+
+  public String getCompareToProfile() {
+    return compareToProfile;
+  }
+
+  /**
+   * Comma-separated list of the fields to be returned in response. All the fields are returned by default, except actives.Since 5.5, following fields have been deprecated :<ul><li>"defaultDebtRemFn" becomes "defaultRemFn"</li><li>"debtRemFn" becomes "remFn"</li><li>"effortToFixDescription" becomes "gapDescription"</li><li>"debtOverloaded" becomes "remFnOverloaded"</li></ul>
+   *
+   * Example value: "repo,name"
+   * Possible values:
+   * <ul>
+   *   <li>"actives"</li>
+   *   <li>"createdAt"</li>
+   *   <li>"debtOverloaded"</li>
+   *   <li>"debtRemFn"</li>
+   *   <li>"defaultDebtRemFn"</li>
+   *   <li>"defaultRemFn"</li>
+   *   <li>"effortToFixDescription"</li>
+   *   <li>"gapDescription"</li>
+   *   <li>"htmlDesc"</li>
+   *   <li>"htmlNote"</li>
+   *   <li>"internalKey"</li>
+   *   <li>"isTemplate"</li>
+   *   <li>"lang"</li>
+   *   <li>"langName"</li>
+   *   <li>"mdDesc"</li>
+   *   <li>"mdNote"</li>
+   *   <li>"name"</li>
+   *   <li>"noteLogin"</li>
+   *   <li>"params"</li>
+   *   <li>"remFn"</li>
+   *   <li>"remFnOverloaded"</li>
+   *   <li>"repo"</li>
+   *   <li>"severity"</li>
+   *   <li>"status"</li>
+   *   <li>"sysTags"</li>
+   *   <li>"tags"</li>
+   *   <li>"templateKey"</li>
+   * </ul>
+   */
+  public SearchRequest setF(List<String> f) {
+    this.f = f;
+    return this;
+  }
+
+  public List<String> getF() {
+    return f;
+  }
+
+  /**
+   * Comma-separated list of the facets to be computed. No facet is computed by default.
+   *
+   * Example value: "languages,repositories"
+   * Possible values:
+   * <ul>
+   *   <li>"languages"</li>
+   *   <li>"repositories"</li>
+   *   <li>"tags"</li>
+   *   <li>"severities"</li>
+   *   <li>"active_severities"</li>
+   *   <li>"statuses"</li>
+   *   <li>"types"</li>
+   *   <li>"true"</li>
+   * </ul>
+   */
+  public SearchRequest setFacets(List<String> facets) {
+    this.facets = facets;
+    return this;
+  }
+
+  public List<String> getFacets() {
+    return facets;
+  }
+
+  /**
+   * Comma-separated list of values of inheritance for a rule within a quality profile. Used only if the parameter 'activation' is set.
+   *
+   * Example value: "INHERITED,OVERRIDES"
+   * Possible values:
+   * <ul>
+   *   <li>"NONE"</li>
+   *   <li>"INHERITED"</li>
+   *   <li>"OVERRIDES"</li>
+   * </ul>
+   */
+  public SearchRequest setInheritance(List<String> inheritance) {
+    this.inheritance = inheritance;
+    return this;
+  }
+
+  public List<String> getInheritance() {
+    return inheritance;
+  }
+
+  /**
+   * Filter template rules
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public SearchRequest setIsTemplate(String isTemplate) {
+    this.isTemplate = isTemplate;
+    return this;
+  }
+
+  public String getIsTemplate() {
+    return isTemplate;
+  }
+
+  /**
+   * Comma-separated list of languages
+   *
+   * Example value: "java,js"
+   */
+  public SearchRequest setLanguages(List<String> languages) {
+    this.languages = languages;
+    return this;
+  }
+
+  public List<String> getLanguages() {
+    return languages;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * UTF-8 search query
+   *
+   * Example value: "xpath"
+   */
+  public SearchRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Quality profile key to filter on. Used only if the parameter 'activation' is set.
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public SearchRequest setQprofile(String qprofile) {
+    this.qprofile = qprofile;
+    return this;
+  }
+
+  public String getQprofile() {
+    return qprofile;
+  }
+
+  /**
+   * Comma-separated list of repositories
+   *
+   * Example value: "checkstyle,findbugs"
+   */
+  public SearchRequest setRepositories(List<String> repositories) {
+    this.repositories = repositories;
+    return this;
+  }
+
+  public List<String> getRepositories() {
+    return repositories;
+  }
+
+  /**
+   * Key of rule to search for
+   *
+   * Example value: "squid:S001"
+   */
+  public SearchRequest setRuleKey(String ruleKey) {
+    this.ruleKey = ruleKey;
+    return this;
+  }
+
+  public String getRuleKey() {
+    return ruleKey;
+  }
+
+  /**
+   * Sort field
+   *
+   * Example value: "name"
+   * Possible values:
+   * <ul>
+   *   <li>"name"</li>
+   *   <li>"updatedAt"</li>
+   *   <li>"createdAt"</li>
+   *   <li>"key"</li>
+   * </ul>
+   */
+  public SearchRequest setS(String s) {
+    this.s = s;
+    return this;
+  }
+
+  public String getS() {
+    return s;
+  }
+
+  /**
+   * Comma-separated list of default severities. Not the same than severity of rules in Quality profiles.
+   *
+   * Example value: "CRITICAL,BLOCKER"
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public SearchRequest setSeverities(List<String> severities) {
+    this.severities = severities;
+    return this;
+  }
+
+  public List<String> getSeverities() {
+    return severities;
+  }
+
+  /**
+   * Comma-separated list of status codes
+   *
+   * Example value: "READY"
+   * Possible values:
+   * <ul>
+   *   <li>"BETA"</li>
+   *   <li>"DEPRECATED"</li>
+   *   <li>"READY"</li>
+   *   <li>"REMOVED"</li>
+   * </ul>
+   */
+  public SearchRequest setStatuses(List<String> statuses) {
+    this.statuses = statuses;
+    return this;
+  }
+
+  public List<String> getStatuses() {
+    return statuses;
+  }
+
+  /**
+   * Comma-separated list of tags. Returned rules match any of the tags (OR operator)
+   *
+   * Example value: "security,java8"
+   */
+  public SearchRequest setTags(List<String> tags) {
+    this.tags = tags;
+    return this;
+  }
+
+  public List<String> getTags() {
+    return tags;
+  }
+
+  /**
+   * Key of the template rule to filter on. Used to search for the custom rules based on this template.
+   *
+   * Example value: "java:S001"
+   */
+  public SearchRequest setTemplateKey(String templateKey) {
+    this.templateKey = templateKey;
+    return this;
+  }
+
+  public String getTemplateKey() {
+    return templateKey;
+  }
+
+  /**
+   * Comma-separated list of types. Returned rules match any of the tags (OR operator)
+   *
+   * Example value: "BUG"
+   * Possible values:
+   * <ul>
+   *   <li>"CODE_SMELL"</li>
+   *   <li>"BUG"</li>
+   *   <li>"VULNERABILITY"</li>
+   * </ul>
+   */
+  public SearchRequest setTypes(List<String> types) {
+    this.types = types;
+    return this;
+  }
+
+  public List<String> getTypes() {
+    return types;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/ShowRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/ShowRequest.java
new file mode 100644 (file)
index 0000000..253f057
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+ * 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.rules;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get detailed information about a rule<br>Since 5.5, following fields in the response have been deprecated :<ul><li>"effortToFixDescription" becomes "gapDescription"</li><li>"debtRemFnCoeff" becomes "remFnGapMultiplier"</li><li>"defaultDebtRemFnCoeff" becomes "defaultRemFnGapMultiplier"</li><li>"debtRemFnOffset" becomes "remFnBaseEffort"</li><li>"defaultDebtRemFnOffset" becomes "defaultRemFnBaseEffort"</li><li>"debtOverloaded" becomes "remFnOverloaded"</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/show">Further information about this action online (including a response example)</a>
+ * @since 4.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ShowRequest {
+
+  private String actives;
+  private String key;
+  private String organization;
+
+  /**
+   * Show rule's activations for all profiles ("active rules")
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ShowRequest setActives(String actives) {
+    this.actives = actives;
+    return this;
+  }
+
+  public String getActives() {
+    return actives;
+  }
+
+  /**
+   * Rule key
+   *
+   * This is a mandatory parameter.
+   * Example value: "javascript:EmptyBlock"
+   */
+  public ShowRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public ShowRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/TagsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/TagsRequest.java
new file mode 100644 (file)
index 0000000..cc1c6a3
--- /dev/null
@@ -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.rules;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List rule tags
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/tags">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class TagsRequest {
+
+  private String organization;
+  private String ps;
+  private String q;
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public TagsRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 100
+   *
+   * Example value: "20"
+   */
+  public TagsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to tags that contain the supplied string.
+   *
+   * Example value: "misra"
+   */
+  public TagsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/UpdateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/UpdateRequest.java
new file mode 100644 (file)
index 0000000..a692cb2
--- /dev/null
@@ -0,0 +1,299 @@
+/*
+ * 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.rules;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update an existing rule.<br>Requires the 'Administer Quality Profiles' permission
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/rules/update">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateRequest {
+
+  private String debtRemediationFnOffset;
+  private String debtRemediationFnType;
+  private String debtRemediationFyCoeff;
+  private String debtSubCharacteristic;
+  private String key;
+  private String markdownDescription;
+  private String markdownNote;
+  private String name;
+  private String organization;
+  private String params;
+  private String remediationFnBaseEffort;
+  private String remediationFnType;
+  private String remediationFyGapMultiplier;
+  private String severity;
+  private String status;
+  private List<String> tags;
+
+  /**
+   * @deprecated since 5.5
+   */
+  @Deprecated
+  public UpdateRequest setDebtRemediationFnOffset(String debtRemediationFnOffset) {
+    this.debtRemediationFnOffset = debtRemediationFnOffset;
+    return this;
+  }
+
+  public String getDebtRemediationFnOffset() {
+    return debtRemediationFnOffset;
+  }
+
+  /**
+   * Possible values:
+   * <ul>
+   *   <li>"LINEAR"</li>
+   *   <li>"LINEAR_OFFSET"</li>
+   *   <li>"CONSTANT_ISSUE"</li>
+   * </ul>
+   * @deprecated since 5.5
+   */
+  @Deprecated
+  public UpdateRequest setDebtRemediationFnType(String debtRemediationFnType) {
+    this.debtRemediationFnType = debtRemediationFnType;
+    return this;
+  }
+
+  public String getDebtRemediationFnType() {
+    return debtRemediationFnType;
+  }
+
+  /**
+   * @deprecated since 5.5
+   */
+  @Deprecated
+  public UpdateRequest setDebtRemediationFyCoeff(String debtRemediationFyCoeff) {
+    this.debtRemediationFyCoeff = debtRemediationFyCoeff;
+    return this;
+  }
+
+  public String getDebtRemediationFyCoeff() {
+    return debtRemediationFyCoeff;
+  }
+
+  /**
+   * Debt characteristics are no more supported. This parameter is ignored.
+   *
+   * @deprecated since 5.5
+   */
+  @Deprecated
+  public UpdateRequest setDebtSubCharacteristic(String debtSubCharacteristic) {
+    this.debtSubCharacteristic = debtSubCharacteristic;
+    return this;
+  }
+
+  public String getDebtSubCharacteristic() {
+    return debtSubCharacteristic;
+  }
+
+  /**
+   * Key of the rule to update
+   *
+   * This is a mandatory parameter.
+   * Example value: "javascript:NullCheck"
+   */
+  public UpdateRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Rule description (mandatory for custom rule and manual rule)
+   *
+   * Example value: "Description of my custom rule"
+   */
+  public UpdateRequest setMarkdownDescription(String markdownDescription) {
+    this.markdownDescription = markdownDescription;
+    return this;
+  }
+
+  public String getMarkdownDescription() {
+    return markdownDescription;
+  }
+
+  /**
+   * Optional note in markdown format. Use empty value to remove current note. Note is not changedif the parameter is not set.
+   *
+   * Example value: "my *note*"
+   */
+  public UpdateRequest setMarkdownNote(String markdownNote) {
+    this.markdownNote = markdownNote;
+    return this;
+  }
+
+  public String getMarkdownNote() {
+    return markdownNote;
+  }
+
+  /**
+   * Rule name (mandatory for custom rule)
+   *
+   * Example value: "My custom rule"
+   */
+  public UpdateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Organization key
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public UpdateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * Parameters as semi-colon list of <key>=<value>, for example 'params=key1=v1;key2=v2' (Only when updating a custom rule)
+   *
+   */
+  public UpdateRequest setParams(String params) {
+    this.params = params;
+    return this;
+  }
+
+  public String getParams() {
+    return params;
+  }
+
+  /**
+   * Base effort of the remediation function of the rule
+   *
+   * Example value: "1d"
+   */
+  public UpdateRequest setRemediationFnBaseEffort(String remediationFnBaseEffort) {
+    this.remediationFnBaseEffort = remediationFnBaseEffort;
+    return this;
+  }
+
+  public String getRemediationFnBaseEffort() {
+    return remediationFnBaseEffort;
+  }
+
+  /**
+   * Type of the remediation function of the rule
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"LINEAR"</li>
+   *   <li>"LINEAR_OFFSET"</li>
+   *   <li>"CONSTANT_ISSUE"</li>
+   * </ul>
+   */
+  public UpdateRequest setRemediationFnType(String remediationFnType) {
+    this.remediationFnType = remediationFnType;
+    return this;
+  }
+
+  public String getRemediationFnType() {
+    return remediationFnType;
+  }
+
+  /**
+   * Gap multiplier of the remediation function of the rule
+   *
+   * Example value: "3min"
+   */
+  public UpdateRequest setRemediationFyGapMultiplier(String remediationFyGapMultiplier) {
+    this.remediationFyGapMultiplier = remediationFyGapMultiplier;
+    return this;
+  }
+
+  public String getRemediationFyGapMultiplier() {
+    return remediationFyGapMultiplier;
+  }
+
+  /**
+   * Rule severity (Only when updating a custom rule)
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"INFO"</li>
+   *   <li>"MINOR"</li>
+   *   <li>"MAJOR"</li>
+   *   <li>"CRITICAL"</li>
+   *   <li>"BLOCKER"</li>
+   * </ul>
+   */
+  public UpdateRequest setSeverity(String severity) {
+    this.severity = severity;
+    return this;
+  }
+
+  public String getSeverity() {
+    return severity;
+  }
+
+  /**
+   * Rule status (Only when updating a custom rule)
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"BETA"</li>
+   *   <li>"DEPRECATED"</li>
+   *   <li>"READY"</li>
+   *   <li>"REMOVED"</li>
+   * </ul>
+   */
+  public UpdateRequest setStatus(String status) {
+    this.status = status;
+    return this;
+  }
+
+  public String getStatus() {
+    return status;
+  }
+
+  /**
+   * Optional comma-separated list of tags to set. Use blank value to remove current tags. Tags are not changed if the parameter is not set.
+   *
+   * Example value: "java8,security"
+   */
+  public UpdateRequest setTags(List<String> tags) {
+    this.tags = tags;
+    return this;
+  }
+
+  public List<String> getTags() {
+    return tags;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/rules/package-info.java
new file mode 100644 (file)
index 0000000..350942a
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.rules;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/server/ServerService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/server/ServerService.java
new file mode 100644 (file)
index 0000000..d55ddd8
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * 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.server;
+
+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;
+
+/**
+ * $webService.description.asString
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/server">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ServerService extends BaseService {
+
+  public ServerService(WsConnector wsConnector) {
+    super(wsConnector, "api/server");
+  }
+
+  /**
+   * Version of SonarQube in plain text
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/server/version">Further information about this action online (including a response example)</a>
+   * @since 2.10
+   */
+  public String version() {
+    return call(
+      new GetRequest(path("version"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/server/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/server/package-info.java
new file mode 100644 (file)
index 0000000..8e64aae
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.server;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/EncryptRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/EncryptRequest.java
new file mode 100644 (file)
index 0000000..331912b
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.settings;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Encrypt a setting value.<br>Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/encrypt">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class EncryptRequest {
+
+  private String value;
+
+  /**
+   * Setting value to encrypt
+   *
+   * This is a mandatory parameter.
+   * Example value: "my value"
+   */
+  public EncryptRequest setValue(String value) {
+    this.value = value;
+    return this;
+  }
+
+  public String getValue() {
+    return value;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ListDefinitionsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ListDefinitionsRequest.java
new file mode 100644 (file)
index 0000000..e804a25
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.settings;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List settings definitions.<br>Requires 'Browse' permission when a component is specified<br/>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/list_definitions">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ListDefinitionsRequest {
+
+  private String branch;
+  private String component;
+
+  /**
+   * Branch key. Only available on following settings : sonar.leak.period
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ListDefinitionsRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key
+   *
+   * Example value: "my_project"
+   */
+  public ListDefinitionsRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ResetRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ResetRequest.java
new file mode 100644 (file)
index 0000000..23b5978
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * 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.settings;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a setting value.<br>Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified component</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/reset">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ResetRequest {
+
+  private String branch;
+  private String component;
+  private String keys;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ResetRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key
+   *
+   * Example value: "my_project"
+   */
+  public ResetRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Setting keys
+   *
+   * This is a mandatory parameter.
+   * Example value: "sonar.links.scm,sonar.debt.hoursInDay"
+   */
+  public ResetRequest setKeys(String keys) {
+    this.keys = keys;
+    return this;
+  }
+
+  public String getKeys() {
+    return keys;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/SetRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/SetRequest.java
new file mode 100644 (file)
index 0000000..4e5fd14
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * 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.settings;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update a setting value.<br>Either 'value' or 'values' must be provided.<br> Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified component</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/set">Further information about this action online (including a response example)</a>
+ * @since 6.1
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SetRequest {
+
+  private String branch;
+  private String component;
+  private String fieldValues;
+  private String key;
+  private String value;
+  private String values;
+
+  /**
+   * Branch key. Only available on following settings : sonar.leak.period
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public SetRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key
+   *
+   * Example value: "my_project"
+   */
+  public SetRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * Setting field values. To set several values, the parameter must be called once for each value.
+   *
+   * Example value: "fieldValues={\"firstField\":\"first value\", \"secondField\":\"second value\", \"thirdField\":\"third value\"}"
+   */
+  public SetRequest setFieldValues(String fieldValues) {
+    this.fieldValues = fieldValues;
+    return this;
+  }
+
+  public String getFieldValues() {
+    return fieldValues;
+  }
+
+  /**
+   * Setting key
+   *
+   * This is a mandatory parameter.
+   * Example value: "sonar.links.scm"
+   */
+  public SetRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Setting value. To reset a value, please use the reset web service.
+   *
+   * Example value: "git@github.com:SonarSource/sonarqube.git"
+   */
+  public SetRequest setValue(String value) {
+    this.value = value;
+    return this;
+  }
+
+  public String getValue() {
+    return value;
+  }
+
+  /**
+   * Setting multi value. To set several values, the parameter must be called once for each value.
+   *
+   * Example value: "values=firstValue&values=secondValue&values=thirdValue"
+   */
+  public SetRequest setValues(String values) {
+    this.values = values;
+    return this;
+  }
+
+  public String getValues() {
+    return values;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/SettingsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/SettingsService.java
new file mode 100644 (file)
index 0000000..a060004
--- /dev/null
@@ -0,0 +1,160 @@
+/*
+ * 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.settings;
+
+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.Settings.CheckSecretKeyWsResponse;
+import org.sonarqube.ws.Settings.EncryptWsResponse;
+import org.sonarqube.ws.Settings.GenerateSecretKeyWsResponse;
+import org.sonarqube.ws.Settings.ListDefinitionsWsResponse;
+import org.sonarqube.ws.Settings.ValuesWsResponse;
+
+/**
+ * Manage settings.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SettingsService extends BaseService {
+
+  public SettingsService(WsConnector wsConnector) {
+    super(wsConnector, "api/settings");
+  }
+
+  /**
+   * Check if a secret key is available.<br>Requires the 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/check_secret_key">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public CheckSecretKeyWsResponse checkSecretKey() {
+    return call(
+      new GetRequest(path("check_secret_key")),
+      CheckSecretKeyWsResponse.parser());
+  }
+
+  /**
+   * Encrypt a setting value.<br>Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/encrypt">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public EncryptWsResponse encrypt(EncryptRequest request) {
+    return call(
+      new GetRequest(path("encrypt"))
+        .setParam("value", request.getValue()),
+      EncryptWsResponse.parser());
+  }
+
+  /**
+   * Generate a secret key.<br>Requires the 'Administer System' permission
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/generate_secret_key">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public GenerateSecretKeyWsResponse generateSecretKey() {
+    return call(
+      new GetRequest(path("generate_secret_key")),
+      GenerateSecretKeyWsResponse.parser());
+  }
+
+  /**
+   * List settings definitions.<br>Requires 'Browse' permission when a component is specified<br/>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/list_definitions">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public ListDefinitionsWsResponse listDefinitions(ListDefinitionsRequest request) {
+    return call(
+      new GetRequest(path("list_definitions"))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent()),
+      ListDefinitionsWsResponse.parser());
+  }
+
+  /**
+   * Remove a setting value.<br>Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified component</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/reset">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public void reset(ResetRequest request) {
+    call(
+      new PostRequest(path("reset"))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("keys", request.getKeys())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Update a setting value.<br>Either 'value' or 'values' must be provided.<br> Requires one of the following permissions: <ul><li>'Administer System'</li><li>'Administer' rights on the specified component</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/set">Further information about this action online (including a response example)</a>
+   * @since 6.1
+   */
+  public void set(SetRequest request) {
+    call(
+      new PostRequest(path("set"))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("fieldValues", request.getFieldValues())
+        .setParam("key", request.getKey())
+        .setParam("value", request.getValue())
+        .setParam("values", request.getValues())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List settings values.<br>If no value has been set for a setting, then the default value is returned.<br>Requires 'Browse' permission when a component is specified<br/>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/values">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public ValuesWsResponse values(ValuesRequest request) {
+    return call(
+      new GetRequest(path("values"))
+        .setParam("branch", request.getBranch())
+        .setParam("component", request.getComponent())
+        .setParam("keys", request.getKeys()),
+      ValuesWsResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ValuesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/ValuesRequest.java
new file mode 100644 (file)
index 0000000..db511b0
--- /dev/null
@@ -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.settings;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List settings values.<br>If no value has been set for a setting, then the default value is returned.<br>Requires 'Browse' permission when a component is specified<br/>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/settings/values">Further information about this action online (including a response example)</a>
+ * @since 6.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ValuesRequest {
+
+  private String branch;
+  private String component;
+  private String keys;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ValuesRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * Component key
+   *
+   * Example value: "my_project"
+   */
+  public ValuesRequest setComponent(String component) {
+    this.component = component;
+    return this;
+  }
+
+  public String getComponent() {
+    return component;
+  }
+
+  /**
+   * List of setting keys
+   *
+   * Example value: "sonar.test.inclusions,sonar.dbcleaner.cleanDirectory"
+   */
+  public ValuesRequest setKeys(String keys) {
+    this.keys = keys;
+    return this;
+  }
+
+  public String getKeys() {
+    return keys;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/settings/package-info.java
new file mode 100644 (file)
index 0000000..09aad91
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.settings;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/HashRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/HashRequest.java
new file mode 100644 (file)
index 0000000..d73a895
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.sources;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Show line line hashes for a given file. Require See Source Code permission on file's project<br/>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/hash">Further information about this action online (including a response example)</a>
+ * @since 5.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class HashRequest {
+
+  private String key;
+
+  /**
+   * File key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project:/src/foo/Bar.php"
+   */
+  public HashRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/IndexRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/IndexRequest.java
new file mode 100644 (file)
index 0000000..2646a54
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * 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.sources;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get source code as line number / text pairs. Require See Source Code permission on file
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/index">Further information about this action online (including a response example)</a>
+ * @since 5.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class IndexRequest {
+
+  private String from;
+  private String resource;
+  private String to;
+
+  /**
+   * First line
+   *
+   */
+  public IndexRequest setFrom(String from) {
+    this.from = from;
+    return this;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  /**
+   * File key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project:/src/foo/Bar.php"
+   */
+  public IndexRequest setResource(String resource) {
+    this.resource = resource;
+    return this;
+  }
+
+  public String getResource() {
+    return resource;
+  }
+
+  /**
+   * Last line (excluded). If not specified, all lines are returned until end of file
+   *
+   */
+  public IndexRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/LinesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/LinesRequest.java
new file mode 100644 (file)
index 0000000..f2c9000
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * 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.sources;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Show source code with line oriented info. Require See Source Code permission on file's project<br/>Each element of the result array is an object which contains:<ol><li>Line number</li><li>Content of the line</li><li>Author of the line (from SCM information)</li><li>Revision of the line (from SCM information)</li><li>Last commit date of the line (from SCM information)</li><li>Line hits from coverage</li><li>Number of conditions to cover in tests</li><li>Number of conditions covered by tests</li></ol>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/lines">Further information about this action online (including a response example)</a>
+ * @since 5.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class LinesRequest {
+
+  private String branch;
+  private String from;
+  private String key;
+  private String to;
+  private String uuid;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public LinesRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * First line to return. Starts from 1
+   *
+   * Example value: "10"
+   */
+  public LinesRequest setFrom(String from) {
+    this.from = from;
+    return this;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  /**
+   * File key. Mandatory if param 'uuid' is not set. Available since 5.2
+   *
+   * Example value: "my_project:/src/foo/Bar.php"
+   */
+  public LinesRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Optional last line to return (inclusive). It must be greater than or equal to parameter 'from'. If unset, then all the lines greater than or equal to 'from' are returned.
+   *
+   * Example value: "20"
+   */
+  public LinesRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+
+  /**
+   * File uuid. Mandatory if param 'key' is not set
+   *
+   * Example value: "f333aab4-7e3a-4d70-87e1-f4c491f05e5c"
+   */
+  public LinesRequest setUuid(String uuid) {
+    this.uuid = uuid;
+    return this;
+  }
+
+  public String getUuid() {
+    return uuid;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/RawRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/RawRequest.java
new file mode 100644 (file)
index 0000000..825bcc2
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.sources;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get source code as raw text. Require 'See Source Code' permission on file
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/raw">Further information about this action online (including a response example)</a>
+ * @since 5.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RawRequest {
+
+  private String branch;
+  private String key;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public RawRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * File key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project:src/foo/Bar.php"
+   */
+  public RawRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/ScmRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/ScmRequest.java
new file mode 100644 (file)
index 0000000..587bc13
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * 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.sources;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get SCM information of source files. Require See Source Code permission on file's project<br/>Each element of the result array is composed of:<ol><li>Line number</li><li>Author of the commit</li><li>Datetime of the commit (before 5.2 it was only the Date)</li><li>Revision of the commit (added in 5.2)</li></ol>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/scm">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ScmRequest {
+
+  private String commitsByLine;
+  private String from;
+  private String key;
+  private String to;
+
+  /**
+   * Group lines by SCM commit if value is false, else display commits for each line, even if two consecutive lines relate to the same commit.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ScmRequest setCommitsByLine(String commitsByLine) {
+    this.commitsByLine = commitsByLine;
+    return this;
+  }
+
+  public String getCommitsByLine() {
+    return commitsByLine;
+  }
+
+  /**
+   * First line to return. Starts at 1
+   *
+   * Example value: "10"
+   */
+  public ScmRequest setFrom(String from) {
+    this.from = from;
+    return this;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  /**
+   * File key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project:/src/foo/Bar.php"
+   */
+  public ScmRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Last line to return (inclusive)
+   *
+   * Example value: "20"
+   */
+  public ScmRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/ShowRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/ShowRequest.java
new file mode 100644 (file)
index 0000000..8d8b533
--- /dev/null
@@ -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.sources;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get source code. Require See Source Code permission on file's project<br/>Each element of the result array is composed of:<ol><li>Line number</li><li>Content of the line</li></ol>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/show">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ShowRequest {
+
+  private String from;
+  private String key;
+  private String to;
+
+  /**
+   * First line to return. Starts at 1
+   *
+   * Example value: "10"
+   */
+  public ShowRequest setFrom(String from) {
+    this.from = from;
+    return this;
+  }
+
+  public String getFrom() {
+    return from;
+  }
+
+  /**
+   * File key
+   *
+   * This is a mandatory parameter.
+   * Example value: "my_project:/src/foo/Bar.php"
+   */
+  public ShowRequest setKey(String key) {
+    this.key = key;
+    return this;
+  }
+
+  public String getKey() {
+    return key;
+  }
+
+  /**
+   * Last line to return (inclusive)
+   *
+   * Example value: "20"
+   */
+  public ShowRequest setTo(String to) {
+    this.to = to;
+    return this;
+  }
+
+  public String getTo() {
+    return to;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/SourcesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/SourcesService.java
new file mode 100644 (file)
index 0000000..3dcaadc
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * 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.sources;
+
+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;
+
+/**
+ * Get details on source files. See also api/tests.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SourcesService extends BaseService {
+
+  public SourcesService(WsConnector wsConnector) {
+    super(wsConnector, "api/sources");
+  }
+
+  /**
+   * Show line line hashes for a given file. Require See Source Code permission on file's project<br/>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/hash">Further information about this action online (including a response example)</a>
+   * @since 5.0
+   */
+  public String hash(HashRequest request) {
+    return call(
+      new GetRequest(path("hash"))
+        .setParam("key", request.getKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get source code as line number / text pairs. Require See Source Code permission on file
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/index">Further information about this action online (including a response example)</a>
+   * @since 5.0
+   */
+  public String index(IndexRequest request) {
+    return call(
+      new GetRequest(path("index"))
+        .setParam("from", request.getFrom())
+        .setParam("resource", request.getResource())
+        .setParam("to", request.getTo())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Show source code with line oriented info. Require See Source Code permission on file's project<br/>Each element of the result array is an object which contains:<ol><li>Line number</li><li>Content of the line</li><li>Author of the line (from SCM information)</li><li>Revision of the line (from SCM information)</li><li>Last commit date of the line (from SCM information)</li><li>Line hits from coverage</li><li>Number of conditions to cover in tests</li><li>Number of conditions covered by tests</li></ol>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/lines">Further information about this action online (including a response example)</a>
+   * @since 5.0
+   */
+  public String lines(LinesRequest request) {
+    return call(
+      new GetRequest(path("lines"))
+        .setParam("branch", request.getBranch())
+        .setParam("from", request.getFrom())
+        .setParam("key", request.getKey())
+        .setParam("to", request.getTo())
+        .setParam("uuid", request.getUuid())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get source code as raw text. Require 'See Source Code' permission on file
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/raw">Further information about this action online (including a response example)</a>
+   * @since 5.0
+   */
+  public String raw(RawRequest request) {
+    return call(
+      new GetRequest(path("raw"))
+        .setParam("branch", request.getBranch())
+        .setParam("key", request.getKey())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get SCM information of source files. Require See Source Code permission on file's project<br/>Each element of the result array is composed of:<ol><li>Line number</li><li>Author of the commit</li><li>Datetime of the commit (before 5.2 it was only the Date)</li><li>Revision of the commit (added in 5.2)</li></ol>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/scm">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public String scm(ScmRequest request) {
+    return call(
+      new GetRequest(path("scm"))
+        .setParam("commits_by_line", request.getCommitsByLine())
+        .setParam("from", request.getFrom())
+        .setParam("key", request.getKey())
+        .setParam("to", request.getTo())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get source code. Require See Source Code permission on file's project<br/>Each element of the result array is composed of:<ol><li>Line number</li><li>Content of the line</li></ol>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/sources/show">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public String show(ShowRequest request) {
+    return call(
+      new GetRequest(path("show"))
+        .setParam("from", request.getFrom())
+        .setParam("key", request.getKey())
+        .setParam("to", request.getTo())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/sources/package-info.java
new file mode 100644 (file)
index 0000000..06a8b91
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.sources;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/ChangeLogLevelRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/ChangeLogLevelRequest.java
new file mode 100644 (file)
index 0000000..9d0d4d2
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.system;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Temporarily changes level of logs. New level is not persistent and is lost when restarting server. Requires system administration permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/change_log_level">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ChangeLogLevelRequest {
+
+  private String level;
+
+  /**
+   * The new level. Be cautious: DEBUG, and even more TRACE, may have performance impacts.
+   *
+   * This is a mandatory parameter.
+   * Possible values:
+   * <ul>
+   *   <li>"TRACE"</li>
+   *   <li>"DEBUG"</li>
+   *   <li>"INFO"</li>
+   * </ul>
+   */
+  public ChangeLogLevelRequest setLevel(String level) {
+    this.level = level;
+    return this;
+  }
+
+  public String getLevel() {
+    return level;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/LogsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/LogsRequest.java
new file mode 100644 (file)
index 0000000..fb82bd5
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.system;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get system logs in plain-text format. Requires system administration permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/logs">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class LogsRequest {
+
+  private String process;
+
+  /**
+   * Process to get logs from
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"app"</li>
+   *   <li>"ce"</li>
+   *   <li>"es"</li>
+   *   <li>"web"</li>
+   * </ul>
+   */
+  public LogsRequest setProcess(String process) {
+    this.process = process;
+    return this;
+  }
+
+  public String getProcess() {
+    return process;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/SystemService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/SystemService.java
new file mode 100644 (file)
index 0000000..b4b3afa
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+ * 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.system;
+
+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.System.HealthResponse;
+import org.sonarqube.ws.System.StatusResponse;
+
+/**
+ * Get system details, and perform some management actions, such as restarting, and initiating a database migration (as part of a system upgrade).
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SystemService extends BaseService {
+
+  public SystemService(WsConnector wsConnector) {
+    super(wsConnector, "api/system");
+  }
+
+  /**
+   * Temporarily changes level of logs. New level is not persistent and is lost when restarting server. Requires system administration permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/change_log_level">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void changeLogLevel(ChangeLogLevelRequest request) {
+    call(
+      new PostRequest(path("change_log_level"))
+        .setParam("level", request.getLevel())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Display the database migration status of SonarQube.<br/>State values are:<ul><li>NO_MIGRATION: DB is up to date with current version of SonarQube.</li><li>NOT_SUPPORTED: Migration is not supported on embedded databases.</li><li>MIGRATION_RUNNING: DB migration is under go.</li><li>MIGRATION_SUCCEEDED: DB migration has run and has been successful.</li><li>MIGRATION_FAILED: DB migration has run and failed. SonarQube must be restarted in order to retry a DB migration (optionally after DB has been restored from backup).</li><li>MIGRATION_REQUIRED: DB migration is required.</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/db_migration_status">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String dbMigrationStatus() {
+    return call(
+      new GetRequest(path("db_migration_status"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Provide health status of SonarQube.<p>Require 'Administer System' permission or authentication with passcode</p><p>  <ul> <li>GREEN: SonarQube is fully operational</li> <li>YELLOW: SonarQube is usable, but it needs attention in order to be fully operational</li> <li>RED: SonarQube is not operational</li> </ul></p>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/health">Further information about this action online (including a response example)</a>
+   * @since 6.6
+   */
+  public HealthResponse health() {
+    return call(
+      new GetRequest(path("health")),
+      HealthResponse.parser());
+  }
+
+  /**
+   * Get detailed information about system configuration.<br/>Requires 'Administer' permissions.<br/>Since 5.5, this web service becomes internal in order to more easily update result.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/info">Further information about this action online (including a response example)</a>
+   * @since 5.1
+   */
+  public String info() {
+    return call(
+      new GetRequest(path("info"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get system logs in plain-text format. Requires system administration permission.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/logs">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String logs(LogsRequest request) {
+    return call(
+      new GetRequest(path("logs"))
+        .setParam("process", request.getProcess())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Migrate the database to match the current version of SonarQube.<br/>Sending a POST request to this URL starts the DB migration. It is strongly advised to <strong>make a database backup</strong> before invoking this WS.<br/>State values are:<ul><li>NO_MIGRATION: DB is up to date with current version of SonarQube.</li><li>NOT_SUPPORTED: Migration is not supported on embedded databases.</li><li>MIGRATION_RUNNING: DB migration is under go.</li><li>MIGRATION_SUCCEEDED: DB migration has run and has been successful.</li><li>MIGRATION_FAILED: DB migration has run and failed. SonarQube must be restarted in order to retry a DB migration (optionally after DB has been restored from backup).</li><li>MIGRATION_REQUIRED: DB migration is required.</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/migrate_db">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String migrateDb() {
+    return call(
+      new PostRequest(path("migrate_db"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Answers "pong" as plain-text
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/ping">Further information about this action online (including a response example)</a>
+   * @since 6.3
+   */
+  public String ping() {
+    return call(
+      new GetRequest(path("ping"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Restart server. Require 'Administer System' permission. Perform a full restart of the Web, Search and Compute Engine Servers processes.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/restart">Further information about this action online (including a response example)</a>
+   * @since 4.3
+   */
+  public void restart() {
+    call(
+      new PostRequest(path("restart"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Get state information about SonarQube.<p>status: the running status <ul> <li>STARTING: SonarQube Web Server is up and serving some Web Services (eg. api/system/status) but initialization is still ongoing</li> <li>UP: SonarQube instance is up and running</li> <li>DOWN: SonarQube instance is up but not running because migration has failed (refer to WS /api/system/migrate_db for details) or some other reason (check logs).</li> <li>RESTARTING: SonarQube instance is still up but a restart has been requested (refer to WS /api/system/restart for details).</li> <li>DB_MIGRATION_NEEDED: database migration is required. DB migration can be started using WS /api/system/migrate_db.</li> <li>DB_MIGRATION_RUNNING: DB migration is running (refer to WS /api/system/migrate_db for details)</li> </ul></p>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/status">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public StatusResponse status() {
+    return call(
+      new GetRequest(path("status")),
+      StatusResponse.parser());
+  }
+
+  /**
+   * Lists available upgrades for the SonarQube instance (if any) and for each one, lists incompatible plugins and plugins requiring upgrade.<br/>Plugin information is retrieved from Update Center. Date and time at which Update Center was last refreshed is provided in the response.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/system/upgrades">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String upgrades() {
+    return call(
+      new GetRequest(path("upgrades"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/system/package-info.java
new file mode 100644 (file)
index 0000000..86b11d9
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.system;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/CoveredFilesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/CoveredFilesRequest.java
new file mode 100644 (file)
index 0000000..dc1004f
--- /dev/null
@@ -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.tests;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the list of source files covered by a test. Require Browse permission on test file's project
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/tests/covered_files">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CoveredFilesRequest {
+
+  private String p;
+  private String ps;
+  private String testId;
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public CoveredFilesRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0.
+   *
+   * Example value: "20"
+   */
+  public CoveredFilesRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Test ID
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public CoveredFilesRequest setTestId(String testId) {
+    this.testId = testId;
+    return this;
+  }
+
+  public String getTestId() {
+    return testId;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/ListRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/ListRequest.java
new file mode 100644 (file)
index 0000000..e1b7d25
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ * 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.tests;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the list of tests either in a test file or that test a given line of source code.<br /> Requires 'Browse' permission on the file's project.<br /> One (and only one) of the following combination of parameters must be provided: <ul><li>testId - get a specific test</li><li>testFileId - get the tests in a test file</li><li>testFileKey - get the tests in a test file</li><li>sourceFileId and sourceFileLineNumber - get the tests that cover a specific line of code</li><li>sourceFileKey and sourceFileLineNumber - get the tests that cover a specific line of code</li></ul>
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/tests/list">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ListRequest {
+
+  private String branch;
+  private String p;
+  private String ps;
+  private String sourceFileId;
+  private String sourceFileKey;
+  private String sourceFileLineNumber;
+  private String testFileId;
+  private String testFileKey;
+  private String testId;
+
+  /**
+   * Branch key
+   *
+   * This is part of the internal API.
+   * Example value: "feature/my_branch"
+   */
+  public ListRequest setBranch(String branch) {
+    this.branch = branch;
+    return this;
+  }
+
+  public String getBranch() {
+    return branch;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public ListRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public ListRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * ID of source file. Must be provided with the source file line number.
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FL0"
+   */
+  public ListRequest setSourceFileId(String sourceFileId) {
+    this.sourceFileId = sourceFileId;
+    return this;
+  }
+
+  public String getSourceFileId() {
+    return sourceFileId;
+  }
+
+  /**
+   * Key of source file. Must be provided with the source file line number.
+   *
+   * Example value: "my_project:/src/foo/Bar.php"
+   */
+  public ListRequest setSourceFileKey(String sourceFileKey) {
+    this.sourceFileKey = sourceFileKey;
+    return this;
+  }
+
+  public String getSourceFileKey() {
+    return sourceFileKey;
+  }
+
+  /**
+   * Source file line number. Must be provided with the source file ID or key.
+   *
+   * Example value: "10"
+   */
+  public ListRequest setSourceFileLineNumber(String sourceFileLineNumber) {
+    this.sourceFileLineNumber = sourceFileLineNumber;
+    return this;
+  }
+
+  public String getSourceFileLineNumber() {
+    return sourceFileLineNumber;
+  }
+
+  /**
+   * ID of test file
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public ListRequest setTestFileId(String testFileId) {
+    this.testFileId = testFileId;
+    return this;
+  }
+
+  public String getTestFileId() {
+    return testFileId;
+  }
+
+  /**
+   * Key of test file
+   *
+   * Example value: "MY_PROJECT:src/test/java/foo/BarTest.java"
+   */
+  public ListRequest setTestFileKey(String testFileKey) {
+    this.testFileKey = testFileKey;
+    return this;
+  }
+
+  public String getTestFileKey() {
+    return testFileKey;
+  }
+
+  /**
+   * ID of test
+   *
+   * Example value: "AU-TpxcA-iU5OvuD2FLz"
+   */
+  public ListRequest setTestId(String testId) {
+    this.testId = testId;
+    return this;
+  }
+
+  public String getTestId() {
+    return testId;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/TestsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/TestsService.java
new file mode 100644 (file)
index 0000000..07df045
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * 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.tests;
+
+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.Tests.CoveredFilesResponse;
+import org.sonarqube.ws.Tests.ListResponse;
+
+/**
+ * Get details on test files. See also api/sources. Deprecated since 5.6.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/tests">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class TestsService extends BaseService {
+
+  public TestsService(WsConnector wsConnector) {
+    super(wsConnector, "api/tests");
+  }
+
+  /**
+   * Get the list of source files covered by a test. Require Browse permission on test file's project
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/tests/covered_files">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   * @deprecated since 5.6
+   */
+  @Deprecated
+  public CoveredFilesResponse coveredFiles(CoveredFilesRequest request) {
+    return call(
+      new GetRequest(path("covered_files"))
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("testId", request.getTestId()),
+      CoveredFilesResponse.parser());
+  }
+
+  /**
+   * Get the list of tests either in a test file or that test a given line of source code.<br /> Requires 'Browse' permission on the file's project.<br /> One (and only one) of the following combination of parameters must be provided: <ul><li>testId - get a specific test</li><li>testFileId - get the tests in a test file</li><li>testFileKey - get the tests in a test file</li><li>sourceFileId and sourceFileLineNumber - get the tests that cover a specific line of code</li><li>sourceFileKey and sourceFileLineNumber - get the tests that cover a specific line of code</li></ul>
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/tests/list">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   * @deprecated since 5.6
+   */
+  @Deprecated
+  public ListResponse list(ListRequest request) {
+    return call(
+      new GetRequest(path("list"))
+        .setParam("branch", request.getBranch())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("sourceFileId", request.getSourceFileId())
+        .setParam("sourceFileKey", request.getSourceFileKey())
+        .setParam("sourceFileLineNumber", request.getSourceFileLineNumber())
+        .setParam("testFileId", request.getTestFileId())
+        .setParam("testFileKey", request.getTestFileKey())
+        .setParam("testId", request.getTestId()),
+      ListResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/tests/package-info.java
new file mode 100644 (file)
index 0000000..3884257
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.tests;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/timemachine/TimemachineService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/timemachine/TimemachineService.java
new file mode 100644 (file)
index 0000000..536a1d7
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.timemachine;
+
+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;
+
+/**
+ * Removed since 6.3, please use api/measures/search_history instead
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/timemachine">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class TimemachineService extends BaseService {
+
+  public TimemachineService(WsConnector wsConnector) {
+    super(wsConnector, "api/timemachine");
+  }
+
+  /**
+   * The web service is removed and you're invited to use api/measures/search_history instead
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/timemachine/index">Further information about this action online (including a response example)</a>
+   * @since 2.10
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public String index() {
+    return call(
+      new GetRequest(path("index"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/timemachine/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/timemachine/package-info.java
new file mode 100644 (file)
index 0000000..81ff8ac
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.timemachine;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/InstalledPluginsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/InstalledPluginsRequest.java
new file mode 100644 (file)
index 0000000..fe33014
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * 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.updatecenter;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the list of all the plugins installed on the SonarQube instance
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/updatecenter/installed_plugins">Further information about this action online (including a response example)</a>
+ * @since 2.10
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class InstalledPluginsRequest {
+
+  private String format;
+
+  /**
+   * Only json response format is available
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"json"</li>
+   * </ul>
+   */
+  public InstalledPluginsRequest setFormat(String format) {
+    this.format = format;
+    return this;
+  }
+
+  public String getFormat() {
+    return format;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/UpdatecenterService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/UpdatecenterService.java
new file mode 100644 (file)
index 0000000..7a6d180
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * 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.updatecenter;
+
+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;
+
+/**
+ * Get list of installed plugins
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/updatecenter">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdatecenterService extends BaseService {
+
+  public UpdatecenterService(WsConnector wsConnector) {
+    super(wsConnector, "api/updatecenter");
+  }
+
+  /**
+   * Get the list of all the plugins installed on the SonarQube instance
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/updatecenter/installed_plugins">Further information about this action online (including a response example)</a>
+   * @since 2.10
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public String installedPlugins(InstalledPluginsRequest request) {
+    return call(
+      new GetRequest(path("installed_plugins"))
+        .setParam("format", request.getFormat())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Upload a plugin.<br /> Requires 'Administer System' permission.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/updatecenter/upload">Further information about this action online (including a response example)</a>
+   * @since 6.0
+   */
+  public void upload(UploadRequest request) {
+    call(
+      new PostRequest(path("upload"))
+        .setParam("file", request.getFile())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/UploadRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/UploadRequest.java
new file mode 100644 (file)
index 0000000..56a80b9
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.updatecenter;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Upload a plugin.<br /> Requires 'Administer System' permission.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/updatecenter/upload">Further information about this action online (including a response example)</a>
+ * @since 6.0
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UploadRequest {
+
+  private String file;
+
+  /**
+   * The jar file of the plugin to install
+   *
+   * This is a mandatory parameter.
+   */
+  public UploadRequest setFile(String file) {
+    this.file = file;
+    return this;
+  }
+
+  public String getFile() {
+    return file;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/updatecenter/package-info.java
new file mode 100644 (file)
index 0000000..71095e8
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.updatecenter;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/AddUserRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/AddUserRequest.java
new file mode 100644 (file)
index 0000000..e5e61be
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * 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.usergroups;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Add a user to a group.<br />'id' or 'name' must be provided.<br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/add_user">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class AddUserRequest {
+
+  private String id;
+  private String login;
+  private String name;
+  private String organization;
+
+  /**
+   * Group id
+   *
+   * Example value: "42"
+   */
+  public AddUserRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * User login
+   *
+   * Example value: "g.hopper"
+   */
+  public AddUserRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Group name
+   *
+   * Example value: "sonar-administrators"
+   */
+  public AddUserRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Key of organization
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public AddUserRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/CreateRequest.java
new file mode 100644 (file)
index 0000000..0163048
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * 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.usergroups;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Create a group.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/create">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class CreateRequest {
+
+  private String description;
+  private String name;
+  private String organization;
+
+  /**
+   * Description for the new group. A group description cannot be larger than 200 characters.
+   *
+   * Example value: "Default group for new users"
+   */
+  public CreateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Name for the new group. A group name cannot be larger than 255 characters and must be unique. The value 'anyone' (whatever the case) is reserved and cannot be used.
+   *
+   * This is a mandatory parameter.
+   * Example value: "sonar-users"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Key of organization. If unset then default organization is used.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public CreateRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/DeleteRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/DeleteRequest.java
new file mode 100644 (file)
index 0000000..c94631f
--- /dev/null
@@ -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.usergroups;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Delete a group. The default groups cannot be deleted.<br/>'id' or 'name' must be provided.<br />Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/delete">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeleteRequest {
+
+  private String id;
+  private String name;
+  private String organization;
+
+  /**
+   * Group id
+   *
+   * Example value: "42"
+   */
+  public DeleteRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * Group name
+   *
+   * Example value: "sonar-administrators"
+   */
+  public DeleteRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Key of organization
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public DeleteRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/RemoveUserRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/RemoveUserRequest.java
new file mode 100644 (file)
index 0000000..46060ea
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * 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.usergroups;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Remove a user from a group.<br />'id' or 'name' must be provided.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/remove_user">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RemoveUserRequest {
+
+  private String id;
+  private String login;
+  private String name;
+  private String organization;
+
+  /**
+   * Group id
+   *
+   * Example value: "42"
+   */
+  public RemoveUserRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * User login
+   *
+   * Example value: "g.hopper"
+   */
+  public RemoveUserRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Group name
+   *
+   * Example value: "sonar-administrators"
+   */
+  public RemoveUserRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Key of organization
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public RemoveUserRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/SearchRequest.java
new file mode 100644 (file)
index 0000000..85cafc4
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * 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.usergroups;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for user groups.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/search">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private List<String> f;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+
+  /**
+   * Comma-separated list of the fields to be returned in response. All the fields are returned by default.
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"name"</li>
+   *   <li>"description"</li>
+   *   <li>"membersCount"</li>
+   * </ul>
+   */
+  public SearchRequest setF(List<String> f) {
+    this.f = f;
+    return this;
+  }
+
+  public List<String> getF() {
+    return f;
+  }
+
+  /**
+   * Key of organization. If not set then groups are searched in default organization.
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public SearchRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to names that contain the supplied string.
+   *
+   * Example value: "sonar-users"
+   */
+  public SearchRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UpdateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UpdateRequest.java
new file mode 100644 (file)
index 0000000..c9447fe
--- /dev/null
@@ -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.usergroups;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Update a group.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/update">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateRequest {
+
+  private String description;
+  private String id;
+  private String name;
+
+  /**
+   * New optional description for the group. A group description cannot be larger than 200 characters. If value is not defined, then description is not changed.
+   *
+   * Example value: "Default group for new users"
+   */
+  public UpdateRequest setDescription(String description) {
+    this.description = description;
+    return this;
+  }
+
+  public String getDescription() {
+    return description;
+  }
+
+  /**
+   * Identifier of the group.
+   *
+   * This is a mandatory parameter.
+   * Example value: "42"
+   */
+  public UpdateRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * New optional name for the group. A group name cannot be larger than 255 characters and must be unique. Value 'anyone' (whatever the case) is reserved and cannot be used. If value is empty or not defined, then name is not changed.
+   *
+   * Example value: "my-group"
+   */
+  public UpdateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UserGroupsService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UserGroupsService.java
new file mode 100644 (file)
index 0000000..e7abd46
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * 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.usergroups;
+
+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.UserGroups.CreateWsResponse;
+import org.sonarqube.ws.UserGroups.SearchWsResponse;
+import org.sonarqube.ws.UserGroups.UpdateWsResponse;
+
+/**
+ * Manage user groups.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UserGroupsService extends BaseService {
+
+  public UserGroupsService(WsConnector wsConnector) {
+    super(wsConnector, "api/user_groups");
+  }
+
+  /**
+   * Add a user to a group.<br />'id' or 'name' must be provided.<br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/add_user">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void addUser(AddUserRequest request) {
+    call(
+      new PostRequest(path("add_user"))
+        .setParam("id", request.getId())
+        .setParam("login", request.getLogin())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Create a group.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/create">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public CreateWsResponse create(CreateRequest request) {
+    return call(
+      new PostRequest(path("create"))
+        .setParam("description", request.getDescription())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization()),
+      CreateWsResponse.parser());
+  }
+
+  /**
+   * Delete a group. The default groups cannot be deleted.<br/>'id' or 'name' must be provided.<br />Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/delete">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void delete(DeleteRequest request) {
+    call(
+      new PostRequest(path("delete"))
+        .setParam("id", request.getId())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Remove a user from a group.<br />'id' or 'name' must be provided.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/remove_user">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void removeUser(RemoveUserRequest request) {
+    call(
+      new PostRequest(path("remove_user"))
+        .setParam("id", request.getId())
+        .setParam("login", request.getLogin())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Search for user groups.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/search">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public SearchWsResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("f", request.getF() == null ? null : request.getF().stream().collect(Collectors.joining(",")))
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ()),
+      SearchWsResponse.parser());
+  }
+
+  /**
+   * Update a group.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/update">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public void update(UpdateRequest request) {
+    call(
+      new PostRequest(path("update"))
+        .setParam("description", request.getDescription())
+        .setParam("id", request.getId())
+        .setParam("name", request.getName()),
+      UpdateWsResponse.parser());
+  }
+
+  /**
+   * Search for users with membership information with respect to a group.<br>Requires the following permission: 'Administer System'.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/users">Further information about this action online (including a response example)</a>
+   * @since 5.2
+   */
+  public String users(UsersRequest request) {
+    return call(
+      new GetRequest(path("users"))
+        .setParam("id", request.getId())
+        .setParam("name", request.getName())
+        .setParam("organization", request.getOrganization())
+        .setParam("p", request.getP())
+        .setParam("ps", request.getPs())
+        .setParam("q", request.getQ())
+        .setParam("selected", request.getSelected())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UsersRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/UsersRequest.java
new file mode 100644 (file)
index 0000000..7edc7c4
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * 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.usergroups;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Search for users with membership information with respect to a group.<br>Requires the following permission: 'Administer System'.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_groups/users">Further information about this action online (including a response example)</a>
+ * @since 5.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UsersRequest {
+
+  private String id;
+  private String name;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+  private String selected;
+
+  /**
+   * Group id
+   *
+   * Example value: "42"
+   */
+  public UsersRequest setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public String getId() {
+    return id;
+  }
+
+  /**
+   * Group name
+   *
+   * Example value: "sonar-administrators"
+   */
+  public UsersRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * Key of organization
+   *
+   * This is part of the internal API.
+   * Example value: "my-org"
+   */
+  public UsersRequest setOrganization(String organization) {
+    this.organization = organization;
+    return this;
+  }
+
+  public String getOrganization() {
+    return organization;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public UsersRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0.
+   *
+   * Example value: "20"
+   */
+  public UsersRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to names or logins that contain the supplied string.
+   *
+   * Example value: "freddy"
+   */
+  public UsersRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"all"</li>
+   *   <li>"deselected"</li>
+   *   <li>"selected"</li>
+   * </ul>
+   */
+  public UsersRequest setSelected(String selected) {
+    this.selected = selected;
+    return this;
+  }
+
+  public String getSelected() {
+    return selected;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usergroups/package-info.java
new file mode 100644 (file)
index 0000000..fd91b8c
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.usergroups;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/userproperties/UserPropertiesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/userproperties/UserPropertiesService.java
new file mode 100644 (file)
index 0000000..a7f1680
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.userproperties;
+
+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;
+
+/**
+ * Removed since 6.3, please use api/favorites and api/notifications instead
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_properties">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UserPropertiesService extends BaseService {
+
+  public UserPropertiesService(WsConnector wsConnector) {
+    super(wsConnector, "api/user_properties");
+  }
+
+  /**
+   * This web service is removed
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_properties/index">Further information about this action online (including a response example)</a>
+   * @since 2.6
+   * @deprecated since 6.3
+   */
+  @Deprecated
+  public String index() {
+    return call(
+      new GetRequest(path("index"))
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/userproperties/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/userproperties/package-info.java
new file mode 100644 (file)
index 0000000..2e6ccc1
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.userproperties;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/ChangePasswordRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/ChangePasswordRequest.java
new file mode 100644 (file)
index 0000000..c3c0d8b
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * 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;
+
+/**
+ * Update a user's password. Authenticated users can change their own password, provided that the account is not linked to an external authentication system. Administer System permission is required to change another user's password.
+ *
+ * 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("https://github.com/SonarSource/sonar-ws-generator")
+public class ChangePasswordRequest {
+
+  private String login;
+  private String password;
+  private String previousPassword;
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "myuser"
+   */
+  public ChangePasswordRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * New password
+   *
+   * This is a mandatory parameter.
+   * Example value: "mypassword"
+   */
+  public ChangePasswordRequest setPassword(String password) {
+    this.password = password;
+    return this;
+  }
+
+  public String getPassword() {
+    return password;
+  }
+
+  /**
+   * Previous password. Required when changing one's own password.
+   *
+   * Example value: "oldpassword"
+   */
+  public ChangePasswordRequest setPreviousPassword(String previousPassword) {
+    this.previousPassword = previousPassword;
+    return this;
+  }
+
+  public String getPreviousPassword() {
+    return previousPassword;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/CreateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/CreateRequest.java
new file mode 100644 (file)
index 0000000..8c39317
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * 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;
+
+/**
+ * Create a user.<br/>If a deactivated user account exists with the given login, it will be reactivated.<br/>Requires Administer System permission
+ *
+ * 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("https://github.com/SonarSource/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;
+
+  /**
+   * User email
+   *
+   * Example value: "myname@email.com"
+   */
+  public CreateRequest setEmail(String email) {
+    this.email = email;
+    return this;
+  }
+
+  public String getEmail() {
+    return email;
+  }
+
+  /**
+   * Specify if the user should be authenticated from SonarQube server or from an external authentication system. Password should not be set when local is set to false.
+   *
+   * 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;
+  }
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "myuser"
+   */
+  public CreateRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * User name
+   *
+   * This is a mandatory parameter.
+   * Example value: "My Name"
+   */
+  public CreateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * User password. Only mandatory when creating local user, otherwise it should not be set
+   *
+   * Example value: "mypassword"
+   */
+  public CreateRequest setPassword(String password) {
+    this.password = password;
+    return this;
+  }
+
+  public String getPassword() {
+    return password;
+  }
+
+  /**
+   * SCM accounts. To set several values, the parameter must be called once for each value.
+   *
+   * Example value: "scmAccount=firstValue&scmAccount=secondValue&scmAccount=thirdValue"
+   */
+  public CreateRequest setScmAccount(String scmAccount) {
+    this.scmAccount = scmAccount;
+    return this;
+  }
+
+  public String getScmAccount() {
+    return scmAccount;
+  }
+
+  /**
+   * This parameter is deprecated, please use 'scmAccount' instead
+   *
+   * 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-generated/src/main/java/org/sonarqube/ws/client/users/DeactivateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/DeactivateRequest.java
new file mode 100644 (file)
index 0000000..db782e7
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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;
+
+/**
+ * Deactivate a user. Requires Administer System permission
+ *
+ * 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("https://github.com/SonarSource/sonar-ws-generator")
+public class DeactivateRequest {
+
+  private String login;
+
+  /**
+   * User 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-generated/src/main/java/org/sonarqube/ws/client/users/GroupsRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/GroupsRequest.java
new file mode 100644 (file)
index 0000000..96d4a85
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * 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;
+
+/**
+ * Lists the groups a user belongs to. <br/>Requires Administer System permission.
+ *
+ * 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("https://github.com/SonarSource/sonar-ws-generator")
+public class GroupsRequest {
+
+  private String login;
+  private String organization;
+  private String p;
+  private String ps;
+  private String q;
+  private String selected;
+
+  /**
+   * A user login
+   *
+   * This is a mandatory parameter.
+   * Example value: "admin"
+   */
+  public GroupsRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Organization key
+   *
+   * 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;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public GroupsRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0.
+   *
+   * Example value: "20"
+   */
+  public GroupsRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Limit search to group names that contain the supplied string.
+   *
+   * Example value: "users"
+   */
+  public GroupsRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+
+  /**
+   * Depending on the value, show only selected items (selected=selected), deselected items (selected=deselected), or all items with their selection status (selected=all).
+   *
+   * 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-generated/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/SearchRequest.java
new file mode 100644 (file)
index 0000000..da2ba94
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * 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;
+
+/**
+ * Get a list of active users. <br/>Administer System permission is required to show the 'groups' field.<br/>When accessed anonymously, only logins and names are returned.
+ *
+ * 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("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private List<String> f;
+  private String p;
+  private String ps;
+  private String q;
+
+  /**
+   * Comma-separated list of the fields to be returned in response. All the fields are returned by default.
+   *
+   * 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;
+  }
+
+  /**
+   * 1-based page number
+   *
+   * Example value: "42"
+   */
+  public SearchRequest setP(String p) {
+    this.p = p;
+    return this;
+  }
+
+  public String getP() {
+    return p;
+  }
+
+  /**
+   * Page size. Must be greater than 0 and less than 500
+   *
+   * Example value: "20"
+   */
+  public SearchRequest setPs(String ps) {
+    this.ps = ps;
+    return this;
+  }
+
+  public String getPs() {
+    return ps;
+  }
+
+  /**
+   * Filter on login or name.
+   *
+   */
+  public SearchRequest setQ(String q) {
+    this.q = q;
+    return this;
+  }
+
+  public String getQ() {
+    return q;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/UpdateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/UpdateRequest.java
new file mode 100644 (file)
index 0000000..c794135
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * 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;
+
+/**
+ * Update a user. If a deactivated user account exists with the given login, it will be reactivated. Requires Administer System permission
+ *
+ * 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("https://github.com/SonarSource/sonar-ws-generator")
+public class UpdateRequest {
+
+  private String email;
+  private String login;
+  private String name;
+  private String scmAccount;
+  private String scmAccounts;
+
+  /**
+   * User email
+   *
+   * Example value: "myname@email.com"
+   */
+  public UpdateRequest setEmail(String email) {
+    this.email = email;
+    return this;
+  }
+
+  public String getEmail() {
+    return email;
+  }
+
+  /**
+   * User login
+   *
+   * This is a mandatory parameter.
+   * Example value: "myuser"
+   */
+  public UpdateRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * User name
+   *
+   * Example value: "My Name"
+   */
+  public UpdateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  /**
+   * SCM accounts. To set several values, the parameter must be called once for each value.
+   *
+   * Example value: "scmAccount=firstValue&scmAccount=secondValue&scmAccount=thirdValue"
+   */
+  public UpdateRequest setScmAccount(String scmAccount) {
+    this.scmAccount = scmAccount;
+    return this;
+  }
+
+  public String getScmAccount() {
+    return scmAccount;
+  }
+
+  /**
+   * This parameter is deprecated, please use 'scmAccount' instead
+   *
+   * 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-generated/src/main/java/org/sonarqube/ws/client/users/UsersService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/UsersService.java
new file mode 100644 (file)
index 0000000..fab6eb5
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * 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;
+
+/**
+ * Manage users.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/users">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UsersService extends BaseService {
+
+  public UsersService(WsConnector wsConnector) {
+    super(wsConnector, "api/users");
+  }
+
+  /**
+   * Update a user's password. Authenticated users can change their own password, provided that the account is not linked to an external authentication system. Administer System permission is required to change another user's password.
+   *
+   * 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();
+  }
+
+  /**
+   * Create a user.<br/>If a deactivated user account exists with the given login, it will be reactivated.<br/>Requires Administer System permission
+   *
+   * 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());
+  }
+
+  /**
+   * Get the details of the current authenticated user.
+   *
+   * 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());
+  }
+
+  /**
+   * Deactivate a user. Requires Administer System permission
+   *
+   * 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();
+  }
+
+  /**
+   * Lists the groups a user belongs to. <br/>Requires Administer System permission.
+   *
+   * 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());
+  }
+
+  /**
+   * List the external identity providers
+   *
+   * 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());
+  }
+
+  /**
+   * Get a list of active users. <br/>Administer System permission is required to show the 'groups' field.<br/>When accessed anonymously, only logins and names are returned.
+   *
+   * 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());
+  }
+
+  /**
+   * Stores that the user has skipped the onboarding tutorial and does not want to see it after future logins.<br/>Requires authentication.
+   *
+   * 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();
+  }
+
+  /**
+   * Update a user. If a deactivated user account exists with the given login, it will be reactivated. Requires Administer System permission
+   *
+   * 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-generated/src/main/java/org/sonarqube/ws/client/users/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/users/package-info.java
new file mode 100644 (file)
index 0000000..8076ca8
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.users;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/GenerateRequest.java
new file mode 100644 (file)
index 0000000..df6c290
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.usertokens;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Generate a user access token. <br />Please keep your tokens secret. They enable to authenticate and analyze projects.<br />If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_tokens/generate">Further information about this action online (including a response example)</a>
+ * @since 5.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class GenerateRequest {
+
+  private String login;
+  private String name;
+
+  /**
+   * User login. If not set, the token is generated for the authenticated user.
+   *
+   * Example value: "g.hopper"
+   */
+  public GenerateRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Token name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Project scan on Travis"
+   */
+  public GenerateRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/RevokeRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/RevokeRequest.java
new file mode 100644 (file)
index 0000000..13e482f
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * 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.usertokens;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Revoke a user access token. <br/>If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_tokens/revoke">Further information about this action online (including a response example)</a>
+ * @since 5.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class RevokeRequest {
+
+  private String login;
+  private String name;
+
+  /**
+   * User login
+   *
+   * Example value: "g.hopper"
+   */
+  public RevokeRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+
+  /**
+   * Token name
+   *
+   * This is a mandatory parameter.
+   * Example value: "Project scan on Travis"
+   */
+  public RevokeRequest setName(String name) {
+    this.name = name;
+    return this;
+  }
+
+  public String getName() {
+    return name;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/SearchRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/SearchRequest.java
new file mode 100644 (file)
index 0000000..b8116f7
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.usertokens;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List the access tokens of a user.<br>The login must exist and active.<br>If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_tokens/search">Further information about this action online (including a response example)</a>
+ * @since 5.3
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class SearchRequest {
+
+  private String login;
+
+  /**
+   * User login
+   *
+   * Example value: "g.hopper"
+   */
+  public SearchRequest setLogin(String login) {
+    this.login = login;
+    return this;
+  }
+
+  public String getLogin() {
+    return login;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/UserTokensService.java
new file mode 100644 (file)
index 0000000..bb8890c
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * 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.usertokens;
+
+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.UserTokens.GenerateWsResponse;
+import org.sonarqube.ws.UserTokens.SearchWsResponse;
+
+/**
+ * List, create, and delete a user's access tokens.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_tokens">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class UserTokensService extends BaseService {
+
+  public UserTokensService(WsConnector wsConnector) {
+    super(wsConnector, "api/user_tokens");
+  }
+
+  /**
+   * Generate a user access token. <br />Please keep your tokens secret. They enable to authenticate and analyze projects.<br />If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_tokens/generate">Further information about this action online (including a response example)</a>
+   * @since 5.3
+   */
+  public GenerateWsResponse generate(GenerateRequest request) {
+    return call(
+      new PostRequest(path("generate"))
+        .setParam("login", request.getLogin())
+        .setParam("name", request.getName()),
+      GenerateWsResponse.parser());
+  }
+
+  /**
+   * Revoke a user access token. <br/>If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
+   *
+   * This is part of the internal API.
+   * This is a POST request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_tokens/revoke">Further information about this action online (including a response example)</a>
+   * @since 5.3
+   */
+  public void revoke(RevokeRequest request) {
+    call(
+      new PostRequest(path("revoke"))
+        .setParam("login", request.getLogin())
+        .setParam("name", request.getName())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * List the access tokens of a user.<br>The login must exist and active.<br>If the login is set, it requires administration permissions. Otherwise, a token is generated for the authenticated user.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/user_tokens/search">Further information about this action online (including a response example)</a>
+   * @since 5.3
+   */
+  public SearchWsResponse search(SearchRequest request) {
+    return call(
+      new GetRequest(path("search"))
+        .setParam("login", request.getLogin()),
+      SearchWsResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/usertokens/package-info.java
new file mode 100644 (file)
index 0000000..cca27eb
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.usertokens;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/DeliveriesRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/DeliveriesRequest.java
new file mode 100644 (file)
index 0000000..9179bbd
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * 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.webhooks;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get the recent deliveries for a specified project or Compute Engine task.<br/>Require 'Administer' permission on the related project.<br/>Note that additional information are returned by api/webhooks/delivery.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webhooks/deliveries">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeliveriesRequest {
+
+  private String ceTaskId;
+  private String componentKey;
+
+  /**
+   * Id of the Compute Engine task
+   *
+   * Example value: "AU-Tpxb--iU5OvuD2FLy"
+   */
+  public DeliveriesRequest setCeTaskId(String ceTaskId) {
+    this.ceTaskId = ceTaskId;
+    return this;
+  }
+
+  public String getCeTaskId() {
+    return ceTaskId;
+  }
+
+  /**
+   * Key of the project
+   *
+   * Example value: "my-project"
+   */
+  public DeliveriesRequest setComponentKey(String componentKey) {
+    this.componentKey = componentKey;
+    return this;
+  }
+
+  public String getComponentKey() {
+    return componentKey;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/DeliveryRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/DeliveryRequest.java
new file mode 100644 (file)
index 0000000..85d247e
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * 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.webhooks;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Get a webhook delivery by its id.<br/>Require 'Administer System' permission.<br/>Note that additional information are returned by api/webhooks/delivery.
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webhooks/delivery">Further information about this action online (including a response example)</a>
+ * @since 6.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class DeliveryRequest {
+
+  private String deliveryId;
+
+  /**
+   * Id of delivery
+   *
+   * This is a mandatory parameter.
+   * Example value: "AU-TpxcA-iU5OvuD2FL3"
+   */
+  public DeliveryRequest setDeliveryId(String deliveryId) {
+    this.deliveryId = deliveryId;
+    return this;
+  }
+
+  public String getDeliveryId() {
+    return deliveryId;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/WebhooksService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/WebhooksService.java
new file mode 100644 (file)
index 0000000..7bea28f
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * 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.webhooks;
+
+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.Webhooks.DeliveriesWsResponse;
+import org.sonarqube.ws.Webhooks.DeliveryWsResponse;
+
+/**
+ * Webhooks allow to notify external services when a project analysis is done
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webhooks">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class WebhooksService extends BaseService {
+
+  public WebhooksService(WsConnector wsConnector) {
+    super(wsConnector, "api/webhooks");
+  }
+
+  /**
+   * Get the recent deliveries for a specified project or Compute Engine task.<br/>Require 'Administer' permission on the related project.<br/>Note that additional information are returned by api/webhooks/delivery.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webhooks/deliveries">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public DeliveriesWsResponse deliveries(DeliveriesRequest request) {
+    return call(
+      new GetRequest(path("deliveries"))
+        .setParam("ceTaskId", request.getCeTaskId())
+        .setParam("componentKey", request.getComponentKey()),
+      DeliveriesWsResponse.parser());
+  }
+
+  /**
+   * Get a webhook delivery by its id.<br/>Require 'Administer System' permission.<br/>Note that additional information are returned by api/webhooks/delivery.
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webhooks/delivery">Further information about this action online (including a response example)</a>
+   * @since 6.2
+   */
+  public DeliveryWsResponse delivery(DeliveryRequest request) {
+    return call(
+      new GetRequest(path("delivery"))
+        .setParam("deliveryId", request.getDeliveryId()),
+      DeliveryWsResponse.parser());
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webhooks/package-info.java
new file mode 100644 (file)
index 0000000..adb8d2d
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.webhooks;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/ListRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/ListRequest.java
new file mode 100644 (file)
index 0000000..5e8b30b
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * 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.webservices;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * List web services
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices/list">Further information about this action online (including a response example)</a>
+ * @since 4.2
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ListRequest {
+
+  private String includeInternals;
+
+  /**
+   * Include web services that are implemented for internal use only. Their forward-compatibility is not assured
+   *
+   * Possible values:
+   * <ul>
+   *   <li>"true"</li>
+   *   <li>"false"</li>
+   *   <li>"yes"</li>
+   *   <li>"no"</li>
+   * </ul>
+   */
+  public ListRequest setIncludeInternals(String includeInternals) {
+    this.includeInternals = includeInternals;
+    return this;
+  }
+
+  public String getIncludeInternals() {
+    return includeInternals;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/ResponseExampleRequest.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/ResponseExampleRequest.java
new file mode 100644 (file)
index 0000000..c5ea6d3
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * 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.webservices;
+
+import java.util.List;
+import javax.annotation.Generated;
+
+/**
+ * Display web service response example
+ *
+ * This is part of the internal API.
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices/response_example">Further information about this action online (including a response example)</a>
+ * @since 4.4
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class ResponseExampleRequest {
+
+  private String action;
+  private String controller;
+
+  /**
+   * Action of the web service
+   *
+   * This is a mandatory parameter.
+   * Example value: "search"
+   */
+  public ResponseExampleRequest setAction(String action) {
+    this.action = action;
+    return this;
+  }
+
+  public String getAction() {
+    return action;
+  }
+
+  /**
+   * Controller of the web service
+   *
+   * This is a mandatory parameter.
+   * Example value: "api/issues"
+   */
+  public ResponseExampleRequest setController(String controller) {
+    this.controller = controller;
+    return this;
+  }
+
+  public String getController() {
+    return controller;
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/WebservicesService.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/WebservicesService.java
new file mode 100644 (file)
index 0000000..0a23dc3
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * 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.webservices;
+
+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;
+
+/**
+ * Get information on the web api supported on this instance.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices">Further information about this web service online</a>
+ */
+@Generated("https://github.com/SonarSource/sonar-ws-generator")
+public class WebservicesService extends BaseService {
+
+  public WebservicesService(WsConnector wsConnector) {
+    super(wsConnector, "api/webservices");
+  }
+
+  /**
+   * List web services
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices/list">Further information about this action online (including a response example)</a>
+   * @since 4.2
+   */
+  public String list(ListRequest request) {
+    return call(
+      new GetRequest(path("list"))
+        .setParam("include_internals", request.getIncludeInternals())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+
+  /**
+   * Display web service response example
+   *
+   * This is part of the internal API.
+   * This is a GET request.
+   * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/webservices/response_example">Further information about this action online (including a response example)</a>
+   * @since 4.4
+   */
+  public String responseExample(ResponseExampleRequest request) {
+    return call(
+      new GetRequest(path("response_example"))
+        .setParam("action", request.getAction())
+        .setParam("controller", request.getController())
+        .setMediaType(MediaTypes.JSON)
+      ).content();
+  }
+}
diff --git a/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/package-info.java b/sonar-ws-generated/src/main/java/org/sonarqube/ws/client/webservices/package-info.java
new file mode 100644 (file)
index 0000000..d8ec8cb
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * 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
+package org.sonarqube.ws.client.webservices;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-ws-generated/src/main/protobuf/ws-batch.proto b/sonar-ws-generated/src/main/protobuf/ws-batch.proto
new file mode 100644 (file)
index 0000000..11a696d
--- /dev/null
@@ -0,0 +1,47 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.batch;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Batch";
+
+option optimize_for = SPEED;
+
+// WS batch/project
+message WsProjectResponse {
+  optional int64 timestamp = 1;
+  map<string, Settings> settingsByModule = 2;
+  map<string, FileDataByPath> fileDataByModuleAndPath = 3;
+  optional int64 lastAnalysisDate = 4;
+
+  message Settings {
+    map<string,string> settings = 1;
+  }
+
+  message FileDataByPath {
+    map<string, FileData> FileDataByPath = 1;
+  }
+
+  message FileData {
+    optional string hash = 1;
+    optional string revision = 2;
+  }
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-ce.proto b/sonar-ws-generated/src/main/protobuf/ws-ce.proto
new file mode 100644 (file)
index 0000000..61961d6
--- /dev/null
@@ -0,0 +1,103 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.ce;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Ce";
+option optimize_for = SPEED;
+
+// POST api/ce/submit
+message SubmitResponse {
+  optional string taskId = 1;
+  optional string projectId = 2;
+}
+
+// GET api/ce/task
+message TaskResponse {
+  optional Task task = 1;
+}
+
+// GET api/ce/activity
+message ActivityResponse {
+  // paging has been deprecated in 5.5
+  optional sonarqube.ws.commons.Paging unusedPaging = 1;
+  repeated Task tasks = 2;
+}
+
+// GET api/ce/activity_status
+message ActivityStatusWsResponse {
+  optional int32 pending = 1;
+  optional int32 failing = 2;
+  optional int32 inProgress = 3;
+}
+
+// GET api/ce/component
+message ProjectResponse {
+  repeated Task queue = 1;
+  optional Task current = 2;
+}
+
+// GET api/ce/task_types
+message TaskTypesWsResponse {
+  repeated string taskTypes = 1;
+}
+
+// GET api/ce/worker_count
+message WorkerCountResponse {
+  optional int32 value = 1;
+  optional bool canSetWorkerCount = 2;
+}
+
+message Task {
+  optional string id = 1;
+  optional string type = 2;
+  optional string componentId = 3;
+  optional string componentKey = 4;
+  optional string componentName = 5;
+  optional string componentQualifier = 6;
+  optional string analysisId = 7;
+  optional TaskStatus status = 8;
+  optional string submittedAt = 9;
+  optional string submitterLogin = 10;
+  optional string startedAt = 11;
+  optional string executedAt = 12;
+  optional bool isLastExecuted = 13;
+  optional int64 executionTimeMs = 14;
+  optional bool logs = 15;
+  optional string errorMessage = 16;
+  optional string errorStacktrace = 17;
+  optional string scannerContext = 18;
+  optional bool hasScannerContext = 19;
+  optional string organization = 20;
+  optional string branch = 21;
+  optional sonarqube.ws.commons.BranchType branchType = 22;
+  optional string errorType = 23;
+}
+
+enum TaskStatus {
+  PENDING = 0;
+  IN_PROGRESS = 1;
+  SUCCESS = 2;
+  FAILED = 3;
+  CANCELED = 4;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-commons.proto b/sonar-ws-generated/src/main/protobuf/ws-commons.proto
new file mode 100644 (file)
index 0000000..a9b5665
--- /dev/null
@@ -0,0 +1,124 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.commons;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Common";
+option optimize_for = SPEED;
+
+message Paging {
+  optional int32 pageIndex = 1;
+  optional int32 pageSize = 2;
+  optional int32 total = 3;
+}
+
+message Facet {
+  // kind of key
+  optional string property = 1;
+  repeated FacetValue values = 2;
+}
+
+message Facets {
+  repeated Facet facets = 1;
+}
+
+message FacetValue {
+  optional string val = 1;
+  optional int64 count = 2;
+}
+
+enum Severity {
+  INFO = 0;
+  MINOR = 1;
+  MAJOR = 2;
+  CRITICAL = 3;
+  BLOCKER = 4;
+}
+
+message Rule {
+  optional string key = 1;
+  optional string name = 2;
+  optional string lang = 3;
+  optional RuleStatus status = 4;
+  optional string langName = 5;
+}
+
+message Rules {
+  repeated Rule rules = 1;
+}
+
+enum RuleStatus {
+  BETA = 0;
+  DEPRECATED = 1;
+  READY = 2;
+  REMOVED = 3;
+}
+
+// Lines start at 1 and line offsets start at 0
+message TextRange {
+  // Start line. Should never be absent
+  optional int32 startLine = 1;
+
+  // End line (inclusive). Absent means it is same as start line
+  optional int32 endLine = 2;
+
+  // If absent it means range starts at the first offset of start line
+  optional int32 startOffset = 3;
+
+  // If absent it means range ends at the last offset of end line
+  optional int32 endOffset = 4;
+}
+
+message Metric {
+  optional string key = 1;
+  optional string name = 2;
+  optional string description = 3;
+  optional string domain = 4;
+  optional string type = 5;
+  optional bool higherValuesAreBetter = 6;
+  optional bool qualitative = 7;
+  optional bool hidden = 8;
+  optional bool custom = 9;
+  optional int32 decimalScale = 10;
+  optional string bestValue = 11;
+  optional string worstValue = 12;
+}
+
+enum RuleType {
+  // Zero is required in order to not get MAINTAINABILITY as default value
+  // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
+  UNKNOWN = 0;
+
+  // same name as in Java enum IssueType,
+  // same index values as in database (see column ISSUES.ISSUE_TYPE)
+  CODE_SMELL = 1;
+  BUG = 2;
+  VULNERABILITY = 3;
+}
+
+enum BranchType {
+  // Zero is required in order to not get LONG as default value
+  // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
+  UNKNOWN_BRANCH_TYPE = 0;
+
+  LONG = 1;
+  SHORT = 2;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-components.proto b/sonar-ws-generated/src/main/protobuf/ws-components.proto
new file mode 100644 (file)
index 0000000..7305913
--- /dev/null
@@ -0,0 +1,130 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.component;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Components";
+option optimize_for = SPEED;
+
+// WS api/components/search
+message SearchWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Component components = 2;
+}
+
+// WS api/components/tree
+message TreeWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  optional Component baseComponent = 3;
+  repeated Component components = 4;
+}
+
+// WS api/components/show
+message ShowWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  optional Component component = 2;
+  repeated Component ancestors = 3;
+}
+
+// WS api/components/suggestions
+message SuggestionsWsResponse {
+  repeated Category results = 1;
+  optional string warning = 2;
+  repeated Organization organizations = 3;
+  repeated Project projects = 4;
+
+  message Category {
+       optional string q = 1;
+       repeated Suggestion items = 2;
+    optional int64 more = 3;
+  }
+
+  message Suggestion {
+    optional string key = 1;
+    optional string name = 2;
+    optional string match = 3;
+    optional string organization = 4;
+    optional string project = 5;
+    optional bool isRecentlyBrowsed = 6;
+    optional bool isFavorite = 7;
+  }
+
+  message Organization {
+    optional string key = 1;
+    optional string name = 2;
+  }
+
+  message Project {
+    optional string key = 1;
+    optional string name = 2;
+  }
+}
+
+// WS api/components/search_projects
+message SearchProjectsWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Component components = 2;
+  optional sonarqube.ws.commons.Facets facets = 3;
+}
+
+// WS api/components/provisioned
+message ProvisionedWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Component projects = 2;
+
+  message Component {
+    optional string uuid = 1;
+    optional string key = 2;
+    optional string name = 3;
+    optional string creationDate = 4;
+    optional string visibility = 5;
+  }
+}
+
+message Component {
+  optional string organization = 12;
+  optional string id = 1;
+  optional string key = 2;
+  optional string refId = 3;
+  optional string refKey = 4;
+  optional string projectId = 5;
+  optional string name = 6;
+  optional string description = 7;
+  optional string qualifier = 8;
+  optional string path = 9;
+  optional string language = 10;
+  optional bool isFavorite = 11;
+  optional string analysisDate = 13;
+  optional Tags tags = 14;
+  optional string visibility = 15;
+  optional string leakPeriodDate = 16;
+  // Root project key
+  optional string project = 17;
+  optional string branch = 18;
+  optional string version = 19;
+
+  message Tags {
+    repeated string tags = 1;
+  }
+}
+
diff --git a/sonar-ws-generated/src/main/protobuf/ws-duplications.proto b/sonar-ws-generated/src/main/protobuf/ws-duplications.proto
new file mode 100644 (file)
index 0000000..6eeb5f2
--- /dev/null
@@ -0,0 +1,55 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto3";
+
+package sonarqube.ws.duplication;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Duplications";
+option optimize_for = SPEED;
+
+// WS api/duplications/show
+message ShowResponse {
+  repeated Duplication duplications = 1;
+  map<string,File> files = 2;
+
+}
+
+message Duplication {
+  repeated Block blocks = 1;
+}
+
+message Block {
+  int32 from = 1;
+  int32 size = 2;
+  string _ref = 3;
+}
+
+message File {
+  string key = 1;
+  string name = 2;
+  string uuid = 3;
+  string project = 4;
+  string projectUuid = 5;
+  string projectName = 6;
+  string subProject = 7;
+  string subProjectUuid = 8;
+  string subProjectName = 9;
+  string branch = 10;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-editions.proto b/sonar-ws-generated/src/main/protobuf/ws-editions.proto
new file mode 100644 (file)
index 0000000..87531bb
--- /dev/null
@@ -0,0 +1,60 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.editions;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Editions";
+option optimize_for = SPEED;
+
+// GET api/editions/status
+// POST api/editions/apply_license
+message StatusResponse {
+  optional string currentEditionKey = 1;
+  optional InstallationStatus installationStatus = 2;
+  optional string nextEditionKey = 3;
+  optional string installError = 4;
+}
+
+enum InstallationStatus {
+  NONE = 0;
+  AUTOMATIC_IN_PROGRESS = 1;
+  AUTOMATIC_READY = 2;
+  MANUAL_IN_PROGRESS = 3;
+  UNINSTALL_IN_PROGRESS = 4;
+}
+
+// POST api/editions/preview
+message PreviewResponse {
+  optional string nextEditionKey = 1;
+  optional PreviewStatus previewStatus = 2;
+}
+
+enum PreviewStatus {
+  NO_INSTALL = 0;
+  AUTOMATIC_INSTALL = 1;
+  MANUAL_INSTALL = 2;
+}
+
+// POST api/editions/form_data
+message FormDataResponse {
+  optional string serverId = 1;
+  optional int64  ncloc = 2;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-favorites.proto b/sonar-ws-generated/src/main/protobuf/ws-favorites.proto
new file mode 100644 (file)
index 0000000..7cdb6ec
--- /dev/null
@@ -0,0 +1,40 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.favorite;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Favorites";
+option optimize_for = SPEED;
+
+// WS api/favorites/search
+message SearchResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Favorite favorites = 2;
+}
+
+message Favorite {
+  optional string organization = 4;
+  optional string key = 1;
+  optional string name = 2;
+  optional string qualifier = 3;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-issues.proto b/sonar-ws-generated/src/main/protobuf/ws-issues.proto
new file mode 100644 (file)
index 0000000..a130967
--- /dev/null
@@ -0,0 +1,232 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.issues;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Issues";
+option optimize_for = SPEED;
+
+// Response of GET api/issues/search
+message SearchWsResponse {
+  optional int64 total = 1;
+  optional int64 p = 2;
+  optional int32 ps = 3;
+  optional sonarqube.ws.commons.Paging paging = 4;
+
+  // Total amount of effort, only when the facet "total" is enabled
+  optional int64 effortTotal = 13;
+  // Deprecated since 5.5, replaced by effortTotal
+  optional int64 debtTotal = 5;
+
+  repeated Issue issues = 6;
+  repeated Component components = 7;
+  optional sonarqube.ws.commons.Rules rules = 8;
+  optional Users users = 9;
+
+  // Deprecated since 5.5, action plan has been removed
+  optional ActionPlans unusedActionPlans = 10;
+  optional Languages languages = 11;
+  optional sonarqube.ws.commons.Facets facets = 12;
+}
+
+// Response of most of POST/issues/{operation}, for instance assign, add_comment and set_severity
+message Operation {
+  optional Issue issue = 1;
+  repeated Component components = 2;
+  repeated sonarqube.ws.commons.Rule rules = 3;
+  repeated Users.User users = 4;
+  // Deprecated since 5.5, action plan has been removed
+  repeated ActionPlan unusedActionPlans = 5;
+}
+
+message Issue {
+  optional string key = 1;
+  optional string rule = 2;
+  optional sonarqube.ws.commons.Severity severity = 3;
+  optional string component = 4;
+  optional int64 unusedComponentId = 5;
+  optional string project = 6;
+  optional string subProject = 7;
+  optional int32 line = 8;
+  optional string hash = 31;
+  optional sonarqube.ws.commons.TextRange textRange = 9;
+  repeated Flow flows = 10;
+  optional string resolution = 11;
+  optional string status = 12;
+  optional string message = 13;
+
+  optional string effort = 28;
+  // Deprecated since 5.5, replaced by effort
+  optional string debt = 14;
+
+  optional string assignee = 15;
+
+  // Unused since 5.5, manual issues feature has been removed
+  optional string unusedReporter = 16;
+
+  // SCM login of the committer who introduced the issue
+  optional string author = 17;
+
+  // Deprecated since 5.5, action plan has been removed
+  optional string actionPlan = 18;
+
+  repeated string tags = 19;
+
+  // the transitions allowed for the requesting user.
+  optional Transitions transitions = 20;
+
+  // the actions allowed for the requesting user.
+  optional Actions actions = 21;
+
+  optional Comments comments = 22;
+  optional string creationDate = 23;
+  optional string updateDate = 24;
+  optional string fUpdateAge = 25;
+  optional string closeDate = 26;
+
+  optional sonarqube.ws.commons.RuleType type = 27;
+
+  optional string organization = 29;
+  optional string branch = 30;
+}
+
+message Transitions {
+  repeated string transitions = 1;
+}
+
+message Actions {
+  repeated string actions = 1;
+}
+
+message Flow {
+  repeated Location locations = 1;
+}
+
+message Location {
+  optional string unusedComponentId = 1;
+  // Only when component is a file. Can be empty for a file if this is an issue global to the file.
+  optional sonarqube.ws.commons.TextRange textRange = 2;
+  optional string msg = 3;
+}
+
+message Comment {
+  optional string key = 1;
+  optional string login = 2;
+  // TODO drop, it's already in field "users"
+  optional string email = 3;
+  // TODO drop, it's already in field "users"
+  optional string userName = 4;
+  optional string htmlText = 5;
+  // TODO rename markdownText ?
+  optional string markdown = 6;
+  optional bool updatable = 7;
+  optional string createdAt = 8;
+}
+
+message Comments {
+  repeated Comment comments = 1;
+}
+
+// Deprecated since 5.5
+message ActionPlan {
+  optional string key = 1;
+  optional string name = 2;
+
+  // TODO define enum
+  optional string status = 3;
+  optional string deadLine = 4;
+  // TODO to be renamed, is it id or key ?
+  optional string project = 5;
+}
+
+// Deprecated since 5.5
+message ActionPlans {
+  repeated ActionPlan actionPlans = 1;
+}
+
+message Language {
+  optional string key = 1;
+  optional string name = 2;
+}
+
+message Languages {
+  repeated Language languages = 1;
+}
+
+message Component {
+  optional string organization = 11;
+  optional int64 deprecatedId = 1;
+  optional string key = 2;
+  optional string uuid = 3;
+  optional bool enabled = 4;
+  optional string qualifier = 5;
+  optional string name = 6;
+  optional string longName = 7;
+  optional string path = 8;
+  optional int64 unusedProjectId = 9;
+  optional int64 unusedSubProjectId = 10;
+  optional string branch = 12;
+}
+
+// Response of GET api/issues/changelog
+message ChangelogWsResponse {
+  repeated Changelog changelog = 1;
+
+  message Changelog {
+    optional string user = 1;
+    optional string userName = 2;
+    // Email is no more returned since 6.3
+    optional string deprecatedEmail = 3;
+    optional string creationDate = 4;
+    repeated Diff diffs = 5;
+    optional string avatar = 6;
+
+    message Diff {
+      optional string key = 1;
+      optional string newValue = 2;
+      optional string oldValue = 3;
+    }
+  }
+}
+
+// Response of POST api/issues/bulk_change
+message BulkChangeWsResponse {
+  optional int64 total = 1;
+  optional int64 success = 2;
+  optional int64 ignored = 3;
+  optional int64 failures = 4;
+}
+
+message Users {
+  repeated User users = 1;
+
+  message User {
+    optional string login = 1;
+    optional string name = 2;
+    optional string avatar = 3;
+    optional bool active = 4;
+  }
+}
+
+
+
diff --git a/sonar-ws-generated/src/main/protobuf/ws-measures.proto b/sonar-ws-generated/src/main/protobuf/ws-measures.proto
new file mode 100644 (file)
index 0000000..36cd4ab
--- /dev/null
@@ -0,0 +1,110 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.measures;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Measures";
+option optimize_for = SPEED;
+
+// WS api/measures/component_tree
+message ComponentTreeWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  optional Component baseComponent = 2;
+  repeated Component components = 3;
+  optional Metrics metrics = 4;
+  optional Periods periods = 5;
+}
+
+// WS api/measures/component
+message ComponentWsResponse {
+  optional Component component = 1;
+  optional Metrics metrics = 2;
+  optional Periods periods = 3;
+}
+
+// WS api/measures/search
+message SearchWsResponse {
+  repeated Measure measures = 1;
+}
+
+// WS api/measures/search_history
+message SearchHistoryResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated HistoryMeasure measures = 2;
+
+  message HistoryMeasure {
+    optional string metric = 1;
+    repeated HistoryValue history = 2;
+  }
+
+  message HistoryValue {
+    optional string date = 1;
+    optional string value = 2;
+  }
+}
+
+message Component {
+  optional string id = 1;
+  optional string key = 2;
+  optional string refId = 3;
+  optional string refKey = 4;
+  optional string projectId = 5;
+  optional string name = 6;
+  optional string description = 7;
+  optional string qualifier = 8;
+  optional string path = 9;
+  optional string language = 10;
+  repeated Measure measures = 11;
+  optional string branch = 12;
+}
+
+message Period {
+  optional int32 index = 1;
+  optional string mode = 2;
+  optional string date = 3;
+  optional string parameter = 4;
+}
+
+message Periods {
+  repeated Period periods = 1;
+}
+
+message Metrics {
+  repeated sonarqube.ws.commons.Metric metrics = 1;
+}
+
+message Measure {
+  optional string metric = 1;
+  optional string value = 2;
+  optional PeriodsValue periods = 3;
+  optional string component = 4;
+}
+
+message PeriodsValue {
+  repeated PeriodValue periodsValue = 1;
+}
+
+message PeriodValue {
+  optional int32 index = 1;
+  optional string value = 2;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-notifications.proto b/sonar-ws-generated/src/main/protobuf/ws-notifications.proto
new file mode 100644 (file)
index 0000000..ac0cb03
--- /dev/null
@@ -0,0 +1,41 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.notification;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Notifications";
+option optimize_for = SPEED;
+
+// WS api/notifications/list
+message ListResponse {
+  repeated Notification notifications = 1;
+  repeated string channels = 2;
+  repeated string globalTypes = 3;
+  repeated string perProjectTypes = 4;
+}
+
+message Notification {
+  optional string channel = 1;
+  optional string type = 2;
+  optional string organization = 5;
+  optional string project = 3;
+  optional string projectName = 4;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-organizations.proto b/sonar-ws-generated/src/main/protobuf/ws-organizations.proto
new file mode 100644 (file)
index 0000000..f6f2733
--- /dev/null
@@ -0,0 +1,70 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+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;
+
+// WS api/organizations/create
+message CreateWsResponse {
+  optional Organization organization = 1;
+}
+
+// WS api/organizations/update
+message UpdateWsResponse {
+  optional Organization organization = 1;
+}
+
+// WS api/organizations/search
+message SearchWsResponse {
+  repeated Organization organizations = 1;
+  optional sonarqube.ws.commons.Paging paging = 2;
+}
+
+// WS api/organizations/search_members
+message SearchMembersWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated User users = 2;
+}
+
+// WS api/organizations/add_member
+message AddMemberWsResponse {
+  optional User user = 1;
+}
+
+message Organization {
+  optional string key = 1;
+  optional string name = 2;
+  optional string description = 3;
+  optional string url = 4;
+  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;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-permissions.proto b/sonar-ws-generated/src/main/protobuf/ws-permissions.proto
new file mode 100644 (file)
index 0000000..53acf4d
--- /dev/null
@@ -0,0 +1,138 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.permissions;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Permissions";
+option optimize_for = SPEED;
+
+// WS api/permissions/template_users for internal use only
+message OldUsersWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated OldUser users = 2;
+}
+
+// WS api/permissions/users for internal use only
+message UsersWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated User users = 2;
+}
+
+// WS api/permissions/groups for internal use only
+message WsGroupsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Group groups = 2;
+}
+
+// WS api/permissions/template_groups for internal use only
+message WsTemplateGroupsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated OldGroup groups = 2;
+}
+
+message WsSearchGlobalPermissionsResponse {
+  repeated Permission permissions = 1;
+}
+
+message SearchProjectPermissionsWsResponse {
+  message Project {
+    optional string id = 1;
+    optional string key = 2;
+    optional string qualifier = 3;
+    optional string name = 4;
+    repeated Permission permissions = 5;
+  }
+
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Project projects = 2;
+  repeated Permission permissions = 3;
+}
+
+message CreateTemplateWsResponse {
+  optional PermissionTemplate permissionTemplate = 1;
+}
+
+message UpdateTemplateWsResponse {
+  optional PermissionTemplate permissionTemplate = 1;
+}
+
+message SearchTemplatesWsResponse {
+  message TemplateIdQualifier {
+    optional string templateId = 1;
+    optional string qualifier = 2;
+  }
+
+  repeated PermissionTemplate permissionTemplates = 1;
+  repeated TemplateIdQualifier defaultTemplates = 2;
+  repeated Permission permissions = 3;
+}
+
+message Permission {
+  optional string key = 1;
+  optional string name = 2;
+  optional string description = 3;
+  optional int32 usersCount = 4;
+  optional int32 groupsCount = 5;
+  optional bool withProjectCreator = 6;
+}
+
+message PermissionTemplate {
+  optional string id = 1;
+  optional string name = 2;
+  optional string description = 3;
+  optional string projectKeyPattern = 4;
+  // ex: 2015-08-25T16:18:48+0200
+  optional string createdAt = 5;
+  // ex: 2015-08-25T16:18:48+0200
+  optional string updatedAt = 6;
+  repeated Permission permissions = 7;
+}
+
+message OldUser {
+  optional string login = 1;
+  optional string name = 2;
+  optional string email = 3;
+  optional bool selected = 4;
+}
+
+message User {
+  optional string login = 1;
+  optional string name = 2;
+  optional string email = 3;
+  repeated string permissions = 4;
+  optional string avatar = 5;
+}
+
+message OldGroup {
+  optional string id = 1;
+  optional string name = 2;
+  optional string description = 3;
+  optional bool selected = 4;
+}
+
+message Group {
+  optional string id = 1;
+  optional string name = 2;
+  optional string description = 3;
+  repeated string permissions = 4;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-project_tags.proto b/sonar-ws-generated/src/main/protobuf/ws-project_tags.proto
new file mode 100644 (file)
index 0000000..86f1901
--- /dev/null
@@ -0,0 +1,30 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto3";
+
+package sonarqube.ws.projects;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "ProjectTags";
+option optimize_for = SPEED;
+
+// Response for api/project_tags/search
+message SearchResponse {
+  repeated string tags = 1;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-projectanalyses.proto b/sonar-ws-generated/src/main/protobuf/ws-projectanalyses.proto
new file mode 100644 (file)
index 0000000..3b4ea56
--- /dev/null
@@ -0,0 +1,57 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.projectanalysis;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "ProjectAnalyses";
+option optimize_for = SPEED;
+
+// WS api/project_analyses/create_event
+message CreateEventResponse {
+  optional Event event = 1;
+}
+
+// WS api/project_analyses/update_event
+message UpdateEventResponse {
+  optional Event event = 1;
+}
+
+// WS api/project_analyses/search
+message SearchResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Analysis analyses = 2;
+}
+
+message Event {
+  optional string key = 1;
+  optional string analysis = 2;
+  optional string category = 3;
+  optional string name = 4;
+  optional string description = 5;
+}
+
+message Analysis {
+  optional string key = 1;
+  optional string date = 2;
+  repeated Event events = 3;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-projectbranches.proto b/sonar-ws-generated/src/main/protobuf/ws-projectbranches.proto
new file mode 100644 (file)
index 0000000..55d8e40
--- /dev/null
@@ -0,0 +1,60 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.projectbranch;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "ProjectBranches";
+option optimize_for = SPEED;
+
+import "ws-commons.proto";
+
+// WS api/project_branches/list
+message ListWsResponse {
+  repeated Branch branches = 1;
+}
+
+// WS api/project_branches/show
+message ShowWsResponse {
+  optional Branch branch = 1;
+}
+
+message Branch {
+  optional string name = 1;
+  optional bool isMain = 2;
+  optional sonarqube.ws.commons.BranchType type = 3;
+  // Merge branch is only present for short living branch
+  optional string mergeBranch = 4;
+  optional Status status = 5;
+  optional bool isOrphan = 6;
+  optional string analysisDate = 7;
+
+  message Status {
+    // Quality gate status is only present for long living branch
+    optional string qualityGateStatus = 1;
+    // Merge bugs, vulnerabilities and codeSmell are only present for short living branch
+    optional int64 bugs = 2;
+    optional int64 vulnerabilities = 3;
+    optional int64 codeSmells = 4;
+  }
+
+}
+
+
diff --git a/sonar-ws-generated/src/main/protobuf/ws-projectlink.proto b/sonar-ws-generated/src/main/protobuf/ws-projectlink.proto
new file mode 100644 (file)
index 0000000..613f6b6
--- /dev/null
@@ -0,0 +1,23 @@
+syntax = "proto2";
+
+package sonarqube.ws.projectlink;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "ProjectLinks";
+option optimize_for = SPEED;
+
+// WS api/project_links/list
+message SearchWsResponse {
+  repeated Link links = 1;
+}
+
+message CreateWsResponse {
+  optional Link link = 1;
+}
+
+message Link {
+  optional string id = 1;
+  optional string name = 2;
+  optional string type = 3;
+  optional string url = 4;
+}
\ No newline at end of file
diff --git a/sonar-ws-generated/src/main/protobuf/ws-projects.proto b/sonar-ws-generated/src/main/protobuf/ws-projects.proto
new file mode 100644 (file)
index 0000000..2f5372f
--- /dev/null
@@ -0,0 +1,86 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.projects;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Projects";
+option optimize_for = SPEED;
+
+message SearchMyProjectsWsResponse {
+  message Project {
+    optional string id = 1;
+    optional string key = 2;
+    optional string name = 4;
+    optional string description = 5;
+    optional string lastAnalysisDate = 6;
+    optional string qualityGate = 7;
+    repeated Link links = 8;
+  }
+
+  message Link {
+    optional string name = 1;
+    optional string type = 2;
+    optional string href = 3;
+  }
+
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Project projects = 2;
+}
+
+message CreateWsResponse {
+  optional Project project = 1;
+
+  message Project {
+    optional string key = 1;
+    optional string name = 2;
+    optional string qualifier = 3;
+    optional string visibility = 4;
+  }
+}
+
+// WS api/projects/search
+message SearchWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Component components = 2;
+
+  message Component {
+    optional string organization = 1;
+    optional string id = 2;
+    optional string key = 3;
+    optional string name = 4;
+    optional string qualifier = 5;
+    optional string visibility = 6;
+    optional string lastAnalysisDate = 7;
+  }
+}
+
+// WS api/projects/prepare_bulk_update_key
+message BulkUpdateKeyWsResponse {
+  repeated Key keys = 1;
+
+  message Key {
+    optional string key = 1;
+    optional string newKey = 2;
+    optional bool duplicate = 3;
+  }
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-qualitygates.proto b/sonar-ws-generated/src/main/protobuf/ws-qualitygates.proto
new file mode 100644 (file)
index 0000000..c7d63b5
--- /dev/null
@@ -0,0 +1,122 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.qualitygate;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Qualitygates";
+option optimize_for = SPEED;
+
+// GET api/qualitygates/project_status
+message ProjectStatusWsResponse {
+  optional ProjectStatus projectStatus = 1;
+
+  message ProjectStatus {
+    optional Status status = 1;
+    repeated Condition conditions = 2;
+    repeated Period periods = 3;
+    optional bool ignoredConditions = 4;
+  }
+
+  message Condition {
+    optional Status status = 1;
+    optional string metricKey = 2;
+    optional Comparator comparator = 3;
+    optional int32 periodIndex = 4;
+    optional string warningThreshold = 5;
+    optional string errorThreshold = 6;
+    optional string actualValue = 7;
+  }
+
+  message Period {
+    optional int32 index = 1;
+    optional string mode = 2;
+    optional string date = 3;
+    optional string parameter = 4;
+  }
+
+  enum Status {
+    OK = 1;
+    WARN = 2;
+    ERROR = 3;
+    NONE = 4;
+  }
+
+  enum Comparator {
+    GT = 1;
+    LT = 2;
+    EQ = 3;
+    NE = 4;
+  }
+}
+
+// GET api/qualitygates/get_by_project
+message GetByProjectWsResponse {
+  optional QualityGate qualityGate = 1;
+}
+
+message QualityGate {
+  optional string id = 1;
+  optional string name = 2;
+  optional bool default = 3;
+}
+
+// GET api/qualitygates/app
+message AppWsResponse {
+  optional bool edit = 1;
+  repeated Metric metrics = 3;
+
+  message Metric {
+    optional string key = 1;
+    optional string name = 2;
+    optional string type = 3;
+    optional string domain = 4;
+    optional bool hidden = 5;
+  }
+}
+
+// POST api/qualitygates/create
+message CreateWsResponse {
+  optional int64 id = 1;
+  optional string name = 2;
+}
+
+// POST api/qualitygates/create_condition
+message CreateConditionWsResponse {
+  optional int64 id = 1;
+  optional string metric = 2;
+  optional string op = 3;
+  optional string warning = 4;
+  optional string error = 5;
+  optional int32 period = 6;
+}
+
+// POST api/qualitygates/update_condition
+message UpdateConditionWsResponse {
+  optional int64 id = 1;
+  optional string metric = 2;
+  optional string op = 3;
+  optional string warning = 4;
+  optional string error = 5;
+  optional int32 period = 6;
+}
+
+
+
diff --git a/sonar-ws-generated/src/main/protobuf/ws-qualityprofiles.proto b/sonar-ws-generated/src/main/protobuf/ws-qualityprofiles.proto
new file mode 100644 (file)
index 0000000..e4d9df3
--- /dev/null
@@ -0,0 +1,169 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.qualityprofiles;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Qualityprofiles";
+option optimize_for = SPEED;
+
+// WS api/qualityprofiles/search
+message SearchWsResponse {
+  repeated QualityProfile profiles = 1;
+  optional Actions actions = 2;
+
+  message QualityProfile {
+    optional string key = 1;
+    optional string name = 2;
+    optional string language = 3;
+    optional string languageName = 4;
+    optional bool isInherited = 5;
+    optional string parentKey = 6;
+    optional string parentName = 7;
+    optional bool isDefault = 8;
+    optional int64 activeRuleCount = 9;
+    optional int64 activeDeprecatedRuleCount = 12;
+    optional int64 projectCount = 10;
+    optional string rulesUpdatedAt = 11;
+    optional string lastUsed = 13;
+    optional string userUpdatedAt = 14;
+    optional string organization = 15;
+    optional bool isBuiltIn = 16;
+    optional Actions actions = 17;
+
+    message Actions {
+        optional bool edit = 1;
+        optional bool setAsDefault = 2;
+        optional bool copy = 3;
+      }
+  }
+
+  message Actions {
+    optional bool create = 1;
+  }
+}
+
+// WS api/qualityprofiles/create
+message CreateWsResponse {
+  optional QualityProfile profile = 1;
+
+  message QualityProfile {
+    optional string key = 1;
+    optional string name = 2;
+    optional string language = 3;
+    optional string languageName = 4;
+    optional bool isInherited = 5;
+    optional bool isDefault = 6;
+    optional Infos infos = 7;
+    optional Warnings warnings = 8;
+    optional string organization = 9;
+
+    message Infos {
+      repeated string infos = 1;
+    }
+
+    message Warnings {
+      repeated string warnings = 1;
+    }
+  }
+}
+
+// WS api/qualityprofiles/inheritance
+message InheritanceWsResponse {
+  optional QualityProfile profile = 1;
+  repeated QualityProfile ancestors = 2;
+  repeated QualityProfile children = 3;
+
+  message QualityProfile {
+    optional string key = 1;
+    optional string name = 2;
+    optional string parent = 3;
+    optional int64 activeRuleCount = 4;
+    optional int64 overridingRuleCount = 5;
+    optional bool isBuiltIn = 6;
+  }
+}
+
+// WS api/qualityprofiles/copy
+message CopyWsResponse {
+  optional string key = 1;
+  optional string name = 2;
+  optional string language = 3;
+  optional string languageName = 4;
+  optional bool isDefault = 5;
+  optional bool isInherited = 6;
+  optional string parentKey = 7;
+}
+
+// WS api/qualityprofiles/show
+message ShowResponse {
+  optional QualityProfile profile = 1;
+  optional CompareToSonarWay compareToSonarWay = 2;
+
+  message QualityProfile {
+    optional string key = 1;
+    optional string name = 2;
+    optional string language = 3;
+    optional string languageName = 4;
+    optional bool isInherited = 5;
+    optional bool isDefault = 6;
+    optional int64 activeRuleCount = 7;
+    optional int64 activeDeprecatedRuleCount = 8;
+    optional int64 projectCount = 9;
+    optional string rulesUpdatedAt = 10;
+    optional string lastUsed = 11;
+    optional string userUpdatedAt = 12;
+    optional string organization = 13;
+    optional bool isBuiltIn = 14;
+  }
+
+  message CompareToSonarWay {
+    optional string profile = 1;
+    optional string profileName = 2;
+    optional int64 missingRuleCount = 3;
+  }
+}
+
+// WS api/qualityprofiles/search_users
+message SearchUsersResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated User users = 2;
+
+  message User {
+    optional string login = 1;
+    optional string name = 2;
+    optional string avatar = 3;
+    optional bool selected = 4;
+  }
+}
+
+// WS api/qualityprofiles/search_groups
+message SearchGroupsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Group groups = 2;
+
+  message Group {
+    optional string name = 1;
+    optional string description = 2;
+    optional bool selected = 3;
+  }
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-root.proto b/sonar-ws-generated/src/main/protobuf/ws-root.proto
new file mode 100644 (file)
index 0000000..c80ecfb
--- /dev/null
@@ -0,0 +1,36 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.root;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Root";
+option optimize_for = SPEED;
+
+// WS api/root/search
+message SearchWsResponse {
+  repeated RootContent roots = 1;
+}
+
+message RootContent {
+  optional string login = 1;
+  optional string name = 2;
+  optional string email = 3;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-rules.proto b/sonar-ws-generated/src/main/protobuf/ws-rules.proto
new file mode 100644 (file)
index 0000000..d3dfe2c
--- /dev/null
@@ -0,0 +1,177 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.rules;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Rules";
+option optimize_for = SPEED;
+
+// WS api/rules/list for internal use only
+message ListResponse {
+
+  message Rule {
+    optional string repository = 1;
+    optional string key = 2;
+    optional string internal_key = 3;
+    optional string name = 4;
+  }
+
+  repeated Rule rules = 1;
+}
+
+// WS api/rules/search
+message SearchResponse {
+  optional int64 total = 1;
+  optional int32 p = 2;
+  optional int64 ps = 3;
+  repeated Rule rules = 4;
+  optional Actives actives = 5;
+  optional QProfiles qProfiles = 6;
+  optional sonarqube.ws.commons.Facets facets = 7;
+}
+
+//WS api/rules/show
+message ShowResponse {
+  optional Rule rule = 1;
+  repeated Active actives = 3;
+}
+
+//WS api/rules/create
+message CreateResponse {
+  optional Rule rule = 1;
+}
+
+//WS api/rules/update
+message UpdateResponse {
+  optional Rule rule = 1;
+}
+
+message Rule {
+  optional string key = 1;
+  optional string repo = 2;
+  optional string name = 3;
+  optional string createdAt = 4;
+  optional string htmlDesc = 5;
+  optional string htmlNote = 6;
+  optional string mdDesc = 7;
+  optional string mdNote = 8;
+  optional string noteLogin = 9;
+  optional string severity = 10;
+  optional sonarqube.ws.commons.RuleStatus status = 11;
+  optional string internalKey = 12;
+  optional bool isTemplate = 13;
+  optional string templateKey = 14;
+  optional Tags tags = 15;
+  optional SysTags sysTags = 16; 
+  optional string lang = 19;
+  optional string langName = 20;
+  optional Params params = 21;
+  // characteristic fields, unsupported since 5.5
+  optional string unusedDefaultDebtChar = 23;
+  optional string unusedDefaultDebtSubChar = 24;
+  optional string unusedDebtChar = 25;
+  optional string unusedDebtSubChar = 26;
+  optional string unusedDebtCharName = 27;
+  optional string unusedDebtSubCharName = 28;
+
+  // Deprecated since 5.5, replaced by defaultRemFnType
+  optional string defaultDebtRemFnType = 29;
+  // Deprecated since 5.5, replaced by defaultRemFnGapMultiplier
+  optional string defaultDebtRemFnCoeff = 30;
+  // Deprecated since 5.5, replaced by defaultRemFnBaseEffort
+  optional string defaultDebtRemFnOffset = 31;
+  // Deprecated since 5.5, replaced by gapDescription
+  optional string effortToFixDescription = 32;
+  // Deprecated since 5.5, replaced by remFnOverloaded
+  optional bool debtOverloaded = 33;
+  // Deprecated since 5.5, replaced by remFnType
+  optional string debtRemFnType = 34;
+  // Deprecated since 5.5, replaced by remFnGapMultiplier
+  optional string debtRemFnCoeff = 35;
+  // Deprecated since 5.5, replaced by remFnBaseEffort
+  optional string debtRemFnOffset = 36;
+
+  optional string defaultRemFnType = 38;
+  optional string defaultRemFnGapMultiplier = 39;
+  optional string defaultRemFnBaseEffort = 40;
+  optional string remFnType = 41;
+  optional string remFnGapMultiplier = 42;
+  optional string remFnBaseEffort = 43;
+  optional bool remFnOverloaded = 45;
+  optional string gapDescription = 44;
+
+  optional sonarqube.ws.commons.RuleType type = 37;
+
+  message Params {
+    repeated Param params = 1;
+  }
+  
+  message Param {
+    optional string key = 1;
+    optional string htmlDesc = 2;
+    optional string defaultValue = 3;
+    optional string type = 4;
+  }
+}
+
+message SysTags {
+  repeated string sysTags = 1;
+}
+
+message Tags {
+  repeated string tags = 1;
+}
+
+message Actives {
+  map<string, ActiveList> actives = 1;
+}
+
+message ActiveList {
+  repeated Active activeList = 1;
+}
+
+message Active {
+  optional string qProfile = 1;
+  optional string inherit = 2;
+  optional string severity = 3;
+  // Unused since 5.6, it has been removed because it was never used and costly to compute
+  optional string unusedParent = 4;
+  repeated Param params = 5;
+  optional string createdAt = 6;
+
+  message Param {
+    optional string key = 1;
+    optional string value = 2;
+  }
+}
+
+message QProfiles {
+  map<string,QProfile> qProfiles = 1;
+}
+
+message QProfile {
+  optional string name = 1;
+  optional string lang = 2;
+  optional string langName = 3;
+  optional string parent = 4;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-settings.proto b/sonar-ws-generated/src/main/protobuf/ws-settings.proto
new file mode 100644 (file)
index 0000000..db185b5
--- /dev/null
@@ -0,0 +1,119 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto3";
+
+package sonarqube.ws.settings;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Settings";
+option optimize_for = SPEED;
+
+// Response of GET api/settings/list_definitions
+message ListDefinitionsWsResponse {
+  repeated Definition definitions = 1;
+}
+
+// Response of GET api/settings/encrypt
+message EncryptWsResponse {
+  string encryptedValue = 1;
+}
+
+// Response of GET api/settings/generate_secret_key
+message GenerateSecretKeyWsResponse {
+  string secretKey = 1;
+}
+
+// Response of GET api/settings/check_secret_key
+message CheckSecretKeyWsResponse {
+  bool secretKeyAvailable = 1;
+}
+
+message Definition {
+  string key = 1;
+  oneof nameOneOf {string name = 2;}
+  string description = 3;
+  Type type = 4;
+  oneof categoryOneOf {string category = 5;}
+  oneof subCategoryOneOf {string subCategory = 6;}
+  oneof defaultValueOneOf {string defaultValue = 7;}
+  bool multiValues = 8;
+  repeated string options = 9;
+  repeated Field fields = 10;
+  oneof deprecatedKeyOneOf {string deprecatedKey = 11;}
+}
+
+message Field {
+  string key = 1;
+  string name = 2;
+  string description = 3;
+  Type type = 4;
+  repeated string options = 5;
+}
+
+enum Type {
+  STRING = 0;
+  TEXT = 1;
+  PASSWORD = 2;
+  BOOLEAN = 3;
+  INTEGER = 4;
+  FLOAT = 5;
+  LONG = 6;
+  REGULAR_EXPRESSION = 7;
+  METRIC = 8;
+  USER_LOGIN = 9;
+  METRIC_LEVEL = 10;
+  SINGLE_SELECT_LIST = 11;
+  PROPERTY_SET = 12;
+  LICENSE = 13;
+}
+
+// Response of GET api/settings/values
+message ValuesWsResponse {
+  repeated Setting settings = 1;
+}
+
+message Setting {
+  string key = 1;
+  oneof valueOneOf {
+    string value = 2;
+    Values values = 3;
+    FieldValues fieldValues = 4;
+  }
+  bool inherited = 5;
+  oneof parentValueOneOf {
+    string parentValue = 6;
+    Values parentValues = 7;
+    FieldValues parentFieldValues = 8;
+  }
+}
+
+message Values {
+  repeated string values = 1;
+}
+
+message FieldValues {
+  repeated Value fieldValues = 1;
+
+  message Value {
+    map<string, string> value = 1;
+  }
+}
+
+
+
diff --git a/sonar-ws-generated/src/main/protobuf/ws-system.proto b/sonar-ws-generated/src/main/protobuf/ws-system.proto
new file mode 100644 (file)
index 0000000..5ec4197
--- /dev/null
@@ -0,0 +1,77 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.system;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "System";
+option optimize_for = SPEED;
+
+// GET api/system/health
+message HealthResponse {
+  optional Health health = 1;
+  repeated Cause causes = 2;
+  optional Nodes nodes = 3;
+}
+
+message Nodes {
+  repeated Node nodes = 1;
+}
+
+// GET api/system/status
+message StatusResponse {
+  optional string id = 1;
+  optional string version = 2;
+  optional Status status = 3;
+}
+
+message Cause {
+  optional string message = 1;
+}
+
+enum Health {
+  GREEN = 0;
+  YELLOW = 1;
+  RED = 2;
+}
+
+enum Status {
+  STARTING = 0;
+  UP = 1;
+  DOWN = 2;
+  RESTARTING = 3;
+  DB_MIGRATION_NEEDED = 4;
+  DB_MIGRATION_RUNNING = 5;
+}
+
+message Node {
+  optional string name = 1;
+  optional NodeType type = 2;
+  optional string host = 3;
+  optional int32 port = 4;
+  optional string startedAt = 5;
+  optional Health health = 6;
+  repeated Cause causes = 7;
+}
+
+enum NodeType {
+  APPLICATION = 0;
+  SEARCH = 1;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-tests.proto b/sonar-ws-generated/src/main/protobuf/ws-tests.proto
new file mode 100644 (file)
index 0000000..7486597
--- /dev/null
@@ -0,0 +1,68 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.tests;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Tests";
+option optimize_for = SPEED;
+
+// WS api/tests/list
+message ListResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Test tests = 2;
+}
+
+// WS api/tests/covered_files
+message CoveredFilesResponse {
+  repeated CoveredFile files = 1;
+
+  message CoveredFile {
+    optional string id = 1;
+    optional string key = 2;
+    optional string longName = 3;
+    optional int32 coveredLines = 4;
+    optional string branch = 5;
+  }
+}
+
+
+message Test {
+  optional string id = 1;
+  optional string name = 2;
+  optional string fileId = 3;
+  optional string fileKey = 4;
+  optional string fileName = 5;
+  optional TestStatus status = 6;
+  optional int64 durationInMs = 7;
+  optional int32 coveredLines = 8;
+  optional string message = 9;
+  optional string stacktrace = 10;
+  optional string fileBranch = 11;
+}
+
+enum TestStatus {
+  OK = 1;
+  FAILURE = 2;
+  ERROR = 3;
+  SKIPPED = 4;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-user_groups.proto b/sonar-ws-generated/src/main/protobuf/ws-user_groups.proto
new file mode 100644 (file)
index 0000000..0791861
--- /dev/null
@@ -0,0 +1,52 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.usergroup;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "UserGroups";
+option optimize_for = SPEED;
+
+// WS api/user_groups/create
+message CreateWsResponse {
+  optional Group group = 1;
+}
+
+// WS api/user_groups/update
+message UpdateWsResponse {
+  optional Group group = 1;
+}
+
+// WS api/user_groups/search
+message SearchWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Group groups = 2;
+}
+
+message Group {
+  optional int64 id = 1;
+  optional string organization = 2;
+  optional string name = 3;
+  optional string description = 4;
+  optional int32 membersCount = 5;
+  optional bool default = 6;
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-user_tokens.proto b/sonar-ws-generated/src/main/protobuf/ws-user_tokens.proto
new file mode 100644 (file)
index 0000000..e51cd80
--- /dev/null
@@ -0,0 +1,43 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.usertoken;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "UserTokens";
+option optimize_for = SPEED;
+
+// WS api/user_tokens/generate
+message GenerateWsResponse {
+  optional string login = 1;
+  optional string name = 2;
+  optional string token = 3;
+}
+
+// WS api/user_tokens/search
+message SearchWsResponse {
+  optional string login = 1;
+  repeated UserToken userTokens = 2;
+
+  message UserToken {
+    optional string name = 1;
+    optional string createdAt = 2;
+  }
+}
diff --git a/sonar-ws-generated/src/main/protobuf/ws-users.proto b/sonar-ws-generated/src/main/protobuf/ws-users.proto
new file mode 100644 (file)
index 0000000..474b2a8
--- /dev/null
@@ -0,0 +1,116 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.users;
+
+import "ws-commons.proto";
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Users";
+option optimize_for = SPEED;
+
+// WS api/users/search
+message SearchWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated User users = 2;
+
+  message User {
+    optional string login = 1;
+    optional string name = 2;
+    optional bool active = 3;
+    optional string email = 4;
+    optional ScmAccounts scmAccounts = 5;
+    optional Groups groups = 6;
+    optional int32 tokensCount = 7;
+    optional bool local = 8;
+    optional string externalIdentity = 9;
+    optional string externalProvider = 10;
+    optional string avatar = 11;
+  }
+
+  message Groups {
+    repeated string groups = 1;
+  }
+
+  message ScmAccounts {
+    repeated string scmAccounts = 1;
+  }
+}
+
+// WS api/users/identity_providers
+message IdentityProvidersWsResponse {
+  repeated IdentityProvider identityProviders = 1;
+}
+
+message IdentityProvider {
+  optional string key = 1;
+  optional string name = 2;
+  optional string iconPath = 3;
+  optional string backgroundColor = 4;
+}
+
+message CreateWsResponse {
+  optional User user = 1;
+
+  message User {
+    optional string login = 1;
+    optional string name = 2;
+    optional string email = 3;
+    repeated string scmAccounts = 4;
+    optional bool active = 5;
+    optional bool local = 6;
+  }
+}
+
+// WS api/users/groups
+message GroupsWsResponse {
+  optional sonarqube.ws.commons.Paging paging = 1;
+  repeated Group groups = 2;
+
+  message Group {
+    optional int64 id = 1;
+    optional string name = 2;
+    optional string description = 3;
+    optional bool selected = 4;
+    optional bool default = 5;
+  }
+}
+
+// WS api/users/current
+message CurrentWsResponse {
+  optional bool isLoggedIn = 1;
+  optional string login = 2;
+  optional string name = 3;
+  optional string email = 4;
+  optional bool local = 5;
+  optional string externalIdentity = 6;
+  optional string externalProvider = 7;
+  repeated string scmAccounts = 8;
+  repeated string groups = 9;
+  optional Permissions permissions = 10;
+  optional bool showOnboardingTutorial = 11;
+  optional string avatar = 12;
+
+  message Permissions {
+    repeated string global = 1;
+  }
+}
+
+
diff --git a/sonar-ws-generated/src/main/protobuf/ws-webhooks.proto b/sonar-ws-generated/src/main/protobuf/ws-webhooks.proto
new file mode 100644 (file)
index 0000000..a7ef3a9
--- /dev/null
@@ -0,0 +1,49 @@
+// SonarQube, open source software quality management tool.
+// Copyright (C) 2008-2016 SonarSource
+// mailto:contact AT sonarsource DOT com
+//
+// SonarQube 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.
+//
+// SonarQube 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.
+
+syntax = "proto2";
+
+package sonarqube.ws.webhooks;
+
+option java_package = "org.sonarqube.ws";
+option java_outer_classname = "Webhooks";
+option optimize_for = SPEED;
+
+// WS api/webhooks/deliveries
+message DeliveriesWsResponse {
+  repeated Delivery deliveries = 1;
+}
+
+// WS api/webhooks/delivery
+message DeliveryWsResponse {
+  optional Delivery delivery = 1;
+}
+
+message Delivery {
+  optional string id = 1;
+  optional string componentKey = 2;
+  optional string ceTaskId = 3;
+  optional string name = 4;
+  optional string url = 5;
+  optional string at = 6;
+  optional bool success = 7;
+  optional int32 httpStatus = 8;
+  optional int32 durationMs = 9;
+  optional string payload = 10;
+  optional string errorStacktrace = 11;
+}
index f735cdaa4229a1297848e8badac7f5f0b01148ca..a56f2b27e789ed22b8a465bb5ba5ff8c64c51f77 100644 (file)
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.sonarsource.sonarqube</groupId>
+      <artifactId>sonar-ws-generated</artifactId>
+    </dependency>    
     <dependency>
       <groupId>org.sonarsource.sonarqube</groupId>
       <artifactId>sonar-plugin-api</artifactId>
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java b/sonar-ws/src/main/java/org/sonarqube/ws/MediaTypes.java
deleted file mode 100644 (file)
index 08783ca..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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;
-
-import com.google.common.base.Strings;
-import com.google.common.collect.ImmutableMap;
-import java.util.Locale;
-import java.util.Map;
-import org.apache.commons.io.FilenameUtils;
-
-/**
- * @since 5.3
- */
-public final class MediaTypes {
-
-  public static final String JSON = "application/json";
-  public static final String XML = "application/xml";
-  public static final String TXT = "text/plain";
-  public static final String PROTOBUF = "application/x-protobuf";
-  public static final String ZIP = "application/zip";
-  public static final String JAVASCRIPT = "application/javascript";
-  public static final String HTML = "text/html";
-  public static final String DEFAULT = "application/octet-stream";
-
-  private static final Map<String, String> MAP = new ImmutableMap.Builder<String, String>()
-    .put("js", JAVASCRIPT)
-    .put("json", JSON)
-    .put("zip", "application/zip")
-    .put("tgz", "application/tgz")
-    .put("ps", "application/postscript")
-    .put("jnlp", "application/jnlp")
-    .put("jar", "application/java-archive")
-    .put("xls", "application/vnd.ms-excel")
-    .put("ppt", "application/vnd.ms-powerpoint")
-    .put("tar", "application/x-tar")
-    .put("xml", XML)
-    .put("dtd", "application/xml-dtd")
-    .put("xslt", "application/xslt+xml")
-    .put("bmp", "image/bmp")
-    .put("gif", "image/gif")
-    .put("jpg", "image/jpeg")
-    .put("jpeg", "image/jpeg")
-    .put("tiff", "image/tiff")
-    .put("png", "image/png")
-    .put("svg", "image/svg+xml")
-    .put("ico", "image/x-icon")
-    .put("txt", TXT)
-    .put("csv", "text/csv")
-    .put("properties", "text/plain")
-    .put("rtf", "text/rtf")
-    .put("html", HTML)
-    .put("css", "text/css")
-    .put("tsv", "text/tab-separated-values")
-    .build();
-
-  private MediaTypes() {
-    // only static methods
-  }
-
-  public static String getByFilename(String filename) {
-    String extension = FilenameUtils.getExtension(filename);
-    String mime = null;
-    if (!Strings.isNullOrEmpty(extension)) {
-      mime = MAP.get(extension.toLowerCase(Locale.ENGLISH));
-    }
-    return mime != null ? mime : DEFAULT;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseRequest.java
deleted file mode 100644 (file)
index 8b5fbcf..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * 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;
-
-import com.google.common.collect.LinkedListMultimap;
-import com.google.common.collect.ListMultimap;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Set;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import org.sonarqube.ws.MediaTypes;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.isNullOrEmpty;
-import static java.util.Collections.singletonList;
-import static java.util.Collections.unmodifiableSet;
-import static java.util.Objects.requireNonNull;
-
-abstract class BaseRequest<SELF extends BaseRequest> implements WsRequest {
-
-  private final String path;
-
-  private String mediaType = MediaTypes.JSON;
-
-  private final DefaultParameters parameters = new DefaultParameters();
-  private final DefaultHeaders headers = new DefaultHeaders();
-
-  BaseRequest(String path) {
-    this.path = path;
-  }
-
-  @Override
-  public String getPath() {
-    return path;
-  }
-
-  @Override
-  public String getMediaType() {
-    return mediaType;
-  }
-
-  /**
-   * Expected media type of response. Default is {@link MediaTypes#JSON}.
-   */
-  public SELF setMediaType(String s) {
-    requireNonNull(s, "media type of response cannot be null");
-    this.mediaType = s;
-    return (SELF) this;
-  }
-
-  public SELF setParam(String key, @Nullable String value) {
-    return setSingleValueParam(key, value);
-  }
-
-  public SELF setParam(String key, @Nullable Integer value) {
-    return setSingleValueParam(key, value);
-  }
-
-  public SELF setParam(String key, @Nullable Long value) {
-    return setSingleValueParam(key, value);
-  }
-
-  public SELF setParam(String key, @Nullable Float value) {
-    return setSingleValueParam(key, value);
-  }
-
-  public SELF setParam(String key, @Nullable Boolean value) {
-    return setSingleValueParam(key, value);
-  }
-
-  private SELF setSingleValueParam(String key, @Nullable Object value) {
-    checkArgument(!isNullOrEmpty(key), "a WS parameter key cannot be null");
-    if (value == null) {
-      return (SELF) this;
-    }
-    parameters.setValue(key, value.toString());
-
-    return (SELF) this;
-  }
-
-  public SELF setParam(String key, @Nullable Collection<? extends Object> values) {
-    checkArgument(!isNullOrEmpty(key), "a WS parameter key cannot be null");
-    if (values == null || values.isEmpty()) {
-      return (SELF) this;
-    }
-
-    parameters.setValues(key, values.stream()
-      .filter(Objects::nonNull)
-      .map(Object::toString)
-      .filter(value -> !value.isEmpty())
-      .collect(Collectors.toList()));
-
-    return (SELF) this;
-  }
-
-  @Override
-  public Map<String, String> getParams() {
-    return parameters.keyValues.keySet().stream()
-      .collect(Collectors.toMap(
-        Function.identity(),
-        key -> parameters.keyValues.get(key).get(0),
-        (v1, v2) -> {
-          throw new IllegalStateException(String.format("Duplicate key '%s' in request", v1));
-        },
-        LinkedHashMap::new));
-  }
-
-  @Override
-  public Parameters getParameters() {
-    return parameters;
-  }
-
-  @Override
-  public Headers getHeaders() {
-    return headers;
-  }
-
-  public SELF setHeader(String name, @Nullable String value) {
-    requireNonNull(name, "Header name can't be null");
-    headers.setValue(name, value);
-    return (SELF) this;
-  }
-
-  private static class DefaultParameters implements Parameters {
-    // preserve insertion order
-    private final ListMultimap<String, String> keyValues = LinkedListMultimap.create();
-
-    @Override
-    @CheckForNull
-    public String getValue(String key) {
-      return keyValues.containsKey(key) ? keyValues.get(key).get(0) : null;
-    }
-
-    @Override
-    public List<String> getValues(String key) {
-      return keyValues.get(key);
-    }
-
-    @Override
-    public Set<String> getKeys() {
-      return keyValues.keySet();
-    }
-
-    private DefaultParameters setValue(String key, String value) {
-      checkArgument(!isNullOrEmpty(key));
-      checkArgument(value != null);
-
-      keyValues.putAll(key, singletonList(value));
-      return this;
-    }
-
-    private DefaultParameters setValues(String key, Collection<String> values) {
-      checkArgument(!isNullOrEmpty(key));
-      checkArgument(values != null && !values.isEmpty());
-
-      this.keyValues.putAll(key, values.stream().map(Object::toString).filter(Objects::nonNull).collect(Collectors.toList()));
-
-      return this;
-    }
-  }
-
-  private static class DefaultHeaders implements Headers {
-    private final Map<String, String> keyValues = new HashMap<>();
-
-    @Override
-    public Optional<String> getValue(String name) {
-      return Optional.ofNullable(keyValues.get(name));
-    }
-
-    private DefaultHeaders setValue(String name, @Nullable String value) {
-      checkArgument(!isNullOrEmpty(name));
-
-      if (value == null) {
-        keyValues.remove(name);
-      } else {
-        keyValues.put(name, value);
-      }
-      return this;
-    }
-
-    @Override
-    public Set<String> getNames() {
-      return unmodifiableSet(keyValues.keySet());
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseResponse.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseResponse.java
deleted file mode 100644 (file)
index 039754f..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * 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;
-
-import static java.net.HttpURLConnection.HTTP_NO_CONTENT;
-
-abstract class BaseResponse implements WsResponse {
-
-  @Override
-  public boolean isSuccessful() {
-    return code() >= 200 && code() < 300;
-  }
-
-  @Override
-  public WsResponse failIfNotSuccessful() {
-    if (!isSuccessful()) {
-      String content = content();
-      close();
-      throw new HttpException(requestUrl(), code(), content);
-    }
-    return this;
-  }
-
-  @Override
-  public boolean hasContent() {
-    return code() != HTTP_NO_CONTENT;
-  }
-  
-  @Override
-  public void close() {
-    // override if needed
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/BaseService.java
deleted file mode 100644 (file)
index 4c6a0e9..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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;
-
-import com.google.protobuf.Message;
-import com.google.protobuf.Parser;
-import java.io.InputStream;
-import java.util.Collection;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import org.apache.commons.io.IOUtils;
-import org.sonarqube.ws.MediaTypes;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.isNullOrEmpty;
-
-public abstract class BaseService {
-
-  private final WsConnector wsConnector;
-  protected final String controller;
-
-  public BaseService(WsConnector wsConnector, String controllerPath) {
-    checkArgument(!isNullOrEmpty(controllerPath));
-    this.wsConnector = wsConnector;
-    this.controller = controllerPath;
-  }
-
-  protected <T extends Message> T call(BaseRequest request, Parser<T> parser) {
-    request.setMediaType(MediaTypes.PROTOBUF);
-    WsResponse response = call(request);
-    return convert(response, parser);
-  }
-
-  protected WsResponse call(WsRequest request) {
-    return wsConnector.call(request).failIfNotSuccessful();
-  }
-
-  public <T extends Message> T convert(WsResponse response, Parser<T> parser) {
-    try (InputStream byteStream = response.contentStream()) {
-      byte[] bytes = IOUtils.toByteArray(byteStream);
-      // HTTP header "Content-Type" is not verified. It may be different than protobuf.
-      return parser.parseFrom(bytes);
-    } catch (Exception e) {
-      throw new IllegalStateException("Fail to parse protobuf response of " + response.requestUrl(), e);
-    }
-  }
-
-  protected String path(String action) {
-    return String.format("%s/%s", controller, action);
-  }
-
-  @CheckForNull
-  protected static String inlineMultipleParamValue(@Nullable Collection<String> values) {
-    return values == null ? null : String.join(",", values);
-  }
-}
index f0d0e841f86ae4a65b6c47d5565bf848d3debde9..473ec80ad45fad299191c3ef82a8826c0d904ef4 100644 (file)
@@ -28,14 +28,14 @@ import org.sonarqube.ws.client.organization.OrganizationService;
 import org.sonarqube.ws.client.permission.PermissionsService;
 import org.sonarqube.ws.client.project.ProjectsService;
 import org.sonarqube.ws.client.projectanalysis.ProjectAnalysisService;
-import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
+import org.sonarqube.ws.client.projectbranches.ProjectBranchesServiceOld;
 import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
-import org.sonarqube.ws.client.qualitygate.QualityGatesService;
+import org.sonarqube.ws.client.qualitygates.QualitygatesService;
 import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
 import org.sonarqube.ws.client.root.RootsService;
 import org.sonarqube.ws.client.rule.RulesService;
 import org.sonarqube.ws.client.setting.SettingsService;
-import org.sonarqube.ws.client.system.SystemService;
+import org.sonarqube.ws.client.system.SystemServiceOld;
 import org.sonarqube.ws.client.user.UsersService;
 import org.sonarqube.ws.client.usergroup.UserGroupsService;
 import org.sonarqube.ws.client.usertoken.UserTokensService;
@@ -59,9 +59,9 @@ class DefaultWsClient implements WsClient {
   private final UsersService usersService;
   private final UserGroupsService userGroupsService;
   private final UserTokensService userTokensService;
-  private final QualityGatesService qualityGatesService;
+  private final QualitygatesService qualityGatesService;
   private final MeasuresService measuresService;
-  private final SystemService systemService;
+  private final SystemServiceOld systemService;
   private final CeService ceService;
   private final RulesService rulesService;
   private final ProjectsService projectsService;
@@ -70,7 +70,7 @@ class DefaultWsClient implements WsClient {
   private final RootsService rootsService;
   private final WebhooksService webhooksService;
   private final ProjectAnalysisService projectAnalysisService;
-  private final ProjectBranchesService projectBranchesService;
+  private final ProjectBranchesServiceOld projectBranchesService;
 
   DefaultWsClient(WsConnector wsConnector) {
     this.wsConnector = wsConnector;
@@ -83,9 +83,9 @@ class DefaultWsClient implements WsClient {
     this.usersService = new UsersService(wsConnector);
     this.userGroupsService = new UserGroupsService(wsConnector);
     this.userTokensService = new UserTokensService(wsConnector);
-    this.qualityGatesService = new QualityGatesService(wsConnector);
+    this.qualityGatesService = new QualitygatesService(wsConnector);
     this.measuresService = new MeasuresService(wsConnector);
-    this.systemService = new SystemService(wsConnector);
+    this.systemService = new SystemServiceOld(wsConnector);
     this.ceService = new CeService(wsConnector);
     this.rulesService = new RulesService(wsConnector);
     this.projectsService = new ProjectsService(wsConnector);
@@ -94,7 +94,7 @@ class DefaultWsClient implements WsClient {
     this.rootsService = new RootsService(wsConnector);
     this.webhooksService = new WebhooksService(wsConnector);
     this.projectAnalysisService = new ProjectAnalysisService(wsConnector);
-    this.projectBranchesService = new ProjectBranchesService(wsConnector);
+    this.projectBranchesService = new ProjectBranchesServiceOld(wsConnector);
   }
 
   @Override
@@ -148,7 +148,7 @@ class DefaultWsClient implements WsClient {
   }
 
   @Override
-  public QualityGatesService qualityGates() {
+  public QualitygatesService qualityGates() {
     return qualityGatesService;
   }
 
@@ -158,7 +158,7 @@ class DefaultWsClient implements WsClient {
   }
 
   @Override
-  public SystemService system() {
+  public SystemServiceOld system() {
     return systemService;
   }
 
@@ -203,7 +203,7 @@ class DefaultWsClient implements WsClient {
   }
 
   @Override
-  public ProjectBranchesService projectBranches() {
+  public ProjectBranchesServiceOld projectBranches() {
     return projectBranchesService;
   }
 }
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/GetRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/GetRequest.java
deleted file mode 100644 (file)
index 02a1f2a..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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;
-
-/**
- * @since 5.3
- */
-public class GetRequest extends BaseRequest<GetRequest> {
-  public GetRequest(String path) {
-    super(path);
-  }
-
-  @Override
-  public Method getMethod() {
-    return Method.GET;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/Headers.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/Headers.java
deleted file mode 100644 (file)
index b289789..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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;
-
-import java.util.Optional;
-import java.util.Set;
-
-/**
- * HTTP headers
- *
- * @since 6.6
- */
-public interface Headers {
-
-  Optional<String> getValue(String name);
-
-  Set<String> getNames();
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpException.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpException.java
deleted file mode 100644 (file)
index d456fae..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * 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;
-
-/**
- * @since 5.3
- */
-public class HttpException extends RuntimeException {
-
-  private final String url;
-  private final int code;
-  private final String content;
-
-  public HttpException(String url, int code, String content) {
-    super(String.format("Error %d on %s : %s", code, url, content));
-    this.url = url;
-    this.code = code;
-    this.content = content;
-  }
-  
-  public String content() {
-    return content;
-  }
-
-  public String url() {
-    return url;
-  }
-
-  /**
-   * @see java.net.HttpURLConnection constants
-   */
-  public int code() {
-    return code;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/Parameters.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/Parameters.java
deleted file mode 100644 (file)
index ae692ab..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * 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;
-
-import java.util.List;
-import java.util.Set;
-import javax.annotation.CheckForNull;
-
-public interface Parameters {
-  /**
-   * In the case of a multi value parameter, returns the first element
-   */
-  @CheckForNull
-  String getValue(String key);
-
-  List<String> getValues(String key);
-
-  Set<String> getKeys();
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/PostRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/PostRequest.java
deleted file mode 100644 (file)
index 13cbdd5..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * 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;
-
-import java.io.File;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * @since 5.3
- */
-public class PostRequest extends BaseRequest<PostRequest> {
-
-  private final Map<String, Part> parts = new LinkedHashMap<>();
-
-  public PostRequest(String path) {
-    super(path);
-  }
-
-  @Override
-  public Method getMethod() {
-    return Method.POST;
-  }
-
-  public PostRequest setPart(String name, Part part) {
-    this.parts.put(name, part);
-    return this;
-  }
-
-  public Map<String, Part> getParts() {
-    return parts;
-  }
-
-  public static class Part {
-    private final String mediaType;
-    private final File file;
-
-    public Part(String mediaType, File file) {
-      this.mediaType = mediaType;
-      this.file = file;
-    }
-
-    public String getMediaType() {
-      return mediaType;
-    }
-
-    public File getFile() {
-      return file;
-    }
-  }
-
-}
index 6083afd01d4992cb1ff38a28cecf37f03cb600f8..71b00aa96d901c172e23a87d7ef7dfb1fa9faca6 100644 (file)
@@ -28,14 +28,14 @@ import org.sonarqube.ws.client.organization.OrganizationService;
 import org.sonarqube.ws.client.permission.PermissionsService;
 import org.sonarqube.ws.client.project.ProjectsService;
 import org.sonarqube.ws.client.projectanalysis.ProjectAnalysisService;
-import org.sonarqube.ws.client.projectbranches.ProjectBranchesService;
+import org.sonarqube.ws.client.projectbranches.ProjectBranchesServiceOld;
 import org.sonarqube.ws.client.projectlinks.ProjectLinksService;
-import org.sonarqube.ws.client.qualitygate.QualityGatesService;
+import org.sonarqube.ws.client.qualitygates.QualitygatesService;
 import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
 import org.sonarqube.ws.client.root.RootsService;
 import org.sonarqube.ws.client.rule.RulesService;
 import org.sonarqube.ws.client.setting.SettingsService;
-import org.sonarqube.ws.client.system.SystemService;
+import org.sonarqube.ws.client.system.SystemServiceOld;
 import org.sonarqube.ws.client.user.UsersService;
 import org.sonarqube.ws.client.usergroup.UserGroupsService;
 import org.sonarqube.ws.client.usertoken.UserTokensService;
@@ -78,11 +78,11 @@ public interface WsClient {
 
   UserTokensService userTokens();
 
-  QualityGatesService qualityGates();
+  QualitygatesService qualityGates();
 
   MeasuresService measures();
 
-  SystemService system();
+  SystemServiceOld system();
 
   CeService ce();
 
@@ -123,5 +123,5 @@ public interface WsClient {
   /**
    * @since 6.6>
    */
-  ProjectBranchesService projectBranches();
+  ProjectBranchesServiceOld projectBranches();
 }
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsConnector.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsConnector.java
deleted file mode 100644 (file)
index b203d18..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * 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;
-
-/**
- * @since 5.3
- */
-public interface WsConnector {
-
-  /**
-   * Server base URL, always with trailing slash, for instance "http://localhost:9000/"
-   */
-  String baseUrl();
-
-  /**
-   * @throws IllegalStateException if the request could not be executed due to
-   *     a connectivity problem or timeout. Because networks can
-   *     fail during an exchange, it is possible that the remote server
-   *     accepted the request before the failure
-   */
-  WsResponse call(WsRequest wsRequest);
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsRequest.java
deleted file mode 100644 (file)
index 9907ae7..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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;
-
-import java.util.Map;
-
-/**
- * @since 5.3
- */
-public interface WsRequest {
-
-  Method getMethod();
-
-  String getPath();
-
-  String getMediaType();
-
-  /**
-   *
-   * In case of multi value parameters, returns the first value
-   *
-   * @deprecated since 6.1. Use {@link #getParameters()} instead
-   */
-  @Deprecated
-  Map<String, String> getParams();
-
-  Parameters getParameters();
-
-  Headers getHeaders();
-
-  enum Method {
-    GET, POST
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/WsResponse.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/WsResponse.java
deleted file mode 100644 (file)
index fcaed89..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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;
-
-import java.io.Closeable;
-import java.io.InputStream;
-import java.io.Reader;
-
-/**
- * @since 5.3
- */
-public interface WsResponse extends Closeable {
-
-  /**
-   * The absolute requested URL
-   */
-  String requestUrl();
-
-  /**
-   * HTTP status code
-   */
-  int code();
-
-  /**
-   * Returns true if the code is in [200..300), which means the request was
-   * successfully received, understood, and accepted.
-   */
-  boolean isSuccessful() ;
-
-  /**
-   * Throws a {@link HttpException} if {@link #isSuccessful()} is false.
-   */
-  WsResponse failIfNotSuccessful();
-
-  String contentType();
-
-  boolean hasContent();
-
-  InputStream contentStream();
-
-  Reader contentReader();
-
-  String content();
-  
-  @Override
-  void close();
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java
deleted file mode 100644 (file)
index 256afc5..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.ce;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class ActivityStatusWsRequest {
-  private final String componentId;
-  private final String componentKey;
-
-  private ActivityStatusWsRequest(Builder builder) {
-    this.componentId = builder.componentId;
-    this.componentKey = builder.componentKey;
-  }
-
-  @CheckForNull
-  public String getComponentId() {
-    return componentId;
-  }
-
-  @CheckForNull
-  public String getComponentKey() {
-    return componentKey;
-  }
-
-  public static Builder newBuilder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private String componentId;
-    private String componentKey;
-
-    private Builder() {
-      // enforce newBuilder() use for instantiation
-    }
-
-    public Builder setComponentId(@Nullable String componentId) {
-      this.componentId = componentId;
-      return this;
-    }
-
-    public Builder setComponentKey(@Nullable String componentKey) {
-      this.componentKey = componentKey;
-      return this;
-    }
-
-    public ActivityStatusWsRequest build() {
-      return new ActivityStatusWsRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityWsRequest.java
deleted file mode 100644 (file)
index 8a1abb2..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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.ce;
-
-import java.util.List;
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ActivityWsRequest {
-  private String componentId;
-  private String query;
-  private List<String> status;
-  private String type;
-  private Boolean onlyCurrents;
-  private String minSubmittedAt;
-  private String maxExecutedAt;
-  private Integer page;
-  private Integer pageSize;
-
-  @CheckForNull
-  public String getComponentId() {
-    return componentId;
-  }
-
-  public ActivityWsRequest setComponentId(@Nullable String componentId) {
-    this.componentId = componentId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getQuery() {
-    return query;
-  }
-
-  public ActivityWsRequest setQuery(@Nullable String query) {
-    this.query = query;
-    return this;
-  }
-
-  @CheckForNull
-  public List<String> getStatus() {
-    return status;
-  }
-
-  public ActivityWsRequest setStatus(@Nullable List<String> status) {
-    this.status = status;
-    return this;
-  }
-
-  @CheckForNull
-  public String getType() {
-    return type;
-  }
-
-  public ActivityWsRequest setType(@Nullable String type) {
-    this.type = type;
-    return this;
-  }
-
-  @CheckForNull
-  public Boolean getOnlyCurrents() {
-    return onlyCurrents;
-  }
-
-  public ActivityWsRequest setOnlyCurrents(@Nullable Boolean onlyCurrents) {
-    this.onlyCurrents = onlyCurrents;
-    return this;
-  }
-
-  @CheckForNull
-  public String getMinSubmittedAt() {
-    return minSubmittedAt;
-  }
-
-  public ActivityWsRequest setMinSubmittedAt(@Nullable String minSubmittedAt) {
-    this.minSubmittedAt = minSubmittedAt;
-    return this;
-  }
-
-  @CheckForNull
-  public String getMaxExecutedAt() {
-    return maxExecutedAt;
-  }
-
-  public ActivityWsRequest setMaxExecutedAt(@Nullable String maxExecutedAt) {
-    this.maxExecutedAt = maxExecutedAt;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPage() {
-    return page;
-  }
-
-  public ActivityWsRequest setPage(@Nullable Integer page) {
-    this.page = page;
-    return this;
-  }
-
-  @CheckForNull
-  public Integer getPageSize() {
-    return pageSize;
-  }
-
-  public ActivityWsRequest setPageSize(@Nullable Integer pageSize) {
-    this.pageSize = pageSize;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/CeService.java
deleted file mode 100644 (file)
index 243af50..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * 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.ce;
-
-import org.sonarqube.ws.WsCe;
-import org.sonarqube.ws.WsCe.ActivityResponse;
-import org.sonarqube.ws.WsCe.ProjectResponse;
-import org.sonarqube.ws.WsCe.TaskTypesWsResponse;
-import org.sonarqube.ws.WsCe.WorkerCountResponse;
-import org.sonarqube.ws.client.BaseService;
-import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.WsConnector;
-
-import static org.sonarqube.ws.client.ce.CeWsParameters.ACTION_WORKER_COUNT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.DEPRECATED_PARAM_COMPONENT_KEY;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT_ID;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MAX_EXECUTED_AT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MIN_SUBMITTED_AT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_ONLY_CURRENTS;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_STATUS;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_TYPE;
-
-/**
- * Maps web service {@code api/ce} (Compute Engine).
- */
-public class CeService extends BaseService {
-
-  public CeService(WsConnector wsConnector) {
-    super(wsConnector, "api/ce");
-  }
-
-  public ActivityResponse activity(ActivityWsRequest request) {
-    return call(
-      new GetRequest(path("activity"))
-        .setParam(PARAM_COMPONENT_ID, request.getComponentId())
-        .setParam("q", request.getQuery())
-        .setParam(PARAM_STATUS, inlineMultipleParamValue(request.getStatus()))
-        .setParam(PARAM_TYPE, request.getType())
-        .setParam(PARAM_MAX_EXECUTED_AT, request.getMaxExecutedAt())
-        .setParam(PARAM_MIN_SUBMITTED_AT, request.getMinSubmittedAt())
-        .setParam(PARAM_ONLY_CURRENTS, request.getOnlyCurrents())
-        .setParam("p", request.getPage())
-        .setParam("ps", request.getPageSize()),
-      ActivityResponse.parser());
-  }
-
-  public TaskTypesWsResponse taskTypes() {
-    return call(new GetRequest(path("task_types")), TaskTypesWsResponse.parser());
-  }
-
-  /**
-   * Gets details of a Compute Engine task.
-   *
-   * @throws org.sonarqube.ws.client.HttpException if HTTP status code is not 2xx.
-   * @since 5.5
-   */
-  public WsCe.TaskResponse task(String id) {
-    return task(TaskWsRequest.newBuilder(id).build());
-  }
-
-  public WsCe.TaskResponse task(TaskWsRequest taskWsRequest) {
-    GetRequest request = new GetRequest(path("task"))
-      .setParam("id", taskWsRequest.getTaskUuid());
-    if (!taskWsRequest.getAdditionalFields().isEmpty()) {
-      request.setParam("additionalFields", inlineMultipleParamValue(taskWsRequest.getAdditionalFields()));
-    }
-    return call(request, WsCe.TaskResponse.parser());
-  }
-
-  public WsCe.ActivityStatusWsResponse activityStatus(ActivityStatusWsRequest request) {
-    return call(
-      new GetRequest(path("activity_status"))
-        .setParam(PARAM_COMPONENT_ID, request.getComponentId())
-        .setParam(DEPRECATED_PARAM_COMPONENT_KEY, request.getComponentKey()),
-      WsCe.ActivityStatusWsResponse.parser());
-  }
-
-  public WorkerCountResponse workerCount() {
-    return call(new GetRequest(path(ACTION_WORKER_COUNT)), WorkerCountResponse.parser());
-  }
-
-  public ProjectResponse component(String componentKey) {
-    return call(
-      new GetRequest(path("component"))
-        .setParam(PARAM_COMPONENT, componentKey),
-      ProjectResponse.parser());
-  }
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java
deleted file mode 100644 (file)
index d8f9333..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.ce;
-
-import com.google.common.collect.ImmutableList;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import javax.annotation.concurrent.Immutable;
-
-@Immutable
-public class TaskWsRequest {
-  private final String taskUuid;
-  private final List<String> additionalFields;
-
-  private TaskWsRequest(Builder builder) {
-    this.taskUuid = builder.taskUuid;
-    this.additionalFields = createAdditionalFields(builder);
-  }
-  public static Builder newBuilder(String taskUuid) {
-    return new Builder(taskUuid);
-  }
-
-  private static List<String> createAdditionalFields(Builder builder) {
-    if (!builder.errorStacktrace && !builder.scannerContext) {
-      return Collections.emptyList();
-    }
-    List<String> res = new ArrayList<>(2);
-    if (builder.errorStacktrace) {
-      res.add("stacktrace");
-    }
-    if (builder.scannerContext) {
-      res.add("scannerContext");
-    }
-    return ImmutableList.copyOf(res);
-  }
-
-  public String getTaskUuid() {
-    return taskUuid;
-  }
-
-  public List<String> getAdditionalFields() {
-    return additionalFields;
-  }
-
-  public static final class Builder {
-    private final String taskUuid;
-    private boolean errorStacktrace = false;
-    private boolean scannerContext = false;
-
-    private Builder(String taskUuid) {
-      this.taskUuid = taskUuid;
-    }
-
-    public Builder withErrorStacktrace() {
-      this.errorStacktrace = true;
-      return this;
-    }
-
-    public Builder withScannerContext() {
-      this.scannerContext = true;
-      return this;
-    }
-
-    public TaskWsRequest build() {
-      return new TaskWsRequest(this);
-    }
-  }
-}
index 95279bba0c676f1da94e08478ea5ff76edb64cd7..6d45e829bf2117f462dac4c159d5094a9234daf7 100644 (file)
@@ -22,10 +22,10 @@ package org.sonarqube.ws.client.component;
 import com.google.common.base.Joiner;
 import java.util.List;
 import java.util.stream.Collectors;
-import org.sonarqube.ws.WsComponents.SearchProjectsWsResponse;
-import org.sonarqube.ws.WsComponents.SearchWsResponse;
-import org.sonarqube.ws.WsComponents.ShowWsResponse;
-import org.sonarqube.ws.WsComponents.TreeWsResponse;
+import org.sonarqube.ws.Components.SearchProjectsWsResponse;
+import org.sonarqube.ws.Components.SearchWsResponse;
+import org.sonarqube.ws.Components.ShowWsResponse;
+import org.sonarqube.ws.Components.TreeWsResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsConnector;
index db8b7e4bde23f47e3bfb5c123a87bfd5bce43678..0b0afb29cb0f552d7a04d81ca89942c8e9bf6e54 100644 (file)
 package org.sonarqube.ws.client.measure;
 
 import org.sonar.api.server.ws.WebService.Param;
-import org.sonarqube.ws.WsMeasures.ComponentTreeWsResponse;
-import org.sonarqube.ws.WsMeasures.ComponentWsResponse;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse;
-import org.sonarqube.ws.WsMeasures.SearchWsResponse;
+import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
+import org.sonarqube.ws.Measures.ComponentWsResponse;
+import org.sonarqube.ws.Measures.SearchHistoryResponse;
+import org.sonarqube.ws.Measures.SearchWsResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsConnector;
index ba58f34a27493b8a012e8bafde7c3ef750f3eec2..c048837359704aad59db25b4805406e68caea057 100644 (file)
  */
 package org.sonarqube.ws.client.permission;
 
-import org.sonarqube.ws.WsPermissions;
-import org.sonarqube.ws.WsPermissions.CreateTemplateWsResponse;
-import org.sonarqube.ws.WsPermissions.SearchProjectPermissionsWsResponse;
-import org.sonarqube.ws.WsPermissions.SearchTemplatesWsResponse;
-import org.sonarqube.ws.WsPermissions.UpdateTemplateWsResponse;
-import org.sonarqube.ws.WsPermissions.UsersWsResponse;
-import org.sonarqube.ws.WsPermissions.WsSearchGlobalPermissionsResponse;
+import org.sonarqube.ws.Permissions;
+import org.sonarqube.ws.Permissions.CreateTemplateWsResponse;
+import org.sonarqube.ws.Permissions.SearchProjectPermissionsWsResponse;
+import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse;
+import org.sonarqube.ws.Permissions.UpdateTemplateWsResponse;
+import org.sonarqube.ws.Permissions.UsersWsResponse;
+import org.sonarqube.ws.Permissions.WsSearchGlobalPermissionsResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
@@ -53,7 +53,7 @@ public class PermissionsService extends BaseService {
     super(wsConnector, PermissionsWsParameters.CONTROLLER);
   }
 
-  public WsPermissions.WsGroupsResponse groups(GroupsWsRequest request) {
+  public Permissions.WsGroupsResponse groups(GroupsWsRequest request) {
     GetRequest get = new GetRequest(path("groups"))
       .setParam(PARAM_PERMISSION, request.getPermission())
       .setParam(PARAM_PROJECT_ID, request.getProjectId())
@@ -61,7 +61,7 @@ public class PermissionsService extends BaseService {
       .setParam("p", request.getPage())
       .setParam("ps", request.getPageSize())
       .setParam("q", request.getQuery());
-    return call(get, WsPermissions.WsGroupsResponse.parser());
+    return call(get, Permissions.WsGroupsResponse.parser());
   }
 
   public void addGroup(AddGroupWsRequest request) {
index 11dc0c4495fed6a7c0c0c2ed23a2e6233a927580..9a42c155add0abaffce11a6b0c05c983b1ecff1c 100644 (file)
@@ -20,9 +20,9 @@
 package org.sonarqube.ws.client.project;
 
 import com.google.common.base.Joiner;
-import org.sonarqube.ws.WsProjects.BulkUpdateKeyWsResponse;
-import org.sonarqube.ws.WsProjects.CreateWsResponse;
-import org.sonarqube.ws.WsProjects.SearchWsResponse;
+import org.sonarqube.ws.Projects.BulkUpdateKeyWsResponse;
+import org.sonarqube.ws.Projects.CreateWsResponse;
+import org.sonarqube.ws.Projects.SearchWsResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesService.java
deleted file mode 100644 (file)
index 75ad3bd..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.projectbranches;
-
-import org.sonarqube.ws.WsBranches.ListWsResponse;
-import org.sonarqube.ws.WsBranches.ShowWsResponse;
-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 static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.ACTION_DELETE;
-import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.ACTION_LIST;
-import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.ACTION_RENAME;
-import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.ACTION_SHOW;
-import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.CONTROLLER;
-import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_BRANCH;
-import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_NAME;
-import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_PROJECT;
-
-public class ProjectBranchesService extends BaseService {
-
-  public ProjectBranchesService(WsConnector wsConnector) {
-    super(wsConnector, CONTROLLER);
-  }
-
-  public ListWsResponse list(String project) {
-    GetRequest get = new GetRequest(path(ACTION_LIST))
-      .setParam(PARAM_PROJECT, project);
-    return call(get, ListWsResponse.parser());
-  }
-
-  public ShowWsResponse show(String project, String branch) {
-    GetRequest get = new GetRequest(path(ACTION_SHOW))
-      .setParam(PARAM_PROJECT, project)
-      .setParam(PARAM_BRANCH, branch);
-    return call(get, ShowWsResponse.parser());
-  }
-
-  public void delete(String project, String branch) {
-    PostRequest post = new PostRequest(path(ACTION_DELETE))
-      .setParam(PARAM_PROJECT, project)
-      .setParam(PARAM_BRANCH, branch);
-    call(post);
-  }
-
-  public void rename(String project, String name) {
-    PostRequest post = new PostRequest(path(ACTION_RENAME))
-      .setParam(PARAM_PROJECT, project)
-      .setParam(PARAM_NAME, name);
-    call(post);
-  }
-
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceOld.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/projectbranches/ProjectBranchesServiceOld.java
new file mode 100644 (file)
index 0000000..cee7e91
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * 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.projectbranches;
+
+import org.sonarqube.ws.ProjectBranches.ListWsResponse;
+import org.sonarqube.ws.ProjectBranches.ShowWsResponse;
+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 static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.ACTION_DELETE;
+import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.ACTION_LIST;
+import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.ACTION_RENAME;
+import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.ACTION_SHOW;
+import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.CONTROLLER;
+import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_BRANCH;
+import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_NAME;
+import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.PARAM_PROJECT;
+
+public class ProjectBranchesServiceOld extends BaseService {
+
+  public ProjectBranchesServiceOld(WsConnector wsConnector) {
+    super(wsConnector, CONTROLLER);
+  }
+
+  public ListWsResponse list(String project) {
+    GetRequest get = new GetRequest(path(ACTION_LIST))
+      .setParam(PARAM_PROJECT, project);
+    return call(get, ListWsResponse.parser());
+  }
+
+  public ShowWsResponse show(String project, String branch) {
+    GetRequest get = new GetRequest(path(ACTION_SHOW))
+      .setParam(PARAM_PROJECT, project)
+      .setParam(PARAM_BRANCH, branch);
+    return call(get, ShowWsResponse.parser());
+  }
+
+  public void delete(String project, String branch) {
+    PostRequest post = new PostRequest(path(ACTION_DELETE))
+      .setParam(PARAM_PROJECT, project)
+      .setParam(PARAM_BRANCH, branch);
+    call(post);
+  }
+
+  public void rename(String project, String name) {
+    PostRequest post = new PostRequest(path(ACTION_RENAME))
+      .setParam(PARAM_PROJECT, project)
+      .setParam(PARAM_NAME, name);
+    call(post);
+  }
+
+}
index 82e3743157259afe9f56eb5fd5de907429056d31..148ff98162a5f3db062ef3dc475a3b90eec1e9f8 100644 (file)
@@ -21,3 +21,4 @@
 package org.sonarqube.ws.client.projectbranches;
 
 import javax.annotation.ParametersAreNonnullByDefault;
+
index 05d2e0d8a0bfe7f3585deab4ad810c052a5374cd..6266aa38689c8137ec319b79cd79e2ea2e75d806 100644 (file)
@@ -19,8 +19,8 @@
  */
 package org.sonarqube.ws.client.projectlinks;
 
-import org.sonarqube.ws.WsProjectLinks.CreateWsResponse;
-import org.sonarqube.ws.WsProjectLinks.SearchWsResponse;
+import org.sonarqube.ws.ProjectLinks.CreateWsResponse;
+import org.sonarqube.ws.ProjectLinks.SearchWsResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java
deleted file mode 100644 (file)
index 6165b8e..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * 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.qualitygate;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.isNullOrEmpty;
-
-@Immutable
-public class CreateConditionRequest {
-
-  private final long qualityGateId;
-  private final String metricKey;
-  private final String operator;
-  private final String warning;
-  private final String error;
-  private final Integer period;
-
-  private CreateConditionRequest(Builder builder) {
-    this.qualityGateId = builder.qualityGateId;
-    this.metricKey = builder.metricKey;
-    this.operator = builder.operator;
-    this.warning = builder.warning;
-    this.error = builder.error;
-    this.period = builder.period;
-  }
-
-  public long getQualityGateId() {
-    return qualityGateId;
-  }
-
-  public String getMetricKey() {
-    return metricKey;
-  }
-
-  public String getOperator() {
-    return operator;
-  }
-
-  @CheckForNull
-  public String getWarning() {
-    return warning;
-  }
-
-  @CheckForNull
-  public String getError() {
-    return error;
-  }
-
-  @CheckForNull
-  public Integer getPeriod() {
-    return period;
-  }
-
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private long qualityGateId;
-    private String metricKey;
-    private String operator;
-    private String warning;
-    private String error;
-    private Integer period;
-
-    private Builder() {
-      // enforce factory method use
-    }
-
-    public Builder setQualityGateId(long qualityGateId) {
-      this.qualityGateId = qualityGateId;
-      return this;
-    }
-
-    public Builder setMetricKey(String metricKey) {
-      this.metricKey = metricKey;
-      return this;
-    }
-
-    public Builder setOperator(String operator) {
-      this.operator = operator;
-      return this;
-    }
-
-    public Builder setWarning(@Nullable String warning) {
-      this.warning = warning;
-      return this;
-    }
-
-    public Builder setError(@Nullable String error) {
-      this.error = error;
-      return this;
-    }
-
-    public Builder setPeriod(@Nullable Integer period) {
-      this.period = period;
-      return this;
-    }
-
-    public CreateConditionRequest build() {
-      checkArgument(qualityGateId > 0, "Quality gate id is mandatory and must not be empty");
-      checkArgument(!isNullOrEmpty(metricKey), "Metric key is mandatory and must not be empty");
-      checkArgument(!isNullOrEmpty(operator), "Operator is mandatory and must not be empty");
-      return new CreateConditionRequest(this);
-    }
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/ProjectStatusWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/ProjectStatusWsRequest.java
deleted file mode 100644 (file)
index ba4c300..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * 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.qualitygate;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-
-public class ProjectStatusWsRequest {
-  private String analysisId;
-  private String projectId;
-  private String projectKey;
-
-  @CheckForNull
-  public String getAnalysisId() {
-    return analysisId;
-  }
-
-  public ProjectStatusWsRequest setAnalysisId(@Nullable String analysisId) {
-    this.analysisId = analysisId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public ProjectStatusWsRequest setProjectId(@Nullable String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public ProjectStatusWsRequest setProjectKey(@Nullable String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/QualityGatesService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/QualityGatesService.java
deleted file mode 100644 (file)
index 7872e15..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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.qualitygate;
-
-import org.sonarqube.ws.WsQualityGates.CreateConditionWsResponse;
-import org.sonarqube.ws.WsQualityGates.CreateWsResponse;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse;
-import org.sonarqube.ws.WsQualityGates.UpdateConditionWsResponse;
-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 static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_CREATE;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_CREATE_CONDITION;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_PROJECT_STATUS;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_SELECT;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.ACTION_UPDATE_CONDITION;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.CONTROLLER_QUALITY_GATES;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ANALYSIS_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ERROR;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_GATE_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_METRIC;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_NAME;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_OPERATOR;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PERIOD;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PROJECT_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PROJECT_KEY;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_WARNING;
-
-public class QualityGatesService extends BaseService {
-
-  public QualityGatesService(WsConnector wsConnector) {
-    super(wsConnector, CONTROLLER_QUALITY_GATES);
-  }
-
-  public ProjectStatusWsResponse projectStatus(ProjectStatusWsRequest request) {
-    return call(new GetRequest(path(ACTION_PROJECT_STATUS))
-      .setParam(PARAM_ANALYSIS_ID, request.getAnalysisId())
-      .setParam(PARAM_PROJECT_ID, request.getProjectId())
-      .setParam(PARAM_PROJECT_KEY, request.getProjectKey()),
-      ProjectStatusWsResponse.parser());
-  }
-
-  public void associateProject(SelectWsRequest request) {
-    call(new PostRequest(path(ACTION_SELECT))
-      .setParam(PARAM_GATE_ID, request.getGateId())
-      .setParam(PARAM_PROJECT_ID, request.getProjectId())
-      .setParam(PARAM_PROJECT_KEY, request.getProjectKey()));
-  }
-
-  public CreateWsResponse create(String name) {
-    return call(new PostRequest(path(ACTION_CREATE))
-      .setParam(PARAM_NAME, name),
-      CreateWsResponse.parser());
-  }
-
-  public CreateConditionWsResponse createCondition(CreateConditionRequest request) {
-    return call(new PostRequest(path(ACTION_CREATE_CONDITION))
-      .setParam(PARAM_GATE_ID, request.getQualityGateId())
-      .setParam(PARAM_METRIC, request.getMetricKey())
-      .setParam(PARAM_OPERATOR, request.getOperator())
-      .setParam(PARAM_WARNING, request.getWarning())
-      .setParam(PARAM_ERROR, request.getError())
-      .setParam(PARAM_PERIOD, request.getPeriod()),
-      CreateConditionWsResponse.parser());
-  }
-
-  public UpdateConditionWsResponse updateCondition(UpdateConditionRequest request) {
-    return call(new PostRequest(path(ACTION_UPDATE_CONDITION))
-        .setParam(PARAM_ID, request.getConditionId())
-        .setParam(PARAM_METRIC, request.getMetricKey())
-        .setParam(PARAM_OPERATOR, request.getOperator())
-        .setParam(PARAM_WARNING, request.getWarning())
-        .setParam(PARAM_ERROR, request.getError())
-        .setParam(PARAM_PERIOD, request.getPeriod()),
-      UpdateConditionWsResponse.parser());
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/SelectWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/SelectWsRequest.java
deleted file mode 100644 (file)
index a787caa..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.qualitygate;
-
-import javax.annotation.CheckForNull;
-
-public class SelectWsRequest {
-  private long gateId;
-  private String projectId;
-  private String projectKey;
-
-  public long getGateId() {
-    return gateId;
-  }
-
-  public SelectWsRequest setGateId(long gateId) {
-    this.gateId = gateId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectId() {
-    return projectId;
-  }
-
-  public SelectWsRequest setProjectId(String projectId) {
-    this.projectId = projectId;
-    return this;
-  }
-
-  @CheckForNull
-  public String getProjectKey() {
-    return projectKey;
-  }
-
-  public SelectWsRequest setProjectKey(String projectKey) {
-    this.projectKey = projectKey;
-    return this;
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java
deleted file mode 100644 (file)
index 5afa9fd..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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.qualitygate;
-
-import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.Immutable;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Strings.isNullOrEmpty;
-
-@Immutable
-public class UpdateConditionRequest {
-
-  private final long conditionId;
-  private final String metricKey;
-  private final String operator;
-  private final String warning;
-  private final String error;
-  private final Integer period;
-
-  private UpdateConditionRequest(Builder builder) {
-    this.conditionId = builder.conditionId;
-    this.metricKey = builder.metricKey;
-    this.operator = builder.operator;
-    this.warning = builder.warning;
-    this.error = builder.error;
-    this.period = builder.period;
-  }
-
-  public long getConditionId() {
-    return conditionId;
-  }
-
-  public String getMetricKey() {
-    return metricKey;
-  }
-
-  public String getOperator() {
-    return operator;
-  }
-
-  @CheckForNull
-  public String getWarning() {
-    return warning;
-  }
-
-  @CheckForNull
-  public String getError() {
-    return error;
-  }
-
-  @CheckForNull
-  public Integer getPeriod() {
-    return period;
-  }
-  public static Builder builder() {
-    return new Builder();
-  }
-
-  public static class Builder {
-    private long conditionId;
-    private String metricKey;
-    private String operator;
-    private String warning;
-    private String error;
-    private Integer period;
-
-    private Builder() {
-      // enforce factory method use
-    }
-
-    public Builder setConditionId(long conditionId) {
-      this.conditionId = conditionId;
-      return this;
-    }
-
-    public Builder setMetricKey(String metricKey) {
-      this.metricKey = metricKey;
-      return this;
-    }
-
-    public Builder setOperator(String operator) {
-      this.operator = operator;
-      return this;
-    }
-
-    public Builder setWarning(@Nullable String warning) {
-      this.warning = warning;
-      return this;
-    }
-
-    public Builder setError(@Nullable String error) {
-      this.error = error;
-      return this;
-    }
-
-    public Builder setPeriod(@Nullable Integer period) {
-      this.period = period;
-      return this;
-    }
-
-    public UpdateConditionRequest build() {
-      checkArgument(conditionId > 0, "Condition id is mandatory and must not be empty");
-      checkArgument(!isNullOrEmpty(metricKey), "Metric key is mandatory and must not be empty");
-      checkArgument(!isNullOrEmpty(operator), "Operator is mandatory and must not be empty");
-      return new UpdateConditionRequest(this);
-    }
-  }
-}
index 2364a1dae5058587c967fde7406748ac7af742b0..30d6141fa5d76b902ccefdf506c6a974d1a2ca25 100644 (file)
 package org.sonarqube.ws.client.qualityprofile;
 
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.QualityProfiles.CopyWsResponse;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchGroupsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchUsersResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
-import org.sonarqube.ws.QualityProfiles.ShowResponse;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Qualityprofiles.CopyWsResponse;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchGroupsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchUsersResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
@@ -118,7 +118,7 @@ public class QualityProfilesService extends BaseService {
       SearchWsResponse.parser());
   }
 
-  public QualityProfiles.ShowResponse show(ShowRequest request) {
+  public Qualityprofiles.ShowResponse show(ShowRequest request) {
     return call(
       new GetRequest(path(ACTION_SHOW))
         .setParam(PARAM_KEY, request.getKey())
index 833df7ae5d0e5e28e2f12eecbdcf3c72746a9463..43b06b8a3e0c129bf4b9ea9071b1202a1ce613e0 100644 (file)
@@ -19,7 +19,7 @@
  */
 package org.sonarqube.ws.client.root;
 
-import org.sonarqube.ws.WsRoot;
+import org.sonarqube.ws.Root;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
@@ -30,8 +30,8 @@ public class RootsService extends BaseService {
     super(wsConnector, "api/roots");
   }
 
-  public WsRoot.SearchWsResponse search() {
-    return call(new GetRequest(path("search")), WsRoot.SearchWsResponse.parser());
+  public Root.SearchWsResponse search() {
+    return call(new GetRequest(path("search")), Root.SearchWsResponse.parser());
   }
 
   public void setRoot(String login) {
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemService.java
deleted file mode 100644 (file)
index 916072d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.system;
-
-import org.sonarqube.ws.WsSystem;
-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.client.WsResponse;
-
-public class SystemService extends BaseService {
-  public SystemService(WsConnector wsConnector) {
-    super(wsConnector, "api/system");
-  }
-
-  public WsSystem.HealthResponse health() {
-    return call(new GetRequest(path("health")), WsSystem.HealthResponse.parser());
-  }
-
-  public void restart() {
-    call(new PostRequest(path("restart")));
-  }
-
-  public WsSystem.StatusResponse status() {
-    return call(new GetRequest(path("status")), WsSystem.StatusResponse.parser());
-  }
-
-  public void changeLogLevel(String level) {
-    call(new PostRequest(path("change_log_level")).setParam("level", level));
-  }
-
-  public WsResponse info() {
-    return call(new GetRequest(path("info")));
-  }
-}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemServiceOld.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/system/SystemServiceOld.java
new file mode 100644 (file)
index 0000000..949cec1
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * 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.system;
+
+import org.sonarqube.ws.System;
+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.client.WsResponse;
+
+public class SystemServiceOld extends BaseService {
+  public SystemServiceOld(WsConnector wsConnector) {
+    super(wsConnector, "api/system");
+  }
+
+  public System.HealthResponse health() {
+    return call(new GetRequest(path("health")), System.HealthResponse.parser());
+  }
+
+  public void restart() {
+    call(new PostRequest(path("restart")));
+  }
+
+  public System.StatusResponse status() {
+    return call(new GetRequest(path("status")), System.StatusResponse.parser());
+  }
+
+  public void changeLogLevel(String level) {
+    call(new PostRequest(path("change_log_level")).setParam("level", level));
+  }
+
+  public WsResponse info() {
+    return call(new GetRequest(path("info")));
+  }
+}
index c8151dc9133084efe0dbae54e80255e5455dc19a..9f2cb3f06a0c70d587901b917a59e6bec9d0546b 100644 (file)
 package org.sonarqube.ws.client.user;
 
 import java.util.List;
-import org.sonarqube.ws.WsUsers.CreateWsResponse;
-import org.sonarqube.ws.WsUsers.CurrentWsResponse;
-import org.sonarqube.ws.WsUsers.GroupsWsResponse;
-import org.sonarqube.ws.WsUsers.SearchWsResponse;
+import org.sonarqube.ws.Users.CreateWsResponse;
+import org.sonarqube.ws.Users.CurrentWsResponse;
+import org.sonarqube.ws.Users.GroupsWsResponse;
+import org.sonarqube.ws.Users.SearchWsResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
index 6851ea3d8dadfa2a01946696853c4994f5315147..9cd0a388db7971006f36f40f921f8becae510421 100644 (file)
@@ -28,9 +28,9 @@ import static org.sonar.api.server.ws.WebService.Param.FIELDS;
 import static org.sonar.api.server.ws.WebService.Param.PAGE;
 import static org.sonar.api.server.ws.WebService.Param.PAGE_SIZE;
 import static org.sonar.api.server.ws.WebService.Param.TEXT_QUERY;
-import static org.sonarqube.ws.WsUserGroups.CreateWsResponse;
-import static org.sonarqube.ws.WsUserGroups.SearchWsResponse;
-import static org.sonarqube.ws.WsUserGroups.UpdateWsResponse;
+import static org.sonarqube.ws.UserGroups.CreateWsResponse;
+import static org.sonarqube.ws.UserGroups.SearchWsResponse;
+import static org.sonarqube.ws.UserGroups.UpdateWsResponse;
 
 public class UserGroupsService extends BaseService {
 
index 39fdf987ddb718b54e4803fc6bf2394ef0a8d7e8..d3cd30a8be12b15bff6deee4b7de2dd999af86c7 100644 (file)
@@ -19,8 +19,8 @@
  */
 package org.sonarqube.ws.client.usertoken;
 
-import org.sonarqube.ws.WsUserTokens.GenerateWsResponse;
-import org.sonarqube.ws.WsUserTokens.SearchWsResponse;
+import org.sonarqube.ws.UserTokens.GenerateWsResponse;
+import org.sonarqube.ws.UserTokens.SearchWsResponse;
 import org.sonarqube.ws.client.BaseService;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
diff --git a/sonar-ws/src/main/protobuf/ws-batch.proto b/sonar-ws/src/main/protobuf/ws-batch.proto
deleted file mode 100644 (file)
index dec9005..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.batch;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsBatch";
-
-option optimize_for = SPEED;
-
-// WS batch/project
-message WsProjectResponse {
-  optional int64 timestamp = 1;
-  map<string, Settings> settingsByModule = 2;
-  map<string, FileDataByPath> fileDataByModuleAndPath = 3;
-  optional int64 lastAnalysisDate = 4;
-
-  message Settings {
-    map<string,string> settings = 1;
-  }
-
-  message FileDataByPath {
-    map<string, FileData> FileDataByPath = 1;
-  }
-
-  message FileData {
-    optional string hash = 1;
-    optional string revision = 2;
-  }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-ce.proto b/sonar-ws/src/main/protobuf/ws-ce.proto
deleted file mode 100644 (file)
index d578580..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.ce;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsCe";
-option optimize_for = SPEED;
-
-// POST api/ce/submit
-message SubmitResponse {
-  optional string taskId = 1;
-  optional string projectId = 2;
-}
-
-// GET api/ce/task
-message TaskResponse {
-  optional Task task = 1;
-}
-
-// GET api/ce/activity
-message ActivityResponse {
-  // paging has been deprecated in 5.5
-  optional sonarqube.ws.commons.Paging unusedPaging = 1;
-  repeated Task tasks = 2;
-}
-
-// GET api/ce/activity_status
-message ActivityStatusWsResponse {
-  optional int32 pending = 1;
-  optional int32 failing = 2;
-  optional int32 inProgress = 3;
-}
-
-// GET api/ce/component
-message ProjectResponse {
-  repeated Task queue = 1;
-  optional Task current = 2;
-}
-
-// GET api/ce/task_types
-message TaskTypesWsResponse {
-  repeated string taskTypes = 1;
-}
-
-// GET api/ce/worker_count
-message WorkerCountResponse {
-  optional int32 value = 1;
-  optional bool canSetWorkerCount = 2;
-}
-
-message Task {
-  optional string id = 1;
-  optional string type = 2;
-  optional string componentId = 3;
-  optional string componentKey = 4;
-  optional string componentName = 5;
-  optional string componentQualifier = 6;
-  optional string analysisId = 7;
-  optional TaskStatus status = 8;
-  optional string submittedAt = 9;
-  optional string submitterLogin = 10;
-  optional string startedAt = 11;
-  optional string executedAt = 12;
-  optional bool isLastExecuted = 13;
-  optional int64 executionTimeMs = 14;
-  optional bool logs = 15;
-  optional string errorMessage = 16;
-  optional string errorStacktrace = 17;
-  optional string scannerContext = 18;
-  optional bool hasScannerContext = 19;
-  optional string organization = 20;
-  optional string branch = 21;
-  optional sonarqube.ws.commons.BranchType branchType = 22;
-  optional string errorType = 23;
-}
-
-enum TaskStatus {
-  PENDING = 0;
-  IN_PROGRESS = 1;
-  SUCCESS = 2;
-  FAILED = 3;
-  CANCELED = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-commons.proto b/sonar-ws/src/main/protobuf/ws-commons.proto
deleted file mode 100644 (file)
index a9b5665..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.commons;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Common";
-option optimize_for = SPEED;
-
-message Paging {
-  optional int32 pageIndex = 1;
-  optional int32 pageSize = 2;
-  optional int32 total = 3;
-}
-
-message Facet {
-  // kind of key
-  optional string property = 1;
-  repeated FacetValue values = 2;
-}
-
-message Facets {
-  repeated Facet facets = 1;
-}
-
-message FacetValue {
-  optional string val = 1;
-  optional int64 count = 2;
-}
-
-enum Severity {
-  INFO = 0;
-  MINOR = 1;
-  MAJOR = 2;
-  CRITICAL = 3;
-  BLOCKER = 4;
-}
-
-message Rule {
-  optional string key = 1;
-  optional string name = 2;
-  optional string lang = 3;
-  optional RuleStatus status = 4;
-  optional string langName = 5;
-}
-
-message Rules {
-  repeated Rule rules = 1;
-}
-
-enum RuleStatus {
-  BETA = 0;
-  DEPRECATED = 1;
-  READY = 2;
-  REMOVED = 3;
-}
-
-// Lines start at 1 and line offsets start at 0
-message TextRange {
-  // Start line. Should never be absent
-  optional int32 startLine = 1;
-
-  // End line (inclusive). Absent means it is same as start line
-  optional int32 endLine = 2;
-
-  // If absent it means range starts at the first offset of start line
-  optional int32 startOffset = 3;
-
-  // If absent it means range ends at the last offset of end line
-  optional int32 endOffset = 4;
-}
-
-message Metric {
-  optional string key = 1;
-  optional string name = 2;
-  optional string description = 3;
-  optional string domain = 4;
-  optional string type = 5;
-  optional bool higherValuesAreBetter = 6;
-  optional bool qualitative = 7;
-  optional bool hidden = 8;
-  optional bool custom = 9;
-  optional int32 decimalScale = 10;
-  optional string bestValue = 11;
-  optional string worstValue = 12;
-}
-
-enum RuleType {
-  // Zero is required in order to not get MAINTAINABILITY as default value
-  // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
-  UNKNOWN = 0;
-
-  // same name as in Java enum IssueType,
-  // same index values as in database (see column ISSUES.ISSUE_TYPE)
-  CODE_SMELL = 1;
-  BUG = 2;
-  VULNERABILITY = 3;
-}
-
-enum BranchType {
-  // Zero is required in order to not get LONG as default value
-  // See http://androiddevblog.com/protocol-buffers-pitfall-adding-enum-values/
-  UNKNOWN_BRANCH_TYPE = 0;
-
-  LONG = 1;
-  SHORT = 2;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-components.proto b/sonar-ws/src/main/protobuf/ws-components.proto
deleted file mode 100644 (file)
index 7b77658..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.component;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsComponents";
-option optimize_for = SPEED;
-
-// WS api/components/search
-message SearchWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Component components = 2;
-}
-
-// WS api/components/tree
-message TreeWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  optional Component baseComponent = 3;
-  repeated Component components = 4;
-}
-
-// WS api/components/show
-message ShowWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  optional Component component = 2;
-  repeated Component ancestors = 3;
-}
-
-// WS api/components/suggestions
-message SuggestionsWsResponse {
-  repeated Category results = 1;
-  optional string warning = 2;
-  repeated Organization organizations = 3;
-  repeated Project projects = 4;
-
-  message Category {
-       optional string q = 1;
-       repeated Suggestion items = 2;
-    optional int64 more = 3;
-  }
-
-  message Suggestion {
-    optional string key = 1;
-    optional string name = 2;
-    optional string match = 3;
-    optional string organization = 4;
-    optional string project = 5;
-    optional bool isRecentlyBrowsed = 6;
-    optional bool isFavorite = 7;
-  }
-
-  message Organization {
-    optional string key = 1;
-    optional string name = 2;
-  }
-
-  message Project {
-    optional string key = 1;
-    optional string name = 2;
-  }
-}
-
-// WS api/components/search_projects
-message SearchProjectsWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Component components = 2;
-  optional sonarqube.ws.commons.Facets facets = 3;
-}
-
-// WS api/components/provisioned
-message ProvisionedWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Component projects = 2;
-
-  message Component {
-    optional string uuid = 1;
-    optional string key = 2;
-    optional string name = 3;
-    optional string creationDate = 4;
-    optional string visibility = 5;
-  }
-}
-
-message Component {
-  optional string organization = 12;
-  optional string id = 1;
-  optional string key = 2;
-  optional string refId = 3;
-  optional string refKey = 4;
-  optional string projectId = 5;
-  optional string name = 6;
-  optional string description = 7;
-  optional string qualifier = 8;
-  optional string path = 9;
-  optional string language = 10;
-  optional bool isFavorite = 11;
-  optional string analysisDate = 13;
-  optional Tags tags = 14;
-  optional string visibility = 15;
-  optional string leakPeriodDate = 16;
-  // Root project key
-  optional string project = 17;
-  optional string branch = 18;
-  optional string version = 19;
-
-  message Tags {
-    repeated string tags = 1;
-  }
-}
-
diff --git a/sonar-ws/src/main/protobuf/ws-duplications.proto b/sonar-ws/src/main/protobuf/ws-duplications.proto
deleted file mode 100644 (file)
index 50f72a2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto3";
-
-package sonarqube.ws.duplication;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsDuplications";
-option optimize_for = SPEED;
-
-// WS api/duplications/show
-message ShowResponse {
-  repeated Duplication duplications = 1;
-  map<string,File> files = 2;
-
-}
-
-message Duplication {
-  repeated Block blocks = 1;
-}
-
-message Block {
-  int32 from = 1;
-  int32 size = 2;
-  string _ref = 3;
-}
-
-message File {
-  string key = 1;
-  string name = 2;
-  string uuid = 3;
-  string project = 4;
-  string projectUuid = 5;
-  string projectName = 6;
-  string subProject = 7;
-  string subProjectUuid = 8;
-  string subProjectName = 9;
-  string branch = 10;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-editions.proto b/sonar-ws/src/main/protobuf/ws-editions.proto
deleted file mode 100644 (file)
index e916bf3..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.editions;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsEditions";
-option optimize_for = SPEED;
-
-// GET api/editions/status
-// POST api/editions/apply_license
-message StatusResponse {
-  optional string currentEditionKey = 1;
-  optional InstallationStatus installationStatus = 2;
-  optional string nextEditionKey = 3;
-  optional string installError = 4;
-}
-
-enum InstallationStatus {
-  NONE = 0;
-  AUTOMATIC_IN_PROGRESS = 1;
-  AUTOMATIC_READY = 2;
-  MANUAL_IN_PROGRESS = 3;
-  UNINSTALL_IN_PROGRESS = 4;
-}
-
-// POST api/editions/preview
-message PreviewResponse {
-  optional string nextEditionKey = 1;
-  optional PreviewStatus previewStatus = 2;
-}
-
-enum PreviewStatus {
-  NO_INSTALL = 0;
-  AUTOMATIC_INSTALL = 1;
-  MANUAL_INSTALL = 2;
-}
-
-// POST api/editions/form_data
-message FormDataResponse {
-  optional string serverId = 1;
-  optional int64  ncloc = 2;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-favorites.proto b/sonar-ws/src/main/protobuf/ws-favorites.proto
deleted file mode 100644 (file)
index 7cdb6ec..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.favorite;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Favorites";
-option optimize_for = SPEED;
-
-// WS api/favorites/search
-message SearchResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Favorite favorites = 2;
-}
-
-message Favorite {
-  optional string organization = 4;
-  optional string key = 1;
-  optional string name = 2;
-  optional string qualifier = 3;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto
deleted file mode 100644 (file)
index a130967..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.issues;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Issues";
-option optimize_for = SPEED;
-
-// Response of GET api/issues/search
-message SearchWsResponse {
-  optional int64 total = 1;
-  optional int64 p = 2;
-  optional int32 ps = 3;
-  optional sonarqube.ws.commons.Paging paging = 4;
-
-  // Total amount of effort, only when the facet "total" is enabled
-  optional int64 effortTotal = 13;
-  // Deprecated since 5.5, replaced by effortTotal
-  optional int64 debtTotal = 5;
-
-  repeated Issue issues = 6;
-  repeated Component components = 7;
-  optional sonarqube.ws.commons.Rules rules = 8;
-  optional Users users = 9;
-
-  // Deprecated since 5.5, action plan has been removed
-  optional ActionPlans unusedActionPlans = 10;
-  optional Languages languages = 11;
-  optional sonarqube.ws.commons.Facets facets = 12;
-}
-
-// Response of most of POST/issues/{operation}, for instance assign, add_comment and set_severity
-message Operation {
-  optional Issue issue = 1;
-  repeated Component components = 2;
-  repeated sonarqube.ws.commons.Rule rules = 3;
-  repeated Users.User users = 4;
-  // Deprecated since 5.5, action plan has been removed
-  repeated ActionPlan unusedActionPlans = 5;
-}
-
-message Issue {
-  optional string key = 1;
-  optional string rule = 2;
-  optional sonarqube.ws.commons.Severity severity = 3;
-  optional string component = 4;
-  optional int64 unusedComponentId = 5;
-  optional string project = 6;
-  optional string subProject = 7;
-  optional int32 line = 8;
-  optional string hash = 31;
-  optional sonarqube.ws.commons.TextRange textRange = 9;
-  repeated Flow flows = 10;
-  optional string resolution = 11;
-  optional string status = 12;
-  optional string message = 13;
-
-  optional string effort = 28;
-  // Deprecated since 5.5, replaced by effort
-  optional string debt = 14;
-
-  optional string assignee = 15;
-
-  // Unused since 5.5, manual issues feature has been removed
-  optional string unusedReporter = 16;
-
-  // SCM login of the committer who introduced the issue
-  optional string author = 17;
-
-  // Deprecated since 5.5, action plan has been removed
-  optional string actionPlan = 18;
-
-  repeated string tags = 19;
-
-  // the transitions allowed for the requesting user.
-  optional Transitions transitions = 20;
-
-  // the actions allowed for the requesting user.
-  optional Actions actions = 21;
-
-  optional Comments comments = 22;
-  optional string creationDate = 23;
-  optional string updateDate = 24;
-  optional string fUpdateAge = 25;
-  optional string closeDate = 26;
-
-  optional sonarqube.ws.commons.RuleType type = 27;
-
-  optional string organization = 29;
-  optional string branch = 30;
-}
-
-message Transitions {
-  repeated string transitions = 1;
-}
-
-message Actions {
-  repeated string actions = 1;
-}
-
-message Flow {
-  repeated Location locations = 1;
-}
-
-message Location {
-  optional string unusedComponentId = 1;
-  // Only when component is a file. Can be empty for a file if this is an issue global to the file.
-  optional sonarqube.ws.commons.TextRange textRange = 2;
-  optional string msg = 3;
-}
-
-message Comment {
-  optional string key = 1;
-  optional string login = 2;
-  // TODO drop, it's already in field "users"
-  optional string email = 3;
-  // TODO drop, it's already in field "users"
-  optional string userName = 4;
-  optional string htmlText = 5;
-  // TODO rename markdownText ?
-  optional string markdown = 6;
-  optional bool updatable = 7;
-  optional string createdAt = 8;
-}
-
-message Comments {
-  repeated Comment comments = 1;
-}
-
-// Deprecated since 5.5
-message ActionPlan {
-  optional string key = 1;
-  optional string name = 2;
-
-  // TODO define enum
-  optional string status = 3;
-  optional string deadLine = 4;
-  // TODO to be renamed, is it id or key ?
-  optional string project = 5;
-}
-
-// Deprecated since 5.5
-message ActionPlans {
-  repeated ActionPlan actionPlans = 1;
-}
-
-message Language {
-  optional string key = 1;
-  optional string name = 2;
-}
-
-message Languages {
-  repeated Language languages = 1;
-}
-
-message Component {
-  optional string organization = 11;
-  optional int64 deprecatedId = 1;
-  optional string key = 2;
-  optional string uuid = 3;
-  optional bool enabled = 4;
-  optional string qualifier = 5;
-  optional string name = 6;
-  optional string longName = 7;
-  optional string path = 8;
-  optional int64 unusedProjectId = 9;
-  optional int64 unusedSubProjectId = 10;
-  optional string branch = 12;
-}
-
-// Response of GET api/issues/changelog
-message ChangelogWsResponse {
-  repeated Changelog changelog = 1;
-
-  message Changelog {
-    optional string user = 1;
-    optional string userName = 2;
-    // Email is no more returned since 6.3
-    optional string deprecatedEmail = 3;
-    optional string creationDate = 4;
-    repeated Diff diffs = 5;
-    optional string avatar = 6;
-
-    message Diff {
-      optional string key = 1;
-      optional string newValue = 2;
-      optional string oldValue = 3;
-    }
-  }
-}
-
-// Response of POST api/issues/bulk_change
-message BulkChangeWsResponse {
-  optional int64 total = 1;
-  optional int64 success = 2;
-  optional int64 ignored = 3;
-  optional int64 failures = 4;
-}
-
-message Users {
-  repeated User users = 1;
-
-  message User {
-    optional string login = 1;
-    optional string name = 2;
-    optional string avatar = 3;
-    optional bool active = 4;
-  }
-}
-
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-measures.proto b/sonar-ws/src/main/protobuf/ws-measures.proto
deleted file mode 100644 (file)
index 199184e..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.measures;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsMeasures";
-option optimize_for = SPEED;
-
-// WS api/measures/component_tree
-message ComponentTreeWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  optional Component baseComponent = 2;
-  repeated Component components = 3;
-  optional Metrics metrics = 4;
-  optional Periods periods = 5;
-}
-
-// WS api/measures/component
-message ComponentWsResponse {
-  optional Component component = 1;
-  optional Metrics metrics = 2;
-  optional Periods periods = 3;
-}
-
-// WS api/measures/search
-message SearchWsResponse {
-  repeated Measure measures = 1;
-}
-
-// WS api/measures/search_history
-message SearchHistoryResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated HistoryMeasure measures = 2;
-
-  message HistoryMeasure {
-    optional string metric = 1;
-    repeated HistoryValue history = 2;
-  }
-
-  message HistoryValue {
-    optional string date = 1;
-    optional string value = 2;
-  }
-}
-
-message Component {
-  optional string id = 1;
-  optional string key = 2;
-  optional string refId = 3;
-  optional string refKey = 4;
-  optional string projectId = 5;
-  optional string name = 6;
-  optional string description = 7;
-  optional string qualifier = 8;
-  optional string path = 9;
-  optional string language = 10;
-  repeated Measure measures = 11;
-  optional string branch = 12;
-}
-
-message Period {
-  optional int32 index = 1;
-  optional string mode = 2;
-  optional string date = 3;
-  optional string parameter = 4;
-}
-
-message Periods {
-  repeated Period periods = 1;
-}
-
-message Metrics {
-  repeated sonarqube.ws.commons.Metric metrics = 1;
-}
-
-message Measure {
-  optional string metric = 1;
-  optional string value = 2;
-  optional PeriodsValue periods = 3;
-  optional string component = 4;
-}
-
-message PeriodsValue {
-  repeated PeriodValue periodsValue = 1;
-}
-
-message PeriodValue {
-  optional int32 index = 1;
-  optional string value = 2;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-notifications.proto b/sonar-ws/src/main/protobuf/ws-notifications.proto
deleted file mode 100644 (file)
index ac0cb03..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.notification;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Notifications";
-option optimize_for = SPEED;
-
-// WS api/notifications/list
-message ListResponse {
-  repeated Notification notifications = 1;
-  repeated string channels = 2;
-  repeated string globalTypes = 3;
-  repeated string perProjectTypes = 4;
-}
-
-message Notification {
-  optional string channel = 1;
-  optional string type = 2;
-  optional string organization = 5;
-  optional string project = 3;
-  optional string projectName = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-organizations.proto b/sonar-ws/src/main/protobuf/ws-organizations.proto
deleted file mode 100644 (file)
index f6f2733..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-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;
-
-// WS api/organizations/create
-message CreateWsResponse {
-  optional Organization organization = 1;
-}
-
-// WS api/organizations/update
-message UpdateWsResponse {
-  optional Organization organization = 1;
-}
-
-// WS api/organizations/search
-message SearchWsResponse {
-  repeated Organization organizations = 1;
-  optional sonarqube.ws.commons.Paging paging = 2;
-}
-
-// WS api/organizations/search_members
-message SearchMembersWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated User users = 2;
-}
-
-// WS api/organizations/add_member
-message AddMemberWsResponse {
-  optional User user = 1;
-}
-
-message Organization {
-  optional string key = 1;
-  optional string name = 2;
-  optional string description = 3;
-  optional string url = 4;
-  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;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-permissions.proto b/sonar-ws/src/main/protobuf/ws-permissions.proto
deleted file mode 100644 (file)
index 6b6b1e2..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.permissions;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsPermissions";
-option optimize_for = SPEED;
-
-// WS api/permissions/template_users for internal use only
-message OldUsersWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated OldUser users = 2;
-}
-
-// WS api/permissions/users for internal use only
-message UsersWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated User users = 2;
-}
-
-// WS api/permissions/groups for internal use only
-message WsGroupsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Group groups = 2;
-}
-
-// WS api/permissions/template_groups for internal use only
-message WsTemplateGroupsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated OldGroup groups = 2;
-}
-
-message WsSearchGlobalPermissionsResponse {
-  repeated Permission permissions = 1;
-}
-
-message SearchProjectPermissionsWsResponse {
-  message Project {
-    optional string id = 1;
-    optional string key = 2;
-    optional string qualifier = 3;
-    optional string name = 4;
-    repeated Permission permissions = 5;
-  }
-
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Project projects = 2;
-  repeated Permission permissions = 3;
-}
-
-message CreateTemplateWsResponse {
-  optional PermissionTemplate permissionTemplate = 1;
-}
-
-message UpdateTemplateWsResponse {
-  optional PermissionTemplate permissionTemplate = 1;
-}
-
-message SearchTemplatesWsResponse {
-  message TemplateIdQualifier {
-    optional string templateId = 1;
-    optional string qualifier = 2;
-  }
-
-  repeated PermissionTemplate permissionTemplates = 1;
-  repeated TemplateIdQualifier defaultTemplates = 2;
-  repeated Permission permissions = 3;
-}
-
-message Permission {
-  optional string key = 1;
-  optional string name = 2;
-  optional string description = 3;
-  optional int32 usersCount = 4;
-  optional int32 groupsCount = 5;
-  optional bool withProjectCreator = 6;
-}
-
-message PermissionTemplate {
-  optional string id = 1;
-  optional string name = 2;
-  optional string description = 3;
-  optional string projectKeyPattern = 4;
-  // ex: 2015-08-25T16:18:48+0200
-  optional string createdAt = 5;
-  // ex: 2015-08-25T16:18:48+0200
-  optional string updatedAt = 6;
-  repeated Permission permissions = 7;
-}
-
-message OldUser {
-  optional string login = 1;
-  optional string name = 2;
-  optional string email = 3;
-  optional bool selected = 4;
-}
-
-message User {
-  optional string login = 1;
-  optional string name = 2;
-  optional string email = 3;
-  repeated string permissions = 4;
-  optional string avatar = 5;
-}
-
-message OldGroup {
-  optional string id = 1;
-  optional string name = 2;
-  optional string description = 3;
-  optional bool selected = 4;
-}
-
-message Group {
-  optional string id = 1;
-  optional string name = 2;
-  optional string description = 3;
-  repeated string permissions = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-project_tags.proto b/sonar-ws/src/main/protobuf/ws-project_tags.proto
deleted file mode 100644 (file)
index 99cc43c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto3";
-
-package sonarqube.ws.projects;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsProjectTags";
-option optimize_for = SPEED;
-
-// Response for api/project_tags/search
-message SearchResponse {
-  repeated string tags = 1;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-projectanalyses.proto b/sonar-ws/src/main/protobuf/ws-projectanalyses.proto
deleted file mode 100644 (file)
index 3b4ea56..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.projectanalysis;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "ProjectAnalyses";
-option optimize_for = SPEED;
-
-// WS api/project_analyses/create_event
-message CreateEventResponse {
-  optional Event event = 1;
-}
-
-// WS api/project_analyses/update_event
-message UpdateEventResponse {
-  optional Event event = 1;
-}
-
-// WS api/project_analyses/search
-message SearchResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Analysis analyses = 2;
-}
-
-message Event {
-  optional string key = 1;
-  optional string analysis = 2;
-  optional string category = 3;
-  optional string name = 4;
-  optional string description = 5;
-}
-
-message Analysis {
-  optional string key = 1;
-  optional string date = 2;
-  repeated Event events = 3;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-projectbranches.proto b/sonar-ws/src/main/protobuf/ws-projectbranches.proto
deleted file mode 100644 (file)
index d4b2a18..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.projectbranch;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsBranches";
-option optimize_for = SPEED;
-
-import "ws-commons.proto";
-
-// WS api/project_branches/list
-message ListWsResponse {
-  repeated Branch branches = 1;
-}
-
-// WS api/project_branches/show
-message ShowWsResponse {
-  optional Branch branch = 1;
-}
-
-message Branch {
-  optional string name = 1;
-  optional bool isMain = 2;
-  optional sonarqube.ws.commons.BranchType type = 3;
-  // Merge branch is only present for short living branch
-  optional string mergeBranch = 4;
-  optional Status status = 5;
-  optional bool isOrphan = 6;
-  optional string analysisDate = 7;
-
-  message Status {
-    // Quality gate status is only present for long living branch
-    optional string qualityGateStatus = 1;
-    // Merge bugs, vulnerabilities and codeSmell are only present for short living branch
-    optional int64 bugs = 2;
-    optional int64 vulnerabilities = 3;
-    optional int64 codeSmells = 4;
-  }
-
-}
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-projectlink.proto b/sonar-ws/src/main/protobuf/ws-projectlink.proto
deleted file mode 100644 (file)
index 073b3e4..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-syntax = "proto2";
-
-package sonarqube.ws.projectlink;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsProjectLinks";
-option optimize_for = SPEED;
-
-// WS api/project_links/list
-message SearchWsResponse {
-  repeated Link links = 1;
-}
-
-message CreateWsResponse {
-  optional Link link = 1;
-}
-
-message Link {
-  optional string id = 1;
-  optional string name = 2;
-  optional string type = 3;
-  optional string url = 4;
-}
\ No newline at end of file
diff --git a/sonar-ws/src/main/protobuf/ws-projects.proto b/sonar-ws/src/main/protobuf/ws-projects.proto
deleted file mode 100644 (file)
index 8668ffc..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.projects;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsProjects";
-option optimize_for = SPEED;
-
-message SearchMyProjectsWsResponse {
-  message Project {
-    optional string id = 1;
-    optional string key = 2;
-    optional string name = 4;
-    optional string description = 5;
-    optional string lastAnalysisDate = 6;
-    optional string qualityGate = 7;
-    repeated Link links = 8;
-  }
-
-  message Link {
-    optional string name = 1;
-    optional string type = 2;
-    optional string href = 3;
-  }
-
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Project projects = 2;
-}
-
-message CreateWsResponse {
-  optional Project project = 1;
-
-  message Project {
-    optional string key = 1;
-    optional string name = 2;
-    optional string qualifier = 3;
-    optional string visibility = 4;
-  }
-}
-
-// WS api/projects/search
-message SearchWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Component components = 2;
-
-  message Component {
-    optional string organization = 1;
-    optional string id = 2;
-    optional string key = 3;
-    optional string name = 4;
-    optional string qualifier = 5;
-    optional string visibility = 6;
-    optional string lastAnalysisDate = 7;
-  }
-}
-
-// WS api/projects/prepare_bulk_update_key
-message BulkUpdateKeyWsResponse {
-  repeated Key keys = 1;
-
-  message Key {
-    optional string key = 1;
-    optional string newKey = 2;
-    optional bool duplicate = 3;
-  }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-qualitygates.proto b/sonar-ws/src/main/protobuf/ws-qualitygates.proto
deleted file mode 100644 (file)
index 8444dba..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.qualitygate;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsQualityGates";
-option optimize_for = SPEED;
-
-// GET api/qualitygates/project_status
-message ProjectStatusWsResponse {
-  optional ProjectStatus projectStatus = 1;
-
-  message ProjectStatus {
-    optional Status status = 1;
-    repeated Condition conditions = 2;
-    repeated Period periods = 3;
-    optional bool ignoredConditions = 4;
-  }
-
-  message Condition {
-    optional Status status = 1;
-    optional string metricKey = 2;
-    optional Comparator comparator = 3;
-    optional int32 periodIndex = 4;
-    optional string warningThreshold = 5;
-    optional string errorThreshold = 6;
-    optional string actualValue = 7;
-  }
-
-  message Period {
-    optional int32 index = 1;
-    optional string mode = 2;
-    optional string date = 3;
-    optional string parameter = 4;
-  }
-
-  enum Status {
-    OK = 1;
-    WARN = 2;
-    ERROR = 3;
-    NONE = 4;
-  }
-
-  enum Comparator {
-    GT = 1;
-    LT = 2;
-    EQ = 3;
-    NE = 4;
-  }
-}
-
-// GET api/qualitygates/get_by_project
-message GetByProjectWsResponse {
-  optional QualityGate qualityGate = 1;
-}
-
-message QualityGate {
-  optional string id = 1;
-  optional string name = 2;
-  optional bool default = 3;
-}
-
-// GET api/qualitygates/app
-message AppWsResponse {
-  optional bool edit = 1;
-  repeated Metric metrics = 3;
-
-  message Metric {
-    optional string key = 1;
-    optional string name = 2;
-    optional string type = 3;
-    optional string domain = 4;
-    optional bool hidden = 5;
-  }
-}
-
-// POST api/qualitygates/create
-message CreateWsResponse {
-  optional int64 id = 1;
-  optional string name = 2;
-}
-
-// POST api/qualitygates/create_condition
-message CreateConditionWsResponse {
-  optional int64 id = 1;
-  optional string metric = 2;
-  optional string op = 3;
-  optional string warning = 4;
-  optional string error = 5;
-  optional int32 period = 6;
-}
-
-// POST api/qualitygates/update_condition
-message UpdateConditionWsResponse {
-  optional int64 id = 1;
-  optional string metric = 2;
-  optional string op = 3;
-  optional string warning = 4;
-  optional string error = 5;
-  optional int32 period = 6;
-}
-
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-qualityprofiles.proto b/sonar-ws/src/main/protobuf/ws-qualityprofiles.proto
deleted file mode 100644 (file)
index ae1097d..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.qualityprofiles;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "QualityProfiles";
-option optimize_for = SPEED;
-
-// WS api/qualityprofiles/search
-message SearchWsResponse {
-  repeated QualityProfile profiles = 1;
-  optional Actions actions = 2;
-
-  message QualityProfile {
-    optional string key = 1;
-    optional string name = 2;
-    optional string language = 3;
-    optional string languageName = 4;
-    optional bool isInherited = 5;
-    optional string parentKey = 6;
-    optional string parentName = 7;
-    optional bool isDefault = 8;
-    optional int64 activeRuleCount = 9;
-    optional int64 activeDeprecatedRuleCount = 12;
-    optional int64 projectCount = 10;
-    optional string rulesUpdatedAt = 11;
-    optional string lastUsed = 13;
-    optional string userUpdatedAt = 14;
-    optional string organization = 15;
-    optional bool isBuiltIn = 16;
-    optional Actions actions = 17;
-
-    message Actions {
-        optional bool edit = 1;
-        optional bool setAsDefault = 2;
-        optional bool copy = 3;
-      }
-  }
-
-  message Actions {
-    optional bool create = 1;
-  }
-}
-
-// WS api/qualityprofiles/create
-message CreateWsResponse {
-  optional QualityProfile profile = 1;
-
-  message QualityProfile {
-    optional string key = 1;
-    optional string name = 2;
-    optional string language = 3;
-    optional string languageName = 4;
-    optional bool isInherited = 5;
-    optional bool isDefault = 6;
-    optional Infos infos = 7;
-    optional Warnings warnings = 8;
-    optional string organization = 9;
-
-    message Infos {
-      repeated string infos = 1;
-    }
-
-    message Warnings {
-      repeated string warnings = 1;
-    }
-  }
-}
-
-// WS api/qualityprofiles/inheritance
-message InheritanceWsResponse {
-  optional QualityProfile profile = 1;
-  repeated QualityProfile ancestors = 2;
-  repeated QualityProfile children = 3;
-
-  message QualityProfile {
-    optional string key = 1;
-    optional string name = 2;
-    optional string parent = 3;
-    optional int64 activeRuleCount = 4;
-    optional int64 overridingRuleCount = 5;
-    optional bool isBuiltIn = 6;
-  }
-}
-
-// WS api/qualityprofiles/copy
-message CopyWsResponse {
-  optional string key = 1;
-  optional string name = 2;
-  optional string language = 3;
-  optional string languageName = 4;
-  optional bool isDefault = 5;
-  optional bool isInherited = 6;
-  optional string parentKey = 7;
-}
-
-// WS api/qualityprofiles/show
-message ShowResponse {
-  optional QualityProfile profile = 1;
-  optional CompareToSonarWay compareToSonarWay = 2;
-
-  message QualityProfile {
-    optional string key = 1;
-    optional string name = 2;
-    optional string language = 3;
-    optional string languageName = 4;
-    optional bool isInherited = 5;
-    optional bool isDefault = 6;
-    optional int64 activeRuleCount = 7;
-    optional int64 activeDeprecatedRuleCount = 8;
-    optional int64 projectCount = 9;
-    optional string rulesUpdatedAt = 10;
-    optional string lastUsed = 11;
-    optional string userUpdatedAt = 12;
-    optional string organization = 13;
-    optional bool isBuiltIn = 14;
-  }
-
-  message CompareToSonarWay {
-    optional string profile = 1;
-    optional string profileName = 2;
-    optional int64 missingRuleCount = 3;
-  }
-}
-
-// WS api/qualityprofiles/search_users
-message SearchUsersResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated User users = 2;
-
-  message User {
-    optional string login = 1;
-    optional string name = 2;
-    optional string avatar = 3;
-    optional bool selected = 4;
-  }
-}
-
-// WS api/qualityprofiles/search_groups
-message SearchGroupsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Group groups = 2;
-
-  message Group {
-    optional string name = 1;
-    optional string description = 2;
-    optional bool selected = 3;
-  }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-root.proto b/sonar-ws/src/main/protobuf/ws-root.proto
deleted file mode 100644 (file)
index 1501a70..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.root;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsRoot";
-option optimize_for = SPEED;
-
-// WS api/root/search
-message SearchWsResponse {
-  repeated Root roots = 1;
-}
-
-message Root {
-  optional string login = 1;
-  optional string name = 2;
-  optional string email = 3;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-rules.proto b/sonar-ws/src/main/protobuf/ws-rules.proto
deleted file mode 100644 (file)
index d3dfe2c..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.rules;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Rules";
-option optimize_for = SPEED;
-
-// WS api/rules/list for internal use only
-message ListResponse {
-
-  message Rule {
-    optional string repository = 1;
-    optional string key = 2;
-    optional string internal_key = 3;
-    optional string name = 4;
-  }
-
-  repeated Rule rules = 1;
-}
-
-// WS api/rules/search
-message SearchResponse {
-  optional int64 total = 1;
-  optional int32 p = 2;
-  optional int64 ps = 3;
-  repeated Rule rules = 4;
-  optional Actives actives = 5;
-  optional QProfiles qProfiles = 6;
-  optional sonarqube.ws.commons.Facets facets = 7;
-}
-
-//WS api/rules/show
-message ShowResponse {
-  optional Rule rule = 1;
-  repeated Active actives = 3;
-}
-
-//WS api/rules/create
-message CreateResponse {
-  optional Rule rule = 1;
-}
-
-//WS api/rules/update
-message UpdateResponse {
-  optional Rule rule = 1;
-}
-
-message Rule {
-  optional string key = 1;
-  optional string repo = 2;
-  optional string name = 3;
-  optional string createdAt = 4;
-  optional string htmlDesc = 5;
-  optional string htmlNote = 6;
-  optional string mdDesc = 7;
-  optional string mdNote = 8;
-  optional string noteLogin = 9;
-  optional string severity = 10;
-  optional sonarqube.ws.commons.RuleStatus status = 11;
-  optional string internalKey = 12;
-  optional bool isTemplate = 13;
-  optional string templateKey = 14;
-  optional Tags tags = 15;
-  optional SysTags sysTags = 16; 
-  optional string lang = 19;
-  optional string langName = 20;
-  optional Params params = 21;
-  // characteristic fields, unsupported since 5.5
-  optional string unusedDefaultDebtChar = 23;
-  optional string unusedDefaultDebtSubChar = 24;
-  optional string unusedDebtChar = 25;
-  optional string unusedDebtSubChar = 26;
-  optional string unusedDebtCharName = 27;
-  optional string unusedDebtSubCharName = 28;
-
-  // Deprecated since 5.5, replaced by defaultRemFnType
-  optional string defaultDebtRemFnType = 29;
-  // Deprecated since 5.5, replaced by defaultRemFnGapMultiplier
-  optional string defaultDebtRemFnCoeff = 30;
-  // Deprecated since 5.5, replaced by defaultRemFnBaseEffort
-  optional string defaultDebtRemFnOffset = 31;
-  // Deprecated since 5.5, replaced by gapDescription
-  optional string effortToFixDescription = 32;
-  // Deprecated since 5.5, replaced by remFnOverloaded
-  optional bool debtOverloaded = 33;
-  // Deprecated since 5.5, replaced by remFnType
-  optional string debtRemFnType = 34;
-  // Deprecated since 5.5, replaced by remFnGapMultiplier
-  optional string debtRemFnCoeff = 35;
-  // Deprecated since 5.5, replaced by remFnBaseEffort
-  optional string debtRemFnOffset = 36;
-
-  optional string defaultRemFnType = 38;
-  optional string defaultRemFnGapMultiplier = 39;
-  optional string defaultRemFnBaseEffort = 40;
-  optional string remFnType = 41;
-  optional string remFnGapMultiplier = 42;
-  optional string remFnBaseEffort = 43;
-  optional bool remFnOverloaded = 45;
-  optional string gapDescription = 44;
-
-  optional sonarqube.ws.commons.RuleType type = 37;
-
-  message Params {
-    repeated Param params = 1;
-  }
-  
-  message Param {
-    optional string key = 1;
-    optional string htmlDesc = 2;
-    optional string defaultValue = 3;
-    optional string type = 4;
-  }
-}
-
-message SysTags {
-  repeated string sysTags = 1;
-}
-
-message Tags {
-  repeated string tags = 1;
-}
-
-message Actives {
-  map<string, ActiveList> actives = 1;
-}
-
-message ActiveList {
-  repeated Active activeList = 1;
-}
-
-message Active {
-  optional string qProfile = 1;
-  optional string inherit = 2;
-  optional string severity = 3;
-  // Unused since 5.6, it has been removed because it was never used and costly to compute
-  optional string unusedParent = 4;
-  repeated Param params = 5;
-  optional string createdAt = 6;
-
-  message Param {
-    optional string key = 1;
-    optional string value = 2;
-  }
-}
-
-message QProfiles {
-  map<string,QProfile> qProfiles = 1;
-}
-
-message QProfile {
-  optional string name = 1;
-  optional string lang = 2;
-  optional string langName = 3;
-  optional string parent = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-settings.proto b/sonar-ws/src/main/protobuf/ws-settings.proto
deleted file mode 100644 (file)
index db185b5..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto3";
-
-package sonarqube.ws.settings;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Settings";
-option optimize_for = SPEED;
-
-// Response of GET api/settings/list_definitions
-message ListDefinitionsWsResponse {
-  repeated Definition definitions = 1;
-}
-
-// Response of GET api/settings/encrypt
-message EncryptWsResponse {
-  string encryptedValue = 1;
-}
-
-// Response of GET api/settings/generate_secret_key
-message GenerateSecretKeyWsResponse {
-  string secretKey = 1;
-}
-
-// Response of GET api/settings/check_secret_key
-message CheckSecretKeyWsResponse {
-  bool secretKeyAvailable = 1;
-}
-
-message Definition {
-  string key = 1;
-  oneof nameOneOf {string name = 2;}
-  string description = 3;
-  Type type = 4;
-  oneof categoryOneOf {string category = 5;}
-  oneof subCategoryOneOf {string subCategory = 6;}
-  oneof defaultValueOneOf {string defaultValue = 7;}
-  bool multiValues = 8;
-  repeated string options = 9;
-  repeated Field fields = 10;
-  oneof deprecatedKeyOneOf {string deprecatedKey = 11;}
-}
-
-message Field {
-  string key = 1;
-  string name = 2;
-  string description = 3;
-  Type type = 4;
-  repeated string options = 5;
-}
-
-enum Type {
-  STRING = 0;
-  TEXT = 1;
-  PASSWORD = 2;
-  BOOLEAN = 3;
-  INTEGER = 4;
-  FLOAT = 5;
-  LONG = 6;
-  REGULAR_EXPRESSION = 7;
-  METRIC = 8;
-  USER_LOGIN = 9;
-  METRIC_LEVEL = 10;
-  SINGLE_SELECT_LIST = 11;
-  PROPERTY_SET = 12;
-  LICENSE = 13;
-}
-
-// Response of GET api/settings/values
-message ValuesWsResponse {
-  repeated Setting settings = 1;
-}
-
-message Setting {
-  string key = 1;
-  oneof valueOneOf {
-    string value = 2;
-    Values values = 3;
-    FieldValues fieldValues = 4;
-  }
-  bool inherited = 5;
-  oneof parentValueOneOf {
-    string parentValue = 6;
-    Values parentValues = 7;
-    FieldValues parentFieldValues = 8;
-  }
-}
-
-message Values {
-  repeated string values = 1;
-}
-
-message FieldValues {
-  repeated Value fieldValues = 1;
-
-  message Value {
-    map<string, string> value = 1;
-  }
-}
-
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-system.proto b/sonar-ws/src/main/protobuf/ws-system.proto
deleted file mode 100644 (file)
index 5a6cddf..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.system;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsSystem";
-option optimize_for = SPEED;
-
-// GET api/system/health
-message HealthResponse {
-  optional Health health = 1;
-  repeated Cause causes = 2;
-  optional Nodes nodes = 3;
-}
-
-message Nodes {
-  repeated Node nodes = 1;
-}
-
-// GET api/system/status
-message StatusResponse {
-  optional string id = 1;
-  optional string version = 2;
-  optional Status status = 3;
-}
-
-message Cause {
-  optional string message = 1;
-}
-
-enum Health {
-  GREEN = 0;
-  YELLOW = 1;
-  RED = 2;
-}
-
-enum Status {
-  STARTING = 0;
-  UP = 1;
-  DOWN = 2;
-  RESTARTING = 3;
-  DB_MIGRATION_NEEDED = 4;
-  DB_MIGRATION_RUNNING = 5;
-}
-
-message Node {
-  optional string name = 1;
-  optional NodeType type = 2;
-  optional string host = 3;
-  optional int32 port = 4;
-  optional string startedAt = 5;
-  optional Health health = 6;
-  repeated Cause causes = 7;
-}
-
-enum NodeType {
-  APPLICATION = 0;
-  SEARCH = 1;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-tests.proto b/sonar-ws/src/main/protobuf/ws-tests.proto
deleted file mode 100644 (file)
index 5138b36..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.tests;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsTests";
-option optimize_for = SPEED;
-
-// WS api/tests/list
-message ListResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Test tests = 2;
-}
-
-// WS api/tests/covered_files
-message CoveredFilesResponse {
-  repeated CoveredFile files = 1;
-
-  message CoveredFile {
-    optional string id = 1;
-    optional string key = 2;
-    optional string longName = 3;
-    optional int32 coveredLines = 4;
-    optional string branch = 5;
-  }
-}
-
-
-message Test {
-  optional string id = 1;
-  optional string name = 2;
-  optional string fileId = 3;
-  optional string fileKey = 4;
-  optional string fileName = 5;
-  optional TestStatus status = 6;
-  optional int64 durationInMs = 7;
-  optional int32 coveredLines = 8;
-  optional string message = 9;
-  optional string stacktrace = 10;
-  optional string fileBranch = 11;
-}
-
-enum TestStatus {
-  OK = 1;
-  FAILURE = 2;
-  ERROR = 3;
-  SKIPPED = 4;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-user_groups.proto b/sonar-ws/src/main/protobuf/ws-user_groups.proto
deleted file mode 100644 (file)
index 25c7704..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.usergroup;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsUserGroups";
-option optimize_for = SPEED;
-
-// WS api/user_groups/create
-message CreateWsResponse {
-  optional Group group = 1;
-}
-
-// WS api/user_groups/update
-message UpdateWsResponse {
-  optional Group group = 1;
-}
-
-// WS api/user_groups/search
-message SearchWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Group groups = 2;
-}
-
-message Group {
-  optional int64 id = 1;
-  optional string organization = 2;
-  optional string name = 3;
-  optional string description = 4;
-  optional int32 membersCount = 5;
-  optional bool default = 6;
-}
diff --git a/sonar-ws/src/main/protobuf/ws-user_tokens.proto b/sonar-ws/src/main/protobuf/ws-user_tokens.proto
deleted file mode 100644 (file)
index f1e1ae4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.usertoken;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsUserTokens";
-option optimize_for = SPEED;
-
-// WS api/user_tokens/generate
-message GenerateWsResponse {
-  optional string login = 1;
-  optional string name = 2;
-  optional string token = 3;
-}
-
-// WS api/user_tokens/search
-message SearchWsResponse {
-  optional string login = 1;
-  repeated UserToken userTokens = 2;
-
-  message UserToken {
-    optional string name = 1;
-    optional string createdAt = 2;
-  }
-}
diff --git a/sonar-ws/src/main/protobuf/ws-users.proto b/sonar-ws/src/main/protobuf/ws-users.proto
deleted file mode 100644 (file)
index cf5a9d9..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.users;
-
-import "ws-commons.proto";
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "WsUsers";
-option optimize_for = SPEED;
-
-// WS api/users/search
-message SearchWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated User users = 2;
-
-  message User {
-    optional string login = 1;
-    optional string name = 2;
-    optional bool active = 3;
-    optional string email = 4;
-    optional ScmAccounts scmAccounts = 5;
-    optional Groups groups = 6;
-    optional int32 tokensCount = 7;
-    optional bool local = 8;
-    optional string externalIdentity = 9;
-    optional string externalProvider = 10;
-    optional string avatar = 11;
-  }
-
-  message Groups {
-    repeated string groups = 1;
-  }
-
-  message ScmAccounts {
-    repeated string scmAccounts = 1;
-  }
-}
-
-// WS api/users/identity_providers
-message IdentityProvidersWsResponse {
-  repeated IdentityProvider identityProviders = 1;
-}
-
-message IdentityProvider {
-  optional string key = 1;
-  optional string name = 2;
-  optional string iconPath = 3;
-  optional string backgroundColor = 4;
-}
-
-message CreateWsResponse {
-  optional User user = 1;
-
-  message User {
-    optional string login = 1;
-    optional string name = 2;
-    optional string email = 3;
-    repeated string scmAccounts = 4;
-    optional bool active = 5;
-    optional bool local = 6;
-  }
-}
-
-// WS api/users/groups
-message GroupsWsResponse {
-  optional sonarqube.ws.commons.Paging paging = 1;
-  repeated Group groups = 2;
-
-  message Group {
-    optional int64 id = 1;
-    optional string name = 2;
-    optional string description = 3;
-    optional bool selected = 4;
-    optional bool default = 5;
-  }
-}
-
-// WS api/users/current
-message CurrentWsResponse {
-  optional bool isLoggedIn = 1;
-  optional string login = 2;
-  optional string name = 3;
-  optional string email = 4;
-  optional bool local = 5;
-  optional string externalIdentity = 6;
-  optional string externalProvider = 7;
-  repeated string scmAccounts = 8;
-  repeated string groups = 9;
-  optional Permissions permissions = 10;
-  optional bool showOnboardingTutorial = 11;
-  optional string avatar = 12;
-
-  message Permissions {
-    repeated string global = 1;
-  }
-}
-
-
diff --git a/sonar-ws/src/main/protobuf/ws-webhooks.proto b/sonar-ws/src/main/protobuf/ws-webhooks.proto
deleted file mode 100644 (file)
index a7ef3a9..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// SonarQube, open source software quality management tool.
-// Copyright (C) 2008-2016 SonarSource
-// mailto:contact AT sonarsource DOT com
-//
-// SonarQube 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.
-//
-// SonarQube 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.
-
-syntax = "proto2";
-
-package sonarqube.ws.webhooks;
-
-option java_package = "org.sonarqube.ws";
-option java_outer_classname = "Webhooks";
-option optimize_for = SPEED;
-
-// WS api/webhooks/deliveries
-message DeliveriesWsResponse {
-  repeated Delivery deliveries = 1;
-}
-
-// WS api/webhooks/delivery
-message DeliveryWsResponse {
-  optional Delivery delivery = 1;
-}
-
-message Delivery {
-  optional string id = 1;
-  optional string componentKey = 2;
-  optional string ceTaskId = 3;
-  optional string name = 4;
-  optional string url = 5;
-  optional string at = 6;
-  optional bool success = 7;
-  optional int32 httpStatus = 8;
-  optional int32 durationMs = 9;
-  optional string payload = 10;
-  optional string errorStacktrace = 11;
-}
index 0b1912178967362bc5b9bc0e190313dc9a252aa2..2d1a66df6d63c2f4ae4278bb5385afc616b6dec7 100644 (file)
@@ -27,7 +27,7 @@ public class MessageFormatterTest {
 
   @Test
   public void print() {
-    WsPermissions.Permission.Builder message = WsPermissions.Permission.newBuilder()
+    Permissions.Permission.Builder message = Permissions.Permission.newBuilder()
       .setName("permission-name")
       .setKey("permission-key")
       .setDescription("permission-description")
@@ -36,7 +36,7 @@ public class MessageFormatterTest {
 
     String result = MessageFormatter.print(message);
 
-    assertThat(result).isEqualTo("org.sonarqube.ws.WsPermissions.Permission.Builder" +
+    assertThat(result).isEqualTo("org.sonarqube.ws.Permissions.Permission.Builder" +
       "[key: \"permission-key\" name: \"permission-name\" description: \"permission-description\" usersCount: 1984 groupsCount: 42]");
   }
 }
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/ce/CeServiceTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/ce/CeServiceTest.java
deleted file mode 100644 (file)
index b75aec5..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * 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.ce;
-
-import com.google.common.collect.ImmutableList;
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonarqube.ws.WsCe;
-import org.sonarqube.ws.WsCe.ActivityResponse;
-import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.ServiceTester;
-import org.sonarqube.ws.client.WsConnector;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.data.MapEntry.entry;
-import static org.mockito.Mockito.mock;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_COMPONENT_ID;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MAX_EXECUTED_AT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_MIN_SUBMITTED_AT;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_ONLY_CURRENTS;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_STATUS;
-import static org.sonarqube.ws.client.ce.CeWsParameters.PARAM_TYPE;
-
-public class CeServiceTest {
-  private static final String VALUE_COMPONENT_ID = "component-uuid";
-  private static final String VALUE_QUERY = "component-query";
-  private static final String VALUE_TASK_STATUS_1 = "task-status";
-  private static final String VALUE_TASK_STATUS_2 = "task-status-2";
-  private static final String VALUE_TASK_TYPE = "task-type";
-  private static final int VALUE_PAGE = 1;
-  private static final int VALUE_PAGE_SIZE = 10;
-  private static final String VALUE_MAX_EXECUTED_AT = "2015-09-17T23:34:59+0200";
-  private static final String VALUE_MIN_SUBMITTED_AT = "2015-09-17T23:34:59+0200";
-  private static final boolean VALUE_ONLY_CURRENTS = true;
-
-  @Rule
-  public ServiceTester<CeService> serviceTester = new ServiceTester<>(new CeService(mock(WsConnector.class)));
-
-  CeService underTest = serviceTester.getInstanceUnderTest();
-
-  @Test
-  public void activity() {
-    ActivityWsRequest request = new ActivityWsRequest()
-      .setComponentId(VALUE_COMPONENT_ID)
-      .setQuery(VALUE_QUERY)
-      .setStatus(ImmutableList.of(VALUE_TASK_STATUS_1, VALUE_TASK_STATUS_2))
-      .setType(VALUE_TASK_TYPE)
-      .setPage(VALUE_PAGE)
-      .setPageSize(VALUE_PAGE_SIZE)
-      .setMaxExecutedAt(VALUE_MAX_EXECUTED_AT)
-      .setMinSubmittedAt(VALUE_MIN_SUBMITTED_AT)
-      .setOnlyCurrents(VALUE_ONLY_CURRENTS)
-      .setPage(1)
-      .setPageSize(1);
-
-    underTest.activity(request);
-    GetRequest result = serviceTester.getGetRequest();
-
-    assertThat(serviceTester.getGetParser()).isSameAs(ActivityResponse.parser());
-    serviceTester.assertThat(result)
-      .hasPath("activity")
-      .hasParam(PARAM_COMPONENT_ID, VALUE_COMPONENT_ID)
-      .hasParam("q", VALUE_QUERY)
-      .hasParam(PARAM_STATUS, VALUE_TASK_STATUS_1 + "," + VALUE_TASK_STATUS_2)
-      .hasParam(PARAM_TYPE, VALUE_TASK_TYPE)
-      .hasParam(PARAM_MAX_EXECUTED_AT, VALUE_MAX_EXECUTED_AT)
-      .hasParam(PARAM_MIN_SUBMITTED_AT, VALUE_MIN_SUBMITTED_AT)
-      .hasParam(PARAM_ONLY_CURRENTS, VALUE_ONLY_CURRENTS)
-      .hasParam("p", 1)
-      .hasParam("ps", 1)
-      .andNoOtherParam();
-  }
-
-  @Test
-  public void task_types() {
-    underTest.taskTypes();
-
-    assertThat(serviceTester.getGetParser()).isSameAs(WsCe.TaskTypesWsResponse.parser());
-  }
-
-  @Test
-  public void task_by_id_only() {
-    underTest.task("task_id");
-
-    assertThat(serviceTester.getGetRequest().getPath()).isEqualTo("api/ce/task");
-    assertThat(serviceTester.getGetRequest().getParams()).containsOnly(entry("id", "task_id"));
-  }
-
-  @Test
-  public void task_with_stacktrace_and_scanner_context() {
-    underTest.task(TaskWsRequest.newBuilder("task_id")
-      .withErrorStacktrace()
-      .withScannerContext()
-      .build());
-
-    assertThat(serviceTester.getGetRequest().getPath()).isEqualTo("api/ce/task");
-    assertThat(serviceTester.getGetRequest().getParams()).containsOnly(entry("id", "task_id"), entry("additionalFields", "stacktrace,scannerContext"));
-  }
-
-  @Test
-  public void task_with_scanner_context_only() {
-    underTest.task(TaskWsRequest.newBuilder("task_id")
-      .withScannerContext()
-      .build());
-
-    assertThat(serviceTester.getGetRequest().getPath()).isEqualTo("api/ce/task");
-    assertThat(serviceTester.getGetRequest().getParams()).containsOnly(entry("id", "task_id"), entry("additionalFields", "scannerContext"));
-  }
-
-  @Test
-  public void task_with_stacktrace_only() {
-    underTest.task(TaskWsRequest.newBuilder("task_id")
-      .withErrorStacktrace()
-      .build());
-
-    assertThat(serviceTester.getGetRequest().getPath()).isEqualTo("api/ce/task");
-    assertThat(serviceTester.getGetRequest().getParams()).containsOnly(entry("id", "task_id"), entry("additionalFields", "stacktrace"));
-  }
-
-  @Test
-  public void worker_count() {
-    underTest.workerCount();
-
-    assertThat(serviceTester.getGetRequest().getPath()).isEqualTo("api/ce/worker_count");
-    assertThat(serviceTester.getGetParser()).isSameAs(WsCe.WorkerCountResponse.parser());
-  }
-
-  @Test
-  public void component() {
-    underTest.component("my_component");
-    GetRequest result = serviceTester.getGetRequest();
-
-    assertThat(serviceTester.getGetParser()).isSameAs(WsCe.ProjectResponse.parser());
-    serviceTester.assertThat(result)
-      .hasPath("component")
-      .hasParam(PARAM_COMPONENT, "my_component")
-      .andNoOtherParam();
-  }
-}
index 61805bbdd1abbeeca2303bc70ca5dec24486e659..5e6f3fa211abaa966832fdeed7133019839f4dac 100644 (file)
@@ -21,7 +21,7 @@ package org.sonarqube.ws.client.component;
 
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsComponents;
+import org.sonarqube.ws.Components;
 import org.sonarqube.ws.client.ServiceTester;
 import org.sonarqube.ws.client.WsConnector;
 
@@ -57,7 +57,7 @@ public class ComponentsServiceTest {
       .setAdditionalFields(singletonList("analysisDate"))
       .build());
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsComponents.SearchProjectsWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Components.SearchProjectsWsResponse.parser());
     serviceTester.assertThat(serviceTester.getGetRequest())
       .hasPath("search_projects")
       .hasParam(PARAM_FILTER, "ncloc > 10")
@@ -79,7 +79,7 @@ public class ComponentsServiceTest {
       .setPageSize(10)
       .build());
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsComponents.SearchProjectsWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Components.SearchProjectsWsResponse.parser());
     serviceTester.assertThat(serviceTester.getGetRequest())
       .hasPath("search_projects")
       .hasParam(PARAM_FILTER, "ncloc > 10")
@@ -98,7 +98,7 @@ public class ComponentsServiceTest {
       .setId(id)
       .setBranch("my_branch"));
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsComponents.ShowWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Components.ShowWsResponse.parser());
     serviceTester.assertThat(serviceTester.getGetRequest())
       .hasPath("show")
       .hasParam("component", key)
@@ -141,7 +141,7 @@ public class ComponentsServiceTest {
       .setPageSize(pageSize)
       .setQuery(textQuery));
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsComponents.SearchWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Components.SearchWsResponse.parser());
     serviceTester.assertThat(serviceTester.getGetRequest())
       .hasPath("search")
       .hasParam("organization", organization)
@@ -172,7 +172,7 @@ public class ComponentsServiceTest {
       .setQuery(query)
       .setSort(asList("sort1", "sort2")));
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsComponents.TreeWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Components.TreeWsResponse.parser());
     serviceTester.assertThat(serviceTester.getGetRequest())
       .hasPath("tree")
       .hasParam("componentId", componentId)
index c8d4e66d339626bcfe9fb5af04682c52c7bcd9d3..653d79aba19db4a8533508494338997e453c3715 100644 (file)
@@ -23,9 +23,9 @@ import java.util.ArrayList;
 import java.util.List;
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.ComponentTreeWsResponse;
-import org.sonarqube.ws.WsMeasures.ComponentWsResponse;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
+import org.sonarqube.ws.Measures.ComponentWsResponse;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.ServiceTester;
 import org.sonarqube.ws.client.WsConnector;
@@ -169,7 +169,7 @@ public class MeasuresServiceTest {
     underTest.searchHistory(request);
     GetRequest getRequest = serviceTester.getGetRequest();
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsMeasures.SearchHistoryResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Measures.SearchHistoryResponse.parser());
     serviceTester.assertThat(getRequest)
       .hasParam(PARAM_COMPONENT, VALUE_COMPONENT)
       .hasParam(PARAM_BRANCH, "my_branch")
@@ -191,7 +191,7 @@ public class MeasuresServiceTest {
     underTest.search(request);
     GetRequest getRequest = serviceTester.getGetRequest();
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsMeasures.SearchWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Measures.SearchWsResponse.parser());
     serviceTester.assertThat(getRequest)
       .hasParam(PARAM_PROJECT_KEYS, "P1,P2")
       .hasParam(PARAM_METRIC_KEYS, "ncloc,complexity")
index fa45cf550c613dd961312059b75af0c2f3c5229e..0d51269ce804b5dc71e3b4b0603bd05c4476d52d 100644 (file)
@@ -22,7 +22,7 @@ package org.sonarqube.ws.client.permission;
 import java.util.Arrays;
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsPermissions;
+import org.sonarqube.ws.Permissions;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.ServiceTester;
@@ -92,7 +92,7 @@ public class PermissionsServiceTest {
       .setPageSize(PAGE_SIZE_VALUE)
       .setQuery(QUERY_VALUE));
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsPermissions.WsGroupsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Permissions.WsGroupsResponse.parser());
     GetRequest getRequest = serviceTester.getGetRequest();
     serviceTester.assertThat(getRequest)
       .hasPath("groups")
@@ -255,7 +255,7 @@ public class PermissionsServiceTest {
       .setProjectKeyPattern(PROJECT_KEY_PATTERN_VALUE)
     );
 
-    assertThat(serviceTester.getPostParser()).isSameAs(WsPermissions.CreateTemplateWsResponse.parser());
+    assertThat(serviceTester.getPostParser()).isSameAs(Permissions.CreateTemplateWsResponse.parser());
     PostRequest postRequest = serviceTester.getPostRequest();
     serviceTester.assertThat(postRequest)
       .hasPath("create_template")
@@ -378,7 +378,7 @@ public class PermissionsServiceTest {
   public void searchGlobalPermissions_does_GET_on_Ws_search_global_permissions() {
     underTest.searchGlobalPermissions();
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsPermissions.WsSearchGlobalPermissionsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Permissions.WsSearchGlobalPermissionsResponse.parser());
     GetRequest getRequest = serviceTester.getGetRequest();
     serviceTester.assertThat(getRequest)
       .hasPath("search_global_permissions")
@@ -396,7 +396,7 @@ public class PermissionsServiceTest {
       .setQuery(QUERY_VALUE)
     );
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsPermissions.SearchProjectPermissionsWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Permissions.SearchProjectPermissionsWsResponse.parser());
     GetRequest getRequest = serviceTester.getGetRequest();
     serviceTester.assertThat(getRequest)
       .hasPath("search_project_permissions")
@@ -415,7 +415,7 @@ public class PermissionsServiceTest {
       .setQuery(QUERY_VALUE)
     );
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsPermissions.SearchTemplatesWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Permissions.SearchTemplatesWsResponse.parser());
     GetRequest getRequest = serviceTester.getGetRequest();
     serviceTester.assertThat(getRequest)
       .hasPath("search_templates")
@@ -450,7 +450,7 @@ public class PermissionsServiceTest {
       .setProjectKeyPattern(PROJECT_KEY_PATTERN_VALUE)
     );
 
-    assertThat(serviceTester.getPostParser()).isSameAs(WsPermissions.UpdateTemplateWsResponse.parser());
+    assertThat(serviceTester.getPostParser()).isSameAs(Permissions.UpdateTemplateWsResponse.parser());
     PostRequest postRequest = serviceTester.getPostRequest();
     serviceTester.assertThat(postRequest)
       .hasPath("update_template")
@@ -513,7 +513,7 @@ public class PermissionsServiceTest {
       .setPageSize(50)
     );
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsPermissions.UsersWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Permissions.UsersWsResponse.parser());
     GetRequest getRequest = serviceTester.getGetRequest();
 
     serviceTester.assertThat(getRequest)
index d1a094f3fcc363db753dfcbdc96a8152fd598cf8..657b7f0e47862d18ccbf8967a249cfd61009951b 100644 (file)
@@ -22,7 +22,7 @@ package org.sonarqube.ws.client.project;
 import java.util.Arrays;
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsProjects;
+import org.sonarqube.ws.Projects;
 import org.sonarqube.ws.client.ServiceTester;
 import org.sonarqube.ws.client.WsConnector;
 
@@ -47,7 +47,7 @@ public class ProjectsServiceTest {
       .setName("Project Name")
       .build());
 
-    assertThat(serviceTester.getPostParser()).isSameAs(WsProjects.CreateWsResponse.parser());
+    assertThat(serviceTester.getPostParser()).isSameAs(Projects.CreateWsResponse.parser());
     assertThat(serviceTester.getPostRequest().getPath()).isEqualTo("api/projects/create");
     assertThat(serviceTester.getPostRequest().getParams()).containsOnly(
       entry("project", "project_key"),
@@ -62,7 +62,7 @@ public class ProjectsServiceTest {
       .setName("Project Name")
       .build());
 
-    assertThat(serviceTester.getPostParser()).isSameAs(WsProjects.CreateWsResponse.parser());
+    assertThat(serviceTester.getPostParser()).isSameAs(Projects.CreateWsResponse.parser());
     assertThat(serviceTester.getPostRequest().getPath()).isEqualTo("api/projects/create");
     assertThat(serviceTester.getPostRequest().getParams()).containsOnly(
       entry("organization", "org_key"),
index eb8f57f344473c153261966c404a9fc59c260d8d..a20137651fe7535875d42f44cb14677de3919099 100644 (file)
@@ -22,8 +22,8 @@ package org.sonarqube.ws.client.projectbranches;
 
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsBranches.ListWsResponse;
-import org.sonarqube.ws.WsBranches.ShowWsResponse;
+import org.sonarqube.ws.ProjectBranches.ListWsResponse;
+import org.sonarqube.ws.ProjectBranches.ShowWsResponse;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.ServiceTester;
@@ -38,9 +38,9 @@ import static org.sonarqube.ws.client.projectbranches.ProjectBranchesParameters.
 public class ProjectBranchesServiceTest {
 
   @Rule
-  public ServiceTester<ProjectBranchesService> serviceTester = new ServiceTester<>(new ProjectBranchesService(mock(WsConnector.class)));
+  public ServiceTester<ProjectBranchesServiceOld> serviceTester = new ServiceTester<>(new ProjectBranchesServiceOld(mock(WsConnector.class)));
 
-  private ProjectBranchesService underTest = serviceTester.getInstanceUnderTest();
+  private ProjectBranchesServiceOld underTest = serviceTester.getInstanceUnderTest();
 
   @Test
   public void list() {
index bc00d51a78c47a0a689354a4a0880132b399a943..3ebf9c68a231a03be6c8d634d3550b6a80af4ac6 100644 (file)
@@ -21,8 +21,8 @@ package org.sonarqube.ws.client.projectlinks;
 
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsProjectLinks.CreateWsResponse;
-import org.sonarqube.ws.WsProjectLinks.SearchWsResponse;
+import org.sonarqube.ws.ProjectLinks.CreateWsResponse;
+import org.sonarqube.ws.ProjectLinks.SearchWsResponse;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.ServiceTester;
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequestTest.java
deleted file mode 100644 (file)
index 5d4e3e5..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.qualitygate;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class CreateConditionRequestTest {
-
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-
-  CreateConditionRequest.Builder underTest = CreateConditionRequest.builder();
-
-  @Test
-  public void create_condition_request() {
-    CreateConditionRequest result = underTest
-      .setQualityGateId(10)
-      .setMetricKey("metric")
-      .setOperator("LT")
-      .setWarning("warning")
-      .setError("error")
-      .setPeriod(1)
-      .build();
-
-    assertThat(result.getQualityGateId()).isEqualTo(10);
-    assertThat(result.getMetricKey()).isEqualTo("metric");
-    assertThat(result.getOperator()).isEqualTo("LT");
-    assertThat(result.getWarning()).isEqualTo("warning");
-    assertThat(result.getError()).isEqualTo("error");
-    assertThat(result.getPeriod()).isEqualTo(1);
-  }
-
-  @Test
-  public void fail_when_no_quality_gate() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Quality gate id is mandatory and must not be empty");
-
-    underTest
-      .setMetricKey("metric")
-      .setOperator("LT")
-      .setWarning("warning")
-      .build();
-  }
-
-  @Test
-  public void fail_when_no_metric() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Metric key is mandatory and must not be empty");
-
-    underTest
-      .setQualityGateId(10)
-      .setOperator("LT")
-      .setWarning("warning")
-      .build();
-  }
-
-  @Test
-  public void fail_when_no_operator() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Operator is mandatory and must not be empty");
-
-    underTest
-      .setQualityGateId(10)
-      .setMetricKey("metric")
-      .setWarning("warning")
-      .build();
-  }
-
-}
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/QualityGatesServiceTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/QualityGatesServiceTest.java
deleted file mode 100644 (file)
index 5f66c8a..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * 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.
- */
-
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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.qualitygate;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.sonarqube.ws.WsQualityGates.CreateConditionWsResponse;
-import org.sonarqube.ws.WsQualityGates.CreateWsResponse;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse;
-import org.sonarqube.ws.WsQualityGates.UpdateConditionWsResponse;
-import org.sonarqube.ws.client.GetRequest;
-import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.ServiceTester;
-import org.sonarqube.ws.client.WsConnector;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ANALYSIS_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ERROR;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_GATE_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_METRIC;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_NAME;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_OPERATOR;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PERIOD;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PROJECT_ID;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_PROJECT_KEY;
-import static org.sonarqube.ws.client.qualitygate.QualityGatesWsParameters.PARAM_WARNING;
-
-public class QualityGatesServiceTest {
-  private static final String PROJECT_ID_VALUE = "195";
-  private static final String PROJECT_KEY_VALUE = "project_key_value";
-  private static final Long GATE_ID_VALUE = 243L;
-
-  @Rule
-  public ServiceTester<QualityGatesService> serviceTester = new ServiceTester<>(new QualityGatesService(mock(WsConnector.class)));
-
-  private QualityGatesService underTest = serviceTester.getInstanceUnderTest();
-
-  @Test
-  public void associate_project() {
-    underTest.associateProject(new SelectWsRequest()
-      .setGateId(GATE_ID_VALUE)
-      .setProjectId(PROJECT_ID_VALUE)
-      .setProjectKey(PROJECT_KEY_VALUE));
-
-    assertThat(serviceTester.getPostParser()).isNull();
-
-    PostRequest postRequest = serviceTester.getPostRequest();
-
-    serviceTester.assertThat(postRequest)
-      .hasPath("select")
-      .hasParam(PARAM_GATE_ID, String.valueOf(GATE_ID_VALUE))
-      .hasParam(PARAM_PROJECT_ID, String.valueOf(PROJECT_ID_VALUE))
-      .hasParam(PARAM_PROJECT_KEY, PROJECT_KEY_VALUE)
-      .andNoOtherParam();
-  }
-
-  @Test
-  public void project_status() {
-    underTest.projectStatus(new ProjectStatusWsRequest()
-      .setAnalysisId("analysisId")
-      .setProjectId("projectId")
-      .setProjectKey("projectKey"));
-    GetRequest getRequest = serviceTester.getGetRequest();
-
-    assertThat(serviceTester.getGetParser()).isSameAs(ProjectStatusWsResponse.parser());
-    serviceTester.assertThat(getRequest)
-      .hasParam(PARAM_ANALYSIS_ID, "analysisId")
-      .hasParam(PARAM_PROJECT_ID, "projectId")
-      .hasParam(PARAM_PROJECT_KEY, "projectKey")
-      .andNoOtherParam();
-  }
-
-  @Test
-  public void create() {
-    underTest.create("Default");
-    PostRequest request = serviceTester.getPostRequest();
-
-    assertThat(serviceTester.getPostParser()).isSameAs(CreateWsResponse.parser());
-    serviceTester.assertThat(request)
-      .hasParam(PARAM_NAME, "Default")
-      .andNoOtherParam();
-  }
-
-  @Test
-  public void create_condition() {
-    underTest.createCondition(CreateConditionRequest.builder()
-      .setQualityGateId(10)
-      .setMetricKey("metric")
-      .setOperator("LT")
-      .setWarning("warning")
-      .setError("error")
-      .setPeriod(1)
-    .build());
-
-    PostRequest request = serviceTester.getPostRequest();
-
-    assertThat(serviceTester.getPostParser()).isSameAs(CreateConditionWsResponse.parser());
-    serviceTester.assertThat(request)
-      .hasPath("create_condition")
-      .hasParam(PARAM_GATE_ID, 10)
-      .hasParam(PARAM_METRIC, "metric")
-      .hasParam(PARAM_OPERATOR, "LT")
-      .hasParam(PARAM_WARNING, "warning")
-      .hasParam(PARAM_ERROR, "error")
-      .hasParam(PARAM_PERIOD, 1)
-      .andNoOtherParam();
-  }
-
-  @Test
-  public void update_condition() {
-    underTest.updateCondition(UpdateConditionRequest.builder()
-      .setConditionId(10)
-      .setMetricKey("metric")
-      .setOperator("LT")
-      .setWarning("warning")
-      .setError("error")
-      .setPeriod(1)
-      .build());
-
-    PostRequest request = serviceTester.getPostRequest();
-
-    assertThat(serviceTester.getPostParser()).isSameAs(UpdateConditionWsResponse.parser());
-    serviceTester.assertThat(request)
-      .hasPath("update_condition")
-      .hasParam(PARAM_ID, 10)
-      .hasParam(PARAM_METRIC, "metric")
-      .hasParam(PARAM_OPERATOR, "LT")
-      .hasParam(PARAM_WARNING, "warning")
-      .hasParam(PARAM_ERROR, "error")
-      .hasParam(PARAM_PERIOD, 1)
-      .andNoOtherParam();
-  }
-}
diff --git a/sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequestTest.java b/sonar-ws/src/test/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequestTest.java
deleted file mode 100644 (file)
index 36e5b37..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.qualitygate;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-public class UpdateConditionRequestTest {
-
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-
-  UpdateConditionRequest.Builder underTest = UpdateConditionRequest.builder();
-
-  @Test
-  public void create_condition_request() {
-    UpdateConditionRequest result = underTest
-      .setConditionId(10)
-      .setMetricKey("metric")
-      .setOperator("LT")
-      .setWarning("warning")
-      .setError("error")
-      .setPeriod(1)
-      .build();
-
-    assertThat(result.getConditionId()).isEqualTo(10);
-    assertThat(result.getMetricKey()).isEqualTo("metric");
-    assertThat(result.getOperator()).isEqualTo("LT");
-    assertThat(result.getWarning()).isEqualTo("warning");
-    assertThat(result.getError()).isEqualTo("error");
-    assertThat(result.getPeriod()).isEqualTo(1);
-  }
-
-  @Test
-  public void fail_when_no_quality_gate() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Condition id is mandatory and must not be empty");
-
-    underTest
-      .setMetricKey("metric")
-      .setOperator("LT")
-      .setWarning("warning")
-      .build();
-  }
-
-  @Test
-  public void fail_when_no_metric() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Metric key is mandatory and must not be empty");
-
-    underTest
-      .setConditionId(10)
-      .setOperator("LT")
-      .setWarning("warning")
-      .build();
-  }
-
-  @Test
-  public void fail_when_no_operator() {
-    expectedException.expect(IllegalArgumentException.class);
-    expectedException.expectMessage("Operator is mandatory and must not be empty");
-
-    underTest
-      .setConditionId(10)
-      .setMetricKey("metric")
-      .setWarning("warning")
-      .build();
-  }
-
-}
index 8d90866470cf36798c6ec1431f1af4f67bfc611a..015186a588e059bed00d1d314baf96e9bf7d3f48 100644 (file)
@@ -22,9 +22,9 @@ package org.sonarqube.ws.client.qualityprofile;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.ws.Common.Severity;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
-import org.sonarqube.ws.QualityProfiles.ShowResponse;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.ServiceTester;
@@ -48,7 +48,6 @@ import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.
 import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_KEY;
 import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_QUALITY_PROFILE;
 import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_PROJECT_KEY;
-import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_QUALITY_PROFILE;
 import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_RULE;
 import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_SEVERITY;
 import static org.sonarqube.ws.client.qualityprofile.QualityProfileWsParameters.PARAM_TO_NAME;
@@ -256,7 +255,7 @@ public class QualityProfilesServiceTest {
     );
     GetRequest getRequest = serviceTester.getGetRequest();
 
-    assertThat(serviceTester.getGetParser()).isSameAs(QualityProfiles.SearchUsersResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Qualityprofiles.SearchUsersResponse.parser());
     serviceTester.assertThat(getRequest)
       .hasPath("search_users")
       .hasParam(PARAM_ORGANIZATION, "O1")
@@ -321,7 +320,7 @@ public class QualityProfilesServiceTest {
     );
     GetRequest getRequest = serviceTester.getGetRequest();
 
-    assertThat(serviceTester.getGetParser()).isSameAs(QualityProfiles.SearchGroupsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Qualityprofiles.SearchGroupsResponse.parser());
     serviceTester.assertThat(getRequest)
       .hasPath("search_groups")
       .hasParam(PARAM_ORGANIZATION, "O1")
index 145642a527870e9b18e25bc3188351931abad421..766baa3752051b175d0cf3ada9887e7c08e2fc1e 100644 (file)
@@ -31,9 +31,9 @@ import static org.mockito.Mockito.mock;
 public class SystemServiceTest {
 
   @Rule
-  public ServiceTester<SystemService> serviceTester = new ServiceTester<>(new SystemService(mock(WsConnector.class)));
+  public ServiceTester<SystemServiceOld> serviceTester = new ServiceTester<>(new SystemServiceOld(mock(WsConnector.class)));
 
-  private SystemService underTest = serviceTester.getInstanceUnderTest();
+  private SystemServiceOld underTest = serviceTester.getInstanceUnderTest();
 
   @Test
   public void test_health() throws Exception {
index 7d26c5f238aedae8914aeba6cebe0d5eef7b6cdd..a0d870b3b906a921af55bdda4b430f7d84b54d5e 100644 (file)
@@ -21,9 +21,9 @@ package org.sonarqube.ws.client.user;
 
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsUsers;
-import org.sonarqube.ws.WsUsers.CreateWsResponse;
-import org.sonarqube.ws.WsUsers.GroupsWsResponse;
+import org.sonarqube.ws.Users;
+import org.sonarqube.ws.Users.CreateWsResponse;
+import org.sonarqube.ws.Users.GroupsWsResponse;
 import org.sonarqube.ws.client.ServiceTester;
 import org.sonarqube.ws.client.WsConnector;
 
@@ -59,7 +59,7 @@ public class UsersServiceTest {
       .setPossibleFields(asList("email", "name"))
       .build());
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsUsers.SearchWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Users.SearchWsResponse.parser());
     serviceTester.assertThat(serviceTester.getGetRequest())
       .hasParam(TEXT_QUERY, "john")
       .hasParam(PAGE, 10)
@@ -133,6 +133,6 @@ public class UsersServiceTest {
   public void current() {
     underTest.current();
 
-    assertThat(serviceTester.getGetParser()).isSameAs(WsUsers.CurrentWsResponse.parser());
+    assertThat(serviceTester.getGetParser()).isSameAs(Users.CurrentWsResponse.parser());
   }
 }
index 57d19f13ab19ead6d6471075702525d72e092af2..d4bac21425734cb164f86d72a20929e12c925982 100644 (file)
@@ -28,9 +28,9 @@ import org.sonarqube.ws.client.WsConnector;
 import static java.util.Arrays.asList;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.Mockito.mock;
-import static org.sonarqube.ws.WsUserGroups.CreateWsResponse;
-import static org.sonarqube.ws.WsUserGroups.SearchWsResponse;
-import static org.sonarqube.ws.WsUserGroups.UpdateWsResponse;
+import static org.sonarqube.ws.UserGroups.CreateWsResponse;
+import static org.sonarqube.ws.UserGroups.SearchWsResponse;
+import static org.sonarqube.ws.UserGroups.UpdateWsResponse;
 
 public class UserGroupsServiceTest {
 
index 7de752bba251c8d63e836b43198daff7274327e9..d626d68d02f7db409d7b6b43204d6385b0a6f4ea 100644 (file)
@@ -22,7 +22,7 @@ import org.sonar.api.server.ws.RequestHandler;
 import org.sonar.api.server.ws.Response;
 import org.sonar.api.server.ws.WebService;
 import org.sonarqube.ws.MediaTypes;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.LocalWsClientFactory;
 import org.sonarqube.ws.client.WsClient;
@@ -50,7 +50,7 @@ public final class LocalCallWebService implements WebService {
     public void handle(Request request, Response response) throws Exception {
       WsClient client = wsClientFactory.newClient(request.localConnector());
 
-      WsCe.TaskTypesWsResponse ceTaskTypes = client.ce().taskTypes();
+      Ce.TaskTypesWsResponse ceTaskTypes = client.ce().taskTypes();
       response.stream().setStatus(ceTaskTypes.getTaskTypesCount() > 0 ? 200 : 500);
     }
   }
index 36edfa2bc3f08bce173d6969f0881c2ca9295275..c36c4aaee206cb00876b9fc59e5f4326f64a0e6f 100644 (file)
       <version>${orchestrator.version}</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <!-- required for overriding ws-client 4.5 to have complete error stacktraces
+      in Issue tests -->
+      <groupId>org.codehaus.sonar</groupId>
+      <artifactId>sonar-ws-client</artifactId>
+      <version>5.0</version>
+    </dependency>
     <dependency>
       <groupId>org.sonarsource.sonarqube</groupId>
       <artifactId>sonar-application</artifactId>
       <version>${project.version}</version>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>org.codehaus.sonar</groupId>
-      <artifactId>sonar-ws-client</artifactId>
-      <version>5.0</version>
-    </dependency>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.assertj</groupId>
-      <artifactId>assertj-guava</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.hamcrest</groupId>
       <artifactId>hamcrest-all</artifactId>
       <artifactId>jsonassert</artifactId>
       <version>1.2.0</version>
     </dependency>
-    <dependency>
-      <groupId>org.jsoup</groupId>
-      <artifactId>jsoup</artifactId>
-      <version>1.8.3</version>
-    </dependency>
     <dependency>
       <groupId>com.squareup.okhttp3</groupId>
       <artifactId>mockwebserver</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-email</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.subethamail</groupId>
       <artifactId>subethasmtp</artifactId>
index 34afd54d11bddd31c7080a5c4163944a734dcb29..eca1a1038f7d6fb0b1d36295a2a4b91003410d7c 100644 (file)
@@ -24,7 +24,6 @@ import org.junit.ClassRule;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 import org.sonarqube.tests.ce.BackgroundTasksTest;
-import org.sonarqube.tests.projectAdministration.ProjectAdministrationTest;
 import org.sonarqube.tests.settings.DeprecatedPropertiesWsTest;
 import org.sonarqube.tests.settings.EmailsTest;
 import org.sonarqube.tests.settings.PropertySetsTest;
@@ -42,7 +41,6 @@ import static util.ItUtils.xooPlugin;
 @RunWith(Suite.class)
 @Suite.SuiteClasses({
   UsersPageTest.class,
-  ProjectAdministrationTest.class,
   BackgroundTasksTest.class,
   DeprecatedPropertiesWsTest.class,
   EmailsTest.class,
@@ -57,18 +55,19 @@ public class Category1Suite {
     .addPlugin(pluginArtifact("property-sets-plugin"))
     .addPlugin(pluginArtifact("sonar-subcategories-plugin"))
 
-    // Used in I18nTest
-    .addPlugin(pluginArtifact("l10n-fr-pack"))
-
-    // 1 second. Required for notification test.
-    .setServerProperty("sonar.notifications.delay", "1")
-
     // Used in SettingsTest.global_property_change_extension_point
     .addPlugin(pluginArtifact("global-property-change-plugin"))
 
     // Used in SettingsTest.should_get_settings_default_value
     .addPlugin(pluginArtifact("server-plugin"))
 
+
+    // Used in I18nTest
+    .addPlugin(pluginArtifact("l10n-fr-pack"))
+
+    // 1 second. Required for notification test.
+    .setServerProperty("sonar.notifications.delay", "1")
+
     .addPlugin(pluginArtifact("posttask-plugin"))
 
     // reduce memory for Elasticsearch to 128M
index db55ef7f23f7b5a664599e62e372ef8f3c68401f..c0615144afdcfee5547b17b07fbd7302e3c45e09 100644 (file)
@@ -35,16 +35,16 @@ import org.junit.After;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.tests.Byteman;
 import org.sonarqube.qa.util.Tester;
+import org.sonarqube.tests.Byteman;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.Common;
 import org.sonarqube.ws.Issues;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse.QualityProfile;
-import org.sonarqube.ws.WsCe;
-import org.sonarqube.ws.WsProjects;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
-import org.sonarqube.ws.client.ce.TaskWsRequest;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse.QualityProfile;
+import org.sonarqube.ws.Projects;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
+import org.sonarqube.ws.client.ce.TaskRequest;
 import org.sonarqube.ws.client.component.SuggestionsWsRequest;
 import org.sonarqube.ws.client.issue.SearchWsRequest;
 import util.ItUtils;
@@ -52,7 +52,7 @@ import util.ItUtils;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.tuple;
 import static org.sonarqube.tests.Byteman.Process.CE;
-import static org.sonarqube.ws.WsCe.TaskStatus.FAILED;
+import static org.sonarqube.ws.Ce.TaskStatus.FAILED;
 import static util.ItUtils.projectDir;
 
 public class AnalysisEsResilienceTest {
@@ -86,7 +86,7 @@ public class AnalysisEsResilienceTest {
   public void activation_and_deactivation_of_rule_is_resilient_to_indexing_errors() throws Exception {
     Organization organization = tester.organizations().generate();
     User orgAdministrator = tester.users().generateAdministrator(organization);
-    WsProjects.CreateWsResponse.Project project = tester.projects().generate(organization);
+    Projects.CreateWsResponse.Project project = tester.projects().provision(organization);
     String projectKey = project.getKey();
     String fileKey = projectKey + ":src/main/xoo/sample/Sample.xoo";
     String file2Key = projectKey + ":src/main/xoo/sample/Sample2.xoo";
@@ -134,7 +134,7 @@ public class AnalysisEsResilienceTest {
   public void purge_mechanism_must_be_resilient_at_next_analysis() throws Exception {
     Organization organization = tester.organizations().generate();
     User orgAdministrator = tester.users().generateAdministrator(organization);
-    WsProjects.CreateWsResponse.Project project = tester.projects().generate(organization);
+    Projects.CreateWsResponse.Project project = tester.projects().provision(organization);
     String projectKey = project.getKey();
     String fileKey = projectKey + ":src/main/xoo/sample/Sample.xoo";
 
@@ -158,9 +158,9 @@ public class AnalysisEsResilienceTest {
     String taskUuid = executeAnalysis(projectKey, organization, orgAdministrator, "analysis/resilience/resilience-purge", "2000-01-02");
 
     // The task has failed
-    TaskWsRequest request = TaskWsRequest.newBuilder(taskUuid).withErrorStacktrace().build();
-    WsCe.Task task = tester.wsClient().ce().task(request).getTask();
-    assertThat(task.getStatus()).isEqualTo(WsCe.TaskStatus.FAILED);
+    TaskRequest request = new TaskRequest().setId(taskUuid).setAdditionalFields(Collections.singletonList("stacktrace"));
+    Ce.Task task = tester.wsClient().ce().task(request).getTask();
+    assertThat(task.getStatus()).isEqualTo(Ce.TaskStatus.FAILED);
     assertThat(task.getErrorMessage()).contains("Unrecoverable indexation failures");
     assertThat(task.getErrorStacktrace())
       .contains("Caused by: java.lang.IllegalStateException: Unrecoverable indexation failures");
@@ -208,7 +208,7 @@ public class AnalysisEsResilienceTest {
   public void compute_engine_task_must_be_red_when_es_is_not_available() throws Exception {
     Organization organization = tester.organizations().generate();
     User orgAdministrator = tester.users().generateAdministrator(organization);
-    WsProjects.CreateWsResponse.Project project = tester.projects().generate(organization);
+    Projects.CreateWsResponse.Project project = tester.projects().provision(organization);
     String projectKey = project.getKey();
     String fileKey = projectKey + ":src/main/xoo/sample/Sample.xoo";
 
@@ -220,7 +220,7 @@ public class AnalysisEsResilienceTest {
     tester.elasticsearch().lockWrites("issues");
 
     String analysisKey = executeAnalysis(projectKey, organization, orgAdministrator, "analysis/resilience/resilience-sample-v1", null);
-    WsCe.TaskResponse task = tester.wsClient().ce().task(analysisKey);
+    Ce.TaskResponse task = tester.wsClient().ce().task(new TaskRequest().setId(analysisKey));
 
     assertThat(task.getTask().getStatus()).isEqualTo(FAILED);
   }
index f94f6aa2833b42036af141d7189339307d23a246..1bb37ef730300169c534fe224aa6537f589517ee 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.sonarqube.ws.Favorites;
 import org.sonarqube.ws.Favorites.Favorite;
-import org.sonarqube.ws.WsPermissions;
+import org.sonarqube.ws.Permissions;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.favorite.SearchRequest;
 import org.sonarqube.ws.client.permission.AddProjectCreatorToTemplateWsRequest;
@@ -105,7 +105,7 @@ public class FavoriteTest {
   }
 
   private void addProjectCreatorPermission() {
-    WsPermissions.SearchTemplatesWsResponse permissionTemplates = adminWsClient.permissions().searchTemplates(new SearchTemplatesWsRequest());
+    Permissions.SearchTemplatesWsResponse permissionTemplates = adminWsClient.permissions().searchTemplates(new SearchTemplatesWsRequest());
     assertThat(permissionTemplates.getDefaultTemplatesCount()).isEqualTo(1);
     adminWsClient.permissions().addProjectCreatorToTemplate(AddProjectCreatorToTemplateWsRequest.builder()
       .setTemplateId(permissionTemplates.getDefaultTemplates(0).getTemplateId())
@@ -114,7 +114,7 @@ public class FavoriteTest {
   }
 
   private void removeProjectCreatorPermission() {
-    WsPermissions.SearchTemplatesWsResponse permissionTemplates = adminWsClient.permissions().searchTemplates(new SearchTemplatesWsRequest());
+    Permissions.SearchTemplatesWsResponse permissionTemplates = adminWsClient.permissions().searchTemplates(new SearchTemplatesWsRequest());
     assertThat(permissionTemplates.getDefaultTemplatesCount()).isEqualTo(1);
     adminWsClient.permissions().removeProjectCreatorFromTemplate(RemoveProjectCreatorFromTemplateWsRequest.builder()
       .setTemplateId(permissionTemplates.getDefaultTemplates(0).getTemplateId())
index c5e111470363d4e385b0309cce3bdc58d2505799..980cd9cafae2e87b6ad1f5303dbaac7d548838e8 100644 (file)
@@ -27,7 +27,7 @@ import java.util.Map;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Test;
-import org.sonarqube.ws.WsComponents.Component;
+import org.sonarqube.ws.Components.Component;
 import org.sonarqube.ws.client.component.TreeWsRequest;
 import util.ItUtils;
 
index 615a5a2aeb6fc7f6b8cc8ff85db49085faa38cbc..19dc6faba4ca47118c4ebd8ddbac330a8f6b291f 100644 (file)
@@ -22,11 +22,13 @@ package org.sonarqube.tests.analysis;
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
 import com.sonar.orchestrator.build.SonarScanner;
-import org.sonarqube.tests.Category4Suite;
 import java.util.Map;
-import org.junit.Before;
 import org.junit.ClassRule;
+import org.junit.Rule;
 import org.junit.Test;
+import org.sonarqube.qa.util.Tester;
+import org.sonarqube.tests.Category4Suite;
+import org.sonarqube.ws.client.qualityprofile.AddProjectRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -40,10 +42,10 @@ public class IssueExclusionsTest {
   @ClassRule
   public static Orchestrator orchestrator = Category4Suite.ORCHESTRATOR;
 
-  @Before
-  public void resetData() {
-    orchestrator.resetData();
-  }
+  @Rule
+  public Tester tester = new Tester(orchestrator)
+    // all the tests of Category4Suite must disable organizations
+    .disableOrganizations();
 
   @Test
   public void should_not_exclude_anything() {
@@ -233,9 +235,12 @@ public class IssueExclusionsTest {
 
   protected BuildResult scan(String... properties) {
     ItUtils.restoreProfile(orchestrator, getClass().getResource("/exclusions/IssueExclusionsTest/with-many-rules.xml"));
-    orchestrator.getServer().provisionProject("com.sonarsource.it.samples:multi-modules-exclusions",
-      "Sonar :: Integration Tests :: Multi-modules With Exclusions");
-    orchestrator.getServer().associateProjectToQualityProfile("com.sonarsource.it.samples:multi-modules-exclusions", "xoo", "with-many-rules");
+
+    tester.projects().provision(p -> p
+      .setKey("com.sonarsource.it.samples:multi-modules-exclusions")
+      .setName("Sonar :: Integration Tests :: Multi-modules With Exclusions"));
+    tester.wsClient().qualityProfiles().addProject(AddProjectRequest.builder().setProjectKey("com.sonarsource.it.samples:multi-modules-exclusions")
+      .setLanguage("xoo").setQualityProfile("with-many-rules").build());
 
     SonarScanner scan = SonarScanner.create(ItUtils.projectDir(PROJECT_DIR))
       .setProperty("sonar.cpd.exclusions", "**/*")
index eb14836b2c163e5fff7c3ee7416317649eee8756..574dc29c367f711bff9370bcdcefc3aceac1110c 100644 (file)
@@ -29,7 +29,7 @@ import java.util.Optional;
 import org.junit.After;
 import org.junit.ClassRule;
 import org.junit.Test;
-import org.sonarqube.ws.WsProjectLinks;
+import org.sonarqube.ws.ProjectLinks;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.projectlinks.SearchWsRequest;
 import util.ItUtils;
@@ -75,7 +75,7 @@ public class LinksTest {
 
   private void verifyLinks() {
     WsClient wsClient = ItUtils.newWsClient(orchestrator);
-    List<WsProjectLinks.Link> links = wsClient.projectLinks().search(new SearchWsRequest().setProjectKey(PROJECT_KEY)).getLinksList();
+    List<ProjectLinks.Link> links = wsClient.projectLinks().search(new SearchWsRequest().setProjectKey(PROJECT_KEY)).getLinksList();
     verifyLink(links, "homepage", "http://www.simplesample.org_OVERRIDDEN");
     verifyLink(links, "ci", "http://bamboo.ci.codehaus.org/browse/SIMPLESAMPLE");
     verifyLink(links, "issue", "http://jira.codehaus.org/browse/SIMPLESAMPLE");
@@ -83,8 +83,8 @@ public class LinksTest {
     verifyLink(links, "scm_dev", "scm:git:git@github.com:SonarSource/simplesample.git");
   }
 
-  private void verifyLink(List<WsProjectLinks.Link> links, String expectedType, String expectedUrl) {
-    Optional<WsProjectLinks.Link> link = links.stream()
+  private void verifyLink(List<ProjectLinks.Link> links, String expectedType, String expectedUrl) {
+    Optional<ProjectLinks.Link> link = links.stream()
       .filter(l -> l.getType().equals(expectedType))
       .findFirst();
     assertThat(link).isPresent();
index 79663eec47842a15c1467b4b4881b020d694972d..d0f4eefd4a42d462b502ae6661bdbee988763b03 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsUserTokens;
+import org.sonarqube.ws.UserTokens;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
 import org.sonarqube.ws.client.usertoken.GenerateWsRequest;
@@ -79,7 +79,7 @@ public class PermissionTest {
     createUserWithProvisioningAndScanPermissions();
 
     String tokenName = "For test";
-    WsUserTokens.GenerateWsResponse generateWsResponse = userTokensWsClient.generate(new GenerateWsRequest()
+    UserTokens.GenerateWsResponse generateWsResponse = userTokensWsClient.generate(new GenerateWsRequest()
       .setLogin(A_LOGIN)
       .setName(tokenName));
     SonarScanner sampleProject = SonarScanner.create(projectDir("shared/xoo-sample"));
index cee2d04936e4be36e6cdcd89271b58409cfed4ab..12006e700cec2e4c259cf24b70082c83d2debd44 100644 (file)
@@ -32,6 +32,7 @@ import static util.ItUtils.xooPlugin;
   ExecuteAnalysisPermissionTest.class,
   IssuePermissionTest.class,
   PermissionSearchTest.class,
+  PermissionTemplatePageTest.class,
   ProvisioningPermissionTest.class,
   QualityProfileAdminPermissionTest.class,
   SystemPasscodeTest.class
index 703544e337ff31f58e97dfd1b1d564d7e119644e..f14d2264b71a8bbcb95251885cb83c990ef0e6c2 100644 (file)
@@ -26,9 +26,9 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsPermissions;
-import org.sonarqube.ws.WsPermissions.Permission;
-import org.sonarqube.ws.WsPermissions.SearchTemplatesWsResponse;
+import org.sonarqube.ws.Permissions;
+import org.sonarqube.ws.Permissions.Permission;
+import org.sonarqube.ws.Permissions.SearchTemplatesWsResponse;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.permission.AddGroupToTemplateWsRequest;
 import org.sonarqube.ws.client.permission.AddGroupWsRequest;
@@ -87,17 +87,17 @@ public class PermissionSearchTest {
         .setPermission("admin")
         .setGroupName(GROUP_NAME));
 
-    WsPermissions.WsSearchGlobalPermissionsResponse searchGlobalPermissionsWsResponse = tester.wsClient().permissions().searchGlobalPermissions();
+    Permissions.WsSearchGlobalPermissionsResponse searchGlobalPermissionsWsResponse = tester.wsClient().permissions().searchGlobalPermissions();
     assertThat(searchGlobalPermissionsWsResponse.getPermissionsList().get(0).getKey()).isEqualTo("admin");
     assertThat(searchGlobalPermissionsWsResponse.getPermissionsList().get(0).getUsersCount()).isEqualTo(1);
     // by default, a group has the global admin permission
     assertThat(searchGlobalPermissionsWsResponse.getPermissionsList().get(0).getGroupsCount()).isEqualTo(2);
 
-    WsPermissions.UsersWsResponse users = tester.wsClient().permissions()
+    Permissions.UsersWsResponse users = tester.wsClient().permissions()
       .users(new UsersWsRequest().setPermission("admin"));
     assertThat(users.getUsersList()).extracting("login").contains(LOGIN);
 
-    WsPermissions.WsGroupsResponse groupsResponse = tester.wsClient().permissions()
+    Permissions.WsGroupsResponse groupsResponse = tester.wsClient().permissions()
       .groups(new GroupsWsRequest()
         .setPermission("admin"));
     assertThat(groupsResponse.getGroupsList()).extracting("name").contains(GROUP_NAME);
@@ -105,7 +105,7 @@ public class PermissionSearchTest {
 
   @Test
   public void template_permission_web_services() {
-    WsPermissions.CreateTemplateWsResponse createTemplateWsResponse = tester.wsClient().permissions().createTemplate(
+    Permissions.CreateTemplateWsResponse createTemplateWsResponse = tester.wsClient().permissions().createTemplate(
       new CreateTemplateWsRequest()
         .setName("my-new-template")
         .setDescription("template-used-in-tests"));
diff --git a/tests/src/test/java/org/sonarqube/tests/authorization/PermissionTemplatePageTest.java b/tests/src/test/java/org/sonarqube/tests/authorization/PermissionTemplatePageTest.java
new file mode 100644 (file)
index 0000000..8ef4d43
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * 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.tests.authorization;
+
+import com.sonar.orchestrator.Orchestrator;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.sonarqube.qa.util.Tester;
+import org.sonarqube.qa.util.pageobjects.ProjectsManagementPage;
+import org.sonarqube.ws.Permissions;
+import org.sonarqube.ws.client.permission.AddUserToTemplateWsRequest;
+import org.sonarqube.ws.client.permission.CreateTemplateWsRequest;
+import org.sonarqube.ws.client.permission.UsersWsRequest;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class PermissionTemplatePageTest {
+
+  @ClassRule
+  public static Orchestrator orchestrator = AuthorizationSuite.ORCHESTRATOR;
+
+  @Rule
+  public Tester tester = new Tester(orchestrator)
+    // all the tests of AuthorizationSuite must disable organizations
+    .disableOrganizations();
+
+  @Test
+  public void bulk_apply_permission_template() {
+    String project = tester.projects().provision().getKey();
+    String userLogin = tester.users().generateMemberOfDefaultOrganization().getLogin();
+    String adminLogin = tester.users().generateAdministratorOnDefaultOrganization().getLogin();
+
+    tester.wsClient().permissions().createTemplate(new CreateTemplateWsRequest().setName("foo-template"));
+    tester.wsClient().permissions().addUserToTemplate(
+      new AddUserToTemplateWsRequest()
+        .setPermission("admin")
+        .setTemplateName("foo-template")
+        .setLogin(userLogin));
+
+    ProjectsManagementPage page = tester.openBrowser().logIn().submitCredentials(adminLogin).openProjectsManagement();
+    page.shouldHaveProject(project);
+    page.bulkApplyPermissionTemplate("foo-template");
+    Permissions.UsersWsResponse usersResponse = tester.wsClient().permissions().users(new UsersWsRequest()
+      .setProjectKey(project)
+      .setPermission("admin")
+    );
+    assertThat(usersResponse.getUsersCount()).isEqualTo(1);
+    assertThat(usersResponse.getUsers(0).getLogin()).isEqualTo(userLogin);
+  }
+
+}
index 66b925d4fc4cc4e0a20369bc09896b92ef1684e0..a0d4d4c7860b99cd734e455cc5d6347e5d9e7cc8 100644 (file)
@@ -32,10 +32,10 @@ import org.junit.rules.Timeout;
 import org.sonarqube.tests.Category6Suite;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.WsPermissions;
-import org.sonarqube.ws.WsPermissions.CreateTemplateWsResponse;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsUsers.CreateWsResponse;
+import org.sonarqube.ws.Permissions;
+import org.sonarqube.ws.Permissions.CreateTemplateWsResponse;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Users.CreateWsResponse;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
 import org.sonarqube.ws.client.permission.AddUserToTemplateWsRequest;
@@ -89,7 +89,7 @@ public class PermissionTemplateTest {
     Organization organization = tester.organizations().generate();
     CreateWsResponse.User user = tester.users().generateMember(organization);
     CreateWsResponse.User anotherUser = tester.users().generateMember(organization);
-    WsPermissions.PermissionTemplate template = createTemplate(organization).getPermissionTemplate();
+    Permissions.PermissionTemplate template = createTemplate(organization).getPermissionTemplate();
     tester.wsClient().permissions().addUserToTemplate(new AddUserToTemplateWsRequest()
       .setOrganization(organization.getKey())
       .setTemplateId(template.getId())
@@ -179,7 +179,7 @@ public class PermissionTemplateTest {
   }
 
   private Project createPrivateProject(Organization organization) {
-    return tester.projects().generate(organization, p -> p.setVisibility("private"));
+    return tester.projects().provision(organization, p -> p.setVisibility("private"));
   }
 
   private void assertThatUserHasPermission(CreateWsResponse.User user, Organization organization, Project project) {
@@ -203,8 +203,8 @@ public class PermissionTemplateTest {
       .setOrganization(organization.getKey())
       .setProjectKey(project.getKey())
       .setPermission("user");
-    WsPermissions.UsersWsResponse response = tester.wsClient().permissions().users(request);
-    Optional<WsPermissions.User> found = response.getUsersList().stream()
+    Permissions.UsersWsResponse response = tester.wsClient().permissions().users(request);
+    Optional<Permissions.User> found = response.getUsersList().stream()
       .filter(u -> user.getLogin().equals(u.getLogin()))
       .findFirst();
     return found.isPresent();
index 27c5b610d6e7f5c50420fde3f107f155b2d26f41..3a9da8f55a094bcf087f12ecca22a7d51812ee49 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
 import org.sonarqube.ws.client.permission.AddGroupWsRequest;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
 import org.sonarqube.ws.client.permission.RemoveGroupWsRequest;
index ab19828ace44fa7625520331dc26d616921519df..601e98ceb16d3c0b24dde1f7e4d1bac0fdc7469b 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
 import org.sonarqube.qa.util.LogsTailer;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.ce.ActivityStatusWsRequest;
+import org.sonarqube.ws.client.ce.ActivityStatusRequest;
 import util.ItUtils;
 
 import static com.google.common.base.Preconditions.checkState;
@@ -142,7 +142,7 @@ public class CeShutdownTest {
     }
 
     int countInProgressTasks() {
-      return adminWsClient.ce().activityStatus(ActivityStatusWsRequest.newBuilder().build()).getInProgress();
+      return adminWsClient.ce().activityStatus(new ActivityStatusRequest()).getInProgress();
     }
 
     boolean hasTaskFinishedSuccessfully() throws Exception {
index 64d0625e1922db771d4890af48f1caa33420333b..25090a55defe4e5088e4012ce54ddd0ff041a64c 100644 (file)
@@ -45,10 +45,11 @@ import org.junit.BeforeClass;
 import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.ws.Ce;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.ce.ActivityWsRequest;
+import org.sonarqube.ws.client.ce.ActivityRequest;
 import util.ItUtils;
 
 import static com.google.common.collect.ImmutableSet.copyOf;
@@ -129,7 +130,7 @@ public class CeWorkersTest {
 
     waitForEmptyQueue();
 
-    assertThat(adminWsClient.ce().activity(new ActivityWsRequest()
+    assertThat(adminWsClient.ce().activity(new ActivityRequest()
       .setType("OOM")
       .setStatus(ImmutableList.of("FAILED")))
       .getTasksCount())
@@ -139,7 +140,7 @@ public class CeWorkersTest {
 
     waitForEmptyQueue();
 
-    assertThat(adminWsClient.ce().activity(new ActivityWsRequest()
+    assertThat(adminWsClient.ce().activity(new ActivityRequest()
       .setType("OK")
       .setStatus(ImmutableList.of("SUCCESS")))
       .getTasksCount())
@@ -149,7 +150,7 @@ public class CeWorkersTest {
 
     waitForEmptyQueue();
 
-    assertThat(adminWsClient.ce().activity(new ActivityWsRequest()
+    assertThat(adminWsClient.ce().activity(new ActivityRequest()
       .setType("ISE")
       .setStatus(ImmutableList.of("FAILED")))
       .getTasksCount())
@@ -159,7 +160,7 @@ public class CeWorkersTest {
 
     waitForEmptyQueue();
 
-    assertThat(adminWsClient.ce().activity(new ActivityWsRequest()
+    assertThat(adminWsClient.ce().activity(new ActivityRequest()
       .setType("OK")
       .setStatus(ImmutableList.of("SUCCESS")))
       .getTasksCount())
@@ -174,11 +175,11 @@ public class CeWorkersTest {
 
   @Test
   public void ce_worker_is_resilient_to_OOM_and_RuntimeException_when_starting_or_stopping_analysis_report_container() throws IOException {
-    int initSuccessReportTaskCount = adminWsClient.ce().activity(new ActivityWsRequest()
+    int initSuccessReportTaskCount = adminWsClient.ce().activity(new ActivityRequest()
       .setType("REPORT")
       .setStatus(ImmutableList.of("SUCCESS")))
       .getTasksCount();
-    int initFailedReportTaskCount = adminWsClient.ce().activity(new ActivityWsRequest()
+    int initFailedReportTaskCount = adminWsClient.ce().activity(new ActivityRequest()
       .setType("REPORT")
       .setStatus(ImmutableList.of("FAILED")))
       .getTasksCount();
@@ -219,14 +220,14 @@ public class CeWorkersTest {
     orchestrator.executeBuild(sonarRunner, true);
 
     // failure while starting components does fail the tasks
-    assertThat(adminWsClient.ce().activity(new ActivityWsRequest()
+    assertThat(adminWsClient.ce().activity(new ActivityRequest()
       .setType("REPORT")
       .setStatus(ImmutableList.of("FAILED")))
       .getTasksCount())
         .isEqualTo(initFailedReportTaskCount + 2);
 
     // failure while stopping components does not fail the tasks
-    assertThat(adminWsClient.ce().activity(new ActivityWsRequest()
+    assertThat(adminWsClient.ce().activity(new ActivityRequest()
       .setType("REPORT")
       .setStatus(ImmutableList.of("SUCCESS")))
       .getTasksCount())
@@ -283,7 +284,7 @@ public class CeWorkersTest {
 
   private void verifyAnalysesRunInParallel(MappedByteBuffer mappedByteBuffer, int workerCount) {
     assertThat(adminWsClient.ce().workerCount())
-      .extracting(WsCe.WorkerCountResponse::getValue, WsCe.WorkerCountResponse::getCanSetWorkerCount)
+      .extracting(Ce.WorkerCountResponse::getValue, Ce.WorkerCountResponse::getCanSetWorkerCount)
       .containsOnly(workerCount, true);
 
     blockAnyAnalysisWithFakeGovernancePlugin(mappedByteBuffer);
@@ -296,18 +297,18 @@ public class CeWorkersTest {
       orchestrator.executeBuild(sonarRunner, false);
     }
 
-    List<WsCe.Task> tasksList = waitForWsCallStatus(
+    List<Ce.Task> tasksList = waitForWsCallStatus(
       this::getTasksAllTasks,
       (tasks) -> verifyInProgressTaskCount(tasks, workerCount));
 
     assertThat(tasksList.stream()
       .filter(CeWorkersTest::pending)
-      .map(WsCe.Task::getComponentKey)
+      .map(Ce.Task::getComponentKey)
       .collect(toSet()))
         .isEqualTo(copyOf(projectKeys.subList(workerCount, projectKeys.size())));
     assertThat(tasksList.stream()
       .filter(CeWorkersTest::inProgress)
-      .map(WsCe.Task::getComponentKey)
+      .map(Ce.Task::getComponentKey)
       .collect(toSet()))
         .isEqualTo(copyOf(projectKeys.subList(0, workerCount)));
 
@@ -336,20 +337,20 @@ public class CeWorkersTest {
     }
   }
 
-  private static boolean verifyInProgressTaskCount(List<WsCe.Task> tasksList, int workerCount) {
+  private static boolean verifyInProgressTaskCount(List<Ce.Task> tasksList, int workerCount) {
     return tasksList.stream().filter(CeWorkersTest::inProgress).count() >= workerCount;
   }
 
-  private static boolean pending(WsCe.Task task) {
-    return WsCe.TaskStatus.PENDING == task.getStatus();
+  private static boolean pending(Ce.Task task) {
+    return Ce.TaskStatus.PENDING == task.getStatus();
   }
 
-  private static boolean inProgress(WsCe.Task task) {
-    return WsCe.TaskStatus.IN_PROGRESS == task.getStatus();
+  private static boolean inProgress(Ce.Task task) {
+    return Ce.TaskStatus.IN_PROGRESS == task.getStatus();
   }
 
-  private List<WsCe.Task> getTasksAllTasks(WsClient wsClient) {
-    return wsClient.ce().activity(new ActivityWsRequest()
+  private List<Ce.Task> getTasksAllTasks(WsClient wsClient) {
+    return wsClient.ce().activity(new ActivityRequest()
       .setStatus(ImmutableList.of(STATUS_PENDING, STATUS_IN_PROGRESS)))
       .getTasksList();
   }
@@ -386,7 +387,7 @@ public class CeWorkersTest {
     int tasksCount;
     do {
       Thread.sleep(delay);
-      tasksCount = adminWsClient.ce().activity(new ActivityWsRequest()
+      tasksCount = adminWsClient.ce().activity(new ActivityRequest()
         .setStatus(ImmutableList.of("PENDING", "IN_PROGRESS")))
         .getTasksCount();
       i++;
index e6faf6ec58c960dc6d1c0967f112b2e4ff7ccff5..aeeac87352eafb73b55972adf9216ef7b67d0554 100644 (file)
@@ -22,13 +22,15 @@ package org.sonarqube.tests.ce;
 import com.sonar.orchestrator.Orchestrator;
 import com.sonar.orchestrator.build.BuildResult;
 import com.sonar.orchestrator.build.SonarScanner;
-import org.sonarqube.tests.Category4Suite;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Test;
-import org.sonarqube.ws.WsCe;
+import org.sonarqube.tests.Category4Suite;
+import org.sonarqube.ws.Ce;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.client.WsClient;
-import org.sonarqube.ws.client.ce.ActivityWsRequest;
+import org.sonarqube.ws.client.ce.ActivityRequest;
+import org.sonarqube.ws.client.ce.TaskRequest;
 import util.ItUtils;
 
 import static com.google.common.collect.Lists.newArrayList;
@@ -52,25 +54,25 @@ public class CeWsTest {
 
   @Test
   public void activity() {
-    WsCe.ActivityResponse response = wsClient.ce().activity(new ActivityWsRequest()
+    Ce.ActivityResponse response = wsClient.ce().activity(new ActivityRequest()
       .setStatus(newArrayList("SUCCESS"))
       .setType("REPORT")
-      .setOnlyCurrents(true)
-      .setPage(1)
-      .setPageSize(100));
+      .setOnlyCurrents(String.valueOf(true))
+      .setP(String.valueOf(1))
+      .setPs(String.valueOf(100)));
 
     assertThat(response).isNotNull();
     assertThat(response.getTasksCount()).isGreaterThan(0);
-    WsCe.Task firstTask = response.getTasks(0);
+    Ce.Task firstTask = response.getTasks(0);
     assertThat(firstTask.getId()).isNotEmpty();
   }
 
   @Test
   public void task() {
-    WsCe.TaskResponse taskResponse = wsClient.ce().task(taskUuid);
+    Ce.TaskResponse taskResponse = wsClient.ce().task(new TaskRequest().setId(taskUuid));
 
     assertThat(taskResponse.hasTask()).isTrue();
-    WsCe.Task task = taskResponse.getTask();
+    Ce.Task task = taskResponse.getTask();
     assertThat(task.getId()).isEqualTo(taskUuid);
     assertThat(task.hasErrorMessage()).isFalse();
     assertThat(task.hasHasScannerContext()).isTrue();
@@ -79,7 +81,7 @@ public class CeWsTest {
 
   @Test
   public void task_types() {
-    WsCe.TaskTypesWsResponse response = wsClient.ce().taskTypes();
+    Ce.TaskTypesWsResponse response = wsClient.ce().taskTypes();
 
     assertThat(response).isNotNull();
     assertThat(response.getTaskTypesCount()).isGreaterThan(0);
index 411c753b9bdb591e167303d839b39078fd46c83f..ed6f9c9f82fdafc60cd325d6531eb0eb89ef85b7 100644 (file)
@@ -44,8 +44,8 @@ import org.junit.Test;
 import org.sonarqube.tests.Category6Suite;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsProjects;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Projects;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
@@ -102,12 +102,12 @@ public class ReportFailureNotificationTest {
   @Test
   public void send_notification_on_report_processing_failures_to_global_and_project_subscribers() throws Exception {
     Organizations.Organization organization = tester.organizations().getDefaultOrganization();
-    WsUsers.CreateWsResponse.User user1 = tester.users().generateMember(organization, t -> t.setPassword("user1").setEmail("user1@bar.com"));
-    WsUsers.CreateWsResponse.User user2 = tester.users().generateMember(organization, t -> t.setPassword("user2").setEmail("user2@bar.com"));
-    WsUsers.CreateWsResponse.User user3 = tester.users().generateMember(organization, t -> t.setPassword("user3").setEmail("user3@bar.com"));
-    WsProjects.CreateWsResponse.Project project1 = tester.projects().generate(organization, t -> t.setName("Project1"));
-    WsProjects.CreateWsResponse.Project project2 = tester.projects().generate(organization, t -> t.setName("Project2"));
-    WsProjects.CreateWsResponse.Project project3 = tester.projects().generate(organization, t -> t.setName("Project3"));
+    Users.CreateWsResponse.User user1 = tester.users().generateMember(organization, t -> t.setPassword("user1").setEmail("user1@bar.com"));
+    Users.CreateWsResponse.User user2 = tester.users().generateMember(organization, t -> t.setPassword("user2").setEmail("user2@bar.com"));
+    Users.CreateWsResponse.User user3 = tester.users().generateMember(organization, t -> t.setPassword("user3").setEmail("user3@bar.com"));
+    Projects.CreateWsResponse.Project project1 = tester.projects().provision(organization, t -> t.setName("Project1"));
+    Projects.CreateWsResponse.Project project2 = tester.projects().provision(organization, t -> t.setName("Project2"));
+    Projects.CreateWsResponse.Project project3 = tester.projects().provision(organization, t -> t.setName("Project3"));
     // user 1 is admin of project 1 and will subscribe to global notifications
     tester.wsClient().permissions().addUser(new AddUserWsRequest()
       .setLogin(user1.getLogin())
@@ -177,7 +177,7 @@ public class ReportFailureNotificationTest {
     assertThat(waitForEmails()).isEmpty();
   }
 
-  private static void assertSubjectAndContent(WsProjects.CreateWsResponse.Project project, List<MimeMessage> messages) {
+  private static void assertSubjectAndContent(Projects.CreateWsResponse.Project project, List<MimeMessage> messages) {
     assertThat(messages.stream().map(toSubject()).collect(Collectors.toSet()))
       .containsOnly("[SONARQUBE] " + project.getName() + ": Background task in failure");
     Set<String> content = messages.stream().map(toContent()).collect(Collectors.toSet());
@@ -221,7 +221,7 @@ public class ReportFailureNotificationTest {
     };
   }
 
-  private void subscribeToReportFailures(WsUsers.CreateWsResponse.User user1, String password, @Nullable WsProjects.CreateWsResponse.Project project) {
+  private void subscribeToReportFailures(Users.CreateWsResponse.User user1, String password, @Nullable Projects.CreateWsResponse.Project project) {
     WsClient wsClient = newUserWsClient(orchestrator, user1.getLogin(), password);
     PostRequest request = new PostRequest("api/notifications/add")
       .setParam("type", "CeReportTaskFailure")
@@ -233,7 +233,7 @@ public class ReportFailureNotificationTest {
       .failIfNotSuccessful();
   }
 
-  private void unsubscribeFromReportFailures(WsUsers.CreateWsResponse.User user1, String password, @Nullable WsProjects.CreateWsResponse.Project project) {
+  private void unsubscribeFromReportFailures(Users.CreateWsResponse.User user1, String password, @Nullable Projects.CreateWsResponse.Project project) {
     WsClient wsClient = newUserWsClient(orchestrator, user1.getLogin(), password);
     PostRequest request = new PostRequest("api/notifications/remove")
       .setParam("type", "CeReportTaskFailure")
@@ -245,7 +245,7 @@ public class ReportFailureNotificationTest {
       .failIfNotSuccessful();
   }
 
-  private void executeAnalysis(WsProjects.CreateWsResponse.Project project) {
+  private void executeAnalysis(Projects.CreateWsResponse.Project project) {
     SonarScanner sonarScanner = SonarScanner.create(projectDir("shared/xoo-sample"),
       "sonar.projectKey", project.getKey(),
       "sonar.projectName", project.getName());
index feb667dce6545e7abf6d923e13a26ebd6a5305ab..3d0b3c8ab023bcc0d2a0db321d3f1ee4e0b81c0b 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Common;
-import org.sonarqube.ws.WsBranches;
+import org.sonarqube.ws.ProjectBranches;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
 import util.ItUtils;
@@ -47,10 +47,10 @@ public class BranchTest {
   public void list_branches_contains_main_branch() {
     runProjectAnalysis(orchestrator, "shared/xoo-sample");
 
-    WsBranches.ListWsResponse result = tester.wsClient().projectBranches().list("sample");
+    ProjectBranches.ListWsResponse result = tester.wsClient().projectBranches().list("sample");
 
     assertThat(result.getBranchesList())
-      .extracting(WsBranches.Branch::getName, WsBranches.Branch::getType, WsBranches.Branch::getIsMain)
+      .extracting(ProjectBranches.Branch::getName, ProjectBranches.Branch::getType, ProjectBranches.Branch::getIsMain)
       .containsExactlyInAnyOrder(Tuple.tuple("master", Common.BranchType.LONG, true));
   }
 
index 1f1b33f5ae602d5b794403f35a132e0a29e6071b..ef121b74fc630db0cfc8afed1eeaa86957e39387 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
 
 import static util.ItUtils.projectDir;
 
@@ -39,7 +39,7 @@ public class CodePageTest {
 
   @Test
   public void code_page() {
-    Project project = tester.projects().generate(null);
+    Project project = tester.projects().provision();
     executeAnalysis(project);
 
     tester.openBrowser().openCode(project.getKey())
@@ -64,7 +64,7 @@ public class CodePageTest {
 
   @Test
   public void expand_root_dir() {
-    Project project = tester.projects().generate(null);
+    Project project = tester.projects().provision();
     executeAnalysis(project, "shared/xoo-sample-with-root-dir");
 
     tester.openBrowser().openCode(project.getKey())
index 2e9ccdd7819efc230550d6e03e8ec7939cdc0108..81a621d0e053cdef2b41ac03bebb9602c006cd6e 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsComponents;
+import org.sonarqube.ws.Components;
 import org.sonarqube.ws.client.component.SearchWsRequest;
 import org.sonarqube.ws.client.component.ShowWsRequest;
 
@@ -53,7 +53,7 @@ public class ComponentsWsTest {
 
   @Test
   public void show() {
-    WsComponents.ShowWsResponse response = tester.wsClient().components().show(new ShowWsRequest().setKey(FILE_KEY));
+    Components.ShowWsResponse response = tester.wsClient().components().show(new ShowWsRequest().setKey(FILE_KEY));
 
     assertThat(response).isNotNull();
     assertThat(response.getComponent().getKey()).isEqualTo(FILE_KEY);
@@ -62,7 +62,7 @@ public class ComponentsWsTest {
 
   @Test
   public void search() {
-    WsComponents.SearchWsResponse response = tester.wsClient().components().search(new SearchWsRequest()
+    Components.SearchWsResponse response = tester.wsClient().components().search(new SearchWsRequest()
       .setQualifiers(singletonList("FIL")));
 
     assertThat(response).isNotNull();
index 76b6a277a55c40e5549121e122b5cc57b76fb995..9e8d41bf9a1198b090fbeee225b8ab9f8ed22cad 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Measures;
 
 import static java.lang.Double.parseDouble;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -57,7 +57,7 @@ public class NewDuplicationsTest {
 
   @Test
   public void new_duplications_on_project() throws Exception {
-    Map<String, WsMeasures.Measure> measures = getMeasures("new-duplications");
+    Map<String, Measures.Measure> measures = getMeasures("new-duplications");
     assertThat(parseDouble(measures.get("new_lines").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(83d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_duplicated_lines").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(71d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_duplicated_lines_density").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(85.5d, DEFAULT_OFFSET);
@@ -66,7 +66,7 @@ public class NewDuplicationsTest {
 
   @Test
   public void new_duplications_on_directory() throws Exception {
-    Map<String, WsMeasures.Measure> measures = getMeasures("new-duplications:src/main/xoo/duplicated_lines_with_other_dir1");
+    Map<String, Measures.Measure> measures = getMeasures("new-duplications:src/main/xoo/duplicated_lines_with_other_dir1");
     assertThat(parseDouble(measures.get("new_lines").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(24d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_duplicated_lines").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(24d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_duplicated_lines_density").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(100d, DEFAULT_OFFSET);
@@ -75,14 +75,14 @@ public class NewDuplicationsTest {
 
   @Test
   public void new_duplications_on_file() throws Exception {
-    Map<String, WsMeasures.Measure> measures = getMeasures("new-duplications:src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo");
+    Map<String, Measures.Measure> measures = getMeasures("new-duplications:src/main/xoo/duplicated_lines_within_same_file/DuplicatedLinesInSameFile.xoo");
     assertThat(parseDouble(measures.get("new_lines").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(41d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_duplicated_lines").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(29d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_duplicated_lines_density").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(70.7d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_duplicated_blocks").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(2d, DEFAULT_OFFSET);
   }
 
-  private static Map<String, WsMeasures.Measure> getMeasures(String key) {
+  private static Map<String, Measures.Measure> getMeasures(String key) {
     return getMeasuresWithVariationsByMetricKey(orchestrator, key, "new_lines", "new_duplicated_lines", "new_duplicated_lines_density", "new_duplicated_blocks");
   }
 }
index d3b76382b4f6df1d55e2ec9401f1101a82d38edf..89d0628ca7396801768506fa63d3613056e157bf 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonar.wsclient.issue.Issue;
 import org.sonar.wsclient.issue.IssueQuery;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.user.CreateRequest;
@@ -191,7 +191,7 @@ public class AutoAssignTest extends AbstractIssueTest {
 
   private static void deleteAllUsers() {
     WsClient wsClient = newAdminWsClient(ORCHESTRATOR);
-    WsUsers.SearchWsResponse searchResponse = wsClient.users().search(SearchRequest.builder().build());
+    Users.SearchWsResponse searchResponse = wsClient.users().search(SearchRequest.builder().build());
     searchResponse.getUsersList().forEach(user -> {
       wsClient.wsConnector().call(new PostRequest("api/users/deactivate").setParam("login", user.getLogin()));
     });
index fbeeb637d60d3d5fe1afa564e121168d5a930c46..b5bcef079549b50fbf71271452a9f5ff20872260 100644 (file)
@@ -44,10 +44,10 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Issues.Issue;
 import org.sonarqube.ws.Issues.SearchWsResponse;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsUsers;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Users;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.issue.AssignRequest;
@@ -289,8 +289,8 @@ public class IssueNotificationsTest {
 
   private void createSampleProject(String visibility) {
     // Create project
-    QualityProfiles.CreateWsResponse.QualityProfile profile = tester.qProfiles().createXooProfile(organization);
-    Project project = tester.projects().generate(organization, p -> p.setKey(PROJECT_KEY)
+    Qualityprofiles.CreateWsResponse.QualityProfile profile = tester.qProfiles().createXooProfile(organization);
+    Project project = tester.projects().provision(organization, p -> p.setKey(PROJECT_KEY)
       .setName("Sample")
       .setVisibility(visibility));
     tester.qProfiles()
@@ -387,7 +387,7 @@ public class IssueNotificationsTest {
       }).collect(Collectors.toList());
   }
 
-  private void addNotificationsTo(WsUsers.CreateWsResponse.User user) {
+  private void addNotificationsTo(Users.CreateWsResponse.User user) {
     // Add notifications to the test user
     WsClient wsClient = tester.as(user.getLogin()).wsClient();
     wsClient.wsConnector().call(new PostRequest("api/notifications/add")
index c44fcafaf7336581dd7633321f980de399014767..e802dc945ac734547cff3eb1526a5fdf9ac6deee 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.issue.SearchWsRequest;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
index 7b6c4c79f9f4960c6043db4190adf2944b0efb3a..d9df52024240045524e78f9258cbea9052fd7dbf 100644 (file)
@@ -25,8 +25,8 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Test;
 import org.sonar.wsclient.issue.IssueQuery;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.Measure;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.Measure;
 import util.ItUtils;
 
 import static java.lang.Integer.parseInt;
@@ -111,7 +111,7 @@ public class NewIssuesMeasureTest extends AbstractIssueTest {
     assertThat(ORCHESTRATOR.getServer().wsClient().issueClient().find(IssueQuery.create()).list()).isNotEmpty();
 
     Map<String, Measure> measures = getMeasuresWithVariationsByMetricKey(ORCHESTRATOR, "sample", "new_violations", "violations", "ncloc");
-    assertThat(measures.get("new_violations").getPeriods().getPeriodsValueList()).extracting(WsMeasures.PeriodValue::getValue).containsOnly("17");
+    assertThat(measures.get("new_violations").getPeriods().getPeriodsValueList()).extracting(Measures.PeriodValue::getValue).containsOnly("17");
 
     Measure violations = measures.get("violations");
     assertThat(parseInt(violations.getValue())).isEqualTo(43);
index 8ca101b9feec654b7bb51dcdd83fc9832c6d5f1c..db359df105677d78d0ae006259e7dd5836f91fc1 100644 (file)
@@ -32,7 +32,7 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Issues;
 import org.sonarqube.ws.Issues.Issue;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.issue.AssignRequest;
 import org.sonarqube.ws.client.issue.BulkChangeRequest;
 import org.sonarqube.ws.client.issue.SearchWsRequest;
index 13e7c26f8c3d1bf40da3a1c473f416cbf162b25e..c7feefc3a582cf71bd1e57740e615c99ab193fd9 100644 (file)
@@ -29,7 +29,7 @@ import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.tests.Category6Suite;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import util.issue.IssueRule;
 
 import static util.ItUtils.restoreProfile;
@@ -48,8 +48,8 @@ public class OrganizationIssuesPageTest {
 
   private Organizations.Organization org1;
   private Organizations.Organization org2;
-  private WsUsers.CreateWsResponse.User user1;
-  private WsUsers.CreateWsResponse.User user2;
+  private Users.CreateWsResponse.User user1;
+  private Users.CreateWsResponse.User user2;
 
   @Before
   public void setUp() throws Exception {
@@ -81,7 +81,7 @@ public class OrganizationIssuesPageTest {
   }
 
   private String provisionProject(Organizations.Organization organization) {
-    return tester.projects().generate(organization).getKey();
+    return tester.projects().provision(organization).getKey();
   }
 
   private void analyseProject(String projectKey, String organization) {
index d1acdb6518813cc14f7cecb7ecae5f8c58ee9b97..66245b7259e49647c74bbfe95912c5e0dea61e5d 100644 (file)
@@ -26,8 +26,8 @@ import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Issues;
-import org.sonarqube.ws.WsComponents;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Components;
+import org.sonarqube.ws.Measures;
 import org.sonarqube.ws.client.component.TreeWsRequest;
 import org.sonarqube.ws.client.issue.IssuesService;
 import org.sonarqube.ws.client.issue.SearchWsRequest;
@@ -75,7 +75,7 @@ public class LiteTest {
   @Test
   public void call_components_ws() {
     // files in project
-    WsComponents.TreeWsResponse tree = tester.wsClient().components().tree(new TreeWsRequest()
+    Components.TreeWsResponse tree = tester.wsClient().components().tree(new TreeWsRequest()
       .setBaseComponentKey(PROJECT_KEY)
       .setQualifiers(singletonList("FIL")));
     assertThat(tree.getComponentsCount()).isEqualTo(4);
@@ -89,13 +89,13 @@ public class LiteTest {
   public void call_measures_ws() {
     // project measures
     MeasuresService measuresService = tester.wsClient().measures();
-    WsMeasures.ComponentWsResponse component = measuresService.component(new ComponentWsRequest()
+    Measures.ComponentWsResponse component = measuresService.component(new ComponentWsRequest()
       .setComponentKey(PROJECT_KEY)
       .setMetricKeys(asList("lines", "ncloc", "files")));
     assertThat(component.getComponent().getMeasuresCount()).isEqualTo(3);
 
     // file measures
-    WsMeasures.ComponentTreeWsResponse tree = measuresService.componentTree(new ComponentTreeWsRequest()
+    Measures.ComponentTreeWsResponse tree = measuresService.componentTree(new ComponentTreeWsRequest()
       .setBaseComponentKey(PROJECT_KEY)
       .setQualifiers(singletonList("FIL"))
       .setMetricKeys(asList("lines", "ncloc")));
index e7718f11b36ba1f0fd6cd40c95c5ae5ff9cc54d1..e83ab8f5c8a390307cccc7bc7735810f06ea4fe5 100644 (file)
@@ -27,9 +27,9 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.ComponentTreeWsResponse;
-import org.sonarqube.ws.WsMeasures.ComponentWsResponse;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.ComponentTreeWsResponse;
+import org.sonarqube.ws.Measures.ComponentWsResponse;
 import org.sonarqube.ws.client.measure.ComponentTreeWsRequest;
 import org.sonarqube.ws.client.measure.ComponentWsRequest;
 
@@ -67,7 +67,7 @@ public class MeasuresWsTest {
     assertThat(response).isNotNull();
     assertThat(response.getBaseComponent().getKey()).isEqualTo("sample");
     assertThat(response.getMetrics().getMetricsList()).extracting("key").containsOnly("ncloc");
-    List<WsMeasures.Component> components = response.getComponentsList();
+    List<Measures.Component> components = response.getComponentsList();
     assertThat(components).hasSize(2).extracting("key").containsOnly(DIR_KEY, FILE_KEY);
     assertThat(components.get(0).getMeasuresList().get(0).getValue()).isEqualTo("13");
   }
@@ -142,7 +142,7 @@ public class MeasuresWsTest {
       .setMetricKeys(singletonList("ncloc"))
       .setAdditionalFields(newArrayList("metrics", "periods")));
 
-    WsMeasures.Component component = response.getComponent();
+    Measures.Component component = response.getComponent();
     assertThat(component.getKey()).isEqualTo("sample");
     assertThat(component.getMeasuresList()).isNotEmpty();
     assertThat(response.getMetrics().getMetricsList()).extracting("key").containsOnly("ncloc");
index dede45c53ae40d91a93025f78cc98f16f883531a..b73d878d87fbcbe2d6086ddc43cfa9e5b46d33fb 100644 (file)
@@ -33,8 +33,8 @@ import org.sonarqube.qa.util.Tester;
 
 import static java.lang.Integer.parseInt;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonarqube.ws.WsMeasures.Measure;
-import static org.sonarqube.ws.WsMeasures.PeriodValue;
+import static org.sonarqube.ws.Measures.Measure;
+import static org.sonarqube.ws.Measures.PeriodValue;
 import static util.ItUtils.getLeakPeriodValue;
 import static util.ItUtils.getMeasureWithVariation;
 import static util.ItUtils.projectDir;
index c030f301e0baea8cce30975c4d4a11d3cc489444..93869338c124eeb6c30275516dfd7d4c3c20d7e0 100644 (file)
@@ -30,7 +30,7 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Measures;
 import util.ItUtils;
 
 import static java.lang.Integer.parseInt;
@@ -87,7 +87,7 @@ public class SinceXDaysHistoryTest {
   }
 
   private void checkMeasure(String metric, int variation) {
-    WsMeasures.Measure measure = getMeasureWithVariation(orchestrator, PROJECT, metric);
+    Measures.Measure measure = getMeasureWithVariation(orchestrator, PROJECT, metric);
     assertThat(measure.getPeriods().getPeriodsValueList()).extracting(periodValue -> parseInt(periodValue.getValue())).containsOnly(variation);
   }
 
index 34b9f0dbc1888c3d32c1370dc4e7ffe3bde4bdcc..41ed941920c22d8125bc54cf355cbba82c37d93f 100644 (file)
@@ -29,9 +29,9 @@ import org.junit.ClassRule;
 import org.junit.Test;
 import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsMeasures.Measure;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse;
-import org.sonarqube.ws.WsMeasures.SearchHistoryResponse.HistoryValue;
+import org.sonarqube.ws.Measures.Measure;
+import org.sonarqube.ws.Measures.SearchHistoryResponse;
+import org.sonarqube.ws.Measures.SearchHistoryResponse.HistoryValue;
 import org.sonarqube.ws.client.measure.SearchHistoryRequest;
 import util.ItUtils;
 import util.ItUtils.ComponentNavigation;
index 911305356e265da313fcc768138a876a80bc46e2..33c6de854b8b195e1290a1b7075924eda25fab70 100644 (file)
@@ -30,9 +30,10 @@ import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
+import org.sonarqube.ws.client.ce.TaskRequest;
 import org.sonarqube.ws.client.organization.UpdateProjectVisibilityWsRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
 import org.sonarqube.ws.client.project.UpdateVisibilityRequest;
@@ -40,7 +41,7 @@ import util.ItUtils;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonarqube.ws.WsCe.TaskResponse;
+import static org.sonarqube.ws.Ce.TaskResponse;
 import static util.ItUtils.expectHttpError;
 import static util.ItUtils.newProjectKey;
 import static util.ItUtils.projectDir;
@@ -76,7 +77,7 @@ public class BillingTest {
 
     String taskUuid = executeAnalysis(newProjectKey());
 
-    TaskResponse taskResponse = tester.wsClient().ce().task(taskUuid);
+    TaskResponse taskResponse = tester.wsClient().ce().task(new TaskRequest().setId(taskUuid));
     assertThat(taskResponse.getTask().hasErrorMessage()).isFalse();
   }
 
@@ -86,7 +87,7 @@ public class BillingTest {
 
     String taskUuid = executeAnalysis(newProjectKey());
 
-    TaskResponse taskResponse = tester.wsClient().ce().task(taskUuid);
+    TaskResponse taskResponse = tester.wsClient().ce().task(new TaskRequest().setId(taskUuid));
     assertThat(taskResponse.getTask().hasErrorMessage()).isTrue();
     assertThat(taskResponse.getTask().getErrorMessage()).contains(format("Organization %s cannot perform analysis", organization.getKey()));
   }
@@ -211,7 +212,7 @@ public class BillingTest {
   }
 
   private String createPublicProject() {
-    return tester.projects().generate(organization).getKey();
+    return tester.projects().provision(organization).getKey();
   }
 
   private String executeAnalysis(String projectKey) {
index 7968fe4d50a680717a192de3b71f483da90af087..2b738c24afd227221b70e4cfbc770a4c90a268af 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Test;
 import org.junit.rules.ExpectedException;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.HttpException;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
 
index 36064dd20f34c24aea71bb3b5eeaaebc523a6035..e909fd2d8101471b0b139962fb6b63baf2648100 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.organization.MembersPage;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 
 public class OrganizationMembershipUiTest {
 
index 158516a3ff9581dc99f222efb2e3d92846107a01..fbf6725f48fd70d54edc031318ed86002490cee6 100644 (file)
@@ -27,16 +27,15 @@ import org.junit.After;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
-import org.junit.rules.ExpectedException;
 import org.sonarqube.qa.util.OrganizationTester;
 import org.sonarqube.qa.util.Tester;
+import org.sonarqube.ws.Components;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles;
+import org.sonarqube.ws.Qualityprofiles;
 import org.sonarqube.ws.Rules;
-import org.sonarqube.ws.WsComponents;
-import org.sonarqube.ws.WsUserGroups.Group;
-import org.sonarqube.ws.WsUsers;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.UserGroups.Group;
+import org.sonarqube.ws.Users;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.component.ComponentsService;
 import org.sonarqube.ws.client.organization.CreateWsRequest;
 import org.sonarqube.ws.client.organization.OrganizationService;
@@ -53,28 +52,25 @@ import static util.ItUtils.expectForbiddenError;
 import static util.ItUtils.expectNotFoundError;
 import static util.ItUtils.expectUnauthorizedError;
 import static util.ItUtils.runProjectAnalysis;
-import static util.ItUtils.setServerProperty;
 
 public class OrganizationTest {
 
   private static final String SETTING_ANYONE_CAN_CREATE_ORGANIZATIONS = "sonar.organizations.anyoneCanCreate";
   private static final String DEFAULT_ORGANIZATION_KEY = "default-organization";
   private static final String NAME = "Foo Company";
-  // private static final String KEY = "foo-company";
   private static final String DESCRIPTION = "the description of Foo company";
   private static final String URL = "https://www.foo.fr";
   private static final String AVATAR_URL = "https://www.foo.fr/corporate_logo.png";
 
   @ClassRule
   public static Orchestrator orchestrator = OrganizationSuite.ORCHESTRATOR;
+
   @Rule
   public Tester tester = new Tester(orchestrator);
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
 
   @After
   public void tearDown() {
-    setServerProperty(orchestrator, SETTING_ANYONE_CAN_CREATE_ORGANIZATIONS, null);
+    tester.settings().resetSettings(SETTING_ANYONE_CAN_CREATE_ORGANIZATIONS);
   }
 
   @Test
@@ -272,22 +268,22 @@ public class OrganizationTest {
     Group group = tester.groups().generate(organization);
     tester.groups().addMemberToGroups(organization, user.getLogin(), group.getName());
 
-    List<WsUsers.GroupsWsResponse.Group> memberOfGroups = tester.groups().getGroupsOfUser(organization, user.getLogin());
+    List<Users.GroupsWsResponse.Group> memberOfGroups = tester.groups().getGroupsOfUser(organization, user.getLogin());
 
-    assertThat(memberOfGroups).extracting(WsUsers.GroupsWsResponse.Group::getName)
+    assertThat(memberOfGroups).extracting(Users.GroupsWsResponse.Group::getName)
       .containsExactlyInAnyOrder(group.getName(), "Members");
   }
 
   @Test
   public void anonymous_cannot_create_organizations_even_if_anyone_is_allowed_to() {
-    setServerProperty(orchestrator, SETTING_ANYONE_CAN_CREATE_ORGANIZATIONS, "true");
+    tester.settings().setGlobalSettings(SETTING_ANYONE_CAN_CREATE_ORGANIZATIONS, "true");
 
     expectUnauthorizedError(() -> tester.asAnonymous().organizations().generate());
   }
 
   @Test
   public void logged_in_user_can_create_organizations_if_anyone_is_allowed_to() {
-    setServerProperty(orchestrator, SETTING_ANYONE_CAN_CREATE_ORGANIZATIONS, "true");
+    tester.settings().setGlobalSettings(SETTING_ANYONE_CAN_CREATE_ORGANIZATIONS, "true");
     User user = tester.users().generate();
 
     Organization organization = tester.as(user.getLogin()).organizations().generate();
@@ -302,7 +298,7 @@ public class OrganizationTest {
       .hasSize(1);
   }
 
-  private WsComponents.SearchWsResponse searchSampleProject(String organizationKey, ComponentsService componentsService) {
+  private Components.SearchWsResponse searchSampleProject(String organizationKey, ComponentsService componentsService) {
     return componentsService
       .search(new org.sonarqube.ws.client.component.SearchWsRequest()
         .setOrganization(organizationKey)
@@ -316,7 +312,7 @@ public class OrganizationTest {
   }
 
   private void verifyOrganization(Organization createdOrganization, String name, String description, String url,
-    String avatarUrl) {
+                                  String avatarUrl) {
     SearchWsRequest request = new SearchWsRequest.Builder().setOrganizations(createdOrganization.getKey()).build();
     List<Organization> result = tester.organizations().service().search(request).getOrganizationsList();
     assertThat(result).hasSize(1);
@@ -343,7 +339,7 @@ public class OrganizationTest {
   private void assertThatBuiltInQualityProfilesExist(Organization org) {
     org.sonarqube.ws.client.qualityprofile.SearchWsRequest profilesRequest = new org.sonarqube.ws.client.qualityprofile.SearchWsRequest()
       .setOrganizationKey(org.getKey());
-    QualityProfiles.SearchWsResponse response = tester.wsClient().qualityProfiles().search(profilesRequest);
+    Qualityprofiles.SearchWsResponse response = tester.wsClient().qualityProfiles().search(profilesRequest);
     assertThat(response.getProfilesCount()).isGreaterThan(0);
 
     response.getProfilesList().forEach(p -> {
index 6387a8ee001fdd183cb8f71b066714032c94c2b9..f0722be9f33eb4b9ebdb3b14fc36e127d06e93d5 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Test;
 import org.openqa.selenium.By;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 
 import static com.codeborne.selenide.Condition.text;
 import static com.codeborne.selenide.Selenide.$;
index 5c421aaf580c7d6b6dea4188c8483078b8b0ad68..a31f889a89072995435c0d33f38ae337f810fce1 100644 (file)
@@ -22,18 +22,16 @@ package org.sonarqube.tests.organization;
 
 import com.sonar.orchestrator.Orchestrator;
 import java.util.List;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.organization.SearchWsRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.setServerProperty;
 
 public class PersonalOrganizationTest {
 
@@ -47,21 +45,16 @@ public class PersonalOrganizationTest {
 
   @Before
   public void setUp() {
-    setServerProperty(orchestrator, SETTING_CREATE_PERSONAL_ORG, "true");
-  }
-
-  @After
-  public void tearDown() {
-    setServerProperty(orchestrator, SETTING_CREATE_PERSONAL_ORG, null);
+    tester.settings().setGlobalSettings(SETTING_CREATE_PERSONAL_ORG, "true");
   }
 
   @Test
   public void personal_organizations_are_created_for_new_users() {
-    WsUsers.CreateWsResponse.User user = tester.users().generate();
+    Users.CreateWsResponse.User user = tester.users().generate();
 
     List<Organizations.Organization> existing = tester.wsClient().organizations().search(SearchWsRequest.builder().build()).getOrganizationsList();
     assertThat(existing)
-      .filteredOn(o -> o.getGuarded())
+      .filteredOn(Organizations.Organization::getGuarded)
       .filteredOn(o -> o.getKey().equals(user.getLogin()))
       .hasSize(1)
       .matches(l -> l.get(0).getName().equals(user.getName()));
index 2a7d0d3f8bcf70e0e4a1822b80ece208f1e34d48..18451b1233907f214b2a3f34259e919a13f6358b 100644 (file)
@@ -26,8 +26,8 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.TesterSession;
-import org.sonarqube.ws.WsRoot;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Root;
+import org.sonarqube.ws.Users;
 import util.user.UserRule;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -45,17 +45,17 @@ public class RootUserTest {
   @Test
   public void system_administrator_is_flagged_as_root_when_he_enables_organization_support() {
     assertThat(tester.wsClient().roots().search().getRootsList())
-      .extracting(WsRoot.Root::getLogin)
+      .extracting(Root.RootContent::getLogin)
       .containsExactly(UserRule.ADMIN_LOGIN);
   }
 
   @Test
   public void a_root_can_flag_other_user_as_root() {
-    WsUsers.CreateWsResponse.User user = tester.users().generate();
+    Users.CreateWsResponse.User user = tester.users().generate();
     tester.wsClient().roots().setRoot(user.getLogin());
 
     assertThat(tester.wsClient().roots().search().getRootsList())
-      .extracting(WsRoot.Root::getLogin)
+      .extracting(Root.RootContent::getLogin)
       .containsExactlyInAnyOrder(UserRule.ADMIN_LOGIN, user.getLogin());
   }
 
@@ -66,8 +66,8 @@ public class RootUserTest {
 
   @Test
   public void root_can_be_set_and_unset_via_web_services() {
-    WsUsers.CreateWsResponse.User user1 = tester.users().generate();
-    WsUsers.CreateWsResponse.User user2 = tester.users().generate();
+    Users.CreateWsResponse.User user1 = tester.users().generate();
+    Users.CreateWsResponse.User user2 = tester.users().generate();
     TesterSession user1Session = tester.as(user1.getLogin());
     TesterSession user2Session = tester.as(user2.getLogin());
 
index 67f05db0964831191cec336acd4ec0ad6e01024e..7d3bc262e166097e1a536c89b70b92feea98ca79 100644 (file)
@@ -27,9 +27,7 @@ import java.io.IOException;
 import java.util.Properties;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
-import org.hamcrest.CustomMatcher;
 import org.junit.Rule;
-import org.junit.rules.ErrorCollector;
 import org.junit.rules.TestName;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -46,34 +44,11 @@ public abstract class AbstractPerfTest {
     assertThat(Math.abs(variation)).as(String.format("Expected %d ms, got %d ms", expectedDuration, duration)).isLessThan(ACCEPTED_DURATION_VARIATION_IN_PERCENTS);
   }
 
-  protected void assertDurationAround(ErrorCollector collector, long duration, long expectedDuration) {
-    double variation = 100.0 * (0.0 + duration - expectedDuration) / expectedDuration;
-    System.out.printf("Test %s : executed in %d ms (%.2f %% from target)\n", testName.getMethodName(), duration, variation);
-    collector.checkThat(String.format("Expected %d ms, got %d ms", expectedDuration, duration), Math.abs(variation), new CustomMatcher<Double>("a value less than "
-      + ACCEPTED_DURATION_VARIATION_IN_PERCENTS) {
-      @Override
-      public boolean matches(Object item) {
-        return ((item instanceof Double) && ((Double) item).compareTo(ACCEPTED_DURATION_VARIATION_IN_PERCENTS) < 0);
-      }
-    });
-  }
-
   protected void assertDurationLessThan(long duration, long maxDuration) {
     System.out.printf("Test %s : %d ms (max allowed is %d)\n", testName.getMethodName(), duration, maxDuration);
     assertThat(duration).as(String.format("Expected less than %d ms, got %d ms", maxDuration, duration)).isLessThanOrEqualTo(maxDuration);
   }
 
-  protected void assertDurationLessThan(ErrorCollector collector, long duration, final long maxDuration) {
-    System.out.printf("Test %s : %d ms (max allowed is %d)\n", testName.getMethodName(), duration, maxDuration);
-    collector.checkThat(String.format("Expected less than %d ms, got %d ms", maxDuration, duration), duration, new CustomMatcher<Long>("a value less than "
-      + maxDuration) {
-      @Override
-      public boolean matches(Object item) {
-        return ((item instanceof Long) && ((Long) item).compareTo(maxDuration) < 0);
-      }
-    });
-  }
-
   protected Properties readProfiling(File baseDir, String moduleKey) throws IOException {
     File profilingFile = new File(baseDir, ".sonar/profiling/" + moduleKey + "-profiler.properties");
     Properties props = new Properties();
index 7b12d79bd381096606e9a0b19a5587a8bdba94f4..1887d1aaba931db43f5392e105ad37f7c95f95b7 100644 (file)
 package org.sonarqube.tests.performance;
 
 import com.google.common.base.Joiner;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 import org.hamcrest.CustomMatcher;
 import org.junit.rules.ErrorCollector;
 import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
 public abstract class PerfRule extends ErrorCollector {
 
   private final int runCount;
-  private final List<List<Long>> recordedResults = new ArrayList<List<Long>>();
+  private final List<List<Long>> recordedResults = new ArrayList<>();
 
   private int currentRun;
-  private String testName;
 
   public PerfRule(int runCount) {
     this.runCount = runCount;
@@ -43,12 +41,11 @@ public abstract class PerfRule extends ErrorCollector {
 
   @Override
   public Statement apply(final Statement base, Description description) {
-    this.testName = description.getMethodName();
     return new Statement() {
       @Override
       public void evaluate() throws Throwable {
         for (currentRun = 1; currentRun <= runCount; currentRun++) {
-          recordedResults.add(new ArrayList<Long>());
+          recordedResults.add(new ArrayList<>());
           beforeEachRun();
           base.evaluate();
         }
@@ -66,6 +63,7 @@ public abstract class PerfRule extends ErrorCollector {
       long meanDuration = computeAverageDurationOfCurrentStep();
       double variation = 100.0 * (0.0 + meanDuration - expectedDuration) / expectedDuration;
       checkThat(String.format("Expected %d ms in average, got %d ms [%s]", expectedDuration, meanDuration, Joiner.on(",").join(getAllResultsOfCurrentStep())), Math.abs(variation),
+
         new CustomMatcher<Double>(
           "a value less than "
             + AbstractPerfTest.ACCEPTED_DURATION_VARIATION_IN_PERCENTS) {
@@ -101,21 +99,6 @@ public abstract class PerfRule extends ErrorCollector {
     return recordedResults.get(currentRun - 1);
   }
 
-  public void assertDurationLessThan(long duration, final long maxDuration) {
-    currentResults().add(duration);
-    if (isLastRun()) {
-      long meanDuration = computeAverageDurationOfCurrentStep();
-      checkThat(String.format("Expected less than %d ms in average, got %d ms [%s]", maxDuration, meanDuration, Joiner.on(",").join(getAllResultsOfCurrentStep())), meanDuration,
-        new CustomMatcher<Long>("a value less than "
-          + maxDuration) {
-          @Override
-          public boolean matches(Object item) {
-            return ((item instanceof Long) && ((Long) item).compareTo(maxDuration) < 0);
-          }
-        });
-    }
-  }
-
   private boolean isLastRun() {
     return currentRun == runCount;
   }
index 4729fb331d81a118022be1b36201b5486074f64f..6d18fec7152ab7c596147beaff7b263e5f53db31 100644 (file)
@@ -33,7 +33,7 @@ import org.junit.Test;
 import org.junit.rules.ErrorCollector;
 import org.junit.rules.TemporaryFolder;
 import org.sonarqube.tests.performance.AbstractPerfTest;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Measures;
 import org.sonarqube.ws.client.HttpConnector;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.WsClientFactories;
@@ -85,7 +85,7 @@ public class DuplicationTest extends AbstractPerfTest {
       .setMetricKeys(asList("duplicated_lines", "duplicated_blocks", "duplicated_files", "duplicated_lines_density")))
       .getComponent().getMeasuresList()
       .stream()
-      .collect(Collectors.toMap(WsMeasures.Measure::getMetric, measure -> parseDouble(measure.getValue())));
+      .collect(Collectors.toMap(Measures.Measure::getMetric, measure -> parseDouble(measure.getValue())));
   }
 
   private WsClient newWsClient() {
index a040b04d25df1edaa224a2b8d6bc74d65f6b19e1..770e83b819283997d47bfaa1fc36e24d5c09ba33 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
 
 import static com.codeborne.selenide.Condition.text;
@@ -53,9 +53,9 @@ public class ProjectBulkDeletionPageTest {
    */
   @Test
   public void bulk_deletion_on_selected_projects() throws Exception {
-    Project project1 = tester.projects().generate(null, t -> t.setName("Foo"));
-    Project project2 = tester.projects().generate(null, t -> t.setName("Bar"));
-    Project project3 = tester.projects().generate(null, t -> t.setName("FooQux"));
+    Project project1 = tester.projects().provision(p -> p.setName("Foo"));
+    Project project2 = tester.projects().provision(p -> p.setName("Bar"));
+    Project project3 = tester.projects().provision(p -> p.setName("FooQux"));
 
     tester.openBrowser().logIn().submitCredentials(sysAdminLogin).open("/organizations/default-organization/projects_management");
     $("#projects-management-page").shouldHave(text(project1.getName())).shouldHave(text(project2.getName())).shouldHave(text(project3.getName()));
index 559589ffc5817513d0141741b2475c530e69a208..7036f46a69d9e4e902e79334621c68a40c7e4ee6 100644 (file)
@@ -28,8 +28,8 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsProjects.CreateWsResponse;
-import org.sonarqube.ws.WsProjects.SearchWsResponse.Component;
+import org.sonarqube.ws.Projects.CreateWsResponse;
+import org.sonarqube.ws.Projects.SearchWsResponse.Component;
 import org.sonarqube.ws.client.project.SearchWsRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -46,9 +46,9 @@ public class ProjectBulkDeletionTest {
   @Test
   public void delete_projects() {
     Organizations.Organization organization = tester.organizations().generate();
-    CreateWsResponse.Project firstProvisionedProject = tester.projects().generate(organization, p -> p.setKey("first-provisioned-project"));
-    CreateWsResponse.Project secondProvisionedProject = tester.projects().generate(organization, p -> p.setKey("second-provisioned-project"));
-    CreateWsResponse.Project analyzedProject = tester.projects().generate(organization);
+    CreateWsResponse.Project firstProvisionedProject = tester.projects().provision(organization, p -> p.setKey("first-provisioned-project"));
+    CreateWsResponse.Project secondProvisionedProject = tester.projects().provision(organization, p -> p.setKey("second-provisioned-project"));
+    CreateWsResponse.Project analyzedProject = tester.projects().provision(organization);
 
     analyzeProject(analyzedProject.getKey(), organization.getKey());
 
@@ -66,7 +66,7 @@ public class ProjectBulkDeletionTest {
   @Test
   public void delete_more_than_50_projects_at_the_same_time() {
     Organizations.Organization organization = tester.organizations().generate();
-    IntStream.range(0, 60).forEach(i -> tester.projects().generate(organization));
+    IntStream.range(0, 60).forEach(i -> tester.projects().provision(organization));
     SearchWsRequest request = SearchWsRequest.builder().setOrganization(organization.getKey()).build();
     assertThat(tester.wsClient().projects().search(request).getPaging().getTotal()).isEqualTo(60);
 
index abd50a848cd313c5040eaccebbec9270f5aff51d..6495e14272774482131740ef59e8c34a67391cf7 100644 (file)
@@ -33,10 +33,10 @@ import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsComponents;
-import org.sonarqube.ws.WsProjects;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Components;
+import org.sonarqube.ws.Projects;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.WsResponse;
@@ -78,7 +78,7 @@ public class ProjectDeletionTest {
     ItUtils.expectUnauthorizedError(() -> executeDeleteRequest(tester.asAnonymous().wsClient(), projectKey));
 
     // fail if insufficient privilege
-    WsUsers.CreateWsResponse.User user = tester.users().generate();
+    Users.CreateWsResponse.User user = tester.users().generate();
     ItUtils.expectForbiddenError(() -> executeDeleteRequest(tester.as(user.getLogin()).wsClient(), projectKey));
 
     // succeed to delete if administrator
@@ -193,7 +193,7 @@ public class ProjectDeletionTest {
    * Projects administration page - uses database
    */
   private boolean isInProjectsSearch(Organizations.Organization organization, String name) {
-    WsProjects.SearchWsResponse response = tester.wsClient().projects().search(
+    Projects.SearchWsResponse response = tester.wsClient().projects().search(
       SearchWsRequest.builder().setOrganization(organization.getKey()).setQuery(name).setQualifiers(singletonList("TRK")).build());
     return response.getComponentsCount() > 0;
   }
@@ -202,7 +202,7 @@ public class ProjectDeletionTest {
    * Projects page - api/components/search_projects - uses ES + DB
    */
   private boolean isInComponentSearchProjects(String name) {
-    WsComponents.SearchProjectsWsResponse response = tester.wsClient().components().searchProjects(
+    Components.SearchProjectsWsResponse response = tester.wsClient().components().searchProjects(
       SearchProjectsRequest.builder().setFilter("query=\"" + name + "\"").build());
     return response.getComponentsCount() > 0;
   }
index 69913864a083d611dcd630646886c3208c647439..95f4a73fdbcca073b4c66171ad1ff97988c85e6c 100644 (file)
@@ -32,8 +32,8 @@ import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Common;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.WsComponents.Component;
-import org.sonarqube.ws.WsComponents.SearchProjectsWsResponse;
+import org.sonarqube.ws.Components.Component;
+import org.sonarqube.ws.Components.SearchProjectsWsResponse;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
 import org.sonarqube.ws.client.project.CreateRequest;
 
index 8a2c14f3806b5fd596339463e8388bc3632a9a73..b560d54c68f289b77f601b7b0c003dd5327aa200 100644 (file)
@@ -34,9 +34,9 @@ import org.junit.rules.DisableOnDebug;
 import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
 import org.sonarqube.qa.util.Tester;
+import org.sonarqube.ws.Components;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsComponents;
-import org.sonarqube.ws.WsProjects;
+import org.sonarqube.ws.Projects;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
@@ -71,7 +71,7 @@ public class ProjectKeyUpdateTest {
   public void update_key() {
     analyzeXooSample();
     String newProjectKey = "another_project_key";
-    WsComponents.Component project = tester.wsClient().components().show(new ShowWsRequest().setKey(PROJECT_KEY)).getComponent();
+    Components.Component project = tester.wsClient().components().show(new ShowWsRequest().setKey(PROJECT_KEY)).getComponent();
     assertThat(project.getKey()).isEqualTo(PROJECT_KEY);
 
     tester.wsClient().projects().updateKey(UpdateKeyWsRequest.builder()
@@ -86,10 +86,10 @@ public class ProjectKeyUpdateTest {
   public void bulk_update_key() {
     analyzeXooSample();
     String newProjectKey = "another_project_key";
-    WsComponents.Component project = tester.wsClient().components().show(new ShowWsRequest().setKey(PROJECT_KEY)).getComponent();
+    Components.Component project = tester.wsClient().components().show(new ShowWsRequest().setKey(PROJECT_KEY)).getComponent();
     assertThat(project.getKey()).isEqualTo(PROJECT_KEY);
 
-    WsProjects.BulkUpdateKeyWsResponse result = tester.wsClient().projects().bulkUpdateKey(BulkUpdateKeyWsRequest.builder()
+    Projects.BulkUpdateKeyWsResponse result = tester.wsClient().projects().bulkUpdateKey(BulkUpdateKeyWsRequest.builder()
       .setKey(PROJECT_KEY)
       .setFrom(PROJECT_KEY)
       .setTo(newProjectKey)
@@ -98,14 +98,14 @@ public class ProjectKeyUpdateTest {
     assertThat(tester.wsClient().components().show(new ShowWsRequest().setId(project.getId())).getComponent().getKey()).isEqualTo(newProjectKey);
     assertThat(result.getKeysCount()).isEqualTo(1);
     assertThat(result.getKeys(0))
-      .extracting(WsProjects.BulkUpdateKeyWsResponse.Key::getKey, WsProjects.BulkUpdateKeyWsResponse.Key::getNewKey, WsProjects.BulkUpdateKeyWsResponse.Key::getDuplicate)
+      .extracting(Projects.BulkUpdateKeyWsResponse.Key::getKey, Projects.BulkUpdateKeyWsResponse.Key::getNewKey, Projects.BulkUpdateKeyWsResponse.Key::getDuplicate)
       .containsOnlyOnce(PROJECT_KEY, newProjectKey, false);
   }
 
   @Test
   public void update_key_of_provisioned_project() {
     Organizations.Organization organization = tester.organizations().generate();
-    WsProjects.CreateWsResponse.Project project = createProject(organization, "one", "Foo");
+    Projects.CreateWsResponse.Project project = createProject(organization, "one", "Foo");
 
     updateKey(project, "two");
 
@@ -120,7 +120,7 @@ public class ProjectKeyUpdateTest {
   @Test
   public void recover_indexing_errors_when_updating_key_of_provisioned_project() throws Exception {
     Organizations.Organization organization = tester.organizations().generate();
-    WsProjects.CreateWsResponse.Project project = createProject(organization, "one", "Foo");
+    Projects.CreateWsResponse.Project project = createProject(organization, "one", "Foo");
 
     lockWritesOnProjectIndices();
 
@@ -228,7 +228,7 @@ public class ProjectKeyUpdateTest {
     tester.elasticsearch().unlockWrites("projectmeasures");
   }
 
-  private void updateKey(WsProjects.CreateWsResponse.Project project, String newKey) {
+  private void updateKey(Projects.CreateWsResponse.Project project, String newKey) {
     tester.wsClient().projects().updateKey(UpdateKeyWsRequest.builder().setKey(project.getKey()).setNewKey(newKey).build());
   }
 
@@ -236,7 +236,7 @@ public class ProjectKeyUpdateTest {
     tester.wsClient().projects().updateKey(UpdateKeyWsRequest.builder().setKey(initialKey).setNewKey(newKey).build());
   }
 
-  private WsProjects.CreateWsResponse.Project createProject(Organizations.Organization organization, String key, String name) {
+  private Projects.CreateWsResponse.Project createProject(Organizations.Organization organization, String key, String name) {
     CreateRequest createRequest = CreateRequest.builder().setKey(key).setName(name).setOrganization(organization.getKey()).build();
     return tester.wsClient().projects().create(createRequest).getProject();
   }
@@ -254,7 +254,7 @@ public class ProjectKeyUpdateTest {
    */
   @CheckForNull
   private String keyInComponentSearchProjects(String name) {
-    WsComponents.SearchProjectsWsResponse response = tester.wsClient().components().searchProjects(
+    Components.SearchProjectsWsResponse response = tester.wsClient().components().searchProjects(
       SearchProjectsRequest.builder().setFilter("query=\"" + name + "\"").build());
     if (response.getComponentsCount() > 0) {
       return response.getComponents(0).getKey();
index 4efc15da1440b468827e30d21ee3c8a379e48c56..b980b287381536528647298f630c50c7172bd43f 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.ProjectLinkItem;
 import org.sonarqube.qa.util.pageobjects.ProjectLinksPage;
-import org.sonarqube.ws.WsProjectLinks.CreateWsResponse;
+import org.sonarqube.ws.ProjectLinks.CreateWsResponse;
 import org.sonarqube.ws.client.projectlinks.CreateWsRequest;
 import org.sonarqube.ws.client.projectlinks.DeleteWsRequest;
 
index 9f9b1a8b7a4d37a5e1684db84c76b043dfc7bdb8..de8a6b65abcd8701d556944897d305f8bacd141f 100644 (file)
@@ -30,9 +30,9 @@ import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsComponents;
-import org.sonarqube.ws.WsProjects;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
+import org.sonarqube.ws.Components;
+import org.sonarqube.ws.Projects;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
@@ -100,7 +100,7 @@ public class ProjectProvisioningTest {
    * Projects administration page - uses database
    */
   private boolean isInProjectsSearch(Organizations.Organization organization, String name) {
-    WsProjects.SearchWsResponse response = tester.wsClient().projects().search(
+    Projects.SearchWsResponse response = tester.wsClient().projects().search(
       SearchWsRequest.builder().setOrganization(organization.getKey()).setQuery(name).setQualifiers(singletonList("TRK")).build());
     return response.getComponentsCount() > 0;
   }
@@ -109,7 +109,7 @@ public class ProjectProvisioningTest {
    * Projects page - api/components/search_projects - uses ES + DB
    */
   private boolean isInComponentSearchProjects(String name) {
-    WsComponents.SearchProjectsWsResponse response = tester.wsClient().components().searchProjects(
+    Components.SearchProjectsWsResponse response = tester.wsClient().components().searchProjects(
       SearchProjectsRequest.builder().setFilter("query=\"" + name + "\"").build());
     return response.getComponentsCount() > 0;
   }
index 69cc1a69cfd780daaf8f49a53952c795292149c9..65da3c029818acdebf6f9733a85afa523c2c3af8 100644 (file)
@@ -28,9 +28,9 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsProjects.CreateWsResponse;
-import org.sonarqube.ws.WsProjects.SearchWsResponse;
-import org.sonarqube.ws.WsProjects.SearchWsResponse.Component;
+import org.sonarqube.ws.Projects.CreateWsResponse;
+import org.sonarqube.ws.Projects.SearchWsResponse;
+import org.sonarqube.ws.Projects.SearchWsResponse.Component;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.project.SearchWsRequest;
 
@@ -50,8 +50,8 @@ public class ProjectSearchTest {
   @Test
   public void search_old_projects() {
     Organizations.Organization organization = tester.organizations().generate();
-    CreateWsResponse.Project oldProject = tester.projects().generate(organization);
-    CreateWsResponse.Project recentProject = tester.projects().generate(organization);
+    CreateWsResponse.Project oldProject = tester.projects().provision(organization);
+    CreateWsResponse.Project recentProject = tester.projects().provision(organization);
     Date now = new Date();
     Date oneYearAgo = DateUtils.addDays(now, -365);
     Date moreThanOneYearAgo = DateUtils.addDays(now, -366);
@@ -70,9 +70,9 @@ public class ProjectSearchTest {
   @Test
   public void search_on_key_query_partial_match_case_insensitive() {
     Organizations.Organization organization = tester.organizations().generate();
-    CreateWsResponse.Project lowerCaseProject = tester.projects().generate(organization, p -> p.setKey("project-key"));
-    CreateWsResponse.Project upperCaseProject = tester.projects().generate(organization, p -> p.setKey("PROJECT-KEY"));
-    CreateWsResponse.Project anotherProject = tester.projects().generate(organization, p -> p.setKey("another-project"));
+    CreateWsResponse.Project lowerCaseProject = tester.projects().provision(organization, p -> p.setKey("project-key"));
+    CreateWsResponse.Project upperCaseProject = tester.projects().provision(organization, p -> p.setKey("PROJECT-KEY"));
+    CreateWsResponse.Project anotherProject = tester.projects().provision(organization, p -> p.setKey("another-project"));
 
     analyzeProject(lowerCaseProject.getKey(), organization.getKey());
     analyzeProject(upperCaseProject.getKey(), organization.getKey());
@@ -92,9 +92,9 @@ public class ProjectSearchTest {
   @Test
   public void search_provisioned_projects() {
     Organizations.Organization organization = tester.organizations().generate();
-    CreateWsResponse.Project firstProvisionedProject = tester.projects().generate(organization);
-    CreateWsResponse.Project secondProvisionedProject = tester.projects().generate(organization);
-    CreateWsResponse.Project analyzedProject = tester.projects().generate(organization);
+    CreateWsResponse.Project firstProvisionedProject = tester.projects().provision(organization);
+    CreateWsResponse.Project secondProvisionedProject = tester.projects().provision(organization);
+    CreateWsResponse.Project analyzedProject = tester.projects().provision(organization);
 
     analyzeProject(analyzedProject.getKey(), organization.getKey());
 
diff --git a/tests/src/test/java/org/sonarqube/tests/project/ProjectSettingsTest.java b/tests/src/test/java/org/sonarqube/tests/project/ProjectSettingsTest.java
new file mode 100644 (file)
index 0000000..b655002
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * 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.tests.project;
+
+import com.sonar.orchestrator.Orchestrator;
+import com.sonar.orchestrator.build.SonarScanner;
+import java.io.UnsupportedEncodingException;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.sonarqube.qa.util.Tester;
+import org.sonarqube.qa.util.pageobjects.Navigation;
+import org.sonarqube.qa.util.pageobjects.settings.SettingsPage;
+
+import static com.codeborne.selenide.Selenide.$;
+import static util.ItUtils.projectDir;
+
+public class ProjectSettingsTest {
+
+  @ClassRule
+  public static Orchestrator orchestrator = ProjectSuite.ORCHESTRATOR;
+
+  @Rule
+  public Tester tester = new Tester(orchestrator);
+
+  private String adminUser;
+
+  @Before
+  public void setUp() {
+    adminUser = tester.users().generateAdministratorOnDefaultOrganization().getLogin();
+  }
+
+  @Test
+  public void display_project_settings() {
+    analyzeSample();
+
+    SettingsPage page = tester.openBrowser()
+      .logIn()
+      .submitCredentials(adminUser)
+      .openSettings("sample")
+      .assertMenuContains("Analysis Scope")
+      .assertMenuContains("Category 1")
+      .assertMenuContains("project-only")
+      .assertMenuContains("Xoo")
+      .assertSettingDisplayed("sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay");
+
+    page.openCategory("project-only")
+      .assertSettingDisplayed("prop_only_on_project");
+
+    page.openCategory("General")
+      .assertStringSettingValue("sonar.dbcleaner.daysBeforeDeletingClosedIssues", "30")
+      .assertStringSettingValue("sonar.leak.period", "previous_version")
+      .assertBooleanSettingValue("sonar.dbcleaner.cleanDirectory", true)
+      .setStringValue("sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay", "48")
+      .assertStringSettingValue("sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay", "48");
+  }
+
+  /**
+   * Values set on project level must not appear on global level
+   */
+  @Test
+  public void display_correct_global_setting() {
+    analyzeSample();
+    Navigation nav = tester.openBrowser();
+    SettingsPage page = nav.logIn()
+      .submitCredentials(adminUser)
+      .openSettings("sample")
+      .openCategory("Analysis Scope")
+      .assertSettingDisplayed("sonar.coverage.exclusions")
+      .setStringValue("sonar.coverage.exclusions", "foo")
+      .assertStringSettingValue("sonar.coverage.exclusions", "foo");
+    nav.logOut();
+
+    // login as root
+    tester.wsClient().users().skipOnboardingTutorial();
+    nav.logIn().submitCredentials("admin", "admin");
+    $(".global-navbar-menu ").$(By.linkText("Administration")).click();
+    page
+      .openCategory("Analysis Scope")
+      .assertSettingDisplayed("sonar.coverage.exclusions")
+      .assertStringSettingValue("sonar.coverage.exclusions", "");
+  }
+
+  @Test
+  public void display_module_settings() throws UnsupportedEncodingException {
+    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));
+
+    tester.openBrowser().logIn().submitCredentials(adminUser)
+      .openSettings("com.sonarsource.it.samples:multi-modules-sample:module_a")
+      .assertMenuContains("Analysis Scope")
+      .assertSettingDisplayed("sonar.coverage.exclusions");
+  }
+
+  private void analyzeSample() {
+    SonarScanner scan = SonarScanner.create(projectDir("shared/xoo-sample"))
+      .setProperty("sonar.cpd.exclusions", "**/*");
+    orchestrator.executeBuild(scan);
+  }
+}
index 65121e03c67c23399b372d109c4ffc48b98a3b76..711ace6dd4ea38d259230be5b6eccb80750699f0 100644 (file)
@@ -26,6 +26,7 @@ import org.junit.ClassRule;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
 
+import static util.ItUtils.pluginArtifact;
 import static util.ItUtils.xooPlugin;
 
 @RunWith(Suite.class)
@@ -42,10 +43,11 @@ import static util.ItUtils.xooPlugin;
   ProjectsPageTest.class,
   ProjectProvisioningTest.class,
   ProjectSearchTest.class,
+  ProjectSettingsTest.class,
   ProjectVisibilityPageTest.class
 })
 public class ProjectSuite {
-  public static final int SEARCH_HTTP_PORT = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
+  static final int SEARCH_HTTP_PORT = NetworkUtils.getNextAvailablePort(InetAddress.getLoopbackAddress());
 
   @ClassRule
   public static final Orchestrator ORCHESTRATOR = Orchestrator.builderEnv()
@@ -59,6 +61,9 @@ public class ProjectSuite {
 
     .addPlugin(xooPlugin())
 
+    // for ProjectSettingsTest
+    .addPlugin(pluginArtifact("sonar-subcategories-plugin"))
+
     .build();
 
 }
index 0c2c745f9f68aaebf388ca816b5279403bab63d9..92699c3332ca9d70ae7547834964c08da2e7d04a 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.ProjectsManagementPage;
-import org.sonarqube.ws.WsComponents;
+import org.sonarqube.ws.Components;
 import org.sonarqube.ws.client.component.SearchProjectsRequest;
 import org.sonarqube.ws.client.permission.RemoveGroupWsRequest;
 import org.sonarqube.ws.client.project.UpdateVisibilityRequest;
@@ -84,7 +84,7 @@ public class ProjectVisibilityPageTest {
       .createProject("foo", "foo", visibility)
       .shouldHaveProjectsCount(1);
 
-    WsComponents.SearchProjectsWsResponse response = newAdminWsClient(orchestrator).components().searchProjects(
+    Components.SearchProjectsWsResponse response = newAdminWsClient(orchestrator).components().searchProjects(
       SearchProjectsRequest.builder().build());
     assertThat(response.getComponentsCount()).isEqualTo(1);
     assertThat(response.getComponents(0).getKey()).isEqualTo("foo");
index d0008cc0bd64e94932086c918032dc0fa8f97ffa..a18787080f500ec256684a084953e81ee54191fc 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.qa.util.pageobjects.projects.ProjectsPage;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 
@@ -104,7 +104,7 @@ public class ProjectsPageTest {
     page.shouldHaveTotal(2).shouldDisplayAllProjectsWidthSort("-analysis_date");
 
     // all projects by default for logged in user
-    WsUsers.CreateWsResponse.User administrator = tester.users().generateAdministratorOnDefaultOrganization();
+    Users.CreateWsResponse.User administrator = tester.users().generateAdministratorOnDefaultOrganization();
     page = nav.logIn().submitCredentials(administrator.getLogin()).openProjects();
     page.shouldHaveTotal(2).shouldDisplayAllProjects();
 
@@ -156,7 +156,7 @@ public class ProjectsPageTest {
 
   @Test
   public void should_switch_between_perspectives() {
-    WsUsers.CreateWsResponse.User administrator = tester.users().generateAdministratorOnDefaultOrganization();
+    Users.CreateWsResponse.User administrator = tester.users().generateAdministratorOnDefaultOrganization();
     ProjectsPage page = tester.openBrowser()
       .logIn().submitCredentials(administrator.getLogin())
       .openProjects();
diff --git a/tests/src/test/java/org/sonarqube/tests/projectAdministration/ProjectAdministrationTest.java b/tests/src/test/java/org/sonarqube/tests/projectAdministration/ProjectAdministrationTest.java
deleted file mode 100644 (file)
index 2e2c5a4..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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.tests.projectAdministration;
-
-import com.sonar.orchestrator.Orchestrator;
-import com.sonar.orchestrator.build.SonarScanner;
-import java.io.UnsupportedEncodingException;
-import java.sql.SQLException;
-import javax.annotation.Nullable;
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.openqa.selenium.By;
-import org.sonarqube.qa.util.Tester;
-import org.sonarqube.qa.util.pageobjects.Navigation;
-import org.sonarqube.qa.util.pageobjects.ProjectsManagementPage;
-import org.sonarqube.qa.util.pageobjects.settings.SettingsPage;
-import org.sonarqube.tests.Category1Suite;
-import org.sonarqube.ws.WsPermissions;
-import org.sonarqube.ws.client.permission.AddUserToTemplateWsRequest;
-import org.sonarqube.ws.client.permission.CreateTemplateWsRequest;
-import org.sonarqube.ws.client.permission.UsersWsRequest;
-
-import static com.codeborne.selenide.Selenide.$;
-import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.projectDir;
-
-/**
- * TODO to be split and moved to project package
- */
-public class ProjectAdministrationTest {
-
-  @ClassRule
-  public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR;
-
-  @Rule
-  public ExpectedException expectedException = ExpectedException.none();
-
-  @Rule
-  public Tester tester = new Tester(orchestrator).disableOrganizations();
-
-  private Navigation nav = Navigation.create(orchestrator);
-
-  private String adminUser;
-
-  @Before
-  public void deleteAnalysisData() throws SQLException {
-    orchestrator.resetData();
-    adminUser = tester.users().generateAdministrator().getLogin();
-  }
-
-  @Test
-  public void display_project_settings() throws UnsupportedEncodingException {
-    scanSample(null, null);
-
-    SettingsPage page = nav.logIn().submitCredentials(adminUser).openSettings("sample")
-      .assertMenuContains("Analysis Scope")
-      .assertMenuContains("Category 1")
-      .assertMenuContains("DEV")
-      .assertMenuContains("project-only")
-      .assertMenuContains("Xoo")
-      .assertSettingDisplayed("sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay");
-
-    page.openCategory("project-only")
-      .assertSettingDisplayed("prop_only_on_project");
-
-    page.openCategory("General")
-      .assertStringSettingValue("sonar.dbcleaner.daysBeforeDeletingClosedIssues", "30")
-      .assertStringSettingValue("sonar.leak.period", "previous_version")
-      .assertBooleanSettingValue("sonar.dbcleaner.cleanDirectory", true)
-      .setStringValue("sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay", "48")
-      .assertStringSettingValue("sonar.dbcleaner.hoursBeforeKeepingOnlyOneSnapshotByDay", "48");
-  }
-
-  @Test
-  public void display_correct_global_setting () throws UnsupportedEncodingException {
-    scanSample(null, null);
-    SettingsPage page = nav.logIn().submitCredentials(adminUser).openSettings("sample")
-      .openCategory("Analysis Scope")
-      .assertSettingDisplayed("sonar.coverage.exclusions")
-      .setStringValue("sonar.coverage.exclusions", "foo")
-      .assertStringSettingValue("sonar.coverage.exclusions", "foo");
-
-    $(".global-navbar-menu ").$(By.linkText("Administration")).click();
-    page
-      .openCategory("Analysis Scope")
-      .assertSettingDisplayed("sonar.coverage.exclusions")
-      .assertStringSettingValue("sonar.coverage.exclusions", "");
-  }
-
-  @Test
-  public void display_module_settings() throws UnsupportedEncodingException {
-    orchestrator.executeBuild(SonarScanner.create(projectDir("shared/xoo-multi-modules-sample")));
-
-    nav.logIn().submitCredentials(adminUser)
-      .openSettings("com.sonarsource.it.samples:multi-modules-sample:module_a")
-      .assertMenuContains("Analysis Scope")
-      .assertSettingDisplayed("sonar.coverage.exclusions");
-  }
-
-  @Test
-  public void bulk_apply_permission_template() {
-    String project = tester.projects().generate(null).getKey();
-    String user = tester.users().generate().getLogin();
-    tester.wsClient().permissions().createTemplate(new CreateTemplateWsRequest().setName("foo-template"));
-    tester.wsClient().permissions().addUserToTemplate(
-      new AddUserToTemplateWsRequest()
-        .setPermission("admin")
-        .setTemplateName("foo-template")
-        .setLogin(user));
-    ProjectsManagementPage page = nav.logIn().submitCredentials(adminUser).openProjectsManagement();
-    page.shouldHaveProject(project);
-    page.bulkApplyPermissionTemplate("foo-template");
-    WsPermissions.UsersWsResponse usersResponse = tester.wsClient().permissions().users(new UsersWsRequest()
-      .setProjectKey(project)
-      .setPermission("admin")
-    );
-    assertThat(usersResponse.getUsersCount()).isEqualTo(1);
-    assertThat(usersResponse.getUsers(0).getLogin()).isEqualTo(user);
-  }
-
-  private void scanSample(@Nullable String date, @Nullable String profile) {
-    SonarScanner scan = SonarScanner.create(projectDir("shared/xoo-sample"))
-      .setProperty("sonar.cpd.exclusions", "**/*");
-    if (date != null) {
-      scan.setProperty("sonar.projectDate", date);
-    }
-    if (profile != null) {
-      scan.setProfile(profile);
-    }
-    orchestrator.executeBuild(scan);
-  }
-}
index d67581b28b7b1dce34f98d6f6a19c3daec1cb24f..e4f9bf3fd273001ff9ba17f7c0bb8b866070a5a8 100644 (file)
@@ -33,16 +33,16 @@ import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.MediaTypes;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsCe;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsQualityGates;
-import org.sonarqube.ws.WsQualityGates.CreateWsResponse;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Ce;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Qualitygates;
+import org.sonarqube.ws.Qualitygates.CreateWsResponse;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
-import org.sonarqube.ws.client.qualitygate.CreateConditionRequest;
-import org.sonarqube.ws.client.qualitygate.ProjectStatusWsRequest;
-import org.sonarqube.ws.client.qualitygate.UpdateConditionRequest;
+import org.sonarqube.ws.client.qualitygates.CreateConditionRequest;
+import org.sonarqube.ws.client.qualitygates.ProjectStatusRequest;
+import org.sonarqube.ws.client.qualitygates.UpdateConditionRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static util.ItUtils.getMeasure;
@@ -59,21 +59,20 @@ public class OrganizationQualityGateForSmallChangesetsTest {
   @Test
   public void do_not_fail_quality_gate_with_poor_LEAK_coverage_and_a_max_of_19_lines_of_NEW_code() throws Exception {
     Organizations.Organization organization = tester.organizations().generate();
-    Project project = tester.projects().generate(organization);
+    Project project = tester.projects().provision(organization);
     CreateWsResponse qualityGate = tester.qGates().generate();
     tester.qGates().associateProject(qualityGate, project);
-    WsQualityGates.CreateConditionWsResponse condition = tester.wsClient().qualityGates().createCondition(CreateConditionRequest.builder()
-      .setQualityGateId(qualityGate.getId())
-      .setMetricKey("new_coverage")
-      .setOperator("LT")
+    Qualitygates.CreateConditionWsResponse condition = tester.wsClient().qualityGates().createCondition(new CreateConditionRequest()
+      .setGateId(String.valueOf(qualityGate.getId()))
+      .setMetric("new_coverage")
+      .setOp("LT")
       .setWarning("90")
       .setError("80")
-      .setPeriod(1)
-      .build());
+      .setPeriod("1"));
 
     tester.settings().setProjectSetting(project.getKey(), "sonar.leak.period", "previous_version");
     String password = "password1";
-    WsUsers.CreateWsResponse.User user = tester.users().generateAdministrator(organization, u -> u.setPassword(password));
+    Users.CreateWsResponse.User user = tester.users().generateAdministrator(organization, u -> u.setPassword(password));
 
     // no leak => use usual behaviour
     SonarScanner analysis = SonarScanner
@@ -106,14 +105,13 @@ public class OrganizationQualityGateForSmallChangesetsTest {
     assertIgnoredConditions("qualitygate/small-changesets/v2-1019-lines", true);
 
     // small leak => if coverage is OK anyways, we do not have to ignore anything
-    tester.wsClient().qualityGates().updateCondition(UpdateConditionRequest.builder()
-      .setConditionId(condition.getId())
-      .setMetricKey("new_coverage")
-      .setOperator("LT")
+    tester.wsClient().qualityGates().updateCondition(new UpdateConditionRequest()
+      .setId(String.valueOf(condition.getId()))
+      .setMetric("new_coverage")
+      .setOp("LT")
       .setWarning("10")
       .setError("20")
-      .setPeriod(1)
-      .build());
+      .setPeriod("1"));
     SonarScanner analysis3 = SonarScanner
       .create(projectDir("qualitygate/small-changesets/v2-1019-lines"))
       .setProperty("sonar.projectKey", project.getKey())
@@ -129,14 +127,13 @@ public class OrganizationQualityGateForSmallChangesetsTest {
     assertIgnoredConditions("qualitygate/small-changesets/v2-1019-lines", false);
 
     // big leak => use usual behaviour
-    tester.wsClient().qualityGates().updateCondition(UpdateConditionRequest.builder()
-      .setConditionId(condition.getId())
-      .setMetricKey("new_coverage")
-      .setOperator("LT")
+    tester.wsClient().qualityGates().updateCondition(new UpdateConditionRequest()
+      .setId(String.valueOf(condition.getId()))
+      .setMetric("new_coverage")
+      .setOp("LT")
       .setWarning(null)
       .setError("70")
-      .setPeriod(1)
-      .build());
+      .setPeriod("1"));
     SonarScanner analysis4 = SonarScanner
       .create(projectDir("qualitygate/small-changesets/v2-1020-lines"))
       .setProperty("sonar.projectKey", project.getKey())
@@ -155,7 +152,7 @@ public class OrganizationQualityGateForSmallChangesetsTest {
   private void assertIgnoredConditions(String projectDir, boolean expected) throws IOException {
     String analysisId = getAnalysisId(getTaskIdInLocalReport(projectDir(projectDir)));
     boolean ignoredConditions = tester.wsClient().qualityGates()
-      .projectStatus(new ProjectStatusWsRequest().setAnalysisId(analysisId))
+      .projectStatus(new ProjectStatusRequest().setAnalysisId(analysisId))
       .getProjectStatus()
       .getIgnoredConditions();
     assertThat(ignoredConditions).isEqualTo(expected);
@@ -167,7 +164,7 @@ public class OrganizationQualityGateForSmallChangesetsTest {
       .call(new GetRequest("api/ce/task")
         .setParam("id", taskId)
         .setMediaType(MediaTypes.PROTOBUF));
-    WsCe.TaskResponse activityWsResponse = WsCe.TaskResponse.parseFrom(activity.contentStream());
+    Ce.TaskResponse activityWsResponse = Ce.TaskResponse.parseFrom(activity.contentStream());
     return activityWsResponse.getTask().getAnalysisId();
   }
 
index be243e050bd3a5615d34348d9eef2fe210b2418b..2deaa41a397eaf27708f89854c95b781e1315f0e 100644 (file)
@@ -27,12 +27,12 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsQualityGates.CreateWsResponse;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Qualitygates.CreateWsResponse;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
-import org.sonarqube.ws.client.qualitygate.CreateConditionRequest;
+import org.sonarqube.ws.client.qualitygates.CreateConditionRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -49,20 +49,19 @@ public class OrganizationQualityGateTest {
   @Test
   public void always_display_current_quality_gate_in_effect() throws Exception {
     Organization organization = tester.organizations().generate();
-    Project project = tester.projects().generate(organization);
+    Project project = tester.projects().provision(organization);
     CreateWsResponse qualityGate = tester.qGates().generate();
     tester.qGates().associateProject(qualityGate, project);
-    tester.wsClient().qualityGates().createCondition(CreateConditionRequest.builder()
-      .setQualityGateId(qualityGate.getId())
-      .setMetricKey("new_coverage")
-      .setOperator("LT")
+    tester.wsClient().qualityGates().createCondition(new CreateConditionRequest()
+      .setGateId(String.valueOf(qualityGate.getId()))
+      .setMetric("new_coverage")
+      .setOp("LT")
       .setWarning("90")
       .setError("80")
-      .setPeriod(1)
-      .build());
+      .setPeriod("1"));
     tester.settings().setProjectSetting(project.getKey(), "sonar.leak.period", "previous_version");
     String password = "password1";
-    WsUsers.CreateWsResponse.User user = tester.users().generateAdministrator(organization, u -> u.setPassword(password));
+    Users.CreateWsResponse.User user = tester.users().generateAdministrator(organization, u -> u.setPassword(password));
 
     WsResponse response = tester.wsClient().wsConnector().call(new GetRequest("api/navigation/component").setParam("componentKey", project.getKey()));
     Map currentQualityGate = (Map) ItUtils.jsonToMap(response.content()).get("qualityGate");
@@ -83,14 +82,13 @@ public class OrganizationQualityGateTest {
 
     CreateWsResponse qualityGate2 = tester.qGates().generate();
     tester.qGates().associateProject(qualityGate2, project);
-    tester.wsClient().qualityGates().createCondition(CreateConditionRequest.builder()
-      .setQualityGateId(qualityGate2.getId())
-      .setMetricKey("new_coverage")
-      .setOperator("LT")
+    tester.wsClient().qualityGates().createCondition(new CreateConditionRequest()
+      .setGateId(String.valueOf(qualityGate2.getId()))
+      .setMetric("new_coverage")
+      .setOp("LT")
       .setWarning("90")
       .setError("80")
-      .setPeriod(1)
-      .build());
+      .setPeriod("1"));
 
     WsResponse response3 = tester.wsClient().wsConnector().call(new GetRequest("api/navigation/component").setParam("componentKey", project.getKey()));
     Map currentQualityGate3 = (Map) ItUtils.jsonToMap(response3.content()).get("qualityGate");
index 9bb518dca2084de55222ad12f28e675a726cea56..507410d6b6bca5a6ba993d4a449e52622dcc5001 100644 (file)
@@ -31,7 +31,7 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.ProjectDashboardPage;
 import org.sonarqube.qa.util.pageobjects.QualityGatePage;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import util.issue.IssueRule;
 
 import static com.codeborne.selenide.Selenide.$;
@@ -50,8 +50,8 @@ public class OrganizationQualityGateUiTest {
   public IssueRule issueRule = IssueRule.from(orchestrator);
 
   private Organizations.Organization organization;
-  private WsUsers.CreateWsResponse.User user;
-  private WsUsers.CreateWsResponse.User gateAdmin;
+  private Users.CreateWsResponse.User user;
+  private Users.CreateWsResponse.User gateAdmin;
 
   @Before
   public void setUp() throws Exception {
@@ -98,7 +98,7 @@ public class OrganizationQualityGateUiTest {
 
   @Test
   public void quality_gate_link_on_project_dashboard_should_have_organization_context() {
-    String project = tester.projects().generate(organization).getKey();
+    String project = tester.projects().provision(organization).getKey();
     runProjectAnalysis(orchestrator, "shared/xoo-multi-modules-sample",
       "sonar.projectKey", project,
       "sonar.organization", organization.getKey(),
index d47377fd3c43a7a953953f21a41313a7d0b280f4..474038f74cc71ac5a71dabe092ae1aa46335f4ef 100644 (file)
@@ -36,7 +36,7 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.qa.util.pageobjects.ProjectQualityGatePage;
 import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.qualitygate.SelectWsRequest;
+import org.sonarqube.ws.client.qualitygates.SelectRequest;
 
 public class ProjectQualityGatePageTest {
 
@@ -153,7 +153,7 @@ public class ProjectQualityGatePageTest {
   }
 
   private void associateWithQualityGate(QualityGate qualityGate) {
-    tester.wsClient().qualityGates().associateProject(new SelectWsRequest().setProjectKey("sample").setGateId(qualityGate.id()));
+    tester.wsClient().qualityGates().select(new SelectRequest().setProjectKey("sample").setGateId(String.valueOf(qualityGate.id())));
   }
 
   private QualityGateClient qualityGateClient() {
index 84b31c58e83828dfb8bd19bc1cadfa04e52677c2..e2a64b36ddf718b3a4340c1ea56086a545568977 100644 (file)
@@ -29,15 +29,15 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsQualityGates;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Qualitygates;
 import org.sonarqube.ws.client.PostRequest;
-import org.sonarqube.ws.client.qualitygate.CreateConditionRequest;
+import org.sonarqube.ws.client.qualitygates.CreateConditionRequest;
 import org.subethamail.wiser.Wiser;
 import org.subethamail.wiser.WiserMessage;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.sonarqube.ws.WsMeasures.Measure;
+import static org.sonarqube.ws.Measures.Measure;
 import static util.ItUtils.getMeasure;
 import static util.ItUtils.projectDir;
 
@@ -86,10 +86,10 @@ public class QualityGateNotificationTest {
       .failIfNotSuccessful();
 
     // Create quality gate with conditions on variations
-    WsQualityGates.CreateWsResponse simple = tester.qGates().generate();
+    Qualitygates.CreateWsResponse simple = tester.qGates().generate();
     tester.qGates().service()
-      .createCondition(CreateConditionRequest.builder().setQualityGateId(simple.getId()).setMetricKey("ncloc").setPeriod(1).setOperator("EQ").setWarning("0").build());
-    Project project = tester.projects().generate(null);
+      .createCondition(new CreateConditionRequest().setGateId(String.valueOf(simple.getId())).setMetric("ncloc").setPeriod("1").setOp("EQ").setWarning("0"));
+    Project project = tester.projects().provision();
     tester.qGates().associateProject(simple, project);
 
     SonarScanner analysis = SonarScanner.create(projectDir("qualitygate/xoo-sample")).setProperty("sonar.projectKey", project.getKey());
index da87a001fe3ecd6d599011ef0d050ded8cbf7042..5da686950bfe7bd54fcad007f0b74cc378ef202c 100644 (file)
@@ -24,10 +24,10 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsQualityGates;
-import org.sonarqube.ws.client.qualitygate.CreateConditionRequest;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Qualitygates;
+import org.sonarqube.ws.client.qualitygates.CreateConditionRequest;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -46,15 +46,14 @@ public class QualityGateOnRatingMeasuresTest {
 
   @Test
   public void generate_warning_qgate_on_rating_metric() throws Exception {
-    Project project = tester.projects().generate(null);
-    WsQualityGates.CreateWsResponse qualityGate = tester.qGates().generate();
+    Project project = tester.projects().provision();
+    Qualitygates.CreateWsResponse qualityGate = tester.qGates().generate();
     tester.qGates().associateProject(qualityGate, project);
-    tester.qGates().service().createCondition(CreateConditionRequest.builder()
-      .setQualityGateId(qualityGate.getId())
-      .setMetricKey("security_rating")
-      .setOperator("GT")
-      .setWarning("3")
-      .build());
+    tester.qGates().service().createCondition(new CreateConditionRequest()
+      .setGateId(String.valueOf(qualityGate.getId()))
+      .setMetric("security_rating")
+      .setOp("GT")
+      .setWarning("3"));
     ItUtils.restoreProfile(orchestrator, getClass().getResource("/qualityGate/QualityGateOnRatingMeasuresTest/with-many-rules.xml"));
     orchestrator.getServer().associateProjectToQualityProfile(project.getKey(), "xoo", "with-many-rules");
 
@@ -65,17 +64,16 @@ public class QualityGateOnRatingMeasuresTest {
 
   @Test
   public void generate_error_qgate_on_rating_metric_on_leak_period() throws Exception {
-    Project project = tester.projects().generate(null);
-    WsQualityGates.CreateWsResponse qualityGate = tester.qGates().generate();
+    Project project = tester.projects().provision();
+    Qualitygates.CreateWsResponse qualityGate = tester.qGates().generate();
     tester.qGates().associateProject(qualityGate, project);
     tester.settings().setGlobalSetting("sonar.leak.period", "previous_version");
-    tester.wsClient().qualityGates().createCondition(CreateConditionRequest.builder()
-      .setQualityGateId(qualityGate.getId())
-      .setMetricKey("new_security_rating")
-      .setOperator("GT")
+    tester.wsClient().qualityGates().createCondition(new CreateConditionRequest()
+      .setGateId(String.valueOf(qualityGate.getId()))
+      .setMetric("new_security_rating")
+      .setOp("GT")
       .setError("3")
-      .setPeriod(1)
-      .build());
+      .setPeriod("1"));
 
     // Run first analysis with empty quality gate -> quality gate is green
     orchestrator.getServer().associateProjectToQualityProfile(project.getKey(), "xoo", "empty");
@@ -89,7 +87,7 @@ public class QualityGateOnRatingMeasuresTest {
     assertThat(getGateStatusMeasure(project).getValue()).isEqualTo("ERROR");
   }
 
-  private WsMeasures.Measure getGateStatusMeasure(Project project) {
+  private Measures.Measure getGateStatusMeasure(Project project) {
     return getMeasure(orchestrator, project.getKey(), "alert_status");
   }
 
index a88574e4866da17feb6f3db090b64f8c2b0202e9..f4c931997ed8633227efbac48a160d4e4c12fc8f 100644 (file)
@@ -44,23 +44,24 @@ import org.sonar.wsclient.qualitygate.QualityGate;
 import org.sonar.wsclient.qualitygate.QualityGateClient;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.TesterSession;
+import org.sonarqube.ws.Ce;
 import org.sonarqube.ws.MediaTypes;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.WsCe;
-import org.sonarqube.ws.WsMeasures.Measure;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsQualityGates;
-import org.sonarqube.ws.WsQualityGates.ProjectStatusWsResponse;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Measures.Measure;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Qualitygates;
+import org.sonarqube.ws.Qualitygates.ProjectStatusWsResponse;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
-import org.sonarqube.ws.client.qualitygate.CreateConditionRequest;
-import org.sonarqube.ws.client.qualitygate.ProjectStatusWsRequest;
-import org.sonarqube.ws.client.qualitygate.QualityGatesService;
-import org.sonarqube.ws.client.qualitygate.SelectWsRequest;
-import org.sonarqube.ws.client.qualitygate.UpdateConditionRequest;
+import org.sonarqube.ws.client.qualitygates.CreateConditionRequest;
+import org.sonarqube.ws.client.qualitygates.CreateRequest;
+import org.sonarqube.ws.client.qualitygates.ProjectStatusRequest;
+import org.sonarqube.ws.client.qualitygates.QualitygatesService;
+import org.sonarqube.ws.client.qualitygates.SelectRequest;
+import org.sonarqube.ws.client.qualitygates.UpdateConditionRequest;
 
 import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -246,7 +247,7 @@ public class QualityGateTest {
       String taskId = getTaskIdInLocalReport(projectDir("qualitygate/xoo-sample"));
       String analysisId = getAnalysisId(taskId);
 
-      ProjectStatusWsResponse projectStatusWsResponse = tester.wsClient().qualityGates().projectStatus(new ProjectStatusWsRequest().setAnalysisId(analysisId));
+      ProjectStatusWsResponse projectStatusWsResponse = tester.wsClient().qualityGates().projectStatus(new ProjectStatusRequest().setAnalysisId(analysisId));
       ProjectStatusWsResponse.ProjectStatus projectStatus = projectStatusWsResponse.getProjectStatus();
       assertThat(projectStatus.getStatus()).isEqualTo(ProjectStatusWsResponse.Status.ERROR);
       assertThat(projectStatus.getConditionsCount()).isEqualTo(1);
@@ -261,7 +262,7 @@ public class QualityGateTest {
   @Test
   public void does_not_fail_when_condition_is_on_removed_metric() throws Exception {
     // create project
-    Project project = tester.projects().generate(null);
+    Project project = tester.projects().provision();
     String projectKey = project.getKey();
 
     // create custom metric
@@ -269,7 +270,7 @@ public class QualityGateTest {
     createCustomIntMetric(customMetricKey);
     try {
       // create quality gate
-      WsQualityGates.CreateWsResponse simple = tester.wsClient().qualityGates().create("OnCustomMetric");
+      Qualitygates.CreateWsResponse simple = tester.wsClient().qualityGates().create(new CreateRequest().setName("OnCustomMetric"));
       Long qualityGateId = simple.getId();
       qgClient().createCondition(NewCondition.create(qualityGateId).metricKey(customMetricKey).operator("GT").warningThreshold("40"));
 
@@ -277,7 +278,7 @@ public class QualityGateTest {
       deleteCustomMetric(customMetricKey);
 
       // run analysis
-      tester.wsClient().qualityGates().associateProject(new SelectWsRequest().setProjectKey(projectKey).setGateId(qualityGateId));
+      tester.wsClient().qualityGates().select(new SelectRequest().setProjectKey(projectKey).setGateId(String.valueOf(qualityGateId)));
       BuildResult buildResult = executeAnalysis(projectKey);
 
       // verify quality gate
@@ -292,16 +293,16 @@ public class QualityGateTest {
   public void administrate_quality_gate_with_gateadmin_permission() {
     // user is quality gate admin of default organization
     Organization organization = tester.organizations().getDefaultOrganization();
-    WsUsers.CreateWsResponse.User user = tester.users().generateMember(organization);
+    Users.CreateWsResponse.User user = tester.users().generateMember(organization);
     tester.wsClient().permissions().addUser(new AddUserWsRequest().setLogin(user.getLogin()).setPermission("gateadmin").setOrganization(organization.getKey()));
     TesterSession qGateAdminTester = tester.as(user.getLogin());
-    QualityGatesService qGateService = qGateAdminTester.qGates().service();
+    QualitygatesService qGateService = qGateAdminTester.qGates().service();
     // perform administration operations
-    WsQualityGates.CreateWsResponse qualityGate = qGateAdminTester.qGates().generate();
-    WsQualityGates.CreateConditionWsResponse condition = qGateService.createCondition(CreateConditionRequest.builder()
-      .setQualityGateId(qualityGate.getId()).setMetricKey("coverage").setOperator("LT").setError("90").build());
-    qGateService.updateCondition(UpdateConditionRequest.builder()
-      .setConditionId(condition.getId()).setMetricKey("coverage").setOperator("LT").setError("90").setWarning("80").build());
+    Qualitygates.CreateWsResponse qualityGate = qGateAdminTester.qGates().generate();
+    Qualitygates.CreateConditionWsResponse condition = qGateService.createCondition(new CreateConditionRequest()
+      .setGateId(String.valueOf(qualityGate.getId())).setMetric("coverage").setOp("LT").setError("90"));
+    qGateService.updateCondition(new UpdateConditionRequest()
+      .setId(String.valueOf(condition.getId())).setMetric("coverage").setOp("LT").setError("90").setWarning("80"));
     qGateAdminTester.wsClient().wsConnector().call(new PostRequest("api/qualitygates/set_as_default").setParam("id", qualityGate.getId()));
     qGateAdminTester.wsClient().wsConnector().call(new PostRequest("api/qualitygates/delete_condition").setParam("id", condition.getId()));
     qGateAdminTester.wsClient().wsConnector().call(new PostRequest("api/qualitygates/unset_default").setParam("id", qualityGate.getId()));
@@ -330,7 +331,7 @@ public class QualityGateTest {
       .call(new GetRequest("api/ce/task")
         .setParam("id", taskId)
         .setMediaType(MediaTypes.PROTOBUF));
-    WsCe.TaskResponse activityWsResponse = WsCe.TaskResponse.parseFrom(activity.contentStream());
+    Ce.TaskResponse activityWsResponse = Ce.TaskResponse.parseFrom(activity.contentStream());
     return activityWsResponse.getTask().getAnalysisId();
   }
 
index 9c9dc04617ca0f84c48acdeafa9b9de6f5b95fb1..9d7a4b52765b1e7149db4ab11ddbc4ca8d6c8584 100644 (file)
@@ -34,10 +34,10 @@ import org.openqa.selenium.By;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.qa.util.pageobjects.ProjectActivityPage;
-import org.sonarqube.ws.WsProjects.CreateWsResponse.Project;
-import org.sonarqube.ws.WsQualityGates;
-import org.sonarqube.ws.client.qualitygate.CreateConditionRequest;
-import org.sonarqube.ws.client.qualitygate.UpdateConditionRequest;
+import org.sonarqube.ws.Projects.CreateWsResponse.Project;
+import org.sonarqube.ws.Qualitygates;
+import org.sonarqube.ws.client.qualitygates.CreateConditionRequest;
+import org.sonarqube.ws.client.qualitygates.UpdateConditionRequest;
 
 import static com.codeborne.selenide.Selenide.$;
 import static org.apache.commons.lang.time.DateUtils.addDays;
@@ -65,19 +65,19 @@ public class QualityGateUiTest {
    */
   @Test
   public void display_alerts_correctly_in_history_page() {
-    Project project = tester.projects().generate(null);
-    WsQualityGates.CreateWsResponse qGate = tester.qGates().generate();
+    Project project = tester.projects().provision();
+    Qualitygates.CreateWsResponse qGate = tester.qGates().generate();
     tester.qGates().associateProject(qGate, project);
 
     String firstAnalysisDate = DateFormatUtils.ISO_DATE_FORMAT.format(addDays(new Date(), -2));
     String secondAnalysisDate = DateFormatUtils.ISO_DATE_FORMAT.format(addDays(new Date(), -1));
 
     // with this configuration, project should have an Orange alert
-    WsQualityGates.CreateConditionWsResponse lowThresholds = tester.qGates().service()
-      .createCondition(CreateConditionRequest.builder().setQualityGateId(qGate.getId()).setMetricKey("lines").setOperator("GT").setWarning("5").setError("50").build());
+    Qualitygates.CreateConditionWsResponse lowThresholds = tester.qGates().service()
+      .createCondition(new CreateConditionRequest().setGateId(String.valueOf(qGate.getId())).setMetric("lines").setOp("GT").setWarning("5").setError("50"));
     scanSampleWithDate(project, firstAnalysisDate);
     // with this configuration, project should have a Green alert
-    tester.qGates().service().updateCondition(UpdateConditionRequest.builder().setConditionId(lowThresholds.getId()).setMetricKey("lines").setOperator("GT").setWarning("5000").setError("5000").build());
+    tester.qGates().service().updateCondition(new UpdateConditionRequest().setId(String.valueOf(lowThresholds.getId())).setMetric("lines").setOp("GT").setWarning("5000").setError("5000"));
     scanSampleWithDate(project, secondAnalysisDate);
 
     Navigation nav = Navigation.create(orchestrator);
index 349acb7aa46fb5e42d3616c73449255b013ca6f0..436e13aa976906d60bbb433fe5501754adcdc734 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Measures;
 import util.ItUtils;
 
 import static java.lang.Double.parseDouble;
@@ -83,7 +83,7 @@ public class ReliabilityMeasureTest {
   }
 
   private void assertMeasures(String componentKey, int expectedBugs, int expectedReliabilityRemediationEffort, int expectedReliabilityRating) {
-    Map<String, WsMeasures.Measure> measures = getMeasuresByMetricKey(orchestrator, componentKey, METRICS);
+    Map<String, Measures.Measure> measures = getMeasuresByMetricKey(orchestrator, componentKey, METRICS);
     assertThat(parseDouble(measures.get(BUGS_METRIC).getValue())).isEqualTo(expectedBugs);
     assertThat(parseDouble(measures.get(RELIABILITY_REMEDIATION_EFFORT_METRIC).getValue())).isEqualTo(expectedReliabilityRemediationEffort);
     assertThat(parseDouble(measures.get(RELIABILITY_RATING_METRIC).getValue())).isEqualTo(expectedReliabilityRating);
index f8c2d6cd36701036ab949d3d59606e0b5dfe2543..c3feea005fd4ac70e7835a028953efea00d2982a 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Measures;
 import util.ItUtils;
 
 import static java.lang.Double.parseDouble;
@@ -83,7 +83,7 @@ public class SecurityMeasureTest {
   }
 
   private void assertMeasures(String componentKey, int expectedVulnerabilities, int expectedReliabilityRemediationEffort, int expectedReliabilityRating) {
-    Map<String, WsMeasures.Measure> measures = getMeasuresByMetricKey(orchestrator, componentKey, METRICS);
+    Map<String, Measures.Measure> measures = getMeasuresByMetricKey(orchestrator, componentKey, METRICS);
     assertThat(parseDouble(measures.get(VULNERABILITIES_METRIC).getValue())).isEqualTo(expectedVulnerabilities);
     assertThat(parseDouble(measures.get(SECURITY_REMEDIATION_EFFORT_METRIC).getValue())).isEqualTo(expectedReliabilityRemediationEffort);
     assertThat(parseDouble(measures.get(SECURITY_RATING_METRIC).getValue())).isEqualTo(expectedReliabilityRating);
index 0f71864996ae98eb19f69fc0f488abf8d110869f..efd0562727b2a048af9d45380d22541be02fef6e 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.rules.Timeout;
 import org.sonarqube.tests.Byteman;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations;
-import org.sonarqube.ws.QualityProfiles;
+import org.sonarqube.ws.Qualityprofiles;
 import org.sonarqube.ws.client.rule.SearchWsRequest;
 import util.ItUtils;
 
@@ -78,7 +78,7 @@ public class ActiveRuleEsResilienceTest {
   @Test
   public void activation_and_deactivation_of_rule_is_resilient_to_indexing_errors() throws Exception {
     Organizations.Organization organization = tester.organizations().generate();
-    QualityProfiles.CreateWsResponse.QualityProfile profile = tester.qProfiles().createXooProfile(organization);
+    Qualityprofiles.CreateWsResponse.QualityProfile profile = tester.qProfiles().createXooProfile(organization);
 
     // step 1. activation
     tester.qProfiles().activateRule(profile.getKey(), RULE_ONE_BUG_PER_LINE);
@@ -99,7 +99,7 @@ public class ActiveRuleEsResilienceTest {
     assertThat(searchActiveRules(profile)).isEqualTo(0);
   }
 
-  private long searchActiveRules(QualityProfiles.CreateWsResponse.QualityProfile profile) {
+  private long searchActiveRules(Qualityprofiles.CreateWsResponse.QualityProfile profile) {
     SearchWsRequest request = new SearchWsRequest().setActivation(true).setQProfile(profile.getKey());
     return tester.wsClient().rules().search(request).getRulesCount();
   }
index ffd7d24bac2032be439e0ebd55d7246f7b666841..3922d96b29c29824b0549ae507b0c5f0a78ce761 100644 (file)
@@ -28,7 +28,7 @@ import javax.mail.internet.MimeMessage;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.permission.AddGroupWsRequest;
@@ -75,7 +75,7 @@ public class BuiltInQualityProfilesNotificationTest {
       .build();
     orchestrator.start();
     userRule = UserRule.from(orchestrator);
-    WsUsers.CreateWsResponse.User profileAdmin1 = userRule.generate();
+    Users.CreateWsResponse.User profileAdmin1 = userRule.generate();
     WsClient wsClient = ItUtils.newAdminWsClient(orchestrator);
     wsClient.permissions().addUser(new AddUserWsRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
 
@@ -98,17 +98,17 @@ public class BuiltInQualityProfilesNotificationTest {
     userRule = UserRule.from(orchestrator);
 
     // Create a quality profile administrator (user having direct permission)
-    WsUsers.CreateWsResponse.User profileAdmin1 = userRule.generate();
+    Users.CreateWsResponse.User profileAdmin1 = userRule.generate();
     WsClient wsClient = ItUtils.newAdminWsClient(orchestrator);
     wsClient.permissions().addUser(new AddUserWsRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
     // Create a quality profile administrator (user having permission from a group)
-    WsUsers.CreateWsResponse.User profileAdmin2 = userRule.generate();
+    Users.CreateWsResponse.User profileAdmin2 = userRule.generate();
     String groupName = randomAlphanumeric(20);
     wsClient.wsConnector().call(new PostRequest("api/user_groups/create").setParam("name", groupName)).failIfNotSuccessful();
     wsClient.permissions().addGroup(new AddGroupWsRequest().setPermission("profileadmin").setGroupName(groupName));
     wsClient.wsConnector().call(new PostRequest("api/user_groups/add_user").setParam("name", groupName).setParam("login", profileAdmin2.getLogin())).failIfNotSuccessful();
     // Create a user not being quality profile administrator
-    WsUsers.CreateWsResponse.User noProfileAdmin = userRule.generate();
+    Users.CreateWsResponse.User noProfileAdmin = userRule.generate();
 
     // Create a child profile on the built-in profile => The notification should not take into account updates of this profile
     wsClient.qualityProfiles().create(CreateRequest.builder().setLanguage("foo").setName("child").build());
@@ -154,7 +154,7 @@ public class BuiltInQualityProfilesNotificationTest {
       .build();
     orchestrator.start();
     userRule = UserRule.from(orchestrator);
-    WsUsers.CreateWsResponse.User profileAdmin1 = userRule.generate();
+    Users.CreateWsResponse.User profileAdmin1 = userRule.generate();
     WsClient wsClient = ItUtils.newAdminWsClient(orchestrator);
     wsClient.permissions().addUser(new AddUserWsRequest().setLogin(profileAdmin1.getLogin()).setPermission("profileadmin"));
 
index 7b255b7894029e43ca08d66d39ed31c449707c11..2ace14e222aafac769074e70cd33ca2ed8bbc30a 100644 (file)
@@ -28,11 +28,11 @@ import org.sonarqube.tests.Category6Suite;
 import org.sonarqube.qa.util.TesterSession;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse.QualityProfile;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.qualityprofile.ChangeParentRequest;
 import org.sonarqube.ws.client.qualityprofile.CopyRequest;
 import org.sonarqube.ws.client.qualityprofile.QualityProfilesService;
@@ -112,7 +112,7 @@ public class BuiltInQualityProfilesTest {
     QualityProfile builtInProfile = getProfile(org, p -> p.getIsBuiltIn() && "Basic".equals(p.getName()) && "xoo".equals(p.getLanguage()));
     TesterSession adminSession = tester.as(administrator.getLogin());
 
-    QualityProfiles.CopyWsResponse copyResponse = adminSession.qProfiles().service().copy(new CopyRequest(builtInProfile.getKey(), "My copy"));
+    Qualityprofiles.CopyWsResponse copyResponse = adminSession.qProfiles().service().copy(new CopyRequest(builtInProfile.getKey(), "My copy"));
 
     assertThat(copyResponse.getIsDefault()).isFalse();
     assertThat(copyResponse.getKey()).isNotEmpty().isNotEqualTo(builtInProfile.getKey());
@@ -134,7 +134,7 @@ public class BuiltInQualityProfilesTest {
     QualityProfile builtInProfile = getProfile(org, p -> p.getIsBuiltIn() && "Basic".equals(p.getName()) && "xoo".equals(p.getLanguage()));
     TesterSession adminSession = tester.as(administrator.getLogin());
 
-    QualityProfiles.CopyWsResponse copyResponse = adminSession.qProfiles().service().copy(new CopyRequest(builtInProfile.getKey(), "My copy"));
+    Qualityprofiles.CopyWsResponse copyResponse = adminSession.qProfiles().service().copy(new CopyRequest(builtInProfile.getKey(), "My copy"));
     adminSession.qProfiles().service().changeParent(
       ChangeParentRequest.builder().setParentKey(builtInProfile.getKey()).setProfileKey(copyResponse.getKey()).build());
 
index 849744752619f26e54ff790d6f36a930a6518b98..fe00a8d4472befe2ac125a3708a76383cd443f17 100644 (file)
@@ -32,9 +32,9 @@ import org.sonarqube.qa.util.QProfileTester;
 import org.sonarqube.qa.util.TesterSession;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse.QualityProfile;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse.QualityProfile;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.qualityprofile.AddProjectRequest;
@@ -125,8 +125,8 @@ public class CustomQualityProfilesTest {
     QualityProfile parentProfile = adminSession.createXooProfile(org);
 
     // Copied profile
-    QualityProfiles.SearchWsResponse.QualityProfile builtInProfile = getProfile(org, p -> p.getIsBuiltIn() && "Basic".equals(p.getName()) && "xoo".equals(p.getLanguage()));
-    QualityProfiles.CopyWsResponse copyResponse = adminSession.service().copy(new CopyRequest(builtInProfile.getKey(), "My copy"));
+    Qualityprofiles.SearchWsResponse.QualityProfile builtInProfile = getProfile(org, p -> p.getIsBuiltIn() && "Basic".equals(p.getName()) && "xoo".equals(p.getLanguage()));
+    Qualityprofiles.CopyWsResponse copyResponse = adminSession.service().copy(new CopyRequest(builtInProfile.getKey(), "My copy"));
 
     // Inherited profile from custom
     QualityProfile inheritedProfile1 = adminSession.service().create(
@@ -230,7 +230,7 @@ public class CustomQualityProfilesTest {
     adminSession.qProfiles().service().changeParent(
       ChangeParentRequest.builder().setParentKey(parentProfile.getKey()).setProfileKey(inheritedProfile.getKey()).build());
 
-    QualityProfiles.SearchWsResponse.QualityProfile inheritedQualityPropfile = getProfile(org, p -> p.getKey().equals(inheritedProfile.getKey()));
+    Qualityprofiles.SearchWsResponse.QualityProfile inheritedQualityPropfile = getProfile(org, p -> p.getKey().equals(inheritedProfile.getKey()));
 
     assertThat(inheritedQualityPropfile.getParentKey()).isEqualTo(parentProfile.getKey());
     assertThat(inheritedQualityPropfile.getParentName()).isEqualTo(parentProfile.getName());
@@ -262,7 +262,7 @@ public class CustomQualityProfilesTest {
         .setProjectKey(projectKey)
         .setProjectName(projectName));
 
-    QualityProfiles.SearchWsResponse.QualityProfile defaultProfile = getProfile(org, p -> "xoo".equals(p.getLanguage()) &&
+    Qualityprofiles.SearchWsResponse.QualityProfile defaultProfile = getProfile(org, p -> "xoo".equals(p.getLanguage()) &&
       p.getIsDefault());
     assertThatQualityProfileIsUsedFor(projectKey, defaultProfile.getKey());
 
@@ -318,7 +318,7 @@ public class CustomQualityProfilesTest {
     assertThat(((Map) ((List) components.get("qualityProfiles")).get(0)).get("key")).isEqualTo(qualityProfileKey);
   }
 
-  private QualityProfiles.SearchWsResponse.QualityProfile getProfile(Organization organization, Predicate<QualityProfiles.SearchWsResponse.QualityProfile> filter) {
+  private Qualityprofiles.SearchWsResponse.QualityProfile getProfile(Organization organization, Predicate<Qualityprofiles.SearchWsResponse.QualityProfile> filter) {
     return tester.qProfiles().service().search(new SearchWsRequest()
       .setOrganizationKey(organization.getKey())).getProfilesList()
       .stream()
index cf156acee16d498c16eb173c3d1bab02bbe7405b..48470073a6ba95c50097e6859abe818934032e67 100644 (file)
@@ -32,8 +32,8 @@ import org.sonarqube.qa.util.pageobjects.QualityProfilePage;
 import org.sonarqube.qa.util.pageobjects.RulesPage;
 import org.sonarqube.tests.Category6Suite;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Qualityprofiles;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.qualityprofile.AddProjectRequest;
 import org.sonarqube.ws.client.qualityprofile.ChangeParentRequest;
@@ -151,7 +151,7 @@ public class OrganizationQualityProfilesUiTest {
 
   @Test
   public void testSonarWayComparison() {
-    QualityProfiles.CreateWsResponse.QualityProfile xooProfile = tester.qProfiles().createXooProfile(organization);
+    Qualityprofiles.CreateWsResponse.QualityProfile xooProfile = tester.qProfiles().createXooProfile(organization);
     tester.qProfiles().activateRule(xooProfile, "xoo:OneBugIssuePerLine");
     tester.qProfiles().activateRule(xooProfile, "xoo:OneIssuePerLine");
     Navigation nav = tester.openBrowser();
index 142fd1d2dffc45f2cebc8d5cab91df8537470022..b6e884eaa77826e944563ecd4649afd1d00b2c7b 100644 (file)
@@ -28,12 +28,12 @@ import org.sonarqube.tests.Category6Suite;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Common;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchGroupsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchUsersResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
-import org.sonarqube.ws.WsUserGroups;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchGroupsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchUsersResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.UserGroups;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
 import org.sonarqube.ws.client.qualityprofile.AddGroupRequest;
@@ -47,7 +47,7 @@ import org.sonarqube.ws.client.qualityprofile.ShowRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.tuple;
-import static org.sonarqube.ws.QualityProfiles.SearchGroupsResponse.Group;
+import static org.sonarqube.ws.Qualityprofiles.SearchGroupsResponse.Group;
 
 public class QualityProfilesEditTest {
   private static final String RULE_ONE_BUG_PER_LINE = "xoo:OneBugIssuePerLine";
@@ -132,9 +132,9 @@ public class QualityProfilesEditTest {
   @Test
   public void search_groups_allowed_to_edit_a_profile() {
     Organization organization = tester.organizations().generate();
-    WsUserGroups.Group group1 = tester.groups().generate(organization);
-    WsUserGroups.Group group2 = tester.groups().generate(organization);
-    WsUserGroups.Group group3 = tester.groups().generate(organization);
+    UserGroups.Group group1 = tester.groups().generate(organization);
+    UserGroups.Group group2 = tester.groups().generate(organization);
+    UserGroups.Group group3 = tester.groups().generate(organization);
     CreateWsResponse.QualityProfile xooProfile = tester.qProfiles().createXooProfile(organization);
     addGroupPermission(organization, group1, xooProfile);
     addGroupPermission(organization, group2, xooProfile);
@@ -156,8 +156,8 @@ public class QualityProfilesEditTest {
   @Test
   public void add_and_remove_group() {
     Organization organization = tester.organizations().generate();
-    WsUserGroups.Group group1 = tester.groups().generate(organization);
-    WsUserGroups.Group group2 = tester.groups().generate(organization);
+    UserGroups.Group group1 = tester.groups().generate(organization);
+    UserGroups.Group group2 = tester.groups().generate(organization);
     CreateWsResponse.QualityProfile xooProfile = tester.qProfiles().createXooProfile(organization);
 
     // No group added
@@ -205,7 +205,7 @@ public class QualityProfilesEditTest {
     CreateWsResponse.QualityProfile xooProfile1 = tester.qProfiles().createXooProfile(organization);
     addUserPermission(organization, user, xooProfile1);
     CreateWsResponse.QualityProfile xooProfile2 = tester.qProfiles().createXooProfile(organization);
-    WsUserGroups.Group group = tester.groups().generate(organization);
+    UserGroups.Group group = tester.groups().generate(organization);
     tester.groups().addMemberToGroups(organization, user.getLogin(), group.getName());
     addGroupPermission(organization, group, xooProfile2);
     CreateWsResponse.QualityProfile xooProfile3 = tester.qProfiles().createXooProfile(organization);
@@ -243,7 +243,7 @@ public class QualityProfilesEditTest {
     CreateWsResponse.QualityProfile xooProfile = tester.qProfiles().createXooProfile(org);
     User individualEditor = tester.users().generateMember(org);
     addUserPermission(org, individualEditor, xooProfile);
-    WsUserGroups.Group group = tester.groups().generate(org);
+    UserGroups.Group group = tester.groups().generate(org);
     addGroupPermission(org, group, xooProfile);
     User groupEditor = tester.users().generateMember(org);
     tester.groups().addMemberToGroups(org, groupEditor.getLogin(), group.getName());
@@ -275,7 +275,7 @@ public class QualityProfilesEditTest {
       .build());
   }
 
-  private void addGroupPermission(Organization organization, WsUserGroups.Group group, CreateWsResponse.QualityProfile qProfile) {
+  private void addGroupPermission(Organization organization, UserGroups.Group group, CreateWsResponse.QualityProfile qProfile) {
     tester.qProfiles().service().addGroup(AddGroupRequest.builder()
       .setOrganization(organization.getKey())
       .setQualityProfile(qProfile.getName())
index 4e1215201172eaa4cfd331dd8b19539333df2a41..21b319f6f787ccc4c2e4a951e3c0f7a6ce42b775 100644 (file)
@@ -30,11 +30,11 @@ import org.skyscreamer.jsonassert.JSONCompareMode;
 import org.sonarqube.tests.Category6Suite;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
-import org.sonarqube.ws.QualityProfiles.ShowResponse;
-import org.sonarqube.ws.QualityProfiles.ShowResponse.CompareToSonarWay;
-import org.sonarqube.ws.QualityProfiles.ShowResponse.QualityProfile;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse.CompareToSonarWay;
+import org.sonarqube.ws.Qualityprofiles.ShowResponse.QualityProfile;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsResponse;
index 77aca9652f43a2685d61a63f77e1dc68be00d8eb..33469fb65770346a79749246336d1da9741b0856 100644 (file)
@@ -28,8 +28,8 @@ import org.junit.Test;
 import org.sonarqube.tests.Category6Suite;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.ws.Organizations.Organization;
-import org.sonarqube.ws.QualityProfiles.CreateWsResponse;
-import org.sonarqube.ws.QualityProfiles.SearchWsResponse;
+import org.sonarqube.ws.Qualityprofiles.CreateWsResponse;
+import org.sonarqube.ws.Qualityprofiles.SearchWsResponse;
 import org.sonarqube.ws.Rules;
 import org.sonarqube.ws.client.rule.SearchWsRequest;
 
index 33e61642c799938a814c92a97c1c11e4aca3883b..e1219ae9ee6b312b28403f8a6ddf31ba2335a159 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.rules.DisableOnDebug;
 import org.junit.rules.ExpectedException;
 import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
@@ -75,7 +75,7 @@ public class RestartTest {
 
       createSystemAdministrator("big", "boss");
       ItUtils.newUserWsClient(orchestrator, "big", "boss").system().restart();
-      assertThat(newAdminWsClient(orchestrator).system().status().getStatus()).isEqualTo(WsSystem.Status.RESTARTING);
+      assertThat(newAdminWsClient(orchestrator).system().status().getStatus()).isEqualTo(System.Status.RESTARTING);
 
       // we just wait five seconds, for a lack of a better approach to waiting for the restart process to start in SQ
       Thread.sleep(5000);
index cd4e2c1ac78600daed5f40d5e295f3a89c41e6eb..ac6411408734745ba115942441c64478cd9a312b 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.After;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -77,7 +77,7 @@ public class ServerSystemRestartingOrchestrator {
       .build();
     orchestrator.start();
 
-    assertThat(newAdminWsClient(orchestrator).system().status().getStatus()).isEqualTo(WsSystem.Status.UP);
+    assertThat(newAdminWsClient(orchestrator).system().status().getStatus()).isEqualTo(System.Status.UP);
   }
 
   // SONAR-4748
index 2e70f4e5c18734b77d1fd28bf4e3088c1a96391b..22d69666e24102349dfc6b3e4d695c8e0d30d6b1 100644 (file)
@@ -32,7 +32,7 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.tests.Category4Suite;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
 import util.ItUtils;
 import util.selenium.Selenese;
 
@@ -58,7 +58,7 @@ public class ServerSystemTest {
 
   @Test
   public void get_sonarqube_version() {
-    WsSystem.StatusResponse response = tester.wsClient().system().status();
+    System.StatusResponse response = tester.wsClient().system().status();
 
     String version = response.getVersion();
     if (!startsWithAny(version, new String[]{"6.", "7.", "8."})) {
index 62985921e4a5f191120bf59891aa0cbd919a19bc..5edd77875a1a4d69a8a8425946afdc4b42b8b2d6 100644 (file)
@@ -36,7 +36,7 @@ import org.junit.rules.TemporaryFolder;
 import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
 import org.sonarqube.qa.util.Elasticsearch;
-import org.sonarqube.ws.WsSystem;
+import org.sonarqube.ws.System;
 import org.sonarqube.ws.client.WsClient;
 
 import static com.google.common.base.Preconditions.checkState;
@@ -64,17 +64,17 @@ public class SystemStateTest {
       commander.start(lock);
       commander.waitFor(() -> commander.webLogsContain("ServerStartupLock - Waiting for file to be deleted"));
 
-      commander.verifyStatus(WsSystem.Status.STARTING);
-      commander.verifyHealth(WsSystem.Health.RED, "SonarQube webserver is not up");
+      commander.verifyStatus(System.Status.STARTING);
+      commander.verifyHealth(System.Health.RED, "SonarQube webserver is not up");
 
       lock.unlockWeb();
       // status is UP as soon as web server is up, whatever the status of Compute Engine
-      commander.waitFor(() -> WsSystem.Status.UP == commander.status().orElse(null));
-      commander.verifyHealth(WsSystem.Health.RED, "Compute Engine is not operational");
+      commander.waitFor(() -> System.Status.UP == commander.status().orElse(null));
+      commander.verifyHealth(System.Health.RED, "Compute Engine is not operational");
 
       lock.unlockCe();
-      commander.waitForHealth(WsSystem.Health.GREEN);
-      commander.verifyStatus(WsSystem.Status.UP);
+      commander.waitForHealth(System.Health.GREEN);
+      commander.verifyStatus(System.Status.UP);
     }
   }
 
@@ -82,16 +82,16 @@ public class SystemStateTest {
   public void test_status_and_health_when_ES_becomes_yellow() throws Exception {
     try (Commander commander = new Commander()) {
       commander.start();
-      commander.waitForHealth(WsSystem.Health.GREEN);
+      commander.waitForHealth(System.Health.GREEN);
 
       commander.makeElasticsearchYellow();
-      commander.waitForHealth(WsSystem.Health.YELLOW, "Elasticsearch status is YELLOW");
-      commander.verifyStatus(WsSystem.Status.UP);
+      commander.waitForHealth(System.Health.YELLOW, "Elasticsearch status is YELLOW");
+      commander.verifyStatus(System.Status.UP);
 
       commander.makeElasticsearchGreen();
-      commander.waitForHealth(WsSystem.Health.GREEN);
+      commander.waitForHealth(System.Health.GREEN);
       // status does not change after being UP
-      commander.verifyStatus(WsSystem.Status.UP);
+      commander.verifyStatus(System.Status.UP);
     }
   }
 
@@ -166,7 +166,7 @@ public class SystemStateTest {
       }
     }
 
-    Optional<WsSystem.Status> status() {
+    Optional<System.Status> status() {
       if (orchestrator.getServer() != null) {
         WsClient wsClient = newWsClient(orchestrator);
         try {
@@ -178,16 +178,16 @@ public class SystemStateTest {
       return Optional.empty();
     }
 
-    void verifyStatus(WsSystem.Status expectedStatus) {
+    void verifyStatus(System.Status expectedStatus) {
       assertThat(status()).hasValue(expectedStatus);
     }
 
-    Optional<WsSystem.Health> health() {
-      Optional<WsSystem.HealthResponse> response = healthResponse();
-      return response.map(WsSystem.HealthResponse::getHealth);
+    Optional<System.Health> health() {
+      Optional<System.HealthResponse> response = healthResponse();
+      return response.map(System.HealthResponse::getHealth);
     }
 
-    Optional<WsSystem.HealthResponse> healthResponse() {
+    Optional<System.HealthResponse> healthResponse() {
       if (orchestrator.getServer() != null) {
         WsClient wsClient = newSystemUserWsClient(orchestrator, systemPassCode);
         try {
@@ -199,18 +199,18 @@ public class SystemStateTest {
       return Optional.empty();
     }
 
-    void waitForHealth(WsSystem.Health expectedHealth, String... expectedMessages) {
+    void waitForHealth(System.Health expectedHealth, String... expectedMessages) {
       waitFor(() -> expectedHealth == health().orElse(null));
       verifyHealth(expectedHealth, expectedMessages);
     }
 
-    void verifyHealth(WsSystem.Health expectedHealth, String... expectedMessages) {
-      WsSystem.HealthResponse response = healthResponse().get();
+    void verifyHealth(System.Health expectedHealth, String... expectedMessages) {
+      System.HealthResponse response = healthResponse().get();
       assertThat(response.getHealth())
         .describedAs("Expected status %s in response %s", expectedHealth, response)
         .isEqualTo(expectedHealth);
       assertThat(response.getCausesList())
-        .extracting(WsSystem.Cause::getMessage)
+        .extracting(System.Cause::getMessage)
         .describedAs("Expected causes %s in response %s", Arrays.asList(expectedMessages), response)
         .containsExactlyInAnyOrder(expectedMessages);
     }
index 4a0bd037333dcfc1a77b0a686008cd43c2e686ca..0448d8bac8821eb1079e507f280e04299c051d37 100644 (file)
@@ -22,6 +22,7 @@ package org.sonarqube.tests.settings;
 import com.google.common.base.Throwables;
 import com.google.gson.Gson;
 import com.sonar.orchestrator.Orchestrator;
+import org.junit.rules.RuleChain;
 import org.sonarqube.tests.Category1Suite;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
@@ -69,8 +70,10 @@ public class DeprecatedPropertiesWsTest {
   @ClassRule
   public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR;
 
+  private static UserRule userRule = UserRule.from(orchestrator);
+
   @ClassRule
-  public static UserRule userRule = UserRule.from(orchestrator);
+  public static RuleChain ruleChain = RuleChain.outerRule(orchestrator).around(userRule);
 
   static WsClient adminWsClient;
   static WsClient userWsClient;
index de7d213db2b74a49e306f71fbbb237dd34f12ac9..df5b3fe02d7966c7fb28b1825b54d56eed88404a 100644 (file)
@@ -21,6 +21,7 @@ package org.sonarqube.tests.settings;
 
 import com.google.common.collect.ImmutableMap;
 import com.sonar.orchestrator.Orchestrator;
+import org.junit.rules.RuleChain;
 import org.sonarqube.tests.Category1Suite;
 import java.io.IOException;
 import java.util.List;
@@ -62,8 +63,10 @@ public class SettingsTest {
   @ClassRule
   public static Orchestrator orchestrator = Category1Suite.ORCHESTRATOR;
 
+  private static UserRule userRule = UserRule.from(orchestrator);
+
   @ClassRule
-  public static UserRule userRule = UserRule.from(orchestrator);
+  public static RuleChain ruleChain = RuleChain.outerRule(orchestrator).around(userRule);
 
   private static WsClient adminWsClient;
   private static SettingsService anonymousSettingsService;
index 1e95f664ec3fbc4fa5b7a0c4eb0050d357f4af6f..8032a439d3b51c257d9ae0ef5e927abf4cde5548 100644 (file)
@@ -35,7 +35,7 @@ import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
 import org.sonarqube.qa.util.LogsTailer;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.user.SearchRequest;
 
 import static org.assertj.core.api.Assertions.assertThat;
@@ -65,7 +65,7 @@ public class StartupIndexationTest {
       sonarQube.resume();
       sonarQubeIsUpWatcher.waitForLog(20, TimeUnit.SECONDS);
       SearchRequest searchRequest = SearchRequest.builder().setQuery("admin").build();
-      WsUsers.SearchWsResponse searchWsResponse = sonarQube.tester.wsClient().users().search(searchRequest);
+      Users.SearchWsResponse searchWsResponse = sonarQube.tester.wsClient().users().search(searchRequest);
       assertThat(searchWsResponse.getUsersCount()).isEqualTo(1);
       assertThat(searchWsResponse.getUsers(0).getName()).isEqualTo("Administrator");
     }
index 670d54404795692e4325236d42111c4b22fc8a5a..3c77acc05817b9f3cd1ff9175d08a505b83042a4 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsMeasures;
+import org.sonarqube.ws.Measures;
 
 import static java.lang.Double.parseDouble;
 import static org.assertj.core.api.Assertions.assertThat;
@@ -54,7 +54,7 @@ public class NewCoverageTest {
     orchestrator.executeBuilds(SonarScanner.create(projectDir("testing/xoo-sample-new-coverage-v2"))
       .setProperty("sonar.scm.disabled", "false"));
 
-    Map<String, WsMeasures.Measure> measures = getMeasuresWithVariationsByMetricKey(orchestrator, PROJECT_KEY, ALL_NEW_COVERAGE_METRICS);
+    Map<String, Measures.Measure> measures = getMeasuresWithVariationsByMetricKey(orchestrator, PROJECT_KEY, ALL_NEW_COVERAGE_METRICS);
     assertThat(parseDouble(measures.get("new_coverage").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(66.6d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_line_coverage").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(100d, DEFAULT_OFFSET);
     assertThat(parseDouble(measures.get("new_branch_coverage").getPeriods().getPeriodsValue(0).getValue())).isEqualTo(42.8, DEFAULT_OFFSET);
index 4a8bbfe31da5f42278a465cccdd6a4ccf8b63129..8e6f6cba8215d31fed7135e1d0deb162a872d265 100644 (file)
@@ -26,8 +26,8 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.openqa.selenium.By;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsProjects;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Projects;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.project.CreateRequest;
 import util.ItUtils;
 import util.selenium.Selenese;
@@ -78,7 +78,7 @@ public class UiExtensionsTest {
 
   @Test
   public void test_project_page() {
-    WsProjects.CreateWsResponse.Project project = createSampleProject();
+    Projects.CreateWsResponse.Project project = createSampleProject();
 
     tester.openBrowser().open("/dashboard?id=" + project.getKey());
 
@@ -91,7 +91,7 @@ public class UiExtensionsTest {
 
   @Test
   public void test_project_administration_page() {
-    WsProjects.CreateWsResponse.Project project = createSampleProject();
+    Projects.CreateWsResponse.Project project = createSampleProject();
     User administrator = tester.users().generateAdministrator();
 
     tester.openBrowser()
@@ -105,7 +105,7 @@ public class UiExtensionsTest {
     $("body").shouldHave(text("uiextensionsplugin/project_admin_page"));
   }
 
-  private WsProjects.CreateWsResponse.Project createSampleProject() {
+  private Projects.CreateWsResponse.Project createSampleProject() {
     String projectKey = ItUtils.newProjectKey();
     return tester.wsClient().projects().create(CreateRequest.builder()
       .setKey(projectKey)
index d7562caa96068fe259c09dcd688fc55df7468d52..76f2e28431cdf887c17985e3916441c23a4d011f 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.commons.io.IOUtils;
 import org.junit.After;
 import org.junit.Test;
 import org.sonarqube.qa.util.SelenideConfig;
-import org.sonarqube.ws.WsMeasures.Measure;
+import org.sonarqube.ws.Measures.Measure;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.HttpConnector;
 import org.sonarqube.ws.client.WsClient;
index bcd7384dfaeda1020774586dd32f3e473fb407d8..db5b754b00043c07f8dbc787d9b151fa1e11f188 100644 (file)
 package org.sonarqube.tests.user;
 
 import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
 import com.sonar.orchestrator.Orchestrator;
 import java.io.File;
+import java.util.Optional;
 import org.apache.commons.io.FileUtils;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.ClassRule;
 import org.junit.Test;
+import org.junit.rules.RuleChain;
 import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.tests.Category4Suite;
 import org.sonarqube.ws.client.GetRequest;
@@ -38,7 +39,6 @@ import util.user.UserRule;
 import util.user.Users;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.guava.api.Assertions.assertThat;
 import static util.ItUtils.newAdminWsClient;
 import static util.ItUtils.resetSettings;
 import static util.ItUtils.setServerProperty;
@@ -53,8 +53,10 @@ public class BaseIdentityProviderTest {
   @ClassRule
   public static Orchestrator ORCHESTRATOR = Category4Suite.ORCHESTRATOR;
 
+  private static UserRule userRule = UserRule.from(ORCHESTRATOR);
+
   @ClassRule
-  public static UserRule userRule = UserRule.from(ORCHESTRATOR);
+  public static RuleChain ruleChain = RuleChain.outerRule(ORCHESTRATOR).around(userRule);
 
   static String FAKE_PROVIDER_KEY = "fake-base-id-provider";
 
index d09aa11028838b99e4fd0d3035367bd7b38ac38d..eb5fdfb463533b13a2b40a6c5505448e1fe96a62 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
index 30203f58e6a860b854e260d53c6056934d580445..14b8237feabcb4390abaeb2588b0a10fe802ced7 100644 (file)
@@ -30,9 +30,9 @@ import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.LoginPage;
 import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.tests.Category4Suite;
-import org.sonarqube.ws.WsUserTokens;
-import org.sonarqube.ws.WsUsers;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.UserTokens;
+import org.sonarqube.ws.Users;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.HttpConnector;
 import org.sonarqube.ws.client.PostRequest;
@@ -106,7 +106,7 @@ public class LocalAuthenticationTest {
     User user = tester.users().generate();
     String tokenName = "Validate token based authentication";
     UserTokensService tokensService = tester.wsClient().userTokens();
-    WsUserTokens.GenerateWsResponse generateWsResponse = tokensService.generate(new GenerateWsRequest()
+    UserTokens.GenerateWsResponse generateWsResponse = tokensService.generate(new GenerateWsRequest()
       .setLogin(user.getLogin())
       .setName(tokenName));
     WsClient wsClient = WsClientFactories.getDefault().newClient(HttpConnector.newBuilder()
@@ -117,7 +117,7 @@ public class LocalAuthenticationTest {
 
     assertThat(response.content()).isEqualTo("{\"valid\":true}");
 
-    WsUserTokens.SearchWsResponse searchResponse = tokensService.search(new SearchWsRequest().setLogin(user.getLogin()));
+    UserTokens.SearchWsResponse searchResponse = tokensService.search(new SearchWsRequest().setLogin(user.getLogin()));
     assertThat(searchResponse.getUserTokensCount()).isEqualTo(1);
     tokensService.revoke(new RevokeWsRequest().setLogin(user.getLogin()).setName(tokenName));
     searchResponse = tokensService.search(new SearchWsRequest().setLogin(user.getLogin()));
@@ -247,8 +247,8 @@ public class LocalAuthenticationTest {
 
     assertThat(checkAuthenticationWithAuthenticateWebService("test", "password")).isTrue();
     assertThat(tester.users().getByLogin("test").get())
-      .extracting(WsUsers.SearchWsResponse.User::getLogin, WsUsers.SearchWsResponse.User::getName, WsUsers.SearchWsResponse.User::getEmail, u -> u.getScmAccounts().getScmAccountsList(),
-        WsUsers.SearchWsResponse.User::getExternalIdentity, WsUsers.SearchWsResponse.User::getExternalProvider)
+      .extracting(Users.SearchWsResponse.User::getLogin, Users.SearchWsResponse.User::getName, Users.SearchWsResponse.User::getEmail, u -> u.getScmAccounts().getScmAccountsList(),
+        Users.SearchWsResponse.User::getExternalIdentity, Users.SearchWsResponse.User::getExternalProvider)
       .containsOnly("test", "Test", "test@email.com", asList("test1", "test2"), "test", "sonarqube");
   }
 
index ec0961811d357ad36b07d47e8c9400080ceab486..c4b2739585bfd0730f2ecdcfed2cb990d76bcc47 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.Test;
 import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.tests.Category4Suite;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.PostRequest;
 
 import static com.codeborne.selenide.Condition.text;
index 740fd28835ce8777acac981bb742ad4c6d1b56d1..2f6e7f36f1bb60641875f91a70e789471fa733cd 100644 (file)
@@ -35,7 +35,7 @@ import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
 import org.sonarqube.qa.util.pageobjects.Navigation;
 import org.sonarqube.tests.Category4Suite;
-import org.sonarqube.ws.WsUsers.SearchWsResponse.User;
+import org.sonarqube.ws.Users.SearchWsResponse.User;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.permission.AddUserWsRequest;
index f0f9c614629147831c5f81418eef43b8f39dbb4c..b3638e6019b132c75622ffbd641cd3a458f8df20 100644 (file)
 package org.sonarqube.tests.user;
 
 import com.sonar.orchestrator.Orchestrator;
-import org.junit.After;
-import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.WsClient;
 import util.ItUtils;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static util.ItUtils.resetSettings;
-import static util.ItUtils.setServerProperty;
 
 public class OnboardingTest {
 
@@ -44,16 +40,6 @@ public class OnboardingTest {
   @Rule
   public Tester tester = new Tester(orchestrator).disableOrganizations();
 
-  @Before
-  public void setUp() {
-    resetSettings(orchestrator, null, ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS);
-  }
-
-  @After
-  public void reset() {
-    resetSettings(orchestrator, null, ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS);
-  }
-
   @Test
   public void by_default_new_user_does_not_see_onboarding_tutorial() {
     User user = tester.users().generate();
@@ -145,8 +131,8 @@ public class OnboardingTest {
     verifyTutorial(reactivatedUser, true);
   }
 
-  private static void setShownOnboardingSetting(boolean showTutorial) {
-    setServerProperty(orchestrator, ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS, String.valueOf(showTutorial));
+  private void setShownOnboardingSetting(boolean showTutorial) {
+    tester.settings().setGlobalSettings(ONBOARDING_TUTORIAL_SHOW_TO_NEW_USERS, String.valueOf(showTutorial));
   }
 
   private void verifyTutorial(User user, boolean expectedTutorial) {
index 22e1dee4984e4f4a81b618429d5d94bb8f4476c4..d3edfa5b92af2f4360ed18452ace560ed0e4c764 100644 (file)
@@ -21,20 +21,17 @@ package org.sonarqube.tests.user;
 
 import com.google.common.base.Joiner;
 import com.sonar.orchestrator.Orchestrator;
-import org.sonarqube.tests.Category6Suite;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsUserGroups.Group;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.tests.Category6Suite;
+import org.sonarqube.ws.UserGroups.Group;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.GetRequest;
 
-import static util.ItUtils.resetSettings;
-import static util.ItUtils.setServerProperty;
-
 public class OrganizationIdentityProviderTest {
 
   @ClassRule
@@ -43,22 +40,21 @@ public class OrganizationIdentityProviderTest {
   @Rule
   public Tester tester = new Tester(orchestrator);
 
-
   @Before
   public void setUp() {
     // enable the fake authentication plugin
-    setServerProperty(orchestrator, "sonar.auth.fake-base-id-provider.enabled", "true");
+    tester.settings().setGlobalSettings("sonar.auth.fake-base-id-provider.enabled", "true");
   }
 
   @After
   public void tearDown() {
-    resetSettings(orchestrator, null, "sonar.auth.fake-base-id-provider.enabled", "sonar.auth.fake-base-id-provider.user",
+    tester.settings().resetSettings("sonar.auth.fake-base-id-provider.enabled", "sonar.auth.fake-base-id-provider.user",
       "sonar.auth.fake-base-id-provider.throwUnauthorizedMessage", "sonar.auth.fake-base-id-provider.enabledGroupsSync", "sonar.auth.fake-base-id-provider.groups",
       "sonar.auth.fake-base-id-provider.allowsUsersToSignUp");
   }
 
   @Test
-  public void default_group_is_not_added_for_new_user_when_organizations_are_enabled()  {
+  public void default_group_is_not_added_for_new_user_when_organizations_are_enabled() {
     Group group = tester.groups().generate(null);
     enableUserCreationByAuthPlugin("aLogin");
     setGroupsReturnedByAuthPlugin(group.getName());
@@ -99,14 +95,14 @@ public class OrganizationIdentityProviderTest {
     tester.groups().assertThatUserIsOnlyMemberOf(null, user.getLogin());
   }
 
-  private static void enableUserCreationByAuthPlugin(String login) {
-    setServerProperty(orchestrator, "sonar.auth.fake-base-id-provider.user", login + ",fake-john,John,john@email.com");
+  private void enableUserCreationByAuthPlugin(String login) {
+    tester.settings().setGlobalSettings("sonar.auth.fake-base-id-provider.user", login + ",fake-john,John,john@email.com");
   }
 
-  private static void setGroupsReturnedByAuthPlugin(String... groups) {
-    setServerProperty(orchestrator, "sonar.auth.fake-base-id-provider.enabledGroupsSync", "true");
+  private void setGroupsReturnedByAuthPlugin(String... groups) {
+    tester.settings().setGlobalSettings("sonar.auth.fake-base-id-provider.enabledGroupsSync", "true");
     if (groups.length > 0) {
-      setServerProperty(orchestrator, "sonar.auth.fake-base-id-provider.groups", Joiner.on(",").join(groups));
+      tester.settings().setGlobalSettings("sonar.auth.fake-base-id-provider.groups", Joiner.on(",").join(groups));
     }
   }
 
index aee0917c8f8a9a4cdbccec26627c718277e8b9b9..686732cb34078ddd27ff50dec4897a855c6f9082 100644 (file)
@@ -36,8 +36,8 @@ import org.sonar.wsclient.base.HttpException;
 import org.sonar.wsclient.connectors.HttpClient4Connector;
 import org.sonar.wsclient.services.AuthenticationQuery;
 import org.sonar.wsclient.user.UserParameters;
-import org.sonarqube.qa.util.pageobjects.SystemInfoPage;
 import org.sonarqube.qa.util.Tester;
+import org.sonarqube.qa.util.pageobjects.SystemInfoPage;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.WsResponse;
 import org.sonarqube.ws.client.user.CreateRequest;
@@ -48,11 +48,9 @@ import static java.net.HttpURLConnection.HTTP_OK;
 import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.fail;
-import static util.ItUtils.newAdminWsClient;
 import static util.ItUtils.newUserWsClient;
 import static util.ItUtils.pluginArtifact;
 import static util.ItUtils.resetSettings;
-import static util.ItUtils.setServerProperty;
 import static util.selenium.Selenese.runSelenese;
 
 /**
@@ -293,7 +291,7 @@ public class RealmAuthenticationTest {
     verifyAuthenticationIsNotOk(login, null);
     verifyAuthenticationIsOk(null, null);
 
-    setServerProperty(orchestrator, "sonar.forceAuthentication", "true");
+    tester.settings().setGlobalSettings("sonar.forceAuthentication", "true");
 
     verifyAuthenticationIsOk(login, password);
     verifyAuthenticationIsNotOk("wrong", password);
@@ -313,7 +311,7 @@ public class RealmAuthenticationTest {
 
   @Test
   public void provision_user_before_authentication() {
-    newAdminWsClient(orchestrator).users().create(CreateRequest.builder()
+    tester.wsClient().users().create(CreateRequest.builder()
       .setLogin(USER_LOGIN)
       .setName("Tester Testerovich")
       .setEmail("tester@example.org")
@@ -346,8 +344,8 @@ public class RealmAuthenticationTest {
   /**
    * Updates information about users in security-plugin.
    */
-  private static void updateUsersInExtAuth(Map<String, String> users) {
-    setServerProperty(orchestrator, USERS_PROPERTY, format(users));
+  private void updateUsersInExtAuth(Map<String, String> users) {
+    tester.settings().setGlobalSettings(USERS_PROPERTY, format(users));
   }
 
   private void createUserInDb(String login, String password) {
index 2860b09dfb7f23b6ab2550dd20bb5691f2360f4b..07214b2a5bc7b3c348adc61fdbdd23f55b448116 100644 (file)
@@ -28,6 +28,7 @@ import org.apache.commons.io.FileUtils;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Test;
+import org.junit.rules.RuleChain;
 import util.user.UserRule;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
@@ -63,61 +64,63 @@ public class SsoAuthenticationTest {
     .setServerProperty("sonar.web.sso.groupsHeader", GROUPS_HEADER)
     .build();
 
+  private static UserRule userRule = UserRule.from(orchestrator);
+
   @ClassRule
-  public static UserRule USER_RULE = UserRule.from(orchestrator);
+  public static RuleChain ruleChain = RuleChain.outerRule(orchestrator).around(userRule);
 
   @Before
   public void resetData() throws Exception {
-    USER_RULE.resetUsers();
+    userRule.resetUsers();
   }
 
   @Test
   public void authenticate() {
     doCall(USER_LOGIN, USER_NAME, USER_EMAIL, null);
 
-    USER_RULE.verifyUserExists(USER_LOGIN, USER_NAME, USER_EMAIL);
+    userRule.verifyUserExists(USER_LOGIN, USER_NAME, USER_EMAIL);
   }
 
   @Test
   public void authenticate_with_only_login() throws Exception {
     doCall(USER_LOGIN, null, null, null);
 
-    USER_RULE.verifyUserExists(USER_LOGIN, USER_LOGIN, null);
+    userRule.verifyUserExists(USER_LOGIN, USER_LOGIN, null);
   }
 
   @Test
   public void update_user_when_headers_are_updated() {
     doCall(USER_LOGIN, USER_NAME, USER_EMAIL, null);
-    USER_RULE.verifyUserExists(USER_LOGIN, USER_NAME, USER_EMAIL);
+    userRule.verifyUserExists(USER_LOGIN, USER_NAME, USER_EMAIL);
 
     // As we don't keep the JWT token is the test, the user is updated
     doCall(USER_LOGIN, "new name", "new email", null);
-    USER_RULE.verifyUserExists(USER_LOGIN, "new name", "new email");
+    userRule.verifyUserExists(USER_LOGIN, "new name", "new email");
   }
 
   @Test
   public void authenticate_with_groups() {
     doCall(USER_LOGIN, null, null, GROUP_1);
 
-    USER_RULE.verifyUserGroupMembership(USER_LOGIN, GROUP_1, "sonar-users");
+    userRule.verifyUserGroupMembership(USER_LOGIN, GROUP_1, "sonar-users");
   }
 
   @Test
   public void synchronize_groups_when_authenticating_existing_user() throws Exception {
-    USER_RULE.createGroup(GROUP_1);
-    USER_RULE.createGroup(GROUP_2);
-    USER_RULE.createGroup(GROUP_3);
-    USER_RULE.createUser(USER_LOGIN, "password");
-    USER_RULE.associateGroupsToUser(USER_LOGIN, GROUP_1, GROUP_2);
+    userRule.createGroup(GROUP_1);
+    userRule.createGroup(GROUP_2);
+    userRule.createGroup(GROUP_3);
+    userRule.createUser(USER_LOGIN, "password");
+    userRule.associateGroupsToUser(USER_LOGIN, GROUP_1, GROUP_2);
 
     doCall(USER_LOGIN, null, null, GROUP_2 + "," + GROUP_3);
 
-    USER_RULE.verifyUserGroupMembership(USER_LOGIN, GROUP_2, GROUP_3, "sonar-users");
+    userRule.verifyUserGroupMembership(USER_LOGIN, GROUP_2, GROUP_3, "sonar-users");
   }
 
   @Test
   public void authentication_with_local_user_is_possible_when_no_header() throws Exception {
-    USER_RULE.createUser(USER_LOGIN, "password");
+    userRule.createUser(USER_LOGIN, "password");
 
     checkLocalAuthentication(USER_LOGIN, "password");
   }
@@ -131,12 +134,12 @@ public class SsoAuthenticationTest {
 
     List<String> logsLines = FileUtils.readLines(orchestrator.getServer().getWebLogs(), UTF_8);
     assertThat(logsLines).doesNotContain("org.sonar.server.exceptions.BadRequestException: Use only letters, numbers, and .-_@ please.");
-    USER_RULE.verifyUserDoesNotExist(USER_LOGIN);
+    userRule.verifyUserDoesNotExist(USER_LOGIN);
   }
 
   @Test
   public void fail_when_email_already_exists() throws Exception {
-    USER_RULE.createUser("another", "Another", USER_EMAIL, "another");
+    userRule.createUser("another", "Another", USER_EMAIL, "another");
 
     Response response = doCall(USER_LOGIN, USER_NAME, USER_EMAIL, null);
 
index 7aa50328352b7b77662994f056bdb73e4a32e87b..f73b1fab03d781498df825ecd9091c4fca71ec55 100644 (file)
@@ -31,7 +31,7 @@ import org.junit.rules.TestRule;
 import org.junit.rules.Timeout;
 import org.sonarqube.tests.Byteman;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsUsers.CreateWsResponse.User;
+import org.sonarqube.ws.Users.CreateWsResponse.User;
 import org.sonarqube.ws.client.user.SearchRequest;
 import org.sonarqube.ws.client.user.UpdateRequest;
 import util.ItUtils;
index b983b0e69e0633216585a5096104d65bf5eedc00..38b62681a9cc2738b136c6e7157995d2d9f3436e 100644 (file)
@@ -27,7 +27,7 @@ import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.WsClient;
 import org.sonarqube.ws.client.user.GroupsRequest;
 import util.selenium.Selenese;
@@ -77,8 +77,8 @@ public class UsersPageTest {
     userRule.createGroup(group);
     userRule.associateGroupsToUser(login, group);
 
-    List<WsUsers.GroupsWsResponse.Group> result = adminClient.users().groups(GroupsRequest.builder().setLogin(login).build()).getGroupsList();
+    List<Users.GroupsWsResponse.Group> result = adminClient.users().groups(GroupsRequest.builder().setLogin(login).build()).getGroupsList();
 
-    assertThat(result).extracting(WsUsers.GroupsWsResponse.Group::getName).contains(group);
+    assertThat(result).extracting(Users.GroupsWsResponse.Group::getName).contains(group);
   }
 }
index b10257c2c533dbf59ade48bbfa7856d7d898869d..f663c7d6b94b3331baf87c5a863a6048a7182fde 100644 (file)
@@ -63,9 +63,9 @@ import org.sonar.wsclient.issue.IssueClient;
 import org.sonar.wsclient.issue.IssueQuery;
 import org.sonarqube.qa.util.SettingTester;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsComponents.Component;
-import org.sonarqube.ws.WsMeasures;
-import org.sonarqube.ws.WsMeasures.Measure;
+import org.sonarqube.ws.Components.Component;
+import org.sonarqube.ws.Measures;
+import org.sonarqube.ws.Measures.Measure;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.HttpConnector;
 import org.sonarqube.ws.client.WsClient;
@@ -343,7 +343,7 @@ public class ItUtils {
 
   @CheckForNull
   public static Measure getMeasureWithVariation(Orchestrator orchestrator, String componentKey, String metricKey) {
-    WsMeasures.ComponentWsResponse response = newWsClient(orchestrator).measures().component(new ComponentWsRequest()
+    Measures.ComponentWsResponse response = newWsClient(orchestrator).measures().component(new ComponentWsRequest()
       .setComponentKey(componentKey)
       .setMetricKeys(singletonList(metricKey))
       .setAdditionalFields(singletonList("periods")));
@@ -366,7 +366,7 @@ public class ItUtils {
    */
   @CheckForNull
   public static Double getLeakPeriodValue(Orchestrator orchestrator, String componentKey, String metricKey) {
-    List<WsMeasures.PeriodValue> periodsValueList = getMeasureWithVariation(orchestrator, componentKey, metricKey).getPeriods().getPeriodsValueList();
+    List<Measures.PeriodValue> periodsValueList = getMeasureWithVariation(orchestrator, componentKey, metricKey).getPeriods().getPeriodsValueList();
     return periodsValueList.size() > 0 ? Double.parseDouble(periodsValueList.get(0).getValue()) : null;
   }
 
index beb07e114d23bb12cc516f9649d3a384cdb50d65..80df9438ab695cca61a4f29a35693dcfa82b4f7f 100644 (file)
  */
 package util.user;
 
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.collect.FluentIterable;
 import com.sonar.orchestrator.Orchestrator;
 import java.util.List;
+import java.util.Optional;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Predicate;
 import java.util.stream.Collectors;
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import org.junit.rules.ExternalResource;
 import org.sonarqube.qa.util.Tester;
-import org.sonarqube.ws.WsUsers;
+import org.sonarqube.ws.Users;
 import org.sonarqube.ws.client.GetRequest;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
@@ -47,7 +46,6 @@ import static java.util.Arrays.stream;
 import static java.util.Objects.requireNonNull;
 import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.guava.api.Assertions.assertThat;
 import static util.ItUtils.newAdminWsClient;
 
 /**
@@ -83,7 +81,7 @@ public class UserRule extends ExternalResource implements GroupManagement {
   // *****************
 
   public void resetUsers() {
-    for (Users.User user : getUsers().getUsers()) {
+    for (util.user.Users.User user : getUsers().getUsers()) {
       String userLogin = user.getLogin();
       if (!userLogin.equals(ADMIN_LOGIN)) {
         deactivateUsers(userLogin);
@@ -91,8 +89,8 @@ public class UserRule extends ExternalResource implements GroupManagement {
     }
   }
 
-  public Users.User verifyUserExists(String login, String name, @Nullable String email) {
-    Optional<Users.User> user = getUserByLogin(login);
+  public util.user.Users.User verifyUserExists(String login, String name, @Nullable String email) {
+    Optional<util.user.Users.User> user = getUserByLogin(login);
     assertThat(user).as("User with login '%s' hasn't been found", login).isPresent();
     assertThat(user.get().getLogin()).isEqualTo(login);
     assertThat(user.get().getName()).isEqualTo(name);
@@ -101,15 +99,15 @@ public class UserRule extends ExternalResource implements GroupManagement {
   }
 
   public void verifyUserExists(String login, String name, @Nullable String email, boolean local) {
-    Users.User user = verifyUserExists(login, name, email);
+    util.user.Users.User user = verifyUserExists(login, name, email);
     assertThat(user.isLocal()).isEqualTo(local);
   }
 
   public void verifyUserDoesNotExist(String login) {
-    assertThat(getUserByLogin(login)).as("Unexpected user with login '%s' has been found", login).isAbsent();
+    assertThat(getUserByLogin(login)).as("Unexpected user with login '%s' has been found", login).isEmpty();
   }
 
-  public WsUsers.CreateWsResponse.User createUser(String login, String name, @Nullable String email, String password) {
+  public Users.CreateWsResponse.User createUser(String login, String name, @Nullable String email, String password) {
     CreateRequest.Builder request = CreateRequest.builder()
       .setLogin(login)
       .setName(name)
@@ -122,7 +120,7 @@ public class UserRule extends ExternalResource implements GroupManagement {
    * Create user with randomly generated values. By default password is the login.
    */
   @SafeVarargs
-  public final WsUsers.CreateWsResponse.User generate(Consumer<CreateRequest.Builder>... populators) {
+  public final org.sonarqube.ws.Users.CreateWsResponse.User generate(Consumer<CreateRequest.Builder>... populators) {
     int id = ID_GENERATOR.getAndIncrement();
     String login = "login" + id;
     CreateRequest.Builder request = CreateRequest.builder()
@@ -157,15 +155,15 @@ public class UserRule extends ExternalResource implements GroupManagement {
     adminWsClient().roots().setRoot(login);
   }
 
-  public Optional<Users.User> getUserByLogin(String login) {
-    return FluentIterable.from(getUsers().getUsers()).firstMatch(new MatchUserLogin(login));
+  public Optional<util.user.Users.User> getUserByLogin(String login) {
+    return getUsers().getUsers().stream().filter(new MatchUserLogin(login)).findFirst();
   }
 
-  public Users getUsers() {
+  public util.user.Users getUsers() {
     WsResponse response = adminWsClient().wsConnector().call(
       new GetRequest("api/users/search"))
       .failIfNotSuccessful();
-    return Users.parse(response.content());
+    return util.user.Users.parse(response.content());
   }
 
   public void deactivateUsers(List<String> userLogins) {
@@ -194,10 +192,6 @@ public class UserRule extends ExternalResource implements GroupManagement {
   // User groups
   // *****************
 
-  public GroupManagement forOrganization(String organizationKey) {
-    return new GroupManagementImpl(organizationKey);
-  }
-
   private final class GroupManagementImpl implements GroupManagement {
     @CheckForNull
     private final String organizationKey;
@@ -247,7 +241,7 @@ public class UserRule extends ExternalResource implements GroupManagement {
 
     @Override
     public java.util.Optional<Groups.Group> getGroupByName(String name) {
-      return getGroups().getGroups().stream().filter(new MatchGroupName(name)::apply).findFirst();
+      return getGroups().getGroups().stream().filter(new MatchGroupName(name)).findFirst();
     }
 
     @Override
@@ -339,7 +333,7 @@ public class UserRule extends ExternalResource implements GroupManagement {
     return adminWsClient;
   }
 
-  private class MatchUserLogin implements Predicate<Users.User> {
+  private class MatchUserLogin implements Predicate<util.user.Users.User> {
     private final String login;
 
     private MatchUserLogin(String login) {
@@ -347,7 +341,7 @@ public class UserRule extends ExternalResource implements GroupManagement {
     }
 
     @Override
-    public boolean apply(@Nonnull Users.User user) {
+    public boolean test(@Nonnull util.user.Users.User user) {
       String login = user.getLogin();
       return login != null && login.equals(this.login) && user.isActive();
     }
@@ -361,7 +355,7 @@ public class UserRule extends ExternalResource implements GroupManagement {
     }
 
     @Override
-    public boolean apply(@Nonnull Groups.Group group) {
+    public boolean test(@Nonnull Groups.Group group) {
       String groupName = group.getName();
       return groupName != null && groupName.equals(this.groupName);
     }
index 2f0a252e6c7c8d574a1b12836de8d947a96e3204..01e3c70238d5471cb8f02391df0577e9c02c459c 100644 (file)
@@ -22,6 +22,7 @@ package util.user;
 import com.google.gson.Gson;
 import java.util.List;
 
+@Deprecated
 public class Users {
 
   private List<User> users;