Skip to content

Commit 5454082

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9747303 of spec repo
1 parent 559511e commit 5454082

File tree

7 files changed

+224
-20
lines changed

7 files changed

+224
-20
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9117,6 +9117,10 @@ components:
91179117
$ref: '#/components/schemas/ServiceNowTicket'
91189118
status:
91199119
$ref: '#/components/schemas/CaseStatus'
9120+
status_group:
9121+
$ref: '#/components/schemas/CaseStatusGroup'
9122+
status_name:
9123+
$ref: '#/components/schemas/CaseStatusName'
91209124
title:
91219125
description: Title
91229126
example: Memory leak investigation on API
@@ -9183,6 +9187,8 @@ components:
91839187
type: string
91849188
priority:
91859189
$ref: '#/components/schemas/CasePriority'
9190+
status_name:
9191+
$ref: '#/components/schemas/CaseStatusName'
91869192
title:
91879193
description: Title
91889194
example: Security breach investigation
@@ -9351,7 +9357,9 @@ components:
93519357
- PRIORITY
93529358
- STATUS
93539359
CaseStatus:
9354-
description: Case status
9360+
deprecated: true
9361+
description: Deprecated way of representing the case status, which only supports
9362+
OPEN, IN_PROGRESS, and CLOSED statuses. Use `status_name` instead.
93559363
enum:
93569364
- OPEN
93579365
- IN_PROGRESS
@@ -9362,6 +9370,23 @@ components:
93629370
- OPEN
93639371
- IN_PROGRESS
93649372
- CLOSED
9373+
CaseStatusGroup:
9374+
description: Status group of the case.
9375+
enum:
9376+
- SG_OPEN
9377+
- SG_IN_PROGRESS
9378+
- SG_CLOSED
9379+
example: SG_OPEN
9380+
type: string
9381+
x-enum-varnames:
9382+
- SG_OPEN
9383+
- SG_IN_PROGRESS
9384+
- SG_CLOSED
9385+
CaseStatusName:
9386+
description: Status of the case. Must be one of the existing statuses for the
9387+
case's type.
9388+
example: Open
9389+
type: string
93659390
CaseTrigger:
93669391
description: Trigger a workflow from a Case. For automatic triggering a handle
93679392
must be configured and the workflow must be published.
@@ -9585,8 +9610,9 @@ components:
95859610
properties:
95869611
status:
95879612
$ref: '#/components/schemas/CaseStatus'
9588-
required:
9589-
- status
9613+
deprecated: true
9614+
status_name:
9615+
$ref: '#/components/schemas/CaseStatusName'
95909616
type: object
95919617
CaseUpdateStatusRequest:
95929618
description: Case update status request

src/main/java/com/datadog/api/client/v2/model/CaseAttributes.java

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
CaseAttributes.JSON_PROPERTY_PRIORITY,
3434
CaseAttributes.JSON_PROPERTY_SERVICE_NOW_TICKET,
3535
CaseAttributes.JSON_PROPERTY_STATUS,
36+
CaseAttributes.JSON_PROPERTY_STATUS_GROUP,
37+
CaseAttributes.JSON_PROPERTY_STATUS_NAME,
3638
CaseAttributes.JSON_PROPERTY_TITLE,
3739
CaseAttributes.JSON_PROPERTY_TYPE,
3840
CaseAttributes.JSON_PROPERTY_TYPE_ID
@@ -78,6 +80,12 @@ public class CaseAttributes {
7880
public static final String JSON_PROPERTY_STATUS = "status";
7981
private CaseStatus status;
8082

83+
public static final String JSON_PROPERTY_STATUS_GROUP = "status_group";
84+
private CaseStatusGroup statusGroup;
85+
86+
public static final String JSON_PROPERTY_STATUS_NAME = "status_name";
87+
private String statusName;
88+
8189
public static final String JSON_PROPERTY_TITLE = "title";
8290
private String title;
8391

@@ -362,24 +370,74 @@ public CaseAttributes status(CaseStatus status) {
362370
}
363371

364372
/**
365-
* Case status
373+
* Deprecated way of representing the case status, which only supports OPEN, IN_PROGRESS, and
374+
* CLOSED statuses. Use <code>status_name</code> instead.
366375
*
367376
* @return status
377+
* @deprecated
368378
*/
379+
@Deprecated
369380
@jakarta.annotation.Nullable
370381
@JsonProperty(JSON_PROPERTY_STATUS)
371382
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
372383
public CaseStatus getStatus() {
373384
return status;
374385
}
375386

387+
@Deprecated
376388
public void setStatus(CaseStatus status) {
377389
if (!status.isValid()) {
378390
this.unparsed = true;
379391
}
380392
this.status = status;
381393
}
382394

395+
public CaseAttributes statusGroup(CaseStatusGroup statusGroup) {
396+
this.statusGroup = statusGroup;
397+
this.unparsed |= !statusGroup.isValid();
398+
return this;
399+
}
400+
401+
/**
402+
* Status group of the case.
403+
*
404+
* @return statusGroup
405+
*/
406+
@jakarta.annotation.Nullable
407+
@JsonProperty(JSON_PROPERTY_STATUS_GROUP)
408+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
409+
public CaseStatusGroup getStatusGroup() {
410+
return statusGroup;
411+
}
412+
413+
public void setStatusGroup(CaseStatusGroup statusGroup) {
414+
if (!statusGroup.isValid()) {
415+
this.unparsed = true;
416+
}
417+
this.statusGroup = statusGroup;
418+
}
419+
420+
public CaseAttributes statusName(String statusName) {
421+
this.statusName = statusName;
422+
return this;
423+
}
424+
425+
/**
426+
* Status of the case. Must be one of the existing statuses for the case's type.
427+
*
428+
* @return statusName
429+
*/
430+
@jakarta.annotation.Nullable
431+
@JsonProperty(JSON_PROPERTY_STATUS_NAME)
432+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
433+
public String getStatusName() {
434+
return statusName;
435+
}
436+
437+
public void setStatusName(String statusName) {
438+
this.statusName = statusName;
439+
}
440+
383441
public CaseAttributes title(String title) {
384442
this.title = title;
385443
return this;
@@ -518,6 +576,8 @@ public boolean equals(Object o) {
518576
&& Objects.equals(this.priority, caseAttributes.priority)
519577
&& Objects.equals(this.serviceNowTicket, caseAttributes.serviceNowTicket)
520578
&& Objects.equals(this.status, caseAttributes.status)
579+
&& Objects.equals(this.statusGroup, caseAttributes.statusGroup)
580+
&& Objects.equals(this.statusName, caseAttributes.statusName)
521581
&& Objects.equals(this.title, caseAttributes.title)
522582
&& Objects.equals(this.type, caseAttributes.type)
523583
&& Objects.equals(this.typeId, caseAttributes.typeId)
@@ -539,6 +599,8 @@ public int hashCode() {
539599
priority,
540600
serviceNowTicket,
541601
status,
602+
statusGroup,
603+
statusName,
542604
title,
543605
type,
544606
typeId,
@@ -561,6 +623,8 @@ public String toString() {
561623
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
562624
sb.append(" serviceNowTicket: ").append(toIndentedString(serviceNowTicket)).append("\n");
563625
sb.append(" status: ").append(toIndentedString(status)).append("\n");
626+
sb.append(" statusGroup: ").append(toIndentedString(statusGroup)).append("\n");
627+
sb.append(" statusName: ").append(toIndentedString(statusName)).append("\n");
564628
sb.append(" title: ").append(toIndentedString(title)).append("\n");
565629
sb.append(" type: ").append(toIndentedString(type)).append("\n");
566630
sb.append(" typeId: ").append(toIndentedString(typeId)).append("\n");

src/main/java/com/datadog/api/client/v2/model/CaseCreateAttributes.java

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
CaseCreateAttributes.JSON_PROPERTY_CUSTOM_ATTRIBUTES,
2323
CaseCreateAttributes.JSON_PROPERTY_DESCRIPTION,
2424
CaseCreateAttributes.JSON_PROPERTY_PRIORITY,
25+
CaseCreateAttributes.JSON_PROPERTY_STATUS_NAME,
2526
CaseCreateAttributes.JSON_PROPERTY_TITLE,
2627
CaseCreateAttributes.JSON_PROPERTY_TYPE_ID
2728
})
@@ -38,6 +39,9 @@ public class CaseCreateAttributes {
3839
public static final String JSON_PROPERTY_PRIORITY = "priority";
3940
private CasePriority priority = CasePriority.NOT_DEFINED;
4041

42+
public static final String JSON_PROPERTY_STATUS_NAME = "status_name";
43+
private String statusName;
44+
4145
public static final String JSON_PROPERTY_TITLE = "title";
4246
private String title;
4347

@@ -130,6 +134,27 @@ public void setPriority(CasePriority priority) {
130134
this.priority = priority;
131135
}
132136

137+
public CaseCreateAttributes statusName(String statusName) {
138+
this.statusName = statusName;
139+
return this;
140+
}
141+
142+
/**
143+
* Status of the case. Must be one of the existing statuses for the case's type.
144+
*
145+
* @return statusName
146+
*/
147+
@jakarta.annotation.Nullable
148+
@JsonProperty(JSON_PROPERTY_STATUS_NAME)
149+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
150+
public String getStatusName() {
151+
return statusName;
152+
}
153+
154+
public void setStatusName(String statusName) {
155+
this.statusName = statusName;
156+
}
157+
133158
public CaseCreateAttributes title(String title) {
134159
this.title = title;
135160
return this;
@@ -229,6 +254,7 @@ public boolean equals(Object o) {
229254
return Objects.equals(this.customAttributes, caseCreateAttributes.customAttributes)
230255
&& Objects.equals(this.description, caseCreateAttributes.description)
231256
&& Objects.equals(this.priority, caseCreateAttributes.priority)
257+
&& Objects.equals(this.statusName, caseCreateAttributes.statusName)
232258
&& Objects.equals(this.title, caseCreateAttributes.title)
233259
&& Objects.equals(this.typeId, caseCreateAttributes.typeId)
234260
&& Objects.equals(this.additionalProperties, caseCreateAttributes.additionalProperties);
@@ -237,7 +263,7 @@ public boolean equals(Object o) {
237263
@Override
238264
public int hashCode() {
239265
return Objects.hash(
240-
customAttributes, description, priority, title, typeId, additionalProperties);
266+
customAttributes, description, priority, statusName, title, typeId, additionalProperties);
241267
}
242268

243269
@Override
@@ -247,6 +273,7 @@ public String toString() {
247273
sb.append(" customAttributes: ").append(toIndentedString(customAttributes)).append("\n");
248274
sb.append(" description: ").append(toIndentedString(description)).append("\n");
249275
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
276+
sb.append(" statusName: ").append(toIndentedString(statusName)).append("\n");
250277
sb.append(" title: ").append(toIndentedString(title)).append("\n");
251278
sb.append(" typeId: ").append(toIndentedString(typeId)).append("\n");
252279
sb.append(" additionalProperties: ")

src/main/java/com/datadog/api/client/v2/model/CaseStatus.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
import java.util.HashSet;
1919
import java.util.Set;
2020

21-
/** Case status */
21+
/**
22+
* Deprecated way of representing the case status, which only supports OPEN, IN_PROGRESS, and CLOSED
23+
* statuses. Use <code>status_name</code> instead.
24+
*/
2225
@JsonSerialize(using = CaseStatus.CaseStatusSerializer.class)
2326
public class CaseStatus extends ModelEnum<String> {
2427

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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+
7+
package com.datadog.api.client.v2.model;
8+
9+
import com.datadog.api.client.ModelEnum;
10+
import com.fasterxml.jackson.annotation.JsonCreator;
11+
import com.fasterxml.jackson.core.JsonGenerator;
12+
import com.fasterxml.jackson.core.JsonProcessingException;
13+
import com.fasterxml.jackson.databind.SerializerProvider;
14+
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
15+
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
16+
import java.io.IOException;
17+
import java.util.Arrays;
18+
import java.util.HashSet;
19+
import java.util.Set;
20+
21+
/** Status group of the case. */
22+
@JsonSerialize(using = CaseStatusGroup.CaseStatusGroupSerializer.class)
23+
public class CaseStatusGroup extends ModelEnum<String> {
24+
25+
private static final Set<String> allowedValues =
26+
new HashSet<String>(Arrays.asList("SG_OPEN", "SG_IN_PROGRESS", "SG_CLOSED"));
27+
28+
public static final CaseStatusGroup SG_OPEN = new CaseStatusGroup("SG_OPEN");
29+
public static final CaseStatusGroup SG_IN_PROGRESS = new CaseStatusGroup("SG_IN_PROGRESS");
30+
public static final CaseStatusGroup SG_CLOSED = new CaseStatusGroup("SG_CLOSED");
31+
32+
CaseStatusGroup(String value) {
33+
super(value, allowedValues);
34+
}
35+
36+
public static class CaseStatusGroupSerializer extends StdSerializer<CaseStatusGroup> {
37+
public CaseStatusGroupSerializer(Class<CaseStatusGroup> t) {
38+
super(t);
39+
}
40+
41+
public CaseStatusGroupSerializer() {
42+
this(null);
43+
}
44+
45+
@Override
46+
public void serialize(CaseStatusGroup value, JsonGenerator jgen, SerializerProvider provider)
47+
throws IOException, JsonProcessingException {
48+
jgen.writeObject(value.value);
49+
}
50+
}
51+
52+
@JsonCreator
53+
public static CaseStatusGroup fromValue(String value) {
54+
return new CaseStatusGroup(value);
55+
}
56+
}

0 commit comments

Comments
 (0)