Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,8 @@ components:
description: Description of the dashboard.
nullable: true
type: string
experience_type:
$ref: "#/components/schemas/DashboardExperienceType"
id:
description: ID of the dashboard.
example: "123-abc-456"
Expand Down Expand Up @@ -1573,6 +1575,17 @@ components:
description: ID of the deleted dashboard.
type: string
type: object
DashboardExperienceType:
description: The experience type of the dashboard.
enum:
- default
- product_analytics
example: default
readOnly: true
type: string
x-enum-varnames:
- DEFAULT
- PRODUCT_ANALYTICS
DashboardFixedTimeframe:
description: A fixed dashboard timeframe.
properties:
Expand Down
19 changes: 19 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 @@ -31,6 +31,7 @@
Dashboard.JSON_PROPERTY_CREATED_AT,
Dashboard.JSON_PROPERTY_DEFAULT_TIMEFRAME,
Dashboard.JSON_PROPERTY_DESCRIPTION,
Dashboard.JSON_PROPERTY_EXPERIENCE_TYPE,
Dashboard.JSON_PROPERTY_ID,
Dashboard.JSON_PROPERTY_IS_READ_ONLY,
Dashboard.JSON_PROPERTY_LAYOUT_TYPE,
Expand Down Expand Up @@ -65,6 +66,9 @@ public class Dashboard {
public static final String JSON_PROPERTY_DESCRIPTION = "description";
private JsonNullable<String> description = JsonNullable.<String>undefined();

public static final String JSON_PROPERTY_EXPERIENCE_TYPE = "experience_type";
private DashboardExperienceType experienceType;

public static final String JSON_PROPERTY_ID = "id";
private String id;

Expand Down Expand Up @@ -233,6 +237,18 @@ public void setDescription(String description) {
this.description = JsonNullable.<String>of(description);
}

/**
* The experience type of the dashboard.
*
* @return experienceType
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_EXPERIENCE_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DashboardExperienceType getExperienceType() {
return experienceType;
}

/**
* ID of the dashboard.
*
Expand Down Expand Up @@ -718,6 +734,7 @@ public boolean equals(Object o) {
&& Objects.equals(this.createdAt, dashboard.createdAt)
&& Objects.equals(this.defaultTimeframe, dashboard.defaultTimeframe)
&& Objects.equals(this.description, dashboard.description)
&& Objects.equals(this.experienceType, dashboard.experienceType)
&& Objects.equals(this.id, dashboard.id)
&& Objects.equals(this.isReadOnly, dashboard.isReadOnly)
&& Objects.equals(this.layoutType, dashboard.layoutType)
Expand All @@ -743,6 +760,7 @@ public int hashCode() {
createdAt,
defaultTimeframe,
description,
experienceType,
id,
isReadOnly,
layoutType,
Expand All @@ -769,6 +787,7 @@ public String toString() {
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(" experienceType: ").append(toIndentedString(experienceType)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" isReadOnly: ").append(toIndentedString(isReadOnly)).append("\n");
sb.append(" layoutType: ").append(toIndentedString(layoutType)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

package com.datadog.api.client.v1.model;

import com.datadog.api.client.ModelEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/** The experience type of the dashboard. */
@JsonSerialize(using = DashboardExperienceType.DashboardExperienceTypeSerializer.class)
public class DashboardExperienceType extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("default", "product_analytics"));

public static final DashboardExperienceType DEFAULT = new DashboardExperienceType("default");
public static final DashboardExperienceType PRODUCT_ANALYTICS =
new DashboardExperienceType("product_analytics");

DashboardExperienceType(String value) {
super(value, allowedValues);
}

public static class DashboardExperienceTypeSerializer
extends StdSerializer<DashboardExperienceType> {
public DashboardExperienceTypeSerializer(Class<DashboardExperienceType> t) {
super(t);
}

public DashboardExperienceTypeSerializer() {
this(null);
}

@Override
public void serialize(
DashboardExperienceType value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeObject(value.value);
}
}

@JsonCreator
public static DashboardExperienceType fromValue(String value) {
return new DashboardExperienceType(value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,7 @@ Feature: Dashboards
When the request is sent
Then the response status is 200 OK
And the response "description" is equal to null
And the response "experience_type" is equal to "default"

@replay-only @team:DataDog/dashboards-backend
Scenario: Get a dashboard returns 'author_name'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11619,15 +11619,15 @@
},
{
"feature": "Dashboards",
"frozen_at": "2024-11-15T19:33:06.052Z",
"frozen_at": "2026-10-01T01:04:23.267Z",
"interactions": [
{
"request": {
"body": {
"type": "json",
"value": {
"layout_type": "ordered",
"title": "Test-Get_a_dashboard_returns_OK_response-1731699186 with Profile Metrics Query",
"title": "Test-Get_a_dashboard_returns_OK_response-1790816663 with Profile Metrics Query",
"widgets": [
{
"definition": {
Expand Down Expand Up @@ -11669,7 +11669,7 @@
"response": {
"body": {
"encoding": "text",
"value": "{\"id\":\"448-ktj-ezs\",\"title\":\"Test-Get_a_dashboard_returns_OK_response-1731699186 with Profile Metrics Query\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/448-ktj-ezs/test-getadashboardreturnsokresponse-1731699186-with-profile-metrics-query\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"profile_metrics_query\":{\"compute\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\"},\"group_by\":[{\"facet\":\"service\",\"limit\":10,\"sort\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\",\"order\":\"desc\"}}],\"search\":{\"query\":\"runtime:jvm\"}}}],\"type\":\"timeseries\"},\"id\":7381515167611300}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:33:06.217022+00:00\",\"modified_at\":\"2024-11-15T19:33:06.217022+00:00\",\"restricted_roles\":[]}\n"
"value": "{\"id\":\"223-fhs-m3a\",\"title\":\"Test-Get_a_dashboard_returns_OK_response-1790816663 with Profile Metrics Query\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":\"frog\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/223-fhs-m3a/test-getadashboardreturnsokresponse-1790816663-with-profile-metrics-query\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"profile_metrics_query\":{\"compute\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\"},\"group_by\":[{\"facet\":\"service\",\"limit\":10,\"sort\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\",\"order\":\"desc\"}}],\"search\":{\"query\":\"runtime:jvm\"}}}],\"type\":\"timeseries\"},\"id\":737698456766602}],\"notify_list\":null,\"created_at\":\"2026-10-01T01:04:23.449294+00:00\",\"modified_at\":\"2026-10-01T01:04:23.449294+00:00\",\"experience_type\":\"default\",\"restricted_roles\":[]}"
},
"headers": {
"content-type": "application/json"
Expand All @@ -11686,13 +11686,13 @@
},
"content_type": "",
"method": "GET",
"path": "/api/v1/dashboard/448-ktj-ezs",
"path": "/api/v1/dashboard/223-fhs-m3a",
"query": []
},
"response": {
"body": {
"encoding": "text",
"value": "{\"id\":\"448-ktj-ezs\",\"title\":\"Test-Get_a_dashboard_returns_OK_response-1731699186 with Profile Metrics Query\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":null,\"layout_type\":\"ordered\",\"url\":\"/dashboard/448-ktj-ezs/test-getadashboardreturnsokresponse-1731699186-with-profile-metrics-query\",\"is_read_only\":false,\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"profile_metrics_query\":{\"compute\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\"},\"group_by\":[{\"facet\":\"service\",\"limit\":10,\"sort\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\",\"order\":\"desc\"}}],\"search\":{\"query\":\"runtime:jvm\"}}}],\"type\":\"timeseries\"},\"id\":7381515167611300}],\"notify_list\":null,\"created_at\":\"2024-11-15T19:33:06.217022+00:00\",\"modified_at\":\"2024-11-15T19:33:06.217022+00:00\",\"restricted_roles\":[]}\n"
"value": "{\"id\":\"223-fhs-m3a\",\"title\":\"Test-Get_a_dashboard_returns_OK_response-1790816663 with Profile Metrics Query\",\"description\":null,\"author_handle\":\"frog@datadoghq.com\",\"author_name\":\"frog\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/223-fhs-m3a/test-getadashboardreturnsokresponse-1790816663-with-profile-metrics-query\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"profile_metrics_query\":{\"compute\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\"},\"group_by\":[{\"facet\":\"service\",\"limit\":10,\"sort\":{\"aggregation\":\"sum\",\"facet\":\"@prof_core_cpu_cores\",\"order\":\"desc\"}}],\"search\":{\"query\":\"runtime:jvm\"}}}],\"type\":\"timeseries\"},\"id\":737698456766602}],\"notify_list\":null,\"created_at\":\"2026-10-01T01:04:23.449294+00:00\",\"modified_at\":\"2026-10-01T01:04:23.449294+00:00\",\"experience_type\":\"default\",\"restricted_roles\":[]}"
},
"headers": {
"content-type": "application/json"
Expand All @@ -11709,13 +11709,13 @@
},
"content_type": "",
"method": "DELETE",
"path": "/api/v1/dashboard/448-ktj-ezs",
"path": "/api/v1/dashboard/223-fhs-m3a",
"query": []
},
"response": {
"body": {
"encoding": "text",
"value": "{\"deleted_dashboard_id\":\"448-ktj-ezs\"}\n"
"value": "{\"deleted_dashboard_id\":\"223-fhs-m3a\"}"
},
"headers": {
"content-type": "application/json"
Expand Down
Loading