Skip to content

Commit a8f0718

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update timezone for cumulative window (#2729)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a1f3db4 commit a8f0718

File tree

4 files changed

+41
-10
lines changed

4 files changed

+41
-10
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-02-27 21:31:36.139846",
8-
"spec_repo_commit": "0b2e3d20"
7+
"regenerated": "2025-02-28 17:49:26.181107",
8+
"spec_repo_commit": "59e6a448"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-27 21:31:36.154973",
13-
"spec_repo_commit": "0b2e3d20"
12+
"regenerated": "2025-02-28 17:49:26.196379",
13+
"spec_repo_commit": "59e6a448"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7439,7 +7439,7 @@ components:
74397439
properties:
74407440
day_starts:
74417441
description: The time of the day at which a one day cumulative evaluation
7442-
window starts. Must be defined in UTC time in `HH:mm` format.
7442+
window starts.
74437443
example: 04:00
74447444
type: string
74457445
hour_starts:
@@ -7458,6 +7458,11 @@ components:
74587458
maximum: 1
74597459
minimum: 1
74607460
type: integer
7461+
timezone:
7462+
description: The timezone of the time of the day of the cumulative evaluation
7463+
window start.
7464+
example: Europe/Paris
7465+
type: string
74617466
type: object
74627467
MonitorOverallStates:
74637468
description: The different states your monitor can be in.

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

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
@JsonPropertyOrder({
2525
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_DAY_STARTS,
2626
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_HOUR_STARTS,
27-
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_MONTH_STARTS
27+
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_MONTH_STARTS,
28+
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_TIMEZONE
2829
})
2930
@jakarta.annotation.Generated(
3031
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
@@ -39,14 +40,16 @@ public class MonitorOptionsSchedulingOptionsEvaluationWindow {
3940
public static final String JSON_PROPERTY_MONTH_STARTS = "month_starts";
4041
private Integer monthStarts;
4142

43+
public static final String JSON_PROPERTY_TIMEZONE = "timezone";
44+
private String timezone;
45+
4246
public MonitorOptionsSchedulingOptionsEvaluationWindow dayStarts(String dayStarts) {
4347
this.dayStarts = dayStarts;
4448
return this;
4549
}
4650

4751
/**
48-
* The time of the day at which a one day cumulative evaluation window starts. Must be defined in
49-
* UTC time in <code>HH:mm</code> format.
52+
* The time of the day at which a one day cumulative evaluation window starts.
5053
*
5154
* @return dayStarts
5255
*/
@@ -105,6 +108,27 @@ public void setMonthStarts(Integer monthStarts) {
105108
this.monthStarts = monthStarts;
106109
}
107110

111+
public MonitorOptionsSchedulingOptionsEvaluationWindow timezone(String timezone) {
112+
this.timezone = timezone;
113+
return this;
114+
}
115+
116+
/**
117+
* The timezone of the time of the day of the cumulative evaluation window start.
118+
*
119+
* @return timezone
120+
*/
121+
@jakarta.annotation.Nullable
122+
@JsonProperty(JSON_PROPERTY_TIMEZONE)
123+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
124+
public String getTimezone() {
125+
return timezone;
126+
}
127+
128+
public void setTimezone(String timezone) {
129+
this.timezone = timezone;
130+
}
131+
108132
/**
109133
* A container for additional, undeclared properties. This is a holder for any undeclared
110134
* properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -169,14 +193,15 @@ public boolean equals(Object o) {
169193
this.hourStarts, monitorOptionsSchedulingOptionsEvaluationWindow.hourStarts)
170194
&& Objects.equals(
171195
this.monthStarts, monitorOptionsSchedulingOptionsEvaluationWindow.monthStarts)
196+
&& Objects.equals(this.timezone, monitorOptionsSchedulingOptionsEvaluationWindow.timezone)
172197
&& Objects.equals(
173198
this.additionalProperties,
174199
monitorOptionsSchedulingOptionsEvaluationWindow.additionalProperties);
175200
}
176201

177202
@Override
178203
public int hashCode() {
179-
return Objects.hash(dayStarts, hourStarts, monthStarts, additionalProperties);
204+
return Objects.hash(dayStarts, hourStarts, monthStarts, timezone, additionalProperties);
180205
}
181206

182207
@Override
@@ -186,6 +211,7 @@ public String toString() {
186211
sb.append(" dayStarts: ").append(toIndentedString(dayStarts)).append("\n");
187212
sb.append(" hourStarts: ").append(toIndentedString(hourStarts)).append("\n");
188213
sb.append(" monthStarts: ").append(toIndentedString(monthStarts)).append("\n");
214+
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
189215
sb.append(" additionalProperties: ")
190216
.append(toIndentedString(additionalProperties))
191217
.append("\n");

src/test/resources/com/datadog/api/client/v1/api/monitors.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Feature: Monitors
164164
Scenario: Edit a monitor returns "Bad Request" response
165165
Given new "UpdateMonitor" request
166166
And request contains "monitor_id" parameter from "REPLACE.ME"
167-
And body with value {"options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "priority": null, "restricted_roles": [], "tags": [], "type": "query alert"}
167+
And body with value {"options": {"evaluation_delay": null, "include_tags": true, "min_failure_duration": 0, "min_location_failed": 1, "new_group_delay": null, "new_host_delay": 300, "no_data_timeframe": null, "notification_preset_name": "show_all", "notify_audit": false, "notify_by": [], "on_missing_data": "default", "renotify_interval": null, "renotify_occurrences": null, "renotify_statuses": ["alert"], "scheduling_options": {"custom_schedule": {"recurrences": [{"rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start": "2023-08-31T16:30:00", "timezone": "Europe/Paris"}]}, "evaluation_window": {"day_starts": "04:00", "hour_starts": 0, "month_starts": 1, "timezone": "Europe/Paris"}}, "synthetics_check_id": null, "threshold_windows": {"recovery_window": null, "trigger_window": null}, "thresholds": {"critical_recovery": null, "ok": null, "unknown": null, "warning": null, "warning_recovery": null}, "timeout_h": null, "variables": [{"compute": {"aggregation": "avg", "interval": 60000, "metric": "@duration"}, "data_source": "rum", "group_by": [{"facet": "status", "limit": 10, "sort": {"aggregation": "avg", "order": "desc"}}], "indexes": ["days-3", "days-7"], "name": "query_errors", "search": {"query": "service:query"}}]}, "priority": null, "restricted_roles": [], "tags": [], "type": "query alert"}
168168
When the request is sent
169169
Then the response status is 400 Bad Request
170170

0 commit comments

Comments
 (0)