25
25
MonitorUpdateRequest .JSON_PROPERTY_CREATED ,
26
26
MonitorUpdateRequest .JSON_PROPERTY_CREATOR ,
27
27
MonitorUpdateRequest .JSON_PROPERTY_DELETED ,
28
+ MonitorUpdateRequest .JSON_PROPERTY_DRAFT_STATUS ,
28
29
MonitorUpdateRequest .JSON_PROPERTY_ID ,
29
30
MonitorUpdateRequest .JSON_PROPERTY_MESSAGE ,
30
31
MonitorUpdateRequest .JSON_PROPERTY_MODIFIED ,
@@ -52,6 +53,9 @@ public class MonitorUpdateRequest {
52
53
public static final String JSON_PROPERTY_DELETED = "deleted" ;
53
54
private JsonNullable <OffsetDateTime > deleted = JsonNullable .<OffsetDateTime >undefined ();
54
55
56
+ public static final String JSON_PROPERTY_DRAFT_STATUS = "draft_status" ;
57
+ private MonitorUpdateRequestDraftStatus draftStatus = MonitorUpdateRequestDraftStatus .PUBLISHED ;
58
+
55
59
public static final String JSON_PROPERTY_ID = "id" ;
56
60
private Long id ;
57
61
@@ -141,6 +145,33 @@ private void setDeleted_JsonNullable(JsonNullable<OffsetDateTime> deleted) {
141
145
this .deleted = deleted ;
142
146
}
143
147
148
+ public MonitorUpdateRequest draftStatus (MonitorUpdateRequestDraftStatus draftStatus ) {
149
+ this .draftStatus = draftStatus ;
150
+ this .unparsed |= !draftStatus .isValid ();
151
+ return this ;
152
+ }
153
+
154
+ /**
155
+ * Whether a monitor is in draft or published state. Draft monitors do not notify recipients.
156
+ * Draft monitors are currently in preview and field is only processed for enabled customers. This
157
+ * accepts the values <code>draft</code> and <code>published</code>. Defaults to published.
158
+ *
159
+ * @return draftStatus
160
+ */
161
+ @ jakarta .annotation .Nullable
162
+ @ JsonProperty (JSON_PROPERTY_DRAFT_STATUS )
163
+ @ JsonInclude (value = JsonInclude .Include .USE_DEFAULTS )
164
+ public MonitorUpdateRequestDraftStatus getDraftStatus () {
165
+ return draftStatus ;
166
+ }
167
+
168
+ public void setDraftStatus (MonitorUpdateRequestDraftStatus draftStatus ) {
169
+ if (!draftStatus .isValid ()) {
170
+ this .unparsed = true ;
171
+ }
172
+ this .draftStatus = draftStatus ;
173
+ }
174
+
144
175
/**
145
176
* ID of this monitor.
146
177
*
@@ -481,6 +512,7 @@ public boolean equals(Object o) {
481
512
return Objects .equals (this .created , monitorUpdateRequest .created )
482
513
&& Objects .equals (this .creator , monitorUpdateRequest .creator )
483
514
&& Objects .equals (this .deleted , monitorUpdateRequest .deleted )
515
+ && Objects .equals (this .draftStatus , monitorUpdateRequest .draftStatus )
484
516
&& Objects .equals (this .id , monitorUpdateRequest .id )
485
517
&& Objects .equals (this .message , monitorUpdateRequest .message )
486
518
&& Objects .equals (this .modified , monitorUpdateRequest .modified )
@@ -503,6 +535,7 @@ public int hashCode() {
503
535
created ,
504
536
creator ,
505
537
deleted ,
538
+ draftStatus ,
506
539
id ,
507
540
message ,
508
541
modified ,
@@ -526,6 +559,7 @@ public String toString() {
526
559
sb .append (" created: " ).append (toIndentedString (created )).append ("\n " );
527
560
sb .append (" creator: " ).append (toIndentedString (creator )).append ("\n " );
528
561
sb .append (" deleted: " ).append (toIndentedString (deleted )).append ("\n " );
562
+ sb .append (" draftStatus: " ).append (toIndentedString (draftStatus )).append ("\n " );
529
563
sb .append (" id: " ).append (toIndentedString (id )).append ("\n " );
530
564
sb .append (" message: " ).append (toIndentedString (message )).append ("\n " );
531
565
sb .append (" modified: " ).append (toIndentedString (modified )).append ("\n " );
0 commit comments