Skip to content

Commit 74df2fc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 35cfe07 of spec repo
1 parent a57af86 commit 74df2fc

File tree

69 files changed

+5057
-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.

69 files changed

+5057
-17
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 409 additions & 0 deletions
Large diffs are not rendered by default.
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: 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)