Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,8 @@ components:
format: date-time
readOnly: true
type: string
default_timeframe:
$ref: "#/components/schemas/DashboardDefaultTimeframeSetting"
description:
description: Description of the dashboard.
nullable: true
Expand Down Expand Up @@ -1557,13 +1559,55 @@ components:
required:
- data
type: object
DashboardDefaultTimeframeSetting:
description: The default timeframe applied when opening the dashboard. Set to `null` to clear the dashboard's default timeframe.
discriminator:
mapping:
fixed: "#/components/schemas/DashboardFixedTimeframe"
live: "#/components/schemas/DashboardLiveTimeframe"
propertyName: type
nullable: true
oneOf:
- $ref: "#/components/schemas/DashboardLiveTimeframe"
- $ref: "#/components/schemas/DashboardFixedTimeframe"
type: object
DashboardDeleteResponse:
description: Response from the delete dashboard call.
properties:
deleted_dashboard_id:
description: ID of the deleted dashboard.
type: string
type: object
DashboardFixedTimeframe:
description: A fixed dashboard timeframe.
properties:
from:
description: Start time in milliseconds since epoch.
example: 1712080128000
format: int64
minimum: 0
type: integer
to:
description: End time in milliseconds since epoch.
example: 1712083128000
format: int64
minimum: 0
type: integer
type:
$ref: "#/components/schemas/DashboardFixedTimeframeType"
required:
- type
- from
- to
type: object
DashboardFixedTimeframeType:
description: Type of fixed timeframe.
enum:
- fixed
example: fixed
type: string
x-enum-varnames:
- FIXED
DashboardGlobalTime:
description: Object containing the live span selection for the dashboard.
properties:
Expand Down Expand Up @@ -1672,6 +1716,32 @@ components:
$ref: "#/components/schemas/DashboardList"
type: array
type: object
DashboardLiveTimeframe:
description: A live dashboard timeframe.
properties:
type:
$ref: "#/components/schemas/DashboardLiveTimeframeType"
unit:
$ref: "#/components/schemas/WidgetLiveSpanUnit"
value:
description: Value of the live timeframe span.
example: 4
format: int64
minimum: 1
type: integer
required:
- type
- value
- unit
type: object
DashboardLiveTimeframeType:
description: Type of live timeframe.
enum:
- live
example: live
type: string
x-enum-varnames:
- LIVE
DashboardReflowType:
description: |-
Reflow type for a **new dashboard layout** dashboard. Set this only when layout type is 'ordered'.
Expand Down
41 changes: 41 additions & 0 deletions src/main/java/com/datadog/api/client/v1/model/Dashboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
Dashboard.JSON_PROPERTY_AUTHOR_HANDLE,
Dashboard.JSON_PROPERTY_AUTHOR_NAME,
Dashboard.JSON_PROPERTY_CREATED_AT,
Dashboard.JSON_PROPERTY_DEFAULT_TIMEFRAME,
Dashboard.JSON_PROPERTY_DESCRIPTION,
Dashboard.JSON_PROPERTY_ID,
Dashboard.JSON_PROPERTY_IS_READ_ONLY,
Expand Down Expand Up @@ -58,6 +59,10 @@ public class Dashboard {
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
private OffsetDateTime createdAt;

public static final String JSON_PROPERTY_DEFAULT_TIMEFRAME = "default_timeframe";
private JsonNullable<DashboardDefaultTimeframeSetting> defaultTimeframe =
JsonNullable.<DashboardDefaultTimeframeSetting>undefined();

public static final String JSON_PROPERTY_DESCRIPTION = "description";
private JsonNullable<String> description = JsonNullable.<String>undefined();

Expand Down Expand Up @@ -169,6 +174,39 @@ public OffsetDateTime getCreatedAt() {
return createdAt;
}

public Dashboard defaultTimeframe(DashboardDefaultTimeframeSetting defaultTimeframe) {
this.defaultTimeframe = JsonNullable.<DashboardDefaultTimeframeSetting>of(defaultTimeframe);
return this;
}

/**
* The default timeframe applied when opening the dashboard. Set to <code>null</code> to clear the
* dashboard's default timeframe.
*
* @return defaultTimeframe
*/
@jakarta.annotation.Nullable
@JsonIgnore
public DashboardDefaultTimeframeSetting getDefaultTimeframe() {
return defaultTimeframe.orElse(null);
}

@JsonProperty(JSON_PROPERTY_DEFAULT_TIMEFRAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<DashboardDefaultTimeframeSetting> getDefaultTimeframe_JsonNullable() {
return defaultTimeframe;
}

@JsonProperty(JSON_PROPERTY_DEFAULT_TIMEFRAME)
public void setDefaultTimeframe_JsonNullable(
JsonNullable<DashboardDefaultTimeframeSetting> defaultTimeframe) {
this.defaultTimeframe = defaultTimeframe;
}

public void setDefaultTimeframe(DashboardDefaultTimeframeSetting defaultTimeframe) {
this.defaultTimeframe = JsonNullable.<DashboardDefaultTimeframeSetting>of(defaultTimeframe);
}

public Dashboard description(String description) {
this.description = JsonNullable.<String>of(description);
return this;
Expand Down Expand Up @@ -678,6 +716,7 @@ public boolean equals(Object o) {
return Objects.equals(this.authorHandle, dashboard.authorHandle)
&& Objects.equals(this.authorName, dashboard.authorName)
&& Objects.equals(this.createdAt, dashboard.createdAt)
&& Objects.equals(this.defaultTimeframe, dashboard.defaultTimeframe)
&& Objects.equals(this.description, dashboard.description)
&& Objects.equals(this.id, dashboard.id)
&& Objects.equals(this.isReadOnly, dashboard.isReadOnly)
Expand All @@ -702,6 +741,7 @@ public int hashCode() {
authorHandle,
authorName,
createdAt,
defaultTimeframe,
description,
id,
isReadOnly,
Expand All @@ -727,6 +767,7 @@ public String toString() {
sb.append(" authorHandle: ").append(toIndentedString(authorHandle)).append("\n");
sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" defaultTimeframe: ").append(toIndentedString(defaultTimeframe)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" isReadOnly: ").append(toIndentedString(isReadOnly)).append("\n");
Expand Down
Loading
Loading