Skip to content

Commit 13cbb55

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spectherve
authored
Regenerate client from commit 0e7768c of spec repo (#993)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: Thomas Hervé <thomas.herve@datadoghq.com>
1 parent 1f9c699 commit 13cbb55

File tree

8 files changed

+308
-54
lines changed

8 files changed

+308
-54
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.5.1.dev2",
7-
"regenerated": "2021-10-07 07:33:01.592408",
8-
"spec_repo_commit": "7a4f3f3"
7+
"regenerated": "2021-10-07 18:58:53.006965",
8+
"spec_repo_commit": "0e7768c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2021-10-07 07:34:00.461595",
13-
"spec_repo_commit": "7a4f3f3"
12+
"regenerated": "2021-10-07 18:59:47.842011",
13+
"spec_repo_commit": "0e7768c"
1414
}
1515
}
1616
}

api_docs/v1/MonitorOptions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Name | Type | Description | Notes
2424
**notifyAudit** | **Boolean** | A Boolean indicating whether tagged users is notified on changes to this monitor. | [optional]
2525
**notifyNoData** | **Boolean** | A Boolean indicating whether this monitor notifies when data stops reporting. | [optional]
2626
**renotifyInterval** | **Long** | The number of minutes after the last notification before a monitor re-notifies on the current status. It only re-notifies if it’s not resolved. | [optional]
27+
**renotifyOccurrences** | **Long** | The number of times re-notification messages should be sent on the current status at the provided re-notification interval. | [optional]
28+
**renotifyStatuses** | **List&lt;MonitorRenotifyStatusType&gt;** | The types of monitor statuses for which re-notification messages are sent. | [optional]
2729
**requireFullWindow** | **Boolean** | A Boolean indicating whether this monitor needs a full window of data before it’s evaluated. We highly recommend you set this to &#x60;false&#x60; for sparse metrics, otherwise some evaluations are skipped. Default is false. | [optional]
2830
**silenced** | **Map&lt;String, Long&gt;** | Information about the downtime applied to the monitor. | [optional]
2931
**syntheticsCheckId** | **String** | ID of the corresponding Synthetic check. | [optional]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
# MonitorRenotifyStatusType
4+
5+
## Enum
6+
7+
8+
* `ALERT` (value: `"alert"`)
9+
10+
* `WARN` (value: `"warn"`)
11+
12+
* `NO_DATA` (value: `"no data"`)
13+
14+
15+

