Skip to content

Commit 2626e96

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add missing params to ListCustomCostsFiles (#3719)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 9a91a04 commit 2626e96

File tree

3 files changed

+133
-2
lines changed

3 files changed

+133
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17831,6 +17831,18 @@ components:
1783117831
CustomCostListResponseMeta:
1783217832
description: Meta for the response from the List Custom Costs endpoints.
1783317833
properties:
17834+
count_by_status:
17835+
additionalProperties:
17836+
format: int64
17837+
type: integer
17838+
description: Number of Custom Costs files per status.
17839+
type: object
17840+
providers:
17841+
description: List of available providers.
17842+
items:
17843+
description: A provider name.
17844+
type: string
17845+
type: array
1783417846
total_filtered_count:
1783517847
description: Number of Custom Costs files returned by the List Custom Costs endpoint
1783617848
format: int64
@@ -86879,6 +86891,18 @@ paths:
8687986891
name: filter[status]
8688086892
schema:
8688186893
type: string
86894+
- description: Filter files by name with case-insensitive substring matching.
86895+
in: query
86896+
name: filter[name]
86897+
schema:
86898+
type: string
86899+
- description: Filter by provider.
86900+
in: query
86901+
name: filter[provider]
86902+
schema:
86903+
items:
86904+
type: string
86905+
type: array
8688286906
- description: Sort key with optional descending prefix
8688386907
in: query
8688486908
name: sort

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3215,6 +3215,8 @@ public static class ListCustomCostsFilesOptionalParameters {
32153215
private Long pageNumber;
32163216
private Long pageSize;
32173217
private String filterStatus;
3218+
private String filterName;
3219+
private List<String> filterProvider;
32183220
private String sort;
32193221

32203222
/**
@@ -3250,6 +3252,28 @@ public ListCustomCostsFilesOptionalParameters filterStatus(String filterStatus)
32503252
return this;
32513253
}
32523254

3255+
/**
3256+
* Set filterName.
3257+
*
3258+
* @param filterName Filter files by name with case-insensitive substring matching. (optional)
3259+
* @return ListCustomCostsFilesOptionalParameters
3260+
*/
3261+
public ListCustomCostsFilesOptionalParameters filterName(String filterName) {
3262+
this.filterName = filterName;
3263+
return this;
3264+
}
3265+
3266+
/**
3267+
* Set filterProvider.
3268+
*
3269+
* @param filterProvider Filter by provider. (optional)
3270+
* @return ListCustomCostsFilesOptionalParameters
3271+
*/
3272+
public ListCustomCostsFilesOptionalParameters filterProvider(List<String> filterProvider) {
3273+
this.filterProvider = filterProvider;
3274+
return this;
3275+
}
3276+
32533277
/**
32543278
* Set sort.
32553279
*
@@ -3342,6 +3366,8 @@ public ApiResponse<CustomCostsFileListResponse> listCustomCostsFilesWithHttpInfo
33423366
Long pageNumber = parameters.pageNumber;
33433367
Long pageSize = parameters.pageSize;
33443368
String filterStatus = parameters.filterStatus;
3369+
String filterName = parameters.filterName;
3370+
List<String> filterProvider = parameters.filterProvider;
33453371
String sort = parameters.sort;
33463372
// create path and map variables
33473373
String localVarPath = "/api/v2/cost/custom_costs";
@@ -3352,6 +3378,9 @@ public ApiResponse<CustomCostsFileListResponse> listCustomCostsFilesWithHttpInfo
33523378
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber));
33533379
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
33543380
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
3381+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName));
3382+
localVarQueryParams.addAll(
3383+
apiClient.parameterToPairs("multi", "filter[provider]", filterProvider));
33553384
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
33563385

33573386
Invocation.Builder builder =
@@ -3388,6 +3417,8 @@ public ApiResponse<CustomCostsFileListResponse> listCustomCostsFilesWithHttpInfo
33883417
Long pageNumber = parameters.pageNumber;
33893418
Long pageSize = parameters.pageSize;
33903419
String filterStatus = parameters.filterStatus;
3420+
String filterName = parameters.filterName;
3421+
List<String> filterProvider = parameters.filterProvider;
33913422
String sort = parameters.sort;
33923423
// create path and map variables
33933424
String localVarPath = "/api/v2/cost/custom_costs";
@@ -3398,6 +3429,9 @@ public ApiResponse<CustomCostsFileListResponse> listCustomCostsFilesWithHttpInfo
33983429
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber));
33993430
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
34003431
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus));
3432+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName));
3433+
localVarQueryParams.addAll(
3434+
apiClient.parameterToPairs("multi", "filter[provider]", filterProvider));
34013435
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
34023436

34033437
Invocation.Builder builder;

src/main/java/com/datadog/api/client/v2/model/CustomCostListResponseMeta.java

Lines changed: 75 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,93 @@
1212
import com.fasterxml.jackson.annotation.JsonInclude;
1313
import com.fasterxml.jackson.annotation.JsonProperty;
1414
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15+
import java.util.ArrayList;
1516
import java.util.HashMap;
17+
import java.util.List;
1618
import java.util.Map;
1719
import java.util.Objects;
1820

1921
/** Meta for the response from the List Custom Costs endpoints. */
2022
@JsonPropertyOrder({
23+
CustomCostListResponseMeta.JSON_PROPERTY_COUNT_BY_STATUS,
24+
CustomCostListResponseMeta.JSON_PROPERTY_PROVIDERS,
2125
CustomCostListResponseMeta.JSON_PROPERTY_TOTAL_FILTERED_COUNT,
2226
CustomCostListResponseMeta.JSON_PROPERTY_VERSION
2327
})
2428
@jakarta.annotation.Generated(
2529
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2630
public class CustomCostListResponseMeta {
2731
@JsonIgnore public boolean unparsed = false;
32+
public static final String JSON_PROPERTY_COUNT_BY_STATUS = "count_by_status";
33+
private Map<String, Long> countByStatus = null;
34+
35+
public static final String JSON_PROPERTY_PROVIDERS = "providers";
36+
private List<String> providers = null;
37+
2838
public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count";
2939
private Long totalFilteredCount;
3040

3141
public static final String JSON_PROPERTY_VERSION = "version";
3242
private String version;
3343

44+
public CustomCostListResponseMeta countByStatus(Map<String, Long> countByStatus) {
45+
this.countByStatus = countByStatus;
46+
return this;
47+
}
48+
49+
public CustomCostListResponseMeta putCountByStatusItem(String key, Long countByStatusItem) {
50+
if (this.countByStatus == null) {
51+
this.countByStatus = new HashMap<>();
52+
}
53+
this.countByStatus.put(key, countByStatusItem);
54+
return this;
55+
}
56+
57+
/**
58+
* Number of Custom Costs files per status.
59+
*
60+
* @return countByStatus
61+
*/
62+
@jakarta.annotation.Nullable
63+
@JsonProperty(JSON_PROPERTY_COUNT_BY_STATUS)
64+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
65+
public Map<String, Long> getCountByStatus() {
66+
return countByStatus;
67+
}
68+
69+
public void setCountByStatus(Map<String, Long> countByStatus) {
70+
this.countByStatus = countByStatus;
71+
}
72+
73+
public CustomCostListResponseMeta providers(List<String> providers) {
74+
this.providers = providers;
75+
return this;
76+
}
77+
78+
public CustomCostListResponseMeta addProvidersItem(String providersItem) {
79+
if (this.providers == null) {
80+
this.providers = new ArrayList<>();
81+
}
82+
this.providers.add(providersItem);
83+
return this;
84+
}
85+
86+
/**
87+
* List of available providers.
88+
*
89+
* @return providers
90+
*/
91+
@jakarta.annotation.Nullable
92+
@JsonProperty(JSON_PROPERTY_PROVIDERS)
93+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
94+
public List<String> getProviders() {
95+
return providers;
96+
}
97+
98+
public void setProviders(List<String> providers) {
99+
this.providers = providers;
100+
}
101+
34102
public CustomCostListResponseMeta totalFilteredCount(Long totalFilteredCount) {
35103
this.totalFilteredCount = totalFilteredCount;
36104
return this;
@@ -129,21 +197,26 @@ public boolean equals(Object o) {
129197
return false;
130198
}
131199
CustomCostListResponseMeta customCostListResponseMeta = (CustomCostListResponseMeta) o;
132-
return Objects.equals(this.totalFilteredCount, customCostListResponseMeta.totalFilteredCount)
200+
return Objects.equals(this.countByStatus, customCostListResponseMeta.countByStatus)
201+
&& Objects.equals(this.providers, customCostListResponseMeta.providers)
202+
&& Objects.equals(this.totalFilteredCount, customCostListResponseMeta.totalFilteredCount)
133203
&& Objects.equals(this.version, customCostListResponseMeta.version)
134204
&& Objects.equals(
135205
this.additionalProperties, customCostListResponseMeta.additionalProperties);
136206
}
137207

138208
@Override
139209
public int hashCode() {
140-
return Objects.hash(totalFilteredCount, version, additionalProperties);
210+
return Objects.hash(
211+
countByStatus, providers, totalFilteredCount, version, additionalProperties);
141212
}
142213

143214
@Override
144215
public String toString() {
145216
StringBuilder sb = new StringBuilder();
146217
sb.append("class CustomCostListResponseMeta {\n");
218+
sb.append(" countByStatus: ").append(toIndentedString(countByStatus)).append("\n");
219+
sb.append(" providers: ").append(toIndentedString(providers)).append("\n");
147220
sb.append(" totalFilteredCount: ").append(toIndentedString(totalFilteredCount)).append("\n");
148221
sb.append(" version: ").append(toIndentedString(version)).append("\n");
149222
sb.append(" additionalProperties: ")

0 commit comments

Comments
 (0)