Skip to content

Commit a637ce4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Fix GetBudget endpoint to return BudgetWithEntries instead of BudgetValidationRequest (#3423)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 4194d8e commit a637ce4

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71515,7 +71515,7 @@ paths:
7151571515
content:
7151671516
application/json:
7151771517
schema:
71518-
$ref: '#/components/schemas/BudgetValidationRequest'
71518+
$ref: '#/components/schemas/BudgetWithEntries'
7151971519
description: OK
7152071520
'429':
7152171521
$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
/**

0 commit comments

Comments
 (0)