api_docs/v1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ Class | Method | HTTP request | Description
452452
- [MonitorOptions](MonitorOptions.md)
453453
- [MonitorOptionsAggregation](MonitorOptionsAggregation.md)
454454
- [MonitorOverallStates](MonitorOverallStates.md)
455+
- [MonitorRenotifyStatusType](MonitorRenotifyStatusType.md)
455456
- [MonitorSearchResponse](MonitorSearchResponse.md)
456457
- [MonitorSearchResponseCounts](MonitorSearchResponseCounts.md)
457458
- [MonitorSearchResponseMetadata](MonitorSearchResponseMetadata.md)

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

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1717
import io.swagger.annotations.ApiModel;
1818
import io.swagger.annotations.ApiModelProperty;
19+
import java.util.ArrayList;
1920
import java.util.HashMap;
2021
import java.util.List;
2122
import java.util.Map;
@@ -41,6 +42,8 @@
4142
MonitorOptions.JSON_PROPERTY_NOTIFY_AUDIT,
4243
MonitorOptions.JSON_PROPERTY_NOTIFY_NO_DATA,
4344
MonitorOptions.JSON_PROPERTY_RENOTIFY_INTERVAL,
45+
MonitorOptions.JSON_PROPERTY_RENOTIFY_OCCURRENCES,
46+
MonitorOptions.JSON_PROPERTY_RENOTIFY_STATUSES,
4447
MonitorOptions.JSON_PROPERTY_REQUIRE_FULL_WINDOW,
4548
MonitorOptions.JSON_PROPERTY_SILENCED,
4649
MonitorOptions.JSON_PROPERTY_SYNTHETICS_CHECK_ID,
@@ -99,6 +102,13 @@ public class MonitorOptions {
99102
public static final String JSON_PROPERTY_RENOTIFY_INTERVAL = "renotify_interval";
100103
private JsonNullable<Long> renotifyInterval = JsonNullable.<Long>undefined();
101104

105+
public static final String JSON_PROPERTY_RENOTIFY_OCCURRENCES = "renotify_occurrences";
106+
private JsonNullable<Long> renotifyOccurrences = JsonNullable.<Long>undefined();
107+
108+
public static final String JSON_PROPERTY_RENOTIFY_STATUSES = "renotify_statuses";
109+
private JsonNullable<List<MonitorRenotifyStatusType>> renotifyStatuses =
110+
JsonNullable.<List<MonitorRenotifyStatusType>>undefined();
111+
102112
public static final String JSON_PROPERTY_REQUIRE_FULL_WINDOW = "require_full_window";
103113
private Boolean requireFullWindow;
104114

@@ -601,6 +611,88 @@ public void setRenotifyInterval(Long renotifyInterval) {
601611
this.renotifyInterval = JsonNullable.<Long>of(renotifyInterval);
602612
}
603613

614+
public MonitorOptions renotifyOccurrences(Long renotifyOccurrences) {
615+
this.renotifyOccurrences = JsonNullable.<Long>of(renotifyOccurrences);
616+
return this;
617+
}
618+
619+
/**
620+
* The number of times re-notification messages should be sent on the current status at the
621+
* provided re-notification interval.
622+
*
623+
* @return renotifyOccurrences
624+
*/
625+
@javax.annotation.Nullable
626+
@ApiModelProperty(
627+
value =
628+
"The number of times re-notification messages should be sent on the current status at"
629+
+ " the provided re-notification interval.")
630+
@JsonIgnore
631+
public Long getRenotifyOccurrences() {
632+
return renotifyOccurrences.orElse(null);
633+
}
634+
635+
@JsonProperty(JSON_PROPERTY_RENOTIFY_OCCURRENCES)
636+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
637+
public JsonNullable<Long> getRenotifyOccurrences_JsonNullable() {
638+
return renotifyOccurrences;
639+
}
640+
641+
@JsonProperty(JSON_PROPERTY_RENOTIFY_OCCURRENCES)
642+
public void setRenotifyOccurrences_JsonNullable(JsonNullable<Long> renotifyOccurrences) {
643+
this.renotifyOccurrences = renotifyOccurrences;
644+
}
645+
646+
public void setRenotifyOccurrences(Long renotifyOccurrences) {
647+
this.renotifyOccurrences = JsonNullable.<Long>of(renotifyOccurrences);
648+
}
649+
650+
public MonitorOptions renotifyStatuses(List<MonitorRenotifyStatusType> renotifyStatuses) {
651+
this.renotifyStatuses = JsonNullable.<List<MonitorRenotifyStatusType>>of(renotifyStatuses);
652+
return this;
653+
}
654+
655+
public MonitorOptions addRenotifyStatusesItem(MonitorRenotifyStatusType renotifyStatusesItem) {
656+
if (this.renotifyStatuses == null || !this.renotifyStatuses.isPresent()) {
657+
this.renotifyStatuses = JsonNullable.<List<MonitorRenotifyStatusType>>of(new ArrayList<>());
658+
}
659+
try {
660+
this.renotifyStatuses.get().add(renotifyStatusesItem);
661+
} catch (java.util.NoSuchElementException e) {
662+
// this can never happen, as we make sure above that the value is present
663+
}
664+
return this;
665+
}
666+
667+
/**
668+
* The types of monitor statuses for which re-notification messages are sent.
669+
*
670+
* @return renotifyStatuses
671+
*/
672+
@javax.annotation.Nullable
673+
@ApiModelProperty(
674+
value = "The types of monitor statuses for which re-notification messages are sent.")
675+
@JsonIgnore
676+
public List<MonitorRenotifyStatusType> getRenotifyStatuses() {
677+
return renotifyStatuses.orElse(null);
678+
}
679+
680+
@JsonProperty(JSON_PROPERTY_RENOTIFY_STATUSES)
681+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
682+
public JsonNullable<List<MonitorRenotifyStatusType>> getRenotifyStatuses_JsonNullable() {
683+
return renotifyStatuses;
684+
}
685+
686+
@JsonProperty(JSON_PROPERTY_RENOTIFY_STATUSES)
687+
public void setRenotifyStatuses_JsonNullable(
688+
JsonNullable<List<MonitorRenotifyStatusType>> renotifyStatuses) {
689+
this.renotifyStatuses = renotifyStatuses;
690+
}
691+
692+
public void setRenotifyStatuses(List<MonitorRenotifyStatusType> renotifyStatuses) {
693+
this.renotifyStatuses = JsonNullable.<List<MonitorRenotifyStatusType>>of(renotifyStatuses);
694+
}
695+
604696
public MonitorOptions requireFullWindow(Boolean requireFullWindow) {
605697
this.requireFullWindow = requireFullWindow;
606698
return this;
@@ -803,6 +895,8 @@ public boolean equals(Object o) {
803895
&& Objects.equals(this.notifyAudit, monitorOptions.notifyAudit)
804896
&& Objects.equals(this.notifyNoData, monitorOptions.notifyNoData)
805897
&& Objects.equals(this.renotifyInterval, monitorOptions.renotifyInterval)
898+
&& Objects.equals(this.renotifyOccurrences, monitorOptions.renotifyOccurrences)
899+
&& Objects.equals(this.renotifyStatuses, monitorOptions.renotifyStatuses)
806900
&& Objects.equals(this.requireFullWindow, monitorOptions.requireFullWindow)
807901
&& Objects.equals(this.silenced, monitorOptions.silenced)
808902
&& Objects.equals(this.syntheticsCheckId, monitorOptions.syntheticsCheckId)
@@ -830,6 +924,8 @@ public int hashCode() {
830924
notifyAudit,
831925
notifyNoData,
832926
renotifyInterval,
927+
renotifyOccurrences,
928+
renotifyStatuses,
833929
requireFullWindow,
834930
silenced,
835931
syntheticsCheckId,
@@ -860,6 +956,10 @@ public String toString() {
860956
sb.append(" notifyAudit: ").append(toIndentedString(notifyAudit)).append("\n");
861957
sb.append(" notifyNoData: ").append(toIndentedString(notifyNoData)).append("\n");
862958
sb.append(" renotifyInterval: ").append(toIndentedString(renotifyInterval)).append("\n");
959+
sb.append(" renotifyOccurrences: ")
960+
.append(toIndentedString(renotifyOccurrences))
961+
.append("\n");
962+
sb.append(" renotifyStatuses: ").append(toIndentedString(renotifyStatuses)).append("\n");
863963
sb.append(" requireFullWindow: ").append(toIndentedString(requireFullWindow)).append("\n");
864964
sb.append(" silenced: ").append(toIndentedString(silenced)).append("\n");
865965
sb.append(" syntheticsCheckId: ").append(toIndentedString(syntheticsCheckId)).append("\n");
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
7+
* https://openapi-generator.tech
8+
* Do not edit the class manually.
9+
*/
10+
11+
package com.datadog.api.v1.client.model;
12+
13+
import com.fasterxml.jackson.annotation.JsonCreator;
14+
import com.fasterxml.jackson.annotation.JsonValue;
15+
import com.fasterxml.jackson.core.JsonGenerator;
16+
import com.fasterxml.jackson.core.JsonProcessingException;
17+
import com.fasterxml.jackson.databind.SerializerProvider;
18+
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
19+
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
20+
import java.io.IOException;
21+
import java.util.Arrays;
22+
import java.util.HashSet;
23+
import java.util.Objects;
24+
import java.util.Set;
25+
26+
/** The different statuses for which renotification is supported. */
27+
@JsonSerialize(using = MonitorRenotifyStatusType.MonitorRenotifyStatusTypeSerializer.class)
28+
public class MonitorRenotifyStatusType {
29+
30+
public static final MonitorRenotifyStatusType ALERT = new MonitorRenotifyStatusType("alert");
31+
public static final MonitorRenotifyStatusType WARN = new MonitorRenotifyStatusType("warn");
32+
public static final MonitorRenotifyStatusType NO_DATA = new MonitorRenotifyStatusType("no data");
33+
34+
private static final Set<String> allowedValues =
35+
new HashSet<String>(Arrays.asList("alert", "warn", "no data"));
36+
37+
private String value;
38+
39+
public boolean isValid() {
40+
return allowedValues.contains(this.value);
41+
}
42+
43+
MonitorRenotifyStatusType(String value) {
44+
this.value = value;
45+
}
46+
47+
public static class MonitorRenotifyStatusTypeSerializer
48+
extends StdSerializer<MonitorRenotifyStatusType> {
49+
public MonitorRenotifyStatusTypeSerializer(Class<MonitorRenotifyStatusType> t) {
50+
super(t);
51+
}
52+
53+
public MonitorRenotifyStatusTypeSerializer() {
54+
this(null);
55+
}
56+
57+
@Override
58+
public void serialize(
59+
MonitorRenotifyStatusType value, JsonGenerator jgen, SerializerProvider provider)
60+
throws IOException, JsonProcessingException {
61+
jgen.writeObject(value.value);
62+
}
63+
}
64+
65+
@JsonValue
66+
public String getValue() {
67+
return this.value;
68+
}
69+
70+
public void setValue(String value) {
71+
this.value = value;
72+
}
73+
74+
/** Return true if this MonitorRenotifyStatusType object is equal to o. */
75+
@Override
76+
public boolean equals(Object o) {
77+
if (this == o) {
78+
return true;
79+
}
80+
if (o == null || getClass() != o.getClass()) {
81+
return false;
82+
}
83+
return this.value.equals(((MonitorRenotifyStatusType) o).value);
84+
}
85+
86+
@Override
87+
public int hashCode() {
88+
return Objects.hash(value);
89+
}
90+
91+
@Override
92+
public String toString() {
93+
return String.valueOf(value);
94+
}
95+
96+
@JsonCreator
97+
public static MonitorRenotifyStatusType fromValue(String value) {
98+
return new MonitorRenotifyStatusType(value);
99+
}
100+
}

0 commit comments

Comments
 (0)