Skip to content

Commit d224060

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Extend Widget time schema with support for hide_incomplete_cost_data (#3091)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 382b62d commit d224060

File tree

104 files changed

+244
-140
lines changed

Some content is hidden

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

104 files changed

+244
-140
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24164,6 +24164,9 @@ components:
2416424164
additionalProperties: false
2416524165
description: Wrapper for live span
2416624166
properties:
24167+
hide_incomplete_cost_data:
24168+
description: Whether to hide incomplete cost data in the widget.
24169+
type: boolean
2416724170
live_span:
2416824171
$ref: '#/components/schemas/WidgetLiveSpan'
2416924172
type: object
@@ -24364,6 +24367,9 @@ components:
2436424367
format: int64
2436524368
minimum: 0
2436624369
type: integer
24370+
hide_incomplete_cost_data:
24371+
description: Whether to hide incomplete cost data in the widget.
24372+
type: boolean
2436724373
to:
2436824374
description: End time in seconds since epoch.
2436924375
example: 1712083128
@@ -24388,6 +24394,9 @@ components:
2438824394
WidgetNewLiveSpan:
2438924395
description: Used for arbitrary live span times, such as 17 minutes or 6 hours.
2439024396
properties:
24397+
hide_incomplete_cost_data:
24398+
description: Whether to hide incomplete cost data in the widget.
24399+
type: boolean
2439124400
type:
2439224401
$ref: '#/components/schemas/WidgetNewLiveSpanType'
2439324402
unit:

examples/v1/dashboards/CreateDashboard_3066042014.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public static void main(String[] args) {
6161
new WidgetNewLiveSpan()
6262
.type(WidgetNewLiveSpanType.LIVE)
6363
.unit(WidgetLiveSpanUnit.MINUTE)
64-
.value(8L)))
64+
.value(8L)
65+
.hideIncompleteCostData(true)))
6566
.type(TimeseriesWidgetDefinitionType.TIMESERIES)
6667
.requests(
6768
Collections.singletonList(

examples/v1/dashboards/CreateDashboard_3451918078.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public static void main(String[] args) {
6060
new WidgetNewFixedSpan()
6161
.type(WidgetNewFixedSpanType.FIXED)
6262
.from(1712080128L)
63-
.to(1712083128L)))
63+
.to(1712083128L)
64+
.hideIncompleteCostData(true)))
6465
.type(TimeseriesWidgetDefinitionType.TIMESERIES)
6566
.requests(
6667
Collections.singletonList(

examples/v1/dashboards/CreateDashboard_4262729673.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public static void main(String[] args) {
5858
.time(
5959
new WidgetTime(
6060
new WidgetLegacyLiveSpan()
61-
.liveSpan(WidgetLiveSpan.PAST_FIVE_MINUTES)))
61+
.liveSpan(WidgetLiveSpan.PAST_FIVE_MINUTES)
62+
.hideIncompleteCostData(true)))
6263
.type(TimeseriesWidgetDefinitionType.TIMESERIES)
6364
.requests(
6465
Collections.singletonList(

src/main/java/com/datadog/api/client/v1/model/WidgetLegacyLiveSpan.java

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,41 @@
1313
import java.util.Objects;
1414

1515
/** Wrapper for live span */
16-
@JsonPropertyOrder({WidgetLegacyLiveSpan.JSON_PROPERTY_LIVE_SPAN})
16+
@JsonPropertyOrder({
17+
WidgetLegacyLiveSpan.JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA,
18+
WidgetLegacyLiveSpan.JSON_PROPERTY_LIVE_SPAN
19+
})
1720
@jakarta.annotation.Generated(
1821
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
1922
public class WidgetLegacyLiveSpan {
2023
@JsonIgnore public boolean unparsed = false;
24+
public static final String JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA = "hide_incomplete_cost_data";
25+
private Boolean hideIncompleteCostData;
26+
2127
public static final String JSON_PROPERTY_LIVE_SPAN = "live_span";
2228
private WidgetLiveSpan liveSpan;
2329

30+
public WidgetLegacyLiveSpan hideIncompleteCostData(Boolean hideIncompleteCostData) {
31+
this.hideIncompleteCostData = hideIncompleteCostData;
32+
return this;
33+
}
34+
35+
/**
36+
* Whether to hide incomplete cost data in the widget.
37+
*
38+
* @return hideIncompleteCostData
39+
*/
40+
@jakarta.annotation.Nullable
41+
@JsonProperty(JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA)
42+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
43+
public Boolean getHideIncompleteCostData() {
44+
return hideIncompleteCostData;
45+
}
46+
47+
public void setHideIncompleteCostData(Boolean hideIncompleteCostData) {
48+
this.hideIncompleteCostData = hideIncompleteCostData;
49+
}
50+
2451
public WidgetLegacyLiveSpan liveSpan(WidgetLiveSpan liveSpan) {
2552
this.liveSpan = liveSpan;
2653
this.unparsed |= !liveSpan.isValid();
@@ -56,18 +83,22 @@ public boolean equals(Object o) {
5683
return false;
5784
}
5885
WidgetLegacyLiveSpan widgetLegacyLiveSpan = (WidgetLegacyLiveSpan) o;
59-
return Objects.equals(this.liveSpan, widgetLegacyLiveSpan.liveSpan);
86+
return Objects.equals(this.hideIncompleteCostData, widgetLegacyLiveSpan.hideIncompleteCostData)
87+
&& Objects.equals(this.liveSpan, widgetLegacyLiveSpan.liveSpan);
6088
}
6189

6290
@Override
6391
public int hashCode() {
64-
return Objects.hash(liveSpan);
92+
return Objects.hash(hideIncompleteCostData, liveSpan);
6593
}
6694

6795
@Override
6896
public String toString() {
6997
StringBuilder sb = new StringBuilder();
7098
sb.append("class WidgetLegacyLiveSpan {\n");
99+
sb.append(" hideIncompleteCostData: ")
100+
.append(toIndentedString(hideIncompleteCostData))
101+
.append("\n");
71102
sb.append(" liveSpan: ").append(toIndentedString(liveSpan)).append("\n");
72103
sb.append('}');
73104
return sb.toString();

src/main/java/com/datadog/api/client/v1/model/WidgetNewFixedSpan.java

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
/** Used for fixed span times, such as 'March 1 to March 7'. */
2121
@JsonPropertyOrder({
2222
WidgetNewFixedSpan.JSON_PROPERTY_FROM,
23+
WidgetNewFixedSpan.JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA,
2324
WidgetNewFixedSpan.JSON_PROPERTY_TO,
2425
WidgetNewFixedSpan.JSON_PROPERTY_TYPE
2526
})
@@ -30,6 +31,9 @@ public class WidgetNewFixedSpan {
3031
public static final String JSON_PROPERTY_FROM = "from";
3132
private Long from;
3233

34+
public static final String JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA = "hide_incomplete_cost_data";
35+
private Boolean hideIncompleteCostData;
36+
3337
public static final String JSON_PROPERTY_TO = "to";
3438
private Long to;
3539

@@ -69,6 +73,27 @@ public void setFrom(Long from) {
6973
this.from = from;
7074
}
7175

76+
public WidgetNewFixedSpan hideIncompleteCostData(Boolean hideIncompleteCostData) {
77+
this.hideIncompleteCostData = hideIncompleteCostData;
78+
return this;
79+
}
80+
81+
/**
82+
* Whether to hide incomplete cost data in the widget.
83+
*
84+
* @return hideIncompleteCostData
85+
*/
86+
@jakarta.annotation.Nullable
87+
@JsonProperty(JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA)
88+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
89+
public Boolean getHideIncompleteCostData() {
90+
return hideIncompleteCostData;
91+
}
92+
93+
public void setHideIncompleteCostData(Boolean hideIncompleteCostData) {
94+
this.hideIncompleteCostData = hideIncompleteCostData;
95+
}
96+
7297
public WidgetNewFixedSpan to(Long to) {
7398
this.to = to;
7499
return this;
@@ -170,21 +195,25 @@ public boolean equals(Object o) {
170195
}
171196
WidgetNewFixedSpan widgetNewFixedSpan = (WidgetNewFixedSpan) o;
172197
return Objects.equals(this.from, widgetNewFixedSpan.from)
198+
&& Objects.equals(this.hideIncompleteCostData, widgetNewFixedSpan.hideIncompleteCostData)
173199
&& Objects.equals(this.to, widgetNewFixedSpan.to)
174200
&& Objects.equals(this.type, widgetNewFixedSpan.type)
175201
&& Objects.equals(this.additionalProperties, widgetNewFixedSpan.additionalProperties);
176202
}
177203

178204
@Override
179205
public int hashCode() {
180-
return Objects.hash(from, to, type, additionalProperties);
206+
return Objects.hash(from, hideIncompleteCostData, to, type, additionalProperties);
181207
}
182208

183209
@Override
184210
public String toString() {
185211
StringBuilder sb = new StringBuilder();
186212
sb.append("class WidgetNewFixedSpan {\n");
187213
sb.append(" from: ").append(toIndentedString(from)).append("\n");
214+
sb.append(" hideIncompleteCostData: ")
215+
.append(toIndentedString(hideIncompleteCostData))
216+
.append("\n");
188217
sb.append(" to: ").append(toIndentedString(to)).append("\n");
189218
sb.append(" type: ").append(toIndentedString(type)).append("\n");
190219
sb.append(" additionalProperties: ")

src/main/java/com/datadog/api/client/v1/model/WidgetNewLiveSpan.java

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
/** Used for arbitrary live span times, such as 17 minutes or 6 hours. */
2121
@JsonPropertyOrder({
22+
WidgetNewLiveSpan.JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA,
2223
WidgetNewLiveSpan.JSON_PROPERTY_TYPE,
2324
WidgetNewLiveSpan.JSON_PROPERTY_UNIT,
2425
WidgetNewLiveSpan.JSON_PROPERTY_VALUE
@@ -27,6 +28,9 @@
2728
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2829
public class WidgetNewLiveSpan {
2930
@JsonIgnore public boolean unparsed = false;
31+
public static final String JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA = "hide_incomplete_cost_data";
32+
private Boolean hideIncompleteCostData;
33+
3034
public static final String JSON_PROPERTY_TYPE = "type";
3135
private WidgetNewLiveSpanType type;
3236

@@ -50,6 +54,27 @@ public WidgetNewLiveSpan(
5054
this.value = value;
5155
}
5256

57+
public WidgetNewLiveSpan hideIncompleteCostData(Boolean hideIncompleteCostData) {
58+
this.hideIncompleteCostData = hideIncompleteCostData;
59+
return this;
60+
}
61+
62+
/**
63+
* Whether to hide incomplete cost data in the widget.
64+
*
65+
* @return hideIncompleteCostData
66+
*/
67+
@jakarta.annotation.Nullable
68+
@JsonProperty(JSON_PROPERTY_HIDE_INCOMPLETE_COST_DATA)
69+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
70+
public Boolean getHideIncompleteCostData() {
71+
return hideIncompleteCostData;
72+
}
73+
74+
public void setHideIncompleteCostData(Boolean hideIncompleteCostData) {
75+
this.hideIncompleteCostData = hideIncompleteCostData;
76+
}
77+
5378
public WidgetNewLiveSpan type(WidgetNewLiveSpanType type) {
5479
this.type = type;
5580
this.unparsed |= !type.isValid();
@@ -174,21 +199,25 @@ public boolean equals(Object o) {
174199
return false;
175200
}
176201
WidgetNewLiveSpan widgetNewLiveSpan = (WidgetNewLiveSpan) o;
177-
return Objects.equals(this.type, widgetNewLiveSpan.type)
202+
return Objects.equals(this.hideIncompleteCostData, widgetNewLiveSpan.hideIncompleteCostData)
203+
&& Objects.equals(this.type, widgetNewLiveSpan.type)
178204
&& Objects.equals(this.unit, widgetNewLiveSpan.unit)
179205
&& Objects.equals(this.value, widgetNewLiveSpan.value)
180206
&& Objects.equals(this.additionalProperties, widgetNewLiveSpan.additionalProperties);
181207
}
182208

183209
@Override
184210
public int hashCode() {
185-
return Objects.hash(type, unit, value, additionalProperties);
211+
return Objects.hash(hideIncompleteCostData, type, unit, value, additionalProperties);
186212
}
187213

188214
@Override
189215
public String toString() {
190216
StringBuilder sb = new StringBuilder();
191217
sb.append("class WidgetNewLiveSpan {\n");
218+
sb.append(" hideIncompleteCostData: ")
219+
.append(toIndentedString(hideIncompleteCostData))
220+
.append("\n");
192221
sb.append(" type: ").append(toIndentedString(type)).append("\n");
193222
sb.append(" unit: ").append(toIndentedString(unit)).append("\n");
194223
sb.append(" value: ").append(toIndentedString(value)).append("\n");
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-15T19:33:02.539Z
1+
2025-08-26T19:47:58.449Z

src/test/resources/cassettes/features/v1/Create_a_new_timeseries_widget_with_legacy_live_span_time_format.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"httpRequest": {
44
"body": {
55
"type": "JSON",
6-
"json": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1731699182 with legacy live span time\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"live_span\":\"5m\"},\"title\":\"\",\"type\":\"timeseries\"}}]}"
6+
"json": "{\"layout_type\":\"ordered\",\"reflow_type\":\"auto\",\"title\":\"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1756237678 with legacy live span time\",\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"live_span\":\"5m\"},\"title\":\"\",\"type\":\"timeseries\"}}]}"
77
},
88
"headers": {},
99
"method": "POST",
@@ -12,7 +12,7 @@
1212
"secure": true
1313
},
1414
"httpResponse": {
15-
"body": "{\"id\":\"3zr-n9a-dfd\",\"title\":\"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1731699182 with legacy live span time\",\"description\":null,\"author_handle\":\"[email protected]\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/3zr-n9a-dfd/test-createanewtimeserieswidgetwithlegacylivespantimeformat-1731699182-with-lega\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"live_span\":\"5m\"},\"title\":\"\",\"type\":\"timeseries\"},\"id\":5376392318113781}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:33:02.697929+00:00\",\"modified_at\":\"2024-11-15T19:33:02.697929+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}\n",
15+
"body": "{\"id\":\"wek-eci-qnn\",\"title\":\"Test-Create_a_new_timeseries_widget_with_legacy_live_span_time_format-1756237678 with legacy live span time\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/wek-eci-qnn/test-createanewtimeserieswidgetwithlegacylivespantimeformat-1756237678-with-lega\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"legend_columns\":[\"avg\",\"min\",\"max\",\"value\",\"sum\"],\"legend_layout\":\"auto\",\"requests\":[{\"display_type\":\"line\",\"formulas\":[{\"formula\":\"query1\"}],\"queries\":[{\"compute\":{\"aggregation\":\"count\",\"metric\":\"@ci.queue_time\"},\"data_source\":\"ci_pipelines\",\"group_by\":[],\"indexes\":[\"*\"],\"name\":\"query1\",\"search\":{\"query\":\"ci_level:job\"}}],\"response_format\":\"timeseries\",\"style\":{\"line_type\":\"solid\",\"line_width\":\"normal\",\"palette\":\"dog_classic\"}}],\"show_legend\":true,\"time\":{\"hide_incomplete_cost_data\":true,\"live_span\":\"5m\"},\"title\":\"\",\"type\":\"timeseries\"},\"id\":3088384387119347}],\"notify_list\":null,\"created_at\":\"2025-08-26T19:47:58.616519+00:00\",\"modified_at\":\"2025-08-26T19:47:58.616519+00:00\",\"reflow_type\":\"auto\",\"restricted_roles\":[]}",
1616
"headers": {
1717
"Content-Type": [
1818
"application/json"
@@ -27,18 +27,18 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "a6fd82da-c6a3-c543-2e93-da5bcdce17fa"
30+
"id": "447629a4-5b3f-7a06-c9ba-c705c9a3da87"
3131
},
3232
{
3333
"httpRequest": {
3434
"headers": {},
3535
"method": "DELETE",
36-
"path": "/api/v1/dashboard/3zr-n9a-dfd",
36+
"path": "/api/v1/dashboard/wek-eci-qnn",
3737
"keepAlive": false,
3838
"secure": true
3939
},
4040
"httpResponse": {
41-
"body": "{\"deleted_dashboard_id\":\"3zr-n9a-dfd\"}\n",
41+
"body": "{\"deleted_dashboard_id\":\"wek-eci-qnn\"}\n",
4242
"headers": {
4343
"Content-Type": [
4444
"application/json"
@@ -53,6 +53,6 @@
5353
"timeToLive": {
5454
"unlimited": true
5555
},
56-
"id": "a6c4aaad-8c42-4e78-4894-b0edb52912d0"
56+
"id": "df82e41a-4abb-7bf3-fc08-a743973341b0"
5757
}
5858
]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-11-15T19:33:02.942Z
1+
2025-08-26T19:47:58.908Z

0 commit comments

Comments
 (0)