aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/main/java
diff options
context:
space:
mode:
authorJacek <jacek.poreda@sonarsource.com>2021-01-29 16:36:53 +0100
committersonartech <sonartech@sonarsource.com>2021-02-04 20:07:07 +0000
commitac3afb832969385223a6c774a1bc9bb9b4f67162 (patch)
tree36e0352a2cd867d72b2f223bf20624eed880f017 /sonar-ws/src/main/java
parentbd3b1d2b2e5c0dd23f3d52f11d506d8c04c74ca1 (diff)
downloadsonarqube-ac3afb832969385223a6c774a1bc9bb9b4f67162.tar.gz
sonarqube-ac3afb832969385223a6c774a1bc9bb9b4f67162.zip
SONAR-14369 Add ALM integration telemetry
Diffstat (limited to 'sonar-ws/src/main/java')
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/AlmSettingsService.java16
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateBitbucketCloudRequest.java85
2 files changed, 101 insertions, 0 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 db2822356c3..f109c608153 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
@@ -96,6 +96,22 @@ public class AlmSettingsService extends BaseService {
}
/**
+ *
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/create_bitbucket_cloud">Further information about this action online (including a response example)</a>
+ * @since 8.7
+ */
+ public void createBitbucketCloud(CreateBitbucketCloudRequest request) {
+ call(
+ new PostRequest(path("create_bitbucketcloud"))
+ .setParam("key", request.getKey())
+ .setParam("clientId", request.getClientId())
+ .setParam("clientSecret", request.getClientSecret())
+ .setParam("workspace", request.getWorkspace())
+ .setMediaType(MediaTypes.JSON)).content();
+ }
+
+ /**
* This is a POST request.
* @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/create_github">Further information about this action online (including a response example)</a>
* @since 8.1
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateBitbucketCloudRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateBitbucketCloudRequest.java
new file mode 100644
index 00000000000..92e2fb255a3
--- /dev/null
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/almsettings/CreateBitbucketCloudRequest.java
@@ -0,0 +1,85 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+package org.sonarqube.ws.client.almsettings;
+
+import javax.annotation.Generated;
+
+/**
+ *
+ * This is a POST request.
+ * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/alm_settings/create_bitbucket_cloud">Further information about this action online (including a response example)</a>
+ * @since 8.7
+ */
+@Generated("sonar-ws-generator")
+public class CreateBitbucketCloudRequest {
+
+ private String key;
+ private String clientId;
+ private String clientSecret;
+ private String workspace;
+
+ public String getKey() {
+ return key;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public CreateBitbucketCloudRequest setKey(String key) {
+ this.key = key;
+ return this;
+ }
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public CreateBitbucketCloudRequest setClientId(String clientId) {
+ this.clientId = clientId;
+ return this;
+ }
+
+ public String getClientSecret() {
+ return clientSecret;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public CreateBitbucketCloudRequest setClientSecret(String clientSecret) {
+ this.clientSecret = clientSecret;
+ return this;
+ }
+
+ public String getWorkspace() {
+ return workspace;
+ }
+
+ /**
+ * This is a mandatory parameter.
+ */
+ public CreateBitbucketCloudRequest setWorkspace(String workspace) {
+ this.workspace = workspace;
+ return this;
+ }
+}