Skip to content

Commit e36be46

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 71b5d7a of spec repo
1 parent 8c17dc1 commit e36be46

File tree

4 files changed

+27
-18
lines changed

4 files changed

+27
-18
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7384,6 +7384,8 @@ components:
73847384
description: The type of the object, must be `budget`.
73857385
example: ''
73867386
type: string
7387+
required:
7388+
- type
73877389
type: object
73887390
BudgetWithEntriesDataAttributes:
73897391
properties:
@@ -70572,7 +70574,7 @@ paths:
7057270574
content:
7057370575
application/json:
7057470576
schema:
70575-
$ref: '#/components/schemas/BudgetValidationRequest'
70577+
$ref: '#/components/schemas/BudgetWithEntries'
7057670578
description: OK
7057770579
'429':
7057870580
$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/main/java/com/datadog/api/client/v2/model/BudgetWithEntriesData.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import com.fasterxml.jackson.annotation.JsonAnyGetter;
1010
import com.fasterxml.jackson.annotation.JsonAnySetter;
11+
import com.fasterxml.jackson.annotation.JsonCreator;
1112
import com.fasterxml.jackson.annotation.JsonIgnore;
1213
import com.fasterxml.jackson.annotation.JsonInclude;
1314
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -35,6 +36,14 @@ public class BudgetWithEntriesData {
3536
public static final String JSON_PROPERTY_TYPE = "type";
3637
private String type;
3738

39+
public BudgetWithEntriesData() {}
40+
41+
@JsonCreator
42+
public BudgetWithEntriesData(
43+
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) {
44+
this.type = type;
45+
}
46+
3847
public BudgetWithEntriesData attributes(BudgetAttributes attributes) {
3948
this.attributes = attributes;
4049
this.unparsed |= attributes.unparsed;
@@ -88,9 +97,8 @@ public BudgetWithEntriesData type(String type) {
8897
*
8998
* @return type
9099
*/
91-
@jakarta.annotation.Nullable
92100
@JsonProperty(JSON_PROPERTY_TYPE)
93-
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
101+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
94102
public String getType() {
95103
return type;
96104
}

0 commit comments

Comments
 (0)