Skip to content

Commit 7b34c84

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5eb3f25 of spec repo
1 parent b4ed531 commit 7b34c84

File tree

77 files changed

+9836
-2
lines changed

Some content is hidden

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

77 files changed

+9836
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 849 additions & 2 deletions
Large diffs are not rendered by default.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Create deployment gate 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.CreateDeploymentGateParams;
7+
import com.datadog.api.client.v2.model.CreateDeploymentGateParamsData;
8+
import com.datadog.api.client.v2.model.CreateDeploymentGateParamsDataAttributes;
9+
import com.datadog.api.client.v2.model.DeploymentGateDataType;
10+
import com.datadog.api.client.v2.model.DeploymentGateResponse;
11+
12+
public class Example {
13+
public static void main(String[] args) {
14+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
15+
defaultClient.setUnstableOperationEnabled("v2.createDeploymentGate", true);
16+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
17+
18+
CreateDeploymentGateParams body =
19+
new CreateDeploymentGateParams()
20+
.data(
21+
new CreateDeploymentGateParamsData()
22+
.attributes(
23+
new CreateDeploymentGateParamsDataAttributes()
24+
.dryRun(false)
25+
.env("production")
26+
.identifier("my-gate-1")
27+
.service("my-service"))
28+
.type(DeploymentGateDataType.DEPLOYMENT_GATE));
29+
30+
try {
31+
DeploymentGateResponse result = apiInstance.createDeploymentGate(body);
32+
System.out.println(result);
33+
} catch (ApiException e) {
34+
System.err.println("Exception when calling DeploymentGatesApi#createDeploymentGate");
35+
System.err.println("Status code: " + e.getCode());
36+
System.err.println("Reason: " + e.getResponseBody());
37+
System.err.println("Response headers: " + e.getResponseHeaders());
38+
e.printStackTrace();
39+
}
40+
}
41+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Create deployment rule 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.CreateDeploymentRuleParams;
7+
import com.datadog.api.client.v2.model.CreateDeploymentRuleParamsData;
8+
import com.datadog.api.client.v2.model.CreateDeploymentRuleParamsDataAttributes;
9+
import com.datadog.api.client.v2.model.DeploymentRuleDataType;
10+
import com.datadog.api.client.v2.model.DeploymentRuleOptionsFaultyDeploymentDetection;
11+
import com.datadog.api.client.v2.model.DeploymentRuleResponse;
12+
import com.datadog.api.client.v2.model.DeploymentRulesOptions;
13+
14+
public class Example {
15+
public static void main(String[] args) {
16+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
17+
defaultClient.setUnstableOperationEnabled("v2.createDeploymentRule", true);
18+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
19+
20+
// there is a valid "deployment_gate" in the system
21+
String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
22+
23+
CreateDeploymentRuleParams body =
24+
new CreateDeploymentRuleParams()
25+
.data(
26+
new CreateDeploymentRuleParamsData()
27+
.attributes(
28+
new CreateDeploymentRuleParamsDataAttributes()
29+
.dryRun(false)
30+
.name("My deployment rule")
31+
.options(
32+
new DeploymentRulesOptions(
33+
new DeploymentRuleOptionsFaultyDeploymentDetection()))
34+
.type("faulty_deployment_detection"))
35+
.type(DeploymentRuleDataType.DEPLOYMENT_RULE));
36+
37+
try {
38+
DeploymentRuleResponse result =
39+
apiInstance.createDeploymentRule(DEPLOYMENT_GATE_DATA_ID, body);
40+
System.out.println(result);
41+
} catch (ApiException e) {
42+
System.err.println("Exception when calling DeploymentGatesApi#createDeploymentRule");
43+
System.err.println("Status code: " + e.getCode());
44+
System.err.println("Reason: " + e.getResponseBody());
45+
System.err.println("Response headers: " + e.getResponseHeaders());
46+
e.printStackTrace();
47+
}
48+
}
49+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Delete deployment gate returns "No Content" 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+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
defaultClient.setUnstableOperationEnabled("v2.deleteDeploymentGate", true);
11+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
12+
13+
// there is a valid "deployment_gate" in the system
14+
String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
15+
16+
try {
17+
apiInstance.deleteDeploymentGate(DEPLOYMENT_GATE_DATA_ID);
18+
} catch (ApiException e) {
19+
System.err.println("Exception when calling DeploymentGatesApi#deleteDeploymentGate");
20+
System.err.println("Status code: " + e.getCode());
21+
System.err.println("Reason: " + e.getResponseBody());
22+
System.err.println("Response headers: " + e.getResponseHeaders());
23+
e.printStackTrace();
24+
}
25+
}
26+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Delete deployment rule returns "No Content" 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+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
defaultClient.setUnstableOperationEnabled("v2.deleteDeploymentRule", true);
11+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
12+
13+
// there is a valid "deployment_gate" in the system
14+
String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
15+
16+
// there is a valid "deployment_rule" in the system
17+
String DEPLOYMENT_RULE_DATA_ID = System.getenv("DEPLOYMENT_RULE_DATA_ID");
18+
19+
try {
20+
apiInstance.deleteDeploymentRule(DEPLOYMENT_GATE_DATA_ID, DEPLOYMENT_RULE_DATA_ID);
21+
} catch (ApiException e) {
22+
System.err.println("Exception when calling DeploymentGatesApi#deleteDeploymentRule");
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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Get deployment gate 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.DeploymentGateResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getDeploymentGate", true);
12+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
13+
14+
// there is a valid "deployment_gate" in the system
15+
String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
16+
17+
try {
18+
DeploymentGateResponse result = apiInstance.getDeploymentGate(DEPLOYMENT_GATE_DATA_ID);
19+
System.out.println(result);
20+
} catch (ApiException e) {
21+
System.err.println("Exception when calling DeploymentGatesApi#getDeploymentGate");
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: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Get deployment rule 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.DeploymentRuleResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getDeploymentRule", true);
12+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
13+
14+
// there is a valid "deployment_gate" in the system
15+
String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
16+
17+
// there is a valid "deployment_rule" in the system
18+
String DEPLOYMENT_RULE_DATA_ID = System.getenv("DEPLOYMENT_RULE_DATA_ID");
19+
20+
try {
21+
DeploymentRuleResponse result =
22+
apiInstance.getDeploymentRule(DEPLOYMENT_GATE_DATA_ID, DEPLOYMENT_RULE_DATA_ID);
23+
System.out.println(result);
24+
} catch (ApiException e) {
25+
System.err.println("Exception when calling DeploymentGatesApi#getDeploymentRule");
26+
System.err.println("Status code: " + e.getCode());
27+
System.err.println("Reason: " + e.getResponseBody());
28+
System.err.println("Response headers: " + e.getResponseHeaders());
29+
e.printStackTrace();
30+
}
31+
}
32+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Update deployment gate 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.DeploymentGateDataType;
7+
import com.datadog.api.client.v2.model.DeploymentGateResponse;
8+
import com.datadog.api.client.v2.model.UpdateDeploymentGateParams;
9+
import com.datadog.api.client.v2.model.UpdateDeploymentGateParamsData;
10+
import com.datadog.api.client.v2.model.UpdateDeploymentGateParamsDataAttributes;
11+
12+
public class Example {
13+
public static void main(String[] args) {
14+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
15+
defaultClient.setUnstableOperationEnabled("v2.updateDeploymentGate", true);
16+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
17+
18+
// there is a valid "deployment_gate" in the system
19+
String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
20+
21+
UpdateDeploymentGateParams body =
22+
new UpdateDeploymentGateParams()
23+
.data(
24+
new UpdateDeploymentGateParamsData()
25+
.attributes(new UpdateDeploymentGateParamsDataAttributes().dryRun(false))
26+
.id("12345678-1234-1234-1234-123456789012")
27+
.type(DeploymentGateDataType.DEPLOYMENT_GATE));
28+
29+
try {
30+
DeploymentGateResponse result =
31+
apiInstance.updateDeploymentGate(DEPLOYMENT_GATE_DATA_ID, body);
32+
System.out.println(result);
33+
} catch (ApiException e) {
34+
System.err.println("Exception when calling DeploymentGatesApi#updateDeploymentGate");
35+
System.err.println("Status code: " + e.getCode());
36+
System.err.println("Reason: " + e.getResponseBody());
37+
System.err.println("Response headers: " + e.getResponseHeaders());
38+
e.printStackTrace();
39+
}
40+
}
41+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Update deployment rule 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.DeploymentRuleDataType;
7+
import com.datadog.api.client.v2.model.DeploymentRuleOptionsFaultyDeploymentDetection;
8+
import com.datadog.api.client.v2.model.DeploymentRuleResponse;
9+
import com.datadog.api.client.v2.model.DeploymentRulesOptions;
10+
import com.datadog.api.client.v2.model.UpdateDeploymentRuleParams;
11+
import com.datadog.api.client.v2.model.UpdateDeploymentRuleParamsData;
12+
import com.datadog.api.client.v2.model.UpdateDeploymentRuleParamsDataAttributes;
13+
14+
public class Example {
15+
public static void main(String[] args) {
16+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
17+
defaultClient.setUnstableOperationEnabled("v2.updateDeploymentRule", true);
18+
DeploymentGatesApi apiInstance = new DeploymentGatesApi(defaultClient);
19+
20+
// there is a valid "deployment_gate" in the system
21+
String DEPLOYMENT_GATE_DATA_ID = System.getenv("DEPLOYMENT_GATE_DATA_ID");
22+
23+
// there is a valid "deployment_rule" in the system
24+
String DEPLOYMENT_RULE_DATA_ID = System.getenv("DEPLOYMENT_RULE_DATA_ID");
25+
26+
UpdateDeploymentRuleParams body =
27+
new UpdateDeploymentRuleParams()
28+
.data(
29+
new UpdateDeploymentRuleParamsData()
30+
.attributes(
31+
new UpdateDeploymentRuleParamsDataAttributes()
32+
.dryRun(false)
33+
.name("Updated deployment rule")
34+
.options(
35+
new DeploymentRulesOptions(
36+
new DeploymentRuleOptionsFaultyDeploymentDetection())))
37+
.type(DeploymentRuleDataType.DEPLOYMENT_RULE));
38+
39+
try {
40+
DeploymentRuleResponse result =
41+
apiInstance.updateDeploymentRule(DEPLOYMENT_GATE_DATA_ID, DEPLOYMENT_RULE_DATA_ID, body);
42+
System.out.println(result);
43+
} catch (ApiException e) {
44+
System.err.println("Exception when calling DeploymentGatesApi#updateDeploymentRule");
45+
System.err.println("Status code: " + e.getCode());
46+
System.err.println("Reason: " + e.getResponseBody());
47+
System.err.println("Response headers: " + e.getResponseHeaders());
48+
e.printStackTrace();
49+
}
50+
}
51+
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,14 @@ public class ApiClient {
723723
put("v2.cancelDataDeletionRequest", false);
724724
put("v2.createDataDeletionRequest", false);
725725
put("v2.getDataDeletionRequests", false);
726+
put("v2.createDeploymentGate", false);
727+
put("v2.createDeploymentRule", false);
728+
put("v2.deleteDeploymentGate", false);
729+
put("v2.deleteDeploymentRule", false);
730+
put("v2.getDeploymentGate", false);
731+
put("v2.getDeploymentRule", false);
732+
put("v2.updateDeploymentGate", false);
733+
put("v2.updateDeploymentRule", false);
726734
put("v2.createIncident", false);
727735
put("v2.createIncidentImpact", false);
728736
put("v2.createIncidentIntegration", false);

0 commit comments

Comments
 (0)