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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-02-27 21:31:36.139846",
"spec_repo_commit": "0b2e3d20"
"regenerated": "2025-02-28 17:49:26.181107",
"spec_repo_commit": "59e6a448"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-02-27 21:31:36.154973",
"spec_repo_commit": "0b2e3d20"
"regenerated": "2025-02-28 17:49:26.196379",
"spec_repo_commit": "59e6a448"
}
}
}
7 changes: 6 additions & 1 deletion .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7439,7 +7439,7 @@ components:
properties:
day_starts:
description: The time of the day at which a one day cumulative evaluation
window starts. Must be defined in UTC time in `HH:mm` format.
window starts.
example: 04:00
type: string
hour_starts:
Expand All @@ -7458,6 +7458,11 @@ components:
maximum: 1
minimum: 1
type: integer
timezone:
description: The timezone of the time of the day of the cumulative evaluation
window start.
example: Europe/Paris
type: string
type: object
MonitorOverallStates:
description: The different states your monitor can be in.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
@JsonPropertyOrder({
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_DAY_STARTS,
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_HOUR_STARTS,
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_MONTH_STARTS
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_MONTH_STARTS,
MonitorOptionsSchedulingOptionsEvaluationWindow.JSON_PROPERTY_TIMEZONE
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -39,14 +40,16 @@ public class MonitorOptionsSchedulingOptionsEvaluationWindow {
public static final String JSON_PROPERTY_MONTH_STARTS = "month_starts";
private Integer monthStarts;

public static final String JSON_PROPERTY_TIMEZONE = "timezone";
private String timezone;

public MonitorOptionsSchedulingOptionsEvaluationWindow dayStarts(String dayStarts) {
this.dayStarts = dayStarts;
return this;
}

/**
* The time of the day at which a one day cumulative evaluation window starts. Must be defined in
* UTC time in <code>HH:mm</code> format.
* The time of the day at which a one day cumulative evaluation window starts.
*
* @return dayStarts
*/
Expand Down Expand Up @@ -105,6 +108,27 @@ public void setMonthStarts(Integer monthStarts) {
this.monthStarts = monthStarts;
}

public MonitorOptionsSchedulingOptionsEvaluationWindow timezone(String timezone) {
this.timezone = timezone;
return this;
}

/**
* The timezone of the time of the day of the cumulative evaluation window start.
*
* @return timezone
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TIMEZONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTimezone() {
return timezone;
}

public void setTimezone(String timezone) {
this.timezone = timezone;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -169,14 +193,15 @@ public boolean equals(Object o) {
this.hourStarts, monitorOptionsSchedulingOptionsEvaluationWindow.hourStarts)
&& Objects.equals(
this.monthStarts, monitorOptionsSchedulingOptionsEvaluationWindow.monthStarts)
&& Objects.equals(this.timezone, monitorOptionsSchedulingOptionsEvaluationWindow.timezone)
&& Objects.equals(
this.additionalProperties,
monitorOptionsSchedulingOptionsEvaluationWindow.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(dayStarts, hourStarts, monthStarts, additionalProperties);
return Objects.hash(dayStarts, hourStarts, monthStarts, timezone, additionalProperties);
}

@Override
Expand All @@ -186,6 +211,7 @@ public String toString() {
sb.append(" dayStarts: ").append(toIndentedString(dayStarts)).append("\n");
sb.append(" hourStarts: ").append(toIndentedString(hourStarts)).append("\n");
sb.append(" monthStarts: ").append(toIndentedString(monthStarts)).append("\n");
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Feature: Monitors
Scenario: Edit a monitor returns "Bad Request" response
Given new "UpdateMonitor" request
And request contains "monitor_id" parameter from "REPLACE.ME"
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"}
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"}
When the request is sent
Then the response status is 400 Bad Request

Expand Down