-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathIncidentResponseAttributes.java
More file actions
919 lines (798 loc) · 30.3 KB
/
IncidentResponseAttributes.java
File metadata and controls
919 lines (798 loc) · 30.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/
package com.datadog.api.client.v2.model;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;
/** The incident's attributes from a response. */
@JsonPropertyOrder({
IncidentResponseAttributes.JSON_PROPERTY_ARCHIVED,
IncidentResponseAttributes.JSON_PROPERTY_CASE_ID,
IncidentResponseAttributes.JSON_PROPERTY_CREATED,
IncidentResponseAttributes.JSON_PROPERTY_CUSTOMER_IMPACT_DURATION,
IncidentResponseAttributes.JSON_PROPERTY_CUSTOMER_IMPACT_END,
IncidentResponseAttributes.JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE,
IncidentResponseAttributes.JSON_PROPERTY_CUSTOMER_IMPACT_START,
IncidentResponseAttributes.JSON_PROPERTY_CUSTOMER_IMPACTED,
IncidentResponseAttributes.JSON_PROPERTY_DETECTED,
IncidentResponseAttributes.JSON_PROPERTY_FIELDS,
IncidentResponseAttributes.JSON_PROPERTY_INCIDENT_TYPE_UUID,
IncidentResponseAttributes.JSON_PROPERTY_IS_TEST,
IncidentResponseAttributes.JSON_PROPERTY_MODIFIED,
IncidentResponseAttributes.JSON_PROPERTY_NON_DATADOG_CREATOR,
IncidentResponseAttributes.JSON_PROPERTY_NOTIFICATION_HANDLES,
IncidentResponseAttributes.JSON_PROPERTY_PUBLIC_ID,
IncidentResponseAttributes.JSON_PROPERTY_RESOLVED,
IncidentResponseAttributes.JSON_PROPERTY_SEVERITY,
IncidentResponseAttributes.JSON_PROPERTY_STATE,
IncidentResponseAttributes.JSON_PROPERTY_TIME_TO_DETECT,
IncidentResponseAttributes.JSON_PROPERTY_TIME_TO_INTERNAL_RESPONSE,
IncidentResponseAttributes.JSON_PROPERTY_TIME_TO_REPAIR,
IncidentResponseAttributes.JSON_PROPERTY_TIME_TO_RESOLVE,
IncidentResponseAttributes.JSON_PROPERTY_TITLE,
IncidentResponseAttributes.JSON_PROPERTY_VISIBILITY
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class IncidentResponseAttributes {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_ARCHIVED = "archived";
private JsonNullable<OffsetDateTime> archived = JsonNullable.<OffsetDateTime>undefined();
public static final String JSON_PROPERTY_CASE_ID = "case_id";
private JsonNullable<Long> caseId = JsonNullable.<Long>undefined();
public static final String JSON_PROPERTY_CREATED = "created";
private OffsetDateTime created;
public static final String JSON_PROPERTY_CUSTOMER_IMPACT_DURATION = "customer_impact_duration";
private Long customerImpactDuration;
public static final String JSON_PROPERTY_CUSTOMER_IMPACT_END = "customer_impact_end";
private JsonNullable<OffsetDateTime> customerImpactEnd = JsonNullable.<OffsetDateTime>undefined();
public static final String JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE = "customer_impact_scope";
private JsonNullable<String> customerImpactScope = JsonNullable.<String>undefined();
public static final String JSON_PROPERTY_CUSTOMER_IMPACT_START = "customer_impact_start";
private JsonNullable<OffsetDateTime> customerImpactStart =
JsonNullable.<OffsetDateTime>undefined();
public static final String JSON_PROPERTY_CUSTOMER_IMPACTED = "customer_impacted";
private Boolean customerImpacted;
public static final String JSON_PROPERTY_DETECTED = "detected";
private JsonNullable<OffsetDateTime> detected = JsonNullable.<OffsetDateTime>undefined();
public static final String JSON_PROPERTY_FIELDS = "fields";
private Map<String, IncidentFieldAttributes> fields = null;
public static final String JSON_PROPERTY_INCIDENT_TYPE_UUID = "incident_type_uuid";
private String incidentTypeUuid;
public static final String JSON_PROPERTY_IS_TEST = "is_test";
private Boolean isTest;
public static final String JSON_PROPERTY_MODIFIED = "modified";
private OffsetDateTime modified;
public static final String JSON_PROPERTY_NON_DATADOG_CREATOR = "non_datadog_creator";
private JsonNullable<IncidentNonDatadogCreator> nonDatadogCreator =
JsonNullable.<IncidentNonDatadogCreator>undefined();
public static final String JSON_PROPERTY_NOTIFICATION_HANDLES = "notification_handles";
private JsonNullable<List<IncidentNotificationHandle>> notificationHandles =
JsonNullable.<List<IncidentNotificationHandle>>undefined();
public static final String JSON_PROPERTY_PUBLIC_ID = "public_id";
private Long publicId;
public static final String JSON_PROPERTY_RESOLVED = "resolved";
private JsonNullable<OffsetDateTime> resolved = JsonNullable.<OffsetDateTime>undefined();
public static final String JSON_PROPERTY_SEVERITY = "severity";
private IncidentSeverity severity;
public static final String JSON_PROPERTY_STATE = "state";
private JsonNullable<String> state = JsonNullable.<String>undefined();
public static final String JSON_PROPERTY_TIME_TO_DETECT = "time_to_detect";
private Long timeToDetect;
public static final String JSON_PROPERTY_TIME_TO_INTERNAL_RESPONSE = "time_to_internal_response";
private Long timeToInternalResponse;
public static final String JSON_PROPERTY_TIME_TO_REPAIR = "time_to_repair";
private Long timeToRepair;
public static final String JSON_PROPERTY_TIME_TO_RESOLVE = "time_to_resolve";
private Long timeToResolve;
public static final String JSON_PROPERTY_TITLE = "title";
private String title;
public static final String JSON_PROPERTY_VISIBILITY = "visibility";
private JsonNullable<String> visibility = JsonNullable.<String>undefined();
public IncidentResponseAttributes() {}
@JsonCreator
public IncidentResponseAttributes(
@JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) {
this.title = title;
}
/**
* Timestamp of when the incident was archived.
*
* @return archived
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getArchived() {
if (archived == null) {
archived = JsonNullable.<OffsetDateTime>undefined();
}
return archived.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARCHIVED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getArchived_JsonNullable() {
return archived;
}
@JsonProperty(JSON_PROPERTY_ARCHIVED)
private void setArchived_JsonNullable(JsonNullable<OffsetDateTime> archived) {
this.archived = archived;
}
public IncidentResponseAttributes caseId(Long caseId) {
this.caseId = JsonNullable.<Long>of(caseId);
return this;
}
/**
* The incident case id.
*
* @return caseId
*/
@jakarta.annotation.Nullable
@JsonIgnore
public Long getCaseId() {
return caseId.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CASE_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Long> getCaseId_JsonNullable() {
return caseId;
}
@JsonProperty(JSON_PROPERTY_CASE_ID)
public void setCaseId_JsonNullable(JsonNullable<Long> caseId) {
this.caseId = caseId;
}
public void setCaseId(Long caseId) {
this.caseId = JsonNullable.<Long>of(caseId);
}
/**
* Timestamp when the incident was created.
*
* @return created
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CREATED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getCreated() {
return created;
}
/**
* Length of the incident's customer impact in seconds. Equals the difference between <code>
* customer_impact_start</code> and <code>customer_impact_end</code>.
*
* @return customerImpactDuration
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_DURATION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getCustomerImpactDuration() {
return customerImpactDuration;
}
public IncidentResponseAttributes customerImpactEnd(OffsetDateTime customerImpactEnd) {
this.customerImpactEnd = JsonNullable.<OffsetDateTime>of(customerImpactEnd);
return this;
}
/**
* Timestamp when customers were no longer impacted by the incident.
*
* @return customerImpactEnd
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getCustomerImpactEnd() {
return customerImpactEnd.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_END)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getCustomerImpactEnd_JsonNullable() {
return customerImpactEnd;
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_END)
public void setCustomerImpactEnd_JsonNullable(JsonNullable<OffsetDateTime> customerImpactEnd) {
this.customerImpactEnd = customerImpactEnd;
}
public void setCustomerImpactEnd(OffsetDateTime customerImpactEnd) {
this.customerImpactEnd = JsonNullable.<OffsetDateTime>of(customerImpactEnd);
}
public IncidentResponseAttributes customerImpactScope(String customerImpactScope) {
this.customerImpactScope = JsonNullable.<String>of(customerImpactScope);
return this;
}
/**
* A summary of the impact customers experienced during the incident.
*
* @return customerImpactScope
*/
@jakarta.annotation.Nullable
@JsonIgnore
public String getCustomerImpactScope() {
return customerImpactScope.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getCustomerImpactScope_JsonNullable() {
return customerImpactScope;
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_SCOPE)
public void setCustomerImpactScope_JsonNullable(JsonNullable<String> customerImpactScope) {
this.customerImpactScope = customerImpactScope;
}
public void setCustomerImpactScope(String customerImpactScope) {
this.customerImpactScope = JsonNullable.<String>of(customerImpactScope);
}
public IncidentResponseAttributes customerImpactStart(OffsetDateTime customerImpactStart) {
this.customerImpactStart = JsonNullable.<OffsetDateTime>of(customerImpactStart);
return this;
}
/**
* Timestamp when customers began being impacted by the incident.
*
* @return customerImpactStart
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getCustomerImpactStart() {
return customerImpactStart.orElse(null);
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_START)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getCustomerImpactStart_JsonNullable() {
return customerImpactStart;
}
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACT_START)
public void setCustomerImpactStart_JsonNullable(
JsonNullable<OffsetDateTime> customerImpactStart) {
this.customerImpactStart = customerImpactStart;
}
public void setCustomerImpactStart(OffsetDateTime customerImpactStart) {
this.customerImpactStart = JsonNullable.<OffsetDateTime>of(customerImpactStart);
}
public IncidentResponseAttributes customerImpacted(Boolean customerImpacted) {
this.customerImpacted = customerImpacted;
return this;
}
/**
* A flag indicating whether the incident caused customer impact.
*
* @return customerImpacted
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CUSTOMER_IMPACTED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getCustomerImpacted() {
return customerImpacted;
}
public void setCustomerImpacted(Boolean customerImpacted) {
this.customerImpacted = customerImpacted;
}
public IncidentResponseAttributes detected(OffsetDateTime detected) {
this.detected = JsonNullable.<OffsetDateTime>of(detected);
return this;
}
/**
* Timestamp when the incident was detected.
*
* @return detected
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getDetected() {
return detected.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DETECTED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getDetected_JsonNullable() {
return detected;
}
@JsonProperty(JSON_PROPERTY_DETECTED)
public void setDetected_JsonNullable(JsonNullable<OffsetDateTime> detected) {
this.detected = detected;
}
public void setDetected(OffsetDateTime detected) {
this.detected = JsonNullable.<OffsetDateTime>of(detected);
}
public IncidentResponseAttributes fields(Map<String, IncidentFieldAttributes> fields) {
this.fields = fields;
return this;
}
public IncidentResponseAttributes putFieldsItem(String key, IncidentFieldAttributes fieldsItem) {
if (this.fields == null) {
this.fields = new HashMap<>();
}
this.fields.put(key, fieldsItem);
return this;
}
/**
* A condensed view of the user-defined fields attached to incidents.
*
* @return fields
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FIELDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, IncidentFieldAttributes> getFields() {
return fields;
}
public void setFields(Map<String, IncidentFieldAttributes> fields) {
this.fields = fields;
}
public IncidentResponseAttributes incidentTypeUuid(String incidentTypeUuid) {
this.incidentTypeUuid = incidentTypeUuid;
return this;
}
/**
* A unique identifier that represents an incident type.
*
* @return incidentTypeUuid
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INCIDENT_TYPE_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getIncidentTypeUuid() {
return incidentTypeUuid;
}
public void setIncidentTypeUuid(String incidentTypeUuid) {
this.incidentTypeUuid = incidentTypeUuid;
}
public IncidentResponseAttributes isTest(Boolean isTest) {
this.isTest = isTest;
return this;
}
/**
* A flag indicating whether the incident is a test incident.
*
* @return isTest
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IS_TEST)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getIsTest() {
return isTest;
}
public void setIsTest(Boolean isTest) {
this.isTest = isTest;
}
/**
* Timestamp when the incident was last modified.
*
* @return modified
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MODIFIED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getModified() {
return modified;
}
public IncidentResponseAttributes nonDatadogCreator(IncidentNonDatadogCreator nonDatadogCreator) {
this.nonDatadogCreator = JsonNullable.<IncidentNonDatadogCreator>of(nonDatadogCreator);
return this;
}
/**
* Incident's non Datadog creator.
*
* @return nonDatadogCreator
*/
@jakarta.annotation.Nullable
@JsonIgnore
public IncidentNonDatadogCreator getNonDatadogCreator() {
return nonDatadogCreator.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NON_DATADOG_CREATOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<IncidentNonDatadogCreator> getNonDatadogCreator_JsonNullable() {
return nonDatadogCreator;
}
@JsonProperty(JSON_PROPERTY_NON_DATADOG_CREATOR)
public void setNonDatadogCreator_JsonNullable(
JsonNullable<IncidentNonDatadogCreator> nonDatadogCreator) {
this.nonDatadogCreator = nonDatadogCreator;
}
public void setNonDatadogCreator(IncidentNonDatadogCreator nonDatadogCreator) {
this.nonDatadogCreator = JsonNullable.<IncidentNonDatadogCreator>of(nonDatadogCreator);
}
public IncidentResponseAttributes notificationHandles(
List<IncidentNotificationHandle> notificationHandles) {
this.notificationHandles =
JsonNullable.<List<IncidentNotificationHandle>>of(notificationHandles);
return this;
}
public IncidentResponseAttributes addNotificationHandlesItem(
IncidentNotificationHandle notificationHandlesItem) {
if (this.notificationHandles == null || !this.notificationHandles.isPresent()) {
this.notificationHandles =
JsonNullable.<List<IncidentNotificationHandle>>of(new ArrayList<>());
}
try {
this.notificationHandles.get().add(notificationHandlesItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Notification handles that will be notified of the incident during update.
*
* @return notificationHandles
*/
@jakarta.annotation.Nullable
@JsonIgnore
public List<IncidentNotificationHandle> getNotificationHandles() {
return notificationHandles.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<IncidentNotificationHandle>> getNotificationHandles_JsonNullable() {
return notificationHandles;
}
@JsonProperty(JSON_PROPERTY_NOTIFICATION_HANDLES)
public void setNotificationHandles_JsonNullable(
JsonNullable<List<IncidentNotificationHandle>> notificationHandles) {
this.notificationHandles = notificationHandles;
}
public void setNotificationHandles(List<IncidentNotificationHandle> notificationHandles) {
this.notificationHandles =
JsonNullable.<List<IncidentNotificationHandle>>of(notificationHandles);
}
public IncidentResponseAttributes publicId(Long publicId) {
this.publicId = publicId;
return this;
}
/**
* The monotonically increasing integer ID for the incident.
*
* @return publicId
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PUBLIC_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getPublicId() {
return publicId;
}
public void setPublicId(Long publicId) {
this.publicId = publicId;
}
public IncidentResponseAttributes resolved(OffsetDateTime resolved) {
this.resolved = JsonNullable.<OffsetDateTime>of(resolved);
return this;
}
/**
* Timestamp when the incident's state was last changed from active or stable to resolved or
* completed.
*
* @return resolved
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getResolved() {
return resolved.orElse(null);
}
@JsonProperty(JSON_PROPERTY_RESOLVED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getResolved_JsonNullable() {
return resolved;
}
@JsonProperty(JSON_PROPERTY_RESOLVED)
public void setResolved_JsonNullable(JsonNullable<OffsetDateTime> resolved) {
this.resolved = resolved;
}
public void setResolved(OffsetDateTime resolved) {
this.resolved = JsonNullable.<OffsetDateTime>of(resolved);
}
public IncidentResponseAttributes severity(IncidentSeverity severity) {
this.severity = severity;
this.unparsed |= !severity.isValid();
return this;
}
/**
* The incident severity.
*
* @return severity
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SEVERITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public IncidentSeverity getSeverity() {
return severity;
}
public void setSeverity(IncidentSeverity severity) {
if (!severity.isValid()) {
this.unparsed = true;
}
this.severity = severity;
}
public IncidentResponseAttributes state(String state) {
this.state = JsonNullable.<String>of(state);
return this;
}
/**
* The state incident.
*
* @return state
*/
@jakarta.annotation.Nullable
@JsonIgnore
public String getState() {
return state.orElse(null);
}
@JsonProperty(JSON_PROPERTY_STATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getState_JsonNullable() {
return state;
}
@JsonProperty(JSON_PROPERTY_STATE)
public void setState_JsonNullable(JsonNullable<String> state) {
this.state = state;
}
public void setState(String state) {
this.state = JsonNullable.<String>of(state);
}
/**
* The amount of time in seconds to detect the incident. Equals the difference between <code>
* customer_impact_start</code> and <code>detected</code>.
*
* @return timeToDetect
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TIME_TO_DETECT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getTimeToDetect() {
return timeToDetect;
}
/**
* The amount of time in seconds to call incident after detection. Equals the difference of <code>
* detected</code> and <code>created</code>.
*
* @return timeToInternalResponse
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TIME_TO_INTERNAL_RESPONSE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getTimeToInternalResponse() {
return timeToInternalResponse;
}
/**
* The amount of time in seconds to resolve customer impact after detecting the issue. Equals the
* difference between <code>customer_impact_end</code> and <code>detected</code>.
*
* @return timeToRepair
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TIME_TO_REPAIR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getTimeToRepair() {
return timeToRepair;
}
/**
* The amount of time in seconds to resolve the incident after it was created. Equals the
* difference between <code>created</code> and <code>resolved</code>.
*
* @return timeToResolve
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TIME_TO_RESOLVE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getTimeToResolve() {
return timeToResolve;
}
public IncidentResponseAttributes title(String title) {
this.title = title;
return this;
}
/**
* The title of the incident, which summarizes what happened.
*
* @return title
*/
@JsonProperty(JSON_PROPERTY_TITLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public IncidentResponseAttributes visibility(String visibility) {
this.visibility = JsonNullable.<String>of(visibility);
return this;
}
/**
* The incident visibility status.
*
* @return visibility
*/
@jakarta.annotation.Nullable
@JsonIgnore
public String getVisibility() {
return visibility.orElse(null);
}
@JsonProperty(JSON_PROPERTY_VISIBILITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getVisibility_JsonNullable() {
return visibility;
}
@JsonProperty(JSON_PROPERTY_VISIBILITY)
public void setVisibility_JsonNullable(JsonNullable<String> visibility) {
this.visibility = visibility;
}
public void setVisibility(String visibility) {
this.visibility = JsonNullable.<String>of(visibility);
}
/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
*/
private Map<String, Object> additionalProperties;
/**
* Set the additional (undeclared) property with the specified name and value. If the property
* does not already exist, create it otherwise replace it.
*
* @param key The arbitrary key to set
* @param value The associated value
* @return IncidentResponseAttributes
*/
@JsonAnySetter
public IncidentResponseAttributes putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap<String, Object>();
}
this.additionalProperties.put(key, value);
return this;
}
/**
* Return the additional (undeclared) property.
*
* @return The additional properties
*/
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return additionalProperties;
}
/**
* Return the additional (undeclared) property with the specified name.
*
* @param key The arbitrary key to get
* @return The specific additional property for the given key
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}
/** Return true if this IncidentResponseAttributes object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IncidentResponseAttributes incidentResponseAttributes = (IncidentResponseAttributes) o;
return Objects.equals(this.archived, incidentResponseAttributes.archived)
&& Objects.equals(this.caseId, incidentResponseAttributes.caseId)
&& Objects.equals(this.created, incidentResponseAttributes.created)
&& Objects.equals(
this.customerImpactDuration, incidentResponseAttributes.customerImpactDuration)
&& Objects.equals(this.customerImpactEnd, incidentResponseAttributes.customerImpactEnd)
&& Objects.equals(this.customerImpactScope, incidentResponseAttributes.customerImpactScope)
&& Objects.equals(this.customerImpactStart, incidentResponseAttributes.customerImpactStart)
&& Objects.equals(this.customerImpacted, incidentResponseAttributes.customerImpacted)
&& Objects.equals(this.detected, incidentResponseAttributes.detected)
&& Objects.equals(this.fields, incidentResponseAttributes.fields)
&& Objects.equals(this.incidentTypeUuid, incidentResponseAttributes.incidentTypeUuid)
&& Objects.equals(this.isTest, incidentResponseAttributes.isTest)
&& Objects.equals(this.modified, incidentResponseAttributes.modified)
&& Objects.equals(this.nonDatadogCreator, incidentResponseAttributes.nonDatadogCreator)
&& Objects.equals(this.notificationHandles, incidentResponseAttributes.notificationHandles)
&& Objects.equals(this.publicId, incidentResponseAttributes.publicId)
&& Objects.equals(this.resolved, incidentResponseAttributes.resolved)
&& Objects.equals(this.severity, incidentResponseAttributes.severity)
&& Objects.equals(this.state, incidentResponseAttributes.state)
&& Objects.equals(this.timeToDetect, incidentResponseAttributes.timeToDetect)
&& Objects.equals(
this.timeToInternalResponse, incidentResponseAttributes.timeToInternalResponse)
&& Objects.equals(this.timeToRepair, incidentResponseAttributes.timeToRepair)
&& Objects.equals(this.timeToResolve, incidentResponseAttributes.timeToResolve)
&& Objects.equals(this.title, incidentResponseAttributes.title)
&& Objects.equals(this.visibility, incidentResponseAttributes.visibility)
&& Objects.equals(
this.additionalProperties, incidentResponseAttributes.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(
archived,
caseId,
created,
customerImpactDuration,
customerImpactEnd,
customerImpactScope,
customerImpactStart,
customerImpacted,
detected,
fields,
incidentTypeUuid,
isTest,
modified,
nonDatadogCreator,
notificationHandles,
publicId,
resolved,
severity,
state,
timeToDetect,
timeToInternalResponse,
timeToRepair,
timeToResolve,
title,
visibility,
additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IncidentResponseAttributes {\n");
sb.append(" archived: ").append(toIndentedString(archived)).append("\n");
sb.append(" caseId: ").append(toIndentedString(caseId)).append("\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" customerImpactDuration: ")
.append(toIndentedString(customerImpactDuration))
.append("\n");
sb.append(" customerImpactEnd: ").append(toIndentedString(customerImpactEnd)).append("\n");
sb.append(" customerImpactScope: ")
.append(toIndentedString(customerImpactScope))
.append("\n");
sb.append(" customerImpactStart: ")
.append(toIndentedString(customerImpactStart))
.append("\n");
sb.append(" customerImpacted: ").append(toIndentedString(customerImpacted)).append("\n");
sb.append(" detected: ").append(toIndentedString(detected)).append("\n");
sb.append(" fields: ").append(toIndentedString(fields)).append("\n");
sb.append(" incidentTypeUuid: ").append(toIndentedString(incidentTypeUuid)).append("\n");
sb.append(" isTest: ").append(toIndentedString(isTest)).append("\n");
sb.append(" modified: ").append(toIndentedString(modified)).append("\n");
sb.append(" nonDatadogCreator: ").append(toIndentedString(nonDatadogCreator)).append("\n");
sb.append(" notificationHandles: ")
.append(toIndentedString(notificationHandles))
.append("\n");
sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n");
sb.append(" resolved: ").append(toIndentedString(resolved)).append("\n");
sb.append(" severity: ").append(toIndentedString(severity)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" timeToDetect: ").append(toIndentedString(timeToDetect)).append("\n");
sb.append(" timeToInternalResponse: ")
.append(toIndentedString(timeToInternalResponse))
.append("\n");
sb.append(" timeToRepair: ").append(toIndentedString(timeToRepair)).append("\n");
sb.append(" timeToResolve: ").append(toIndentedString(timeToResolve)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
sb.append('}');
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}