|
16 | 16 | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
17 | 17 | import io.swagger.annotations.ApiModel; |
18 | 18 | import io.swagger.annotations.ApiModelProperty; |
| 19 | +import java.util.ArrayList; |
19 | 20 | import java.util.HashMap; |
20 | 21 | import java.util.List; |
21 | 22 | import java.util.Map; |
|
41 | 42 | MonitorOptions.JSON_PROPERTY_NOTIFY_AUDIT, |
42 | 43 | MonitorOptions.JSON_PROPERTY_NOTIFY_NO_DATA, |
43 | 44 | MonitorOptions.JSON_PROPERTY_RENOTIFY_INTERVAL, |
| 45 | + MonitorOptions.JSON_PROPERTY_RENOTIFY_OCCURRENCES, |
| 46 | + MonitorOptions.JSON_PROPERTY_RENOTIFY_STATUSES, |
44 | 47 | MonitorOptions.JSON_PROPERTY_REQUIRE_FULL_WINDOW, |
45 | 48 | MonitorOptions.JSON_PROPERTY_SILENCED, |
46 | 49 | MonitorOptions.JSON_PROPERTY_SYNTHETICS_CHECK_ID, |
@@ -99,6 +102,13 @@ public class MonitorOptions { |
99 | 102 | public static final String JSON_PROPERTY_RENOTIFY_INTERVAL = "renotify_interval"; |
100 | 103 | private JsonNullable<Long> renotifyInterval = JsonNullable.<Long>undefined(); |
101 | 104 |
|
| 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 | + |
102 | 112 | public static final String JSON_PROPERTY_REQUIRE_FULL_WINDOW = "require_full_window"; |
103 | 113 | private Boolean requireFullWindow; |
104 | 114 |
|
@@ -601,6 +611,88 @@ public void setRenotifyInterval(Long renotifyInterval) { |
601 | 611 | this.renotifyInterval = JsonNullable.<Long>of(renotifyInterval); |
602 | 612 | } |
603 | 613 |
|
| 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 | + |
604 | 696 | public MonitorOptions requireFullWindow(Boolean requireFullWindow) { |
605 | 697 | this.requireFullWindow = requireFullWindow; |
606 | 698 | return this; |
@@ -803,6 +895,8 @@ public boolean equals(Object o) { |
803 | 895 | && Objects.equals(this.notifyAudit, monitorOptions.notifyAudit) |
804 | 896 | && Objects.equals(this.notifyNoData, monitorOptions.notifyNoData) |
805 | 897 | && Objects.equals(this.renotifyInterval, monitorOptions.renotifyInterval) |
| 898 | + && Objects.equals(this.renotifyOccurrences, monitorOptions.renotifyOccurrences) |
| 899 | + && Objects.equals(this.renotifyStatuses, monitorOptions.renotifyStatuses) |
806 | 900 | && Objects.equals(this.requireFullWindow, monitorOptions.requireFullWindow) |
807 | 901 | && Objects.equals(this.silenced, monitorOptions.silenced) |
808 | 902 | && Objects.equals(this.syntheticsCheckId, monitorOptions.syntheticsCheckId) |
@@ -830,6 +924,8 @@ public int hashCode() { |
830 | 924 | notifyAudit, |
831 | 925 | notifyNoData, |
832 | 926 | renotifyInterval, |
| 927 | + renotifyOccurrences, |
| 928 | + renotifyStatuses, |
833 | 929 | requireFullWindow, |
834 | 930 | silenced, |
835 | 931 | syntheticsCheckId, |
@@ -860,6 +956,10 @@ public String toString() { |
860 | 956 | sb.append(" notifyAudit: ").append(toIndentedString(notifyAudit)).append("\n"); |
861 | 957 | sb.append(" notifyNoData: ").append(toIndentedString(notifyNoData)).append("\n"); |
862 | 958 | 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"); |
863 | 963 | sb.append(" requireFullWindow: ").append(toIndentedString(requireFullWindow)).append("\n"); |
864 | 964 | sb.append(" silenced: ").append(toIndentedString(silenced)).append("\n"); |
865 | 965 | sb.append(" syntheticsCheckId: ").append(toIndentedString(syntheticsCheckId)).append("\n"); |
|
0 commit comments