Skip to content

Commit 2ec414b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a1ff279 of spec repo
1 parent 4d3dc5e commit 2ec414b

6 files changed

Lines changed: 513 additions & 3 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,11 @@ components:
14431443
format: date-time
14441444
readOnly: true
14451445
type: string
1446+
default_timeframe:
1447+
allOf:
1448+
- $ref: "#/components/schemas/DashboardDefaultTimeframe"
1449+
description: The default timeframe applied when opening the dashboard. Set to `null` to reset after it has been configured.
1450+
nullable: true
14461451
description:
14471452
description: Description of the dashboard.
14481453
nullable: true
@@ -1557,6 +1562,39 @@ components:
15571562
required:
15581563
- data
15591564
type: object
1565+
DashboardDefaultTimeframe:
1566+
description: The default timeframe applied when opening the dashboard.
1567+
nullable: true
1568+
properties:
1569+
from:
1570+
description: Start time in milliseconds since epoch. Required when `type` is `fixed`.
1571+
format: int64
1572+
type: integer
1573+
to:
1574+
description: End time in milliseconds since epoch. Required when `type` is `fixed`.
1575+
format: int64
1576+
type: integer
1577+
type:
1578+
$ref: "#/components/schemas/DashboardDefaultTimeframeType"
1579+
unit:
1580+
$ref: "#/components/schemas/WidgetLiveSpanUnit"
1581+
value:
1582+
description: Value of the live timeframe span. Required when `type` is `live`.
1583+
format: int64
1584+
type: integer
1585+
required:
1586+
- type
1587+
type: object
1588+
DashboardDefaultTimeframeType:
1589+
description: Type of timeframe.
1590+
enum:
1591+
- live
1592+
- fixed
1593+
example: live
1594+
type: string
1595+
x-enum-varnames:
1596+
- LIVE
1597+
- FIXED
15601598
DashboardDeleteResponse:
15611599
description: Response from the delete dashboard call.
15621600
properties:

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

Lines changed: 39 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,9 @@ 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<Object> defaultTimeframe = JsonNullable.<Object>undefined();
64+
6165
public static final String JSON_PROPERTY_DESCRIPTION = "description";
6266
private JsonNullable<String> description = JsonNullable.<String>undefined();
6367

@@ -169,6 +173,38 @@ public OffsetDateTime getCreatedAt() {
169173
return createdAt;
170174
}
171175

176+
public Dashboard defaultTimeframe(Object defaultTimeframe) {
177+
this.defaultTimeframe = JsonNullable.<Object>of(defaultTimeframe);
178+
return this;
179+
}
180+
181+
/**
182+
* The default timeframe applied when opening the dashboard. Set to <code>null</code> to reset
183+
* after it has been configured.
184+
*
185+
* @return defaultTimeframe
186+
*/
187+
@jakarta.annotation.Nullable
188+
@JsonIgnore
189+
public Object getDefaultTimeframe() {
190+
return defaultTimeframe.orElse(null);
191+
}
192+
193+
@JsonProperty(JSON_PROPERTY_DEFAULT_TIMEFRAME)
194+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
195+
public JsonNullable<Object> getDefaultTimeframe_JsonNullable() {
196+
return defaultTimeframe;
197+
}
198+
199+
@JsonProperty(JSON_PROPERTY_DEFAULT_TIMEFRAME)
200+
public void setDefaultTimeframe_JsonNullable(JsonNullable<Object> defaultTimeframe) {
201+
this.defaultTimeframe = defaultTimeframe;
202+
}
203+
204+
public void setDefaultTimeframe(Object defaultTimeframe) {
205+
this.defaultTimeframe = JsonNullable.<Object>of(defaultTimeframe);
206+
}
207+
172208
public Dashboard description(String description) {
173209
this.description = JsonNullable.<String>of(description);
174210
return this;
@@ -678,6 +714,7 @@ public boolean equals(Object o) {
678714
return Objects.equals(this.authorHandle, dashboard.authorHandle)
679715
&& Objects.equals(this.authorName, dashboard.authorName)
680716
&& Objects.equals(this.createdAt, dashboard.createdAt)
717+
&& Objects.equals(this.defaultTimeframe, dashboard.defaultTimeframe)
681718
&& Objects.equals(this.description, dashboard.description)
682719
&& Objects.equals(this.id, dashboard.id)
683720
&& Objects.equals(this.isReadOnly, dashboard.isReadOnly)
@@ -702,6 +739,7 @@ public int hashCode() {
702739
authorHandle,
703740
authorName,
704741
createdAt,
742+
defaultTimeframe,
705743
description,
706744
id,
707745
isReadOnly,
@@ -727,6 +765,7 @@ public String toString() {
727765
sb.append(" authorHandle: ").append(toIndentedString(authorHandle)).append("\n");
728766
sb.append(" authorName: ").append(toIndentedString(authorName)).append("\n");
729767
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
768+
sb.append(" defaultTimeframe: ").append(toIndentedString(defaultTimeframe)).append("\n");
730769
sb.append(" description: ").append(toIndentedString(description)).append("\n");
731770
sb.append(" id: ").append(toIndentedString(id)).append("\n");
732771
sb.append(" isReadOnly: ").append(toIndentedString(isReadOnly)).append("\n");
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
package com.datadog.api.client.v1.model;
8+
9+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10+
import com.fasterxml.jackson.annotation.JsonAnySetter;
11+
import com.fasterxml.jackson.annotation.JsonCreator;
12+
import com.fasterxml.jackson.annotation.JsonIgnore;
13+
import com.fasterxml.jackson.annotation.JsonInclude;
14+
import com.fasterxml.jackson.annotation.JsonProperty;
15+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
16+
import java.util.HashMap;
17+
import java.util.Map;
18+
import java.util.Objects;
19+
20+
/** The default timeframe applied when opening the dashboard. */
21+
@JsonPropertyOrder({
22+
DashboardDefaultTimeframe.JSON_PROPERTY_FROM,
23+
DashboardDefaultTimeframe.JSON_PROPERTY_TO,
24+
DashboardDefaultTimeframe.JSON_PROPERTY_TYPE,
25+
DashboardDefaultTimeframe.JSON_PROPERTY_UNIT,
26+
DashboardDefaultTimeframe.JSON_PROPERTY_VALUE
27+
})
28+
@jakarta.annotation.Generated(
29+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
30+
public class DashboardDefaultTimeframe {
31+
@JsonIgnore public boolean unparsed = false;
32+
public static final String JSON_PROPERTY_FROM = "from";
33+
private Long from;
34+
35+
public static final String JSON_PROPERTY_TO = "to";
36+
private Long to;
37+
38+
public static final String JSON_PROPERTY_TYPE = "type";
39+
private DashboardDefaultTimeframeType type;
40+
41+
public static final String JSON_PROPERTY_UNIT = "unit";
42+
private WidgetLiveSpanUnit unit;
43+
44+
public static final String JSON_PROPERTY_VALUE = "value";
45+
private Long value;
46+
47+
public DashboardDefaultTimeframe() {}
48+
49+
@JsonCreator
50+
public DashboardDefaultTimeframe(
51+
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
52+
DashboardDefaultTimeframeType type) {
53+
this.type = type;
54+
this.unparsed |= !type.isValid();
55+
}
56+
57+
public DashboardDefaultTimeframe from(Long from) {
58+
this.from = from;
59+
return this;
60+
}
61+
62+
/**
63+
* Start time in milliseconds since epoch. Required when <code>type</code> is <code>fixed</code>.
64+
*
65+
* @return from
66+
*/
67+
@jakarta.annotation.Nullable
68+
@JsonProperty(JSON_PROPERTY_FROM)
69+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
70+
public Long getFrom() {
71+
return from;
72+
}
73+
74+
public void setFrom(Long from) {
75+
this.from = from;
76+
}
77+
78+
public DashboardDefaultTimeframe to(Long to) {
79+
this.to = to;
80+
return this;
81+
}
82+
83+
/**
84+
* End time in milliseconds since epoch. Required when <code>type</code> is <code>fixed</code>.
85+
*
86+
* @return to
87+
*/
88+
@jakarta.annotation.Nullable
89+
@JsonProperty(JSON_PROPERTY_TO)
90+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
91+
public Long getTo() {
92+
return to;
93+
}
94+
95+
public void setTo(Long to) {
96+
this.to = to;
97+
}
98+
99+
public DashboardDefaultTimeframe type(DashboardDefaultTimeframeType type) {
100+
this.type = type;
101+
this.unparsed |= !type.isValid();
102+
return this;
103+
}
104+
105+
/**
106+
* Type of timeframe.
107+
*
108+
* @return type
109+
*/
110+
@JsonProperty(JSON_PROPERTY_TYPE)
111+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
112+
public DashboardDefaultTimeframeType getType() {
113+
return type;
114+
}
115+
116+
public void setType(DashboardDefaultTimeframeType type) {
117+
if (!type.isValid()) {
118+
this.unparsed = true;
119+
}
120+
this.type = type;
121+
}
122+
123+
public DashboardDefaultTimeframe unit(WidgetLiveSpanUnit unit) {
124+
this.unit = unit;
125+
this.unparsed |= !unit.isValid();
126+
return this;
127+
}
128+
129+
/**
130+
* Unit of the time span.
131+
*
132+
* @return unit
133+
*/
134+
@jakarta.annotation.Nullable
135+
@JsonProperty(JSON_PROPERTY_UNIT)
136+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
137+
public WidgetLiveSpanUnit getUnit() {
138+
return unit;
139+
}
140+
141+
public void setUnit(WidgetLiveSpanUnit unit) {
142+
if (!unit.isValid()) {
143+
this.unparsed = true;
144+
}
145+
this.unit = unit;
146+
}
147+
148+
public DashboardDefaultTimeframe value(Long value) {
149+
this.value = value;
150+
return this;
151+
}
152+
153+
/**
154+
* Value of the live timeframe span. Required when <code>type</code> is <code>live</code>.
155+
*
156+
* @return value
157+
*/
158+
@jakarta.annotation.Nullable
159+
@JsonProperty(JSON_PROPERTY_VALUE)
160+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
161+
public Long getValue() {
162+
return value;
163+
}
164+
165+
public void setValue(Long value) {
166+
this.value = value;
167+
}
168+
169+
/**
170+
* A container for additional, undeclared properties. This is a holder for any undeclared
171+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
172+
*/
173+
private Map<String, Object> additionalProperties;
174+
175+
/**
176+
* Set the additional (undeclared) property with the specified name and value. If the property
177+
* does not already exist, create it otherwise replace it.
178+
*
179+
* @param key The arbitrary key to set
180+
* @param value The associated value
181+
* @return DashboardDefaultTimeframe
182+
*/
183+
@JsonAnySetter
184+
public DashboardDefaultTimeframe putAdditionalProperty(String key, Object value) {
185+
if (this.additionalProperties == null) {
186+
this.additionalProperties = new HashMap<String, Object>();
187+
}
188+
this.additionalProperties.put(key, value);
189+
return this;
190+
}
191+
192+
/**
193+
* Return the additional (undeclared) property.
194+
*
195+
* @return The additional properties
196+
*/
197+
@JsonAnyGetter
198+
public Map<String, Object> getAdditionalProperties() {
199+
return additionalProperties;
200+
}
201+
202+
/**
203+
* Return the additional (undeclared) property with the specified name.
204+
*
205+
* @param key The arbitrary key to get
206+
* @return The specific additional property for the given key
207+
*/
208+
public Object getAdditionalProperty(String key) {
209+
if (this.additionalProperties == null) {
210+
return null;
211+
}
212+
return this.additionalProperties.get(key);
213+
}
214+
215+
/** Return true if this DashboardDefaultTimeframe object is equal to o. */
216+
@Override
217+
public boolean equals(Object o) {
218+
if (this == o) {
219+
return true;
220+
}
221+
if (o == null || getClass() != o.getClass()) {
222+
return false;
223+
}
224+
DashboardDefaultTimeframe dashboardDefaultTimeframe = (DashboardDefaultTimeframe) o;
225+
return Objects.equals(this.from, dashboardDefaultTimeframe.from)
226+
&& Objects.equals(this.to, dashboardDefaultTimeframe.to)
227+
&& Objects.equals(this.type, dashboardDefaultTimeframe.type)
228+
&& Objects.equals(this.unit, dashboardDefaultTimeframe.unit)
229+
&& Objects.equals(this.value, dashboardDefaultTimeframe.value)
230+
&& Objects.equals(
231+
this.additionalProperties, dashboardDefaultTimeframe.additionalProperties);
232+
}
233+
234+
@Override
235+
public int hashCode() {
236+
return Objects.hash(from, to, type, unit, value, additionalProperties);
237+
}
238+
239+
@Override
240+
public String toString() {
241+
StringBuilder sb = new StringBuilder();
242+
sb.append("class DashboardDefaultTimeframe {\n");
243+
sb.append(" from: ").append(toIndentedString(from)).append("\n");
244+
sb.append(" to: ").append(toIndentedString(to)).append("\n");
245+
sb.append(" type: ").append(toIndentedString(type)).append("\n");
246+
sb.append(" unit: ").append(toIndentedString(unit)).append("\n");
247+
sb.append(" value: ").append(toIndentedString(value)).append("\n");
248+
sb.append(" additionalProperties: ")
249+
.append(toIndentedString(additionalProperties))
250+
.append("\n");
251+
sb.append('}');
252+
return sb.toString();
253+
}
254+
255+
/**
256+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
257+
*/
258+
private String toIndentedString(Object o) {
259+
if (o == null) {
260+
return "null";
261+
}
262+
return o.toString().replace("\n", "\n ");
263+
}
264+
}

0 commit comments

Comments
 (0)