Skip to content

Commit a215ae9

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6905dc7 of spec repo
1 parent a6e49cb commit a215ae9

8 files changed

Lines changed: 931 additions & 3 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,8 @@ components:
14431443
format: date-time
14441444
readOnly: true
14451445
type: string
1446+
default_timeframe:
1447+
$ref: "#/components/schemas/DashboardDefaultTimeframeSetting"
14461448
description:
14471449
description: Description of the dashboard.
14481450
nullable: true
@@ -1557,13 +1559,55 @@ components:
15571559
required:
15581560
- data
15591561
type: object
1562+
DashboardDefaultTimeframeSetting:
1563+
description: The default timeframe applied when opening the dashboard. Set to `null` to clear the dashboard's default timeframe.
1564+
discriminator:
1565+
mapping:
1566+
fixed: "#/components/schemas/DashboardFixedTimeframe"
1567+
live: "#/components/schemas/DashboardLiveTimeframe"
1568+
propertyName: type
1569+
nullable: true
1570+
oneOf:
1571+
- $ref: "#/components/schemas/DashboardLiveTimeframe"
1572+
- $ref: "#/components/schemas/DashboardFixedTimeframe"
1573+
type: object
15601574
DashboardDeleteResponse:
15611575
description: Response from the delete dashboard call.
15621576
properties:
15631577
deleted_dashboard_id:
15641578
description: ID of the deleted dashboard.
15651579
type: string
15661580
type: object
1581+
DashboardFixedTimeframe:
1582+
description: A fixed dashboard timeframe.
1583+
properties:
1584+
from:
1585+
description: Start time in milliseconds since epoch.
1586+
example: 1712080128000
1587+
format: int64
1588+
minimum: 0
1589+
type: integer
1590+
to:
1591+
description: End time in milliseconds since epoch.
1592+
example: 1712083128000
1593+
format: int64
1594+
minimum: 0
1595+
type: integer
1596+
type:
1597+
$ref: "#/components/schemas/DashboardFixedTimeframeType"
1598+
required:
1599+
- type
1600+
- from
1601+
- to
1602+
type: object
1603+
DashboardFixedTimeframeType:
1604+
description: Type of fixed timeframe.
1605+
enum:
1606+
- fixed
1607+
example: fixed
1608+
type: string
1609+
x-enum-varnames:
1610+
- FIXED
15671611
DashboardGlobalTime:
15681612
description: Object containing the live span selection for the dashboard.
15691613
properties:
@@ -1672,6 +1716,32 @@ components:
16721716
$ref: "#/components/schemas/DashboardList"
16731717
type: array
16741718
type: object
1719+
DashboardLiveTimeframe:
1720+
description: A live dashboard timeframe.
1721+
properties:
1722+
type:
1723+
$ref: "#/components/schemas/DashboardLiveTimeframeType"
1724+
unit:
1725+
$ref: "#/components/schemas/WidgetLiveSpanUnit"
1726+
value:
1727+
description: Value of the live timeframe span.
1728+
example: 4
1729+
format: int64
1730+
minimum: 1
1731+
type: integer
1732+
required:
1733+
- type
1734+
- value
1735+
- unit
1736+
type: object
1737+
DashboardLiveTimeframeType:
1738+
description: Type of live timeframe.
1739+
enum:
1740+
- live
1741+
example: live
1742+
type: string
1743+
x-enum-varnames:
1744+
- LIVE
16751745
DashboardReflowType:
16761746
description: |-
16771747
Reflow type for a **new dashboard layout** dashboard. Set this only when layout type is 'ordered'.

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

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
Dashboard.JSON_PROPERTY_AUTHOR_HANDLE,
3030
Dashboard.JSON_PROPERTY_AUTHOR_NAME,
3131
Dashboard.JSON_PROPERTY_CREATED_AT,
32+
Dashboard.JSON_PROPERTY_DEFAULT_TIMEFRAME,
3233
Dashboard.JSON_PROPERTY_DESCRIPTION,
3334
Dashboard.JSON_PROPERTY_ID,
3435
Dashboard.JSON_PROPERTY_IS_READ_ONLY,
@@ -58,6 +59,10 @@ public class Dashboard {
5859
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
5960
private OffsetDateTime createdAt;
6061

62+
public static final String JSON_PROPERTY_DEFAULT_TIMEFRAME = "default_timeframe";
63+
private JsonNullable<DashboardDefaultTimeframeSetting> defaultTimeframe =
64+
JsonNullable.<DashboardDefaultTimeframeSetting>undefined();
65+
6166
public static final String JSON_PROPERTY_DESCRIPTION = "description";
6267
private JsonNullable<String> description = JsonNullable.<String>undefined();
6368

@@ -169,6 +174,39 @@ public OffsetDateTime getCreatedAt() {
169174
return createdAt;
170175
}
171176

177+
public Dashboard defaultTimeframe(DashboardDefaultTimeframeSetting defaultTimeframe) {
178+
this.defaultTimeframe = JsonNullable.<DashboardDefaultTimeframeSetting>of(defaultTimeframe);
179+
return this;
180+
}
181+
182+
/**
183+
* The default timeframe applied when opening the dashboard. Set to <code>null</code> to clear the
184+
* dashboard's default timeframe.
185+
*
186+
* @return defaultTimeframe
187+
*/
188+
@jakarta.annotation.Nullable
189+
@JsonIgnore
190+
public DashboardDefaultTimeframeSetting getDefaultTimeframe() {
191+
return defaultTimeframe.orElse(null);
192+
}
193+
194+
@JsonProperty(JSON_PROPERTY_DEFAULT_TIMEFRAME)
195+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
196+
public JsonNullable<DashboardDefaultTimeframeSetting> getDefaultTimeframe_JsonNullable() {
197+
return defaultTimeframe;
198+
}
199+
200+
@JsonProperty(JSON_PROPERTY_DEFAULT_TIMEFRAME)
201+
public void setDefaultTimeframe_JsonNullable(
202+
JsonNullable<DashboardDefaultTimeframeSetting> defaultTimeframe) {
203+
this.defaultTimeframe = defaultTimeframe;
204+
}
205+
206+
public void setDefaultTimeframe(DashboardDefaultTimeframeSetting defaultTimeframe) {
207+
this.defaultTimeframe = JsonNullable.<DashboardDefaultTimeframeSetting>of(defaultTimeframe);
208+
}
209+
172210
public Dashboard description(String description) {
173211
this.description = JsonNullable.<String>of(description);
174212
return this;
@@ -678,6 +716,7 @@ public boolean equals(Object o) {
678716
return Objects.equals(this.authorHandle, dashboard.authorHandle)
679717
&& Objects.equals(this.authorName, dashboard.authorName)
680718
&& Objects.equals(this.createdAt, dashboard.createdAt)
719+
&& Objects.equals(this.defaultTimeframe, dashboard.defaultTimeframe)
681720
&& Objects.equals(this.description, dashboard.description)
682721
&& Objects.equals(this.id, dashboard.id)
683722
&& Objects.equals(this.isReadOnly, dashboard.isReadOnly)
@@ -702,6 +741,7 @@ public int hashCode() {
702741
authorHandle,
703742
authorName,
704743
createdAt,
744+
defaultTimeframe,
705745
description,
706746
id,
707747
isReadOnly,
@@ -727,6 +767,7 @@ public String toString() {
727767
sb.append(" authorHandle: ").append(toIndentedString(authorHandle)).append("\n");
728768
sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n");
729769
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
770+
sb.append(" defaultTimeframe: ").append(toIndentedString(defaultTimeframe)).append("\n");
730771
sb.append(" description: ").append(toIndentedString(description)).append("\n");
731772
sb.append(" id: ").append(toIndentedString(id)).append("\n");
732773
sb.append(" isReadOnly: ").append(toIndentedString(isReadOnly)).append("\n");

0 commit comments

Comments
 (0)