From 83e8eed514676c22ca9aeb6fad1e87908c95459c Mon Sep 17 00:00:00 2001 From: Pierre Date: Fri, 13 Nov 2020 16:57:23 +0100 Subject: [PATCH] SONAR-14133 add parameters to set_azure_binding --- .../almsettings/AlmSettingsService.java | 2 ++ .../almsettings/CreateAzureRequest.java | 25 ++++++----------- .../ws/client/almsettings/DeleteRequest.java | 13 ++++----- .../almsettings/SetAzureBindingRequest.java | 27 +++++++++++++++++++ 4 files changed, 42 insertions(+), 25 deletions(-) diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java index cd506f16be4..0c3319755a3 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java @@ -196,6 +196,8 @@ public class AlmSettingsService extends BaseService { new PostRequest(path("set_azure_binding")) .setParam("almSetting", request.getAlmSetting()) .setParam("project", request.getProject()) + .setParam("projectName", request.getProjectName()) + .setParam("repositoryName", request.getRepositoryName()) .setMediaType(MediaTypes.JSON)).content(); } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java index b076e0458c3..28f6c7ec391 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateAzureRequest.java @@ -33,38 +33,29 @@ public class CreateAzureRequest { private String personalAccessToken; private String url; - /** - * This is a mandatory parameter. - */ public CreateAzureRequest setKey(String key) { this.key = key; return this; } - public String getKey() { - return key; - } - - /** - * This is a mandatory parameter. - */ public CreateAzureRequest setPersonalAccessToken(String personalAccessToken) { this.personalAccessToken = personalAccessToken; return this; } - public String getPersonalAccessToken() { - return personalAccessToken; - } - - /** - * This is a mandatory parameter. - */ public CreateAzureRequest setUrl(String url) { this.url = url; return this; } + public String getKey() { + return key; + } + + public String getPersonalAccessToken() { + return personalAccessToken; + } + public String getUrl() { return url; } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java index c9f6df6f64a..65a5b79ddb9 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/DeleteRequest.java @@ -29,17 +29,14 @@ import javax.annotation.Generated; @Generated("sonar-ws-generator") public class DeleteRequest { - private String key; + private static String key; + + public DeleteRequest(String key) { + this.key = key; + } public String getKey() { return key; } - /** - * This is a mandatory parameter. - */ - public DeleteRequest setKey(String key) { - this.key = key; - return this; - } } diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java index 2958d2d1b35..9dee34d017e 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/SetAzureBindingRequest.java @@ -31,6 +31,8 @@ public class SetAzureBindingRequest { private String almSetting; private String project; + private String repositoryName; + private String projectName; /** * This is a mandatory parameter. @@ -56,4 +58,29 @@ public class SetAzureBindingRequest { return project; } + public String getRepositoryName() { + return repositoryName; + } + + /** + * This is a mandatory parameter. + * @return + */ + public SetAzureBindingRequest setRepositoryName(String repositoryName) { + this.repositoryName = repositoryName; + return this; + } + + public String getProjectName() { + return projectName; + } + + /** + * This is a mandatory parameter. + * @return + */ + public SetAzureBindingRequest setProjectName(String projectName) { + this.projectName = projectName; + return this; + } } -- 2.39.5