diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 3ade5f79a8a..fade3e94202 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -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" @@ -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: diff --git a/src/main/java/com/datadog/api/client/v1/model/Dashboard.java b/src/main/java/com/datadog/api/client/v1/model/Dashboard.java index 0e830d7eb2b..3bed032a246 100644 --- a/src/main/java/com/datadog/api/client/v1/model/Dashboard.java +++ b/src/main/java/com/datadog/api/client/v1/model/Dashboard.java @@ -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, @@ -65,6 +66,9 @@ public class Dashboard { public static final String JSON_PROPERTY_DESCRIPTION = "description"; private JsonNullable description = JsonNullable.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; @@ -233,6 +237,18 @@ public void setDescription(String description) { this.description = JsonNullable.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. * @@ -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) @@ -743,6 +760,7 @@ public int hashCode() { createdAt, defaultTimeframe, description, + experienceType, id, isReadOnly, layoutType, @@ -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"); diff --git a/src/main/java/com/datadog/api/client/v1/model/DashboardExperienceType.java b/src/main/java/com/datadog/api/client/v1/model/DashboardExperienceType.java new file mode 100644 index 00000000000..3d243a3f3d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/DashboardExperienceType.java @@ -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 { + + private static final Set allowedValues = + new HashSet(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 { + public DashboardExperienceTypeSerializer(Class 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); + } +} diff --git a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature index dc368642f59..1bb0ed3bdef 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature @@ -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' diff --git a/src/test/resources/generated-test/test-server-data/v1/dashboards.json b/src/test/resources/generated-test/test-server-data/v1/dashboards.json index 60c6c752266..7c47fc45411 100644 --- a/src/test/resources/generated-test/test-server-data/v1/dashboards.json +++ b/src/test/resources/generated-test/test-server-data/v1/dashboards.json @@ -11619,7 +11619,7 @@ }, { "feature": "Dashboards", - "frozen_at": "2024-11-15T19:33:06.052Z", + "frozen_at": "2026-10-01T01:04:23.267Z", "interactions": [ { "request": { @@ -11627,7 +11627,7 @@ "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": { @@ -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" @@ -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" @@ -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"