Skip to content

Commit 6eaaaee

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0fee65c of spec repo
1 parent bb3eefc commit 6eaaaee

File tree

5 files changed

+32
-21
lines changed

5 files changed

+32
-21
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71267,7 +71267,7 @@ paths:
7126771267
content:
7126871268
application/json:
7126971269
schema:
71270-
$ref: '#/components/schemas/BudgetValidationRequest'
71270+
$ref: '#/components/schemas/BudgetWithEntries'
7127171271
description: OK
7127271272
'429':
7127371273
$ref: '#/components/responses/TooManyRequestsResponse'

examples/v2/cloud-cost-management/GetBudget.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
55
import com.datadog.api.client.v2.api.CloudCostManagementApi;
6-
import com.datadog.api.client.v2.model.BudgetValidationRequest;
6+
import com.datadog.api.client.v2.model.BudgetWithEntries;
77

88
public class Example {
99
public static void main(String[] args) {
1010
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1111
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);
1212

1313
try {
14-
BudgetValidationRequest result = apiInstance.getBudget("budget_id");
14+
BudgetWithEntries result = apiInstance.getBudget("budget_id");
1515
System.out.println(result);
1616
} catch (ApiException e) {
1717
System.err.println("Exception when calling CloudCostManagementApi#getBudget");

src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,10 +1712,10 @@ public CompletableFuture<ApiResponse<Void>> deleteTagPipelinesRulesetWithHttpInf
17121712
* <p>See {@link #getBudgetWithHttpInfo}.
17131713
*
17141714
* @param budgetId Budget id. (required)
1715-
* @return BudgetValidationRequest
1715+
* @return BudgetWithEntries
17161716
* @throws ApiException if fails to make API call
17171717
*/
1718-
public BudgetValidationRequest getBudget(String budgetId) throws ApiException {
1718+
public BudgetWithEntries getBudget(String budgetId) throws ApiException {
17191719
return getBudgetWithHttpInfo(budgetId).getData();
17201720
}
17211721

@@ -1725,9 +1725,9 @@ public BudgetValidationRequest getBudget(String budgetId) throws ApiException {
17251725
* <p>See {@link #getBudgetWithHttpInfoAsync}.
17261726
*
17271727
* @param budgetId Budget id. (required)
1728-
* @return CompletableFuture&lt;BudgetValidationRequest&gt;
1728+
* @return CompletableFuture&lt;BudgetWithEntries&gt;
17291729
*/
1730-
public CompletableFuture<BudgetValidationRequest> getBudgetAsync(String budgetId) {
1730+
public CompletableFuture<BudgetWithEntries> getBudgetAsync(String budgetId) {
17311731
return getBudgetWithHttpInfoAsync(budgetId)
17321732
.thenApply(
17331733
response -> {
@@ -1739,7 +1739,7 @@ public CompletableFuture<BudgetValidationRequest> getBudgetAsync(String budgetId
17391739
* Get a budget
17401740
*
17411741
* @param budgetId Budget id. (required)
1742-
* @return ApiResponse&lt;BudgetValidationRequest&gt;
1742+
* @return ApiResponse&lt;BudgetWithEntries&gt;
17431743
* @throws ApiException if fails to make API call
17441744
* @http.response.details
17451745
* <table border="1">
@@ -1749,8 +1749,7 @@ public CompletableFuture<BudgetValidationRequest> getBudgetAsync(String budgetId
17491749
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
17501750
* </table>
17511751
*/
1752-
public ApiResponse<BudgetValidationRequest> getBudgetWithHttpInfo(String budgetId)
1753-
throws ApiException {
1752+
public ApiResponse<BudgetWithEntries> getBudgetWithHttpInfo(String budgetId) throws ApiException {
17541753
Object localVarPostBody = null;
17551754

17561755
// verify the required parameter 'budgetId' is set
@@ -1782,7 +1781,7 @@ public ApiResponse<BudgetValidationRequest> getBudgetWithHttpInfo(String budgetI
17821781
localVarPostBody,
17831782
new HashMap<String, Object>(),
17841783
false,
1785-
new GenericType<BudgetValidationRequest>() {});
1784+
new GenericType<BudgetWithEntries>() {});
17861785
}
17871786

17881787
/**
@@ -1791,15 +1790,15 @@ public ApiResponse<BudgetValidationRequest> getBudgetWithHttpInfo(String budgetI
17911790
* <p>See {@link #getBudgetWithHttpInfo}.
17921791
*
17931792
* @param budgetId Budget id. (required)
1794-
* @return CompletableFuture&lt;ApiResponse&lt;BudgetValidationRequest&gt;&gt;
1793+
* @return CompletableFuture&lt;ApiResponse&lt;BudgetWithEntries&gt;&gt;
17951794
*/
1796-
public CompletableFuture<ApiResponse<BudgetValidationRequest>> getBudgetWithHttpInfoAsync(
1795+
public CompletableFuture<ApiResponse<BudgetWithEntries>> getBudgetWithHttpInfoAsync(
17971796
String budgetId) {
17981797
Object localVarPostBody = null;
17991798

18001799
// verify the required parameter 'budgetId' is set
18011800
if (budgetId == null) {
1802-
CompletableFuture<ApiResponse<BudgetValidationRequest>> result = new CompletableFuture<>();
1801+
CompletableFuture<ApiResponse<BudgetWithEntries>> result = new CompletableFuture<>();
18031802
result.completeExceptionally(
18041803
new ApiException(
18051804
400, "Missing the required parameter 'budgetId' when calling getBudget"));
@@ -1824,7 +1823,7 @@ public CompletableFuture<ApiResponse<BudgetValidationRequest>> getBudgetWithHttp
18241823
new String[] {"application/json"},
18251824
new String[] {"apiKeyAuth", "appKeyAuth"});
18261825
} catch (ApiException ex) {
1827-
CompletableFuture<ApiResponse<BudgetValidationRequest>> result = new CompletableFuture<>();
1826+
CompletableFuture<ApiResponse<BudgetWithEntries>> result = new CompletableFuture<>();
18281827
result.completeExceptionally(ex);
18291828
return result;
18301829
}
@@ -1836,7 +1835,7 @@ public CompletableFuture<ApiResponse<BudgetValidationRequest>> getBudgetWithHttp
18361835
localVarPostBody,
18371836
new HashMap<String, Object>(),
18381837
false,
1839-
new GenericType<BudgetValidationRequest>() {});
1838+
new GenericType<BudgetWithEntries>() {});
18401839
}
18411840

18421841
/**

src/test/java/com/datadog/api/Undo.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ public static class Parameter {
3030
public List<Parameter> parameters;
3131

3232
public Map<String, Object> getRequestParameters(
33-
Object responseData, Object requestData, Method requestBuilder, ObjectMapper mapper, Map<String, Object> pathParameters) {
33+
Object responseData,
34+
Object requestData,
35+
Method requestBuilder,
36+
ObjectMapper mapper,
37+
Map<String, Object> pathParameters) {
3438
Map<String, Object> requestParams = new HashMap<String, Object>();
3539
for (int i = 0; i < parameters.size(); i++) {
3640
Undo.UndoMethod.Parameter p = parameters.get(i);

src/test/java/com/datadog/api/World.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public void newRequest(String name) {
274274
}
275275
}
276276
parametersArray = new ArrayList<>();
277-
pathParameters = new HashMap<>(); // Clear path parameters for new request
277+
pathParameters = new HashMap<>(); // Clear path parameters for new request
278278
}
279279

280280
public void addRequestParameter(String parameterName, String value)
@@ -458,7 +458,9 @@ public void given(String apiVersion, Given step) throws Exception {
458458

459459
Undo undoSettings = UndoAction.UndoAction().getUndo(apiVersion, step.getOperationName());
460460
if (undoSettings != null) {
461-
undo.add(getRequestUndo(apiVersion, undoSettings, responseData, givenParametersArray.get(0), pathParameters));
461+
undo.add(
462+
getRequestUndo(
463+
apiVersion, undoSettings, responseData, givenParametersArray.get(0), pathParameters));
462464
}
463465

464466
if (step.source != null) {
@@ -471,7 +473,11 @@ public void given(String apiVersion, Given step) throws Exception {
471473
}
472474

473475
public Callable<?> getRequestUndo(
474-
String apiVersion, Undo undoSettings, Object responseData, Object requestData, Map<String, Object> pathParameters)
476+
String apiVersion,
477+
Undo undoSettings,
478+
Object responseData,
479+
Object requestData,
480+
Map<String, Object> pathParameters)
475481
throws Exception {
476482
// find API service based on undo tag value
477483
Class<?> undoAPIClass =
@@ -579,7 +585,9 @@ public void sendRequest() throws Exception {
579585
} catch (Exception e) {
580586
throw new Exception(e.getCause());
581587
}
582-
undo.add(getRequestUndo(apiVersion, undoSettings, responseData, parametersArray.get(0), pathParameters));
588+
undo.add(
589+
getRequestUndo(
590+
apiVersion, undoSettings, responseData, parametersArray.get(0), pathParameters));
583591
}
584592
}
585593

0 commit comments

Comments
 (0)