Skip to content

Commit 1958b1a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9149371 of spec repo
1 parent dcc8389 commit 1958b1a

File tree

70 files changed

+4976
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+4976
-17
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 387 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Get a deployment gate evaluation result returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.DeploymentGatesApi;
6+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationResultResponse;
7+
import java.util.UUID;
8+
9+
public class Example {
10+
public static void main(String[] args) {
11+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
12+
defaultClient.setUnstableOperationEnabled("v2.getDeploymentGatesEvaluationResult", true);
13+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
14+
15+
try {
16+
DeploymentGatesEvaluationResultResponse result =
17+
apiInstance.getDeploymentGatesEvaluationResult(
18+
UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"));
19+
System.out.println(result);
20+
} catch (ApiException e) {
21+
System.err.println(
22+
"Exception when calling DeploymentGatesApi#getDeploymentGatesEvaluationResult");
23+
System.err.println("Status code: " + e.getCode());
24+
System.err.println("Reason: " + e.getResponseBody());
25+
System.err.println("Response headers: " + e.getResponseHeaders());
26+
e.printStackTrace();
27+
}
28+
}
29+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Get a deployment gates evaluation result returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.DeploymentGatesApi;
6+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationResultResponse;
7+
import java.util.UUID;
8+
9+
public class Example {
10+
public static void main(String[] args) {
11+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
12+
defaultClient.setUnstableOperationEnabled("v2.getDeploymentGatesEvaluationResult", true);
13+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
14+
15+
// there is a valid "deployment_gates_evaluation" in the system
16+
UUID DEPLOYMENT_GATES_EVALUATION_DATA_ID = null;
17+
try {
18+
DEPLOYMENT_GATES_EVALUATION_DATA_ID =
19+
UUID.fromString(System.getenv("DEPLOYMENT_GATES_EVALUATION_DATA_ID"));
20+
} catch (IllegalArgumentException e) {
21+
System.err.println("Error parsing UUID: " + e.getMessage());
22+
}
23+
24+
try {
25+
DeploymentGatesEvaluationResultResponse result =
26+
apiInstance.getDeploymentGatesEvaluationResult(DEPLOYMENT_GATES_EVALUATION_DATA_ID);
27+
System.out.println(result);
28+
} catch (ApiException e) {
29+
System.err.println(
30+
"Exception when calling DeploymentGatesApi#getDeploymentGatesEvaluationResult");
31+
System.err.println("Status code: " + e.getCode());
32+
System.err.println("Reason: " + e.getResponseBody());
33+
System.err.println("Response headers: " + e.getResponseHeaders());
34+
e.printStackTrace();
35+
}
36+
}
37+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Get all deployment gates returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.DeploymentGatesApi;
6+
import com.datadog.api.client.v2.model.DeploymentGatesListResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.listDeploymentGates", true);
12+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
13+
14+
try {
15+
DeploymentGatesListResponse result = apiInstance.listDeploymentGates();
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling DeploymentGatesApi#listDeploymentGates");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Trigger a deployment gate evaluation returns "Accepted" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.DeploymentGatesApi;
6+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationRequest;
7+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationRequestAttributes;
8+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationRequestData;
9+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationRequestDataType;
10+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationResponse;
11+
12+
public class Example {
13+
public static void main(String[] args) {
14+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
15+
defaultClient.setUnstableOperationEnabled("v2.triggerDeploymentGatesEvaluation", true);
16+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
17+
18+
DeploymentGatesEvaluationRequest body =
19+
new DeploymentGatesEvaluationRequest()
20+
.data(
21+
new DeploymentGatesEvaluationRequestData()
22+
.attributes(
23+
new DeploymentGatesEvaluationRequestAttributes()
24+
.env("staging")
25+
.identifier("pre-deploy")
26+
.primaryTag("region:us-east-1")
27+
.service("transaction-backend")
28+
.version("v1.2.3"))
29+
.type(
30+
DeploymentGatesEvaluationRequestDataType
31+
.DEPLOYMENT_GATES_EVALUATION_REQUEST));
32+
33+
try {
34+
DeploymentGatesEvaluationResponse result = apiInstance.triggerDeploymentGatesEvaluation(body);
35+
System.out.println(result);
36+
} catch (ApiException e) {
37+
System.err.println(
38+
"Exception when calling DeploymentGatesApi#triggerDeploymentGatesEvaluation");
39+
System.err.println("Status code: " + e.getCode());
40+
System.err.println("Reason: " + e.getResponseBody());
41+
System.err.println("Response headers: " + e.getResponseHeaders());
42+
e.printStackTrace();
43+
}
44+
}
45+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Trigger a deployment gates evaluation returns "Accepted" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.DeploymentGatesApi;
6+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationRequest;
7+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationRequestAttributes;
8+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationRequestData;
9+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationRequestDataType;
10+
import com.datadog.api.client.v2.model.DeploymentGatesEvaluationResponse;
11+
12+
public class Example {
13+
public static void main(String[] args) {
14+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
15+
defaultClient.setUnstableOperationEnabled("v2.triggerDeploymentGatesEvaluation", true);
16+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
17+
18+
// there is a valid "deployment_gate" in the system
19+
String DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER =
20+
System.getenv("DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER");
21+
22+
DeploymentGatesEvaluationRequest body =
23+
new DeploymentGatesEvaluationRequest()
24+
.data(
25+
new DeploymentGatesEvaluationRequestData()
26+
.attributes(
27+
new DeploymentGatesEvaluationRequestAttributes()
28+
.env("production")
29+
.identifier(DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER)
30+
.service("my-service"))
31+
.type(
32+
DeploymentGatesEvaluationRequestDataType
33+
.DEPLOYMENT_GATES_EVALUATION_REQUEST));
34+
35+
try {
36+
DeploymentGatesEvaluationResponse result = apiInstance.triggerDeploymentGatesEvaluation(body);
37+
System.out.println(result);
38+
} catch (ApiException e) {
39+
System.err.println(
40+
"Exception when calling DeploymentGatesApi#triggerDeploymentGatesEvaluation");
41+
System.err.println("Status code: " + e.getCode());
42+
System.err.println("Reason: " + e.getResponseBody());
43+
System.err.println("Response headers: " + e.getResponseHeaders());
44+
e.printStackTrace();
45+
}
46+
}
47+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,10 @@ public class ApiClient {
824824
put("v2.deleteDeploymentRule", false);
825825
put("v2.getDeploymentGate", false);
826826
put("v2.getDeploymentGateRules", false);
827+
put("v2.getDeploymentGatesEvaluationResult", false);
827828
put("v2.getDeploymentRule", false);
829+
put("v2.listDeploymentGates", false);
830+
put("v2.triggerDeploymentGatesEvaluation", false);
828831
put("v2.updateDeploymentGate", false);
829832
put("v2.updateDeploymentRule", false);
830833
put("v2.createHamrOrgConnection", false);

0 commit comments

Comments
 (0)