Skip to content

Commit 0873436

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9080e16 of spec repo
1 parent 5054734 commit 0873436

File tree

70 files changed

+4915
-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

+4915
-17
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 381 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
13+
14+
try {
15+
DeploymentGatesEvaluationResultResponse result =
16+
apiInstance.getDeploymentGatesEvaluationResult(
17+
UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"));
18+
System.out.println(result);
19+
} catch (ApiException e) {
20+
System.err.println(
21+
"Exception when calling DeploymentGatesApi#getDeploymentGatesEvaluationResult");
22+
System.err.println("Status code: " + e.getCode());
23+
System.err.println("Reason: " + e.getResponseBody());
24+
System.err.println("Response headers: " + e.getResponseHeaders());
25+
e.printStackTrace();
26+
}
27+
}
28+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
13+
14+
// there is a valid "deployment_gates_evaluation" in the system
15+
UUID DEPLOYMENT_GATES_EVALUATION_DATA_ID = null;
16+
try {
17+
DEPLOYMENT_GATES_EVALUATION_DATA_ID =
18+
UUID.fromString(System.getenv("DEPLOYMENT_GATES_EVALUATION_DATA_ID"));
19+
} catch (IllegalArgumentException e) {
20+
System.err.println("Error parsing UUID: " + e.getMessage());
21+
}
22+
23+
try {
24+
DeploymentGatesEvaluationResultResponse result =
25+
apiInstance.getDeploymentGatesEvaluationResult(DEPLOYMENT_GATES_EVALUATION_DATA_ID);
26+
System.out.println(result);
27+
} catch (ApiException e) {
28+
System.err.println(
29+
"Exception when calling DeploymentGatesApi#getDeploymentGatesEvaluationResult");
30+
System.err.println("Status code: " + e.getCode());
31+
System.err.println("Reason: " + e.getResponseBody());
32+
System.err.println("Response headers: " + e.getResponseHeaders());
33+
e.printStackTrace();
34+
}
35+
}
36+
}
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: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
16+
17+
DeploymentGatesEvaluationRequest body =
18+
new DeploymentGatesEvaluationRequest()
19+
.data(
20+
new DeploymentGatesEvaluationRequestData()
21+
.attributes(
22+
new DeploymentGatesEvaluationRequestAttributes()
23+
.env("staging")
24+
.identifier("pre-deploy")
25+
.primaryTag("region:us-east-1")
26+
.service("transaction-backend")
27+
.version("v1.2.3"))
28+
.type(
29+
DeploymentGatesEvaluationRequestDataType
30+
.DEPLOYMENT_GATES_EVALUATION_REQUEST));
31+
32+
try {
33+
DeploymentGatesEvaluationResponse result = apiInstance.triggerDeploymentGatesEvaluation(body);
34+
System.out.println(result);
35+
} catch (ApiException e) {
36+
System.err.println(
37+
"Exception when calling DeploymentGatesApi#triggerDeploymentGatesEvaluation");
38+
System.err.println("Status code: " + e.getCode());
39+
System.err.println("Reason: " + e.getResponseBody());
40+
System.err.println("Response headers: " + e.getResponseHeaders());
41+
e.printStackTrace();
42+
}
43+
}
44+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
16+
17+
// there is a valid "deployment_gate" in the system
18+
String DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER =
19+
System.getenv("DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER");
20+
21+
DeploymentGatesEvaluationRequest body =
22+
new DeploymentGatesEvaluationRequest()
23+
.data(
24+
new DeploymentGatesEvaluationRequestData()
25+
.attributes(
26+
new DeploymentGatesEvaluationRequestAttributes()
27+
.env("production")
28+
.identifier(DEPLOYMENT_GATE_DATA_ATTRIBUTES_IDENTIFIER)
29+
.service("my-service"))
30+
.type(
31+
DeploymentGatesEvaluationRequestDataType
32+
.DEPLOYMENT_GATES_EVALUATION_REQUEST));
33+
34+
try {
35+
DeploymentGatesEvaluationResponse result = apiInstance.triggerDeploymentGatesEvaluation(body);
36+
System.out.println(result);
37+
} catch (ApiException e) {
38+
System.err.println(
39+
"Exception when calling DeploymentGatesApi#triggerDeploymentGatesEvaluation");
40+
System.err.println("Status code: " + e.getCode());
41+
System.err.println("Reason: " + e.getResponseBody());
42+
System.err.println("Response headers: " + e.getResponseHeaders());
43+
e.printStackTrace();
44+
}
45+
}
46+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ public class ApiClient {
825825
put("v2.getDeploymentGate", false);
826826
put("v2.getDeploymentGateRules", false);
827827
put("v2.getDeploymentRule", false);
828+
put("v2.listDeploymentGates", false);
828829
put("v2.updateDeploymentGate", false);
829830
put("v2.updateDeploymentRule", false);
830831
put("v2.createHamrOrgConnection", false);

0 commit comments

Comments
 (0)