Skip to content

Commit 21107f3

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 0895ae7 of spec repo (#3883)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent d866ebd commit 21107f3

10 files changed

Lines changed: 892 additions & 32 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,6 +1345,50 @@ components:
13451345
type: string
13461346
x-enum-varnames:
13471347
- COHORT
1348+
ComparisonCustomTimeframe:
1349+
description: Fixed time range for a `custom_timeframe` comparison.
1350+
properties:
1351+
from:
1352+
description: Start time in milliseconds since epoch.
1353+
example: 1779290190000
1354+
format: int64
1355+
type: integer
1356+
to:
1357+
description: End time in milliseconds since epoch.
1358+
example: 1779894990000
1359+
format: int64
1360+
type: integer
1361+
required:
1362+
- from
1363+
- to
1364+
type: object
1365+
ComparisonDuration:
1366+
description: The comparison period. Use a preset `type` value or set `type` to `custom_timeframe` and provide `custom_timeframe` with explicit millisecond epoch bounds.
1367+
properties:
1368+
custom_timeframe:
1369+
$ref: "#/components/schemas/ComparisonCustomTimeframe"
1370+
description: Required when `type` is `custom_timeframe`. Fixed time range to compare against.
1371+
type:
1372+
$ref: "#/components/schemas/ComparisonDurationType"
1373+
required:
1374+
- type
1375+
type: object
1376+
ComparisonDurationType:
1377+
description: "The comparison window type."
1378+
enum:
1379+
- previous_timeframe
1380+
- custom_timeframe
1381+
- previous_day
1382+
- previous_week
1383+
- previous_month
1384+
example: previous_timeframe
1385+
type: string
1386+
x-enum-varnames:
1387+
- PREVIOUS_TIMEFRAME
1388+
- CUSTOM_TIMEFRAME
1389+
- PREVIOUS_DAY
1390+
- PREVIOUS_WEEK
1391+
- PREVIOUS_MONTH
13481392
ContentEncoding:
13491393
description: HTTP header used to compress the media-type.
13501394
enum:
@@ -12064,6 +12108,43 @@ components:
1206412108
x-enum-varnames:
1206512109
- ASC
1206612110
- DESC
12111+
QueryValueWidgetComparison:
12112+
description: A change indicator that compares the current value to a historical period.
12113+
properties:
12114+
directionality:
12115+
$ref: "#/components/schemas/QueryValueWidgetComparisonDirectionality"
12116+
description: Which direction of change is considered an improvement, determining the indicator color.
12117+
duration:
12118+
$ref: "#/components/schemas/ComparisonDuration"
12119+
type:
12120+
$ref: "#/components/schemas/QueryValueWidgetComparisonType"
12121+
required:
12122+
- duration
12123+
type: object
12124+
QueryValueWidgetComparisonDirectionality:
12125+
default: neutral
12126+
description: "Color-coding direction: `increase_better` (green on rise), `decrease_better` (green on drop), or `neutral` (no color)."
12127+
enum:
12128+
- increase_better
12129+
- decrease_better
12130+
- neutral
12131+
type: string
12132+
x-enum-varnames:
12133+
- INCREASE_BETTER
12134+
- DECREASE_BETTER
12135+
- NEUTRAL
12136+
QueryValueWidgetComparisonType:
12137+
default: absolute
12138+
description: "How the delta is expressed: `absolute` (raw difference), `relative` (percentage), or `both`."
12139+
enum:
12140+
- absolute
12141+
- relative
12142+
- both
12143+
type: string
12144+
x-enum-varnames:
12145+
- ABSOLUTE
12146+
- RELATIVE
12147+
- BOTH
1206712148
QueryValueWidgetDefinition:
1206812149
description: Query values display the current value of a given metric, APM, or log query.
1206912150
properties:
@@ -12135,6 +12216,9 @@ components:
1213512216
$ref: "#/components/schemas/LogQueryDefinition"
1213612217
deprecated: true
1213712218
description: Deprecated - Use `queries` and `formulas` instead.
12219+
comparison:
12220+
$ref: "#/components/schemas/QueryValueWidgetComparison"
12221+
description: Displays a change indicator showing a delta against a historical baseline.
1213812222
conditional_formats:
1213912223
description: List of conditional formats.
1214012224
items:

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66681,9 +66681,6 @@ components:
6668166681
filter:
6668266682
description: Filter expression applied to the recommendations.
6668366683
type: string
66684-
scope:
66685-
description: Recommendations scope. Defaults to `ccm`; use `experiment` for experimental recommendations or `*` for both.
66686-
type: string
6668766684
sort:
6668866685
description: Ordered list of sort clauses applied to the result set.
6668966686
items:
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
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+
/** Fixed time range for a <code>custom_timeframe</code> comparison. */
21+
@JsonPropertyOrder({
22+
ComparisonCustomTimeframe.JSON_PROPERTY_FROM,
23+
ComparisonCustomTimeframe.JSON_PROPERTY_TO
24+
})
25+
@jakarta.annotation.Generated(
26+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
27+
public class ComparisonCustomTimeframe {
28+
@JsonIgnore public boolean unparsed = false;
29+
public static final String JSON_PROPERTY_FROM = "from";
30+
private Long from;
31+
32+
public static final String JSON_PROPERTY_TO = "to";
33+
private Long to;
34+
35+
public ComparisonCustomTimeframe() {}
36+
37+
@JsonCreator
38+
public ComparisonCustomTimeframe(
39+
@JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from,
40+
@JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) {
41+
this.from = from;
42+
this.to = to;
43+
}
44+
45+
public ComparisonCustomTimeframe from(Long from) {
46+
this.from = from;
47+
return this;
48+
}
49+
50+
/**
51+
* Start time in milliseconds since epoch.
52+
*
53+
* @return from
54+
*/
55+
@JsonProperty(JSON_PROPERTY_FROM)
56+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
57+
public Long getFrom() {
58+
return from;
59+
}
60+
61+
public void setFrom(Long from) {
62+
this.from = from;
63+
}
64+
65+
public ComparisonCustomTimeframe to(Long to) {
66+
this.to = to;
67+
return this;
68+
}
69+
70+
/**
71+
* End time in milliseconds since epoch.
72+
*
73+
* @return to
74+
*/
75+
@JsonProperty(JSON_PROPERTY_TO)
76+
@JsonInclude(value = JsonInclude.Include.ALWAYS)
77+
public Long getTo() {
78+
return to;
79+
}
80+
81+
public void setTo(Long to) {
82+
this.to = to;
83+
}
84+
85+
/**
86+
* A container for additional, undeclared properties. This is a holder for any undeclared
87+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
88+
*/
89+
private Map<String, Object> additionalProperties;
90+
91+
/**
92+
* Set the additional (undeclared) property with the specified name and value. If the property
93+
* does not already exist, create it otherwise replace it.
94+
*
95+
* @param key The arbitrary key to set
96+
* @param value The associated value
97+
* @return ComparisonCustomTimeframe
98+
*/
99+
@JsonAnySetter
100+
public ComparisonCustomTimeframe putAdditionalProperty(String key, Object value) {
101+
if (this.additionalProperties == null) {
102+
this.additionalProperties = new HashMap<String, Object>();
103+
}
104+
this.additionalProperties.put(key, value);
105+
return this;
106+
}
107+
108+
/**
109+
* Return the additional (undeclared) property.
110+
*
111+
* @return The additional properties
112+
*/
113+
@JsonAnyGetter
114+
public Map<String, Object> getAdditionalProperties() {
115+
return additionalProperties;
116+
}
117+
118+
/**
119+
* Return the additional (undeclared) property with the specified name.
120+
*
121+
* @param key The arbitrary key to get
122+
* @return The specific additional property for the given key
123+
*/
124+
public Object getAdditionalProperty(String key) {
125+
if (this.additionalProperties == null) {
126+
return null;
127+
}
128+
return this.additionalProperties.get(key);
129+
}
130+
131+
/** Return true if this ComparisonCustomTimeframe object is equal to o. */
132+
@Override
133+
public boolean equals(Object o) {
134+
if (this == o) {
135+
return true;
136+
}
137+
if (o == null || getClass() != o.getClass()) {
138+
return false;
139+
}
140+
ComparisonCustomTimeframe comparisonCustomTimeframe = (ComparisonCustomTimeframe) o;
141+
return Objects.equals(this.from, comparisonCustomTimeframe.from)
142+
&& Objects.equals(this.to, comparisonCustomTimeframe.to)
143+
&& Objects.equals(
144+
this.additionalProperties, comparisonCustomTimeframe.additionalProperties);
145+
}
146+
147+
@Override
148+
public int hashCode() {
149+
return Objects.hash(from, to, additionalProperties);
150+
}
151+
152+
@Override
153+
public String toString() {
154+
StringBuilder sb = new StringBuilder();
155+
sb.append("class ComparisonCustomTimeframe {\n");
156+
sb.append(" from: ").append(toIndentedString(from)).append("\n");
157+
sb.append(" to: ").append(toIndentedString(to)).append("\n");
158+
sb.append(" additionalProperties: ")
159+
.append(toIndentedString(additionalProperties))
160+
.append("\n");
161+
sb.append('}');
162+
return sb.toString();
163+
}
164+
165+
/**
166+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
167+
*/
168+
private String toIndentedString(Object o) {
169+
if (o == null) {
170+
return "null";
171+
}
172+
return o.toString().replace("\n", "\n ");
173+
}
174+
}

0 commit comments

Comments
 (0)