Skip to content

Commit d0cabb4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 764de5f0 of spec repo (#2768)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4051739 commit d0cabb4

12 files changed

+377
-34
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.6.6",
7-
"regenerated": "2025-03-20 15:01:18.145313",
8-
"spec_repo_commit": "0f5c928e"
7+
"regenerated": "2025-03-24 14:58:29.224495",
8+
"spec_repo_commit": "764de5f0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-03-20 15:01:18.161824",
13-
"spec_repo_commit": "0f5c928e"
12+
"regenerated": "2025-03-24 14:58:29.240267",
13+
"spec_repo_commit": "764de5f0"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11936,9 +11936,15 @@ components:
1193611936
description: Incident ID.
1193711937
type: string
1193811938
type:
11939-
description: Incident description.
11940-
type: string
11939+
$ref: '#/components/schemas/EntityResponseIncludedIncidentType'
1194111940
type: object
11941+
EntityResponseIncludedIncidentType:
11942+
description: Incident description.
11943+
enum:
11944+
- incident
11945+
type: string
11946+
x-enum-varnames:
11947+
- INCIDENT
1194211948
EntityResponseIncludedOncall:
1194311949
description: Included oncall.
1194411950
properties:
@@ -11948,9 +11954,15 @@ components:
1194811954
description: Oncall ID.
1194911955
type: string
1195011956
type:
11951-
description: Oncall type.
11952-
type: string
11957+
$ref: '#/components/schemas/EntityResponseIncludedOncallType'
1195311958
type: object
11959+
EntityResponseIncludedOncallType:
11960+
description: Oncall type.
11961+
enum:
11962+
- oncall
11963+
type: string
11964+
x-enum-varnames:
11965+
- ONCALL
1195411966
EntityResponseIncludedRawSchema:
1195511967
description: Included raw schema.
1195611968
properties:
@@ -11960,8 +11972,7 @@ components:
1196011972
description: Raw schema ID.
1196111973
type: string
1196211974
type:
11963-
description: Raw schema type.
11964-
type: string
11975+
$ref: '#/components/schemas/EntityResponseIncludedRawSchemaType'
1196511976
type: object
1196611977
EntityResponseIncludedRawSchemaAttributes:
1196711978
description: Included raw schema attributes.
@@ -11970,6 +11981,13 @@ components:
1197011981
description: Schema from user input in base64 encoding.
1197111982
type: string
1197211983
type: object
11984+
EntityResponseIncludedRawSchemaType:
11985+
description: Raw schema type.
11986+
enum:
11987+
- rawSchema
11988+
type: string
11989+
x-enum-varnames:
11990+
- RAW_SCHEMA
1197311991
EntityResponseIncludedRelatedEntity:
1197411992
description: Included related entity.
1197511993
properties:
@@ -11981,8 +11999,7 @@ components:
1198111999
meta:
1198212000
$ref: '#/components/schemas/EntityResponseIncludedRelatedEntityMeta'
1198312001
type:
11984-
description: Related entity.
11985-
type: string
12002+
$ref: '#/components/schemas/EntityResponseIncludedRelatedEntityType'
1198612003
type: object
1198712004
EntityResponseIncludedRelatedEntityAttributes:
1198812005
description: Related entity attributes.
@@ -12018,6 +12035,13 @@ components:
1201812035
description: Entity relation source.
1201912036
type: string
1202012037
type: object
12038+
EntityResponseIncludedRelatedEntityType:
12039+
description: Related entity.
12040+
enum:
12041+
- relatedEntity
12042+
type: string
12043+
x-enum-varnames:
12044+
- RELATED_ENTITY
1202112045
EntityResponseIncludedRelatedIncidentAttributes:
1202212046
description: Incident attributes.
1202312047
properties:
@@ -12075,15 +12099,21 @@ components:
1207512099
description: Entity ID.
1207612100
type: string
1207712101
type:
12078-
description: Schema type.
12079-
type: string
12102+
$ref: '#/components/schemas/EntityResponseIncludedSchemaType'
1208012103
type: object
1208112104
EntityResponseIncludedSchemaAttributes:
1208212105
description: Included schema.
1208312106
properties:
1208412107
schema:
1208512108
$ref: '#/components/schemas/EntityV3'
1208612109
type: object
12110+
EntityResponseIncludedSchemaType:
12111+
description: Schema type.
12112+
enum:
12113+
- schema
12114+
type: string
12115+
x-enum-varnames:
12116+
- SCHEMA
1208712117
EntityResponseMeta:
1208812118
description: Entity metadata.
1208912119
properties:

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class EntityResponseIncludedIncident {
3333
private String id;
3434

3535
public static final String JSON_PROPERTY_TYPE = "type";
36-
private String type;
36+
private EntityResponseIncludedIncidentType type;
3737

3838
public EntityResponseIncludedIncident attributes(
3939
EntityResponseIncludedRelatedIncidentAttributes attributes) {
@@ -79,8 +79,9 @@ public void setId(String id) {
7979
this.id = id;
8080
}
8181

82-
public EntityResponseIncludedIncident type(String type) {
82+
public EntityResponseIncludedIncident type(EntityResponseIncludedIncidentType type) {
8383
this.type = type;
84+
this.unparsed |= !type.isValid();
8485
return this;
8586
}
8687

@@ -92,11 +93,14 @@ public EntityResponseIncludedIncident type(String type) {
9293
@jakarta.annotation.Nullable
9394
@JsonProperty(JSON_PROPERTY_TYPE)
9495
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
95-
public String getType() {
96+
public EntityResponseIncludedIncidentType getType() {
9697
return type;
9798
}
9899

99-
public void setType(String type) {
100+
public void setType(EntityResponseIncludedIncidentType type) {
101+
if (!type.isValid()) {
102+
this.unparsed = true;
103+
}
100104
this.type = type;
101105
}
102106

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
/** Incident description. */
22+
@JsonSerialize(
23+
using = EntityResponseIncludedIncidentType.EntityResponseIncludedIncidentTypeSerializer.class)
24+
public class EntityResponseIncludedIncidentType extends ModelEnum<String> {
25+
26+
private static final Set<String> allowedValues = new HashSet<String>(Arrays.asList("incident"));
27+
28+
public static final EntityResponseIncludedIncidentType INCIDENT =
29+
new EntityResponseIncludedIncidentType("incident");
30+
31+
EntityResponseIncludedIncidentType(String value) {
32+
super(value, allowedValues);
33+
}
34+
35+
public static class EntityResponseIncludedIncidentTypeSerializer
36+
extends StdSerializer<EntityResponseIncludedIncidentType> {
37+
public EntityResponseIncludedIncidentTypeSerializer(
38+
Class<EntityResponseIncludedIncidentType> t) {
39+
super(t);
40+
}
41+
42+
public EntityResponseIncludedIncidentTypeSerializer() {
43+
this(null);
44+
}
45+
46+
@Override
47+
public void serialize(
48+
EntityResponseIncludedIncidentType value, JsonGenerator jgen, SerializerProvider provider)
49+
throws IOException, JsonProcessingException {
50+
jgen.writeObject(value.value);
51+
}
52+
}
53+
54+
@JsonCreator
55+
public static EntityResponseIncludedIncidentType fromValue(String value) {
56+
return new EntityResponseIncludedIncidentType(value);
57+
}
58+
}

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class EntityResponseIncludedOncall {
3333
private String id;
3434

3535
public static final String JSON_PROPERTY_TYPE = "type";
36-
private String type;
36+
private EntityResponseIncludedOncallType type;
3737

3838
public EntityResponseIncludedOncall attributes(
3939
EntityResponseIncludedRelatedOncallAttributes attributes) {
@@ -79,8 +79,9 @@ public void setId(String id) {
7979
this.id = id;
8080
}
8181

82-
public EntityResponseIncludedOncall type(String type) {
82+
public EntityResponseIncludedOncall type(EntityResponseIncludedOncallType type) {
8383
this.type = type;
84+
this.unparsed |= !type.isValid();
8485
return this;
8586
}
8687

@@ -92,11 +93,14 @@ public EntityResponseIncludedOncall type(String type) {
9293
@jakarta.annotation.Nullable
9394
@JsonProperty(JSON_PROPERTY_TYPE)
9495
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
95-
public String getType() {
96+
public EntityResponseIncludedOncallType getType() {
9697
return type;
9798
}
9899

99-
public void setType(String type) {
100+
public void setType(EntityResponseIncludedOncallType type) {
101+
if (!type.isValid()) {
102+
this.unparsed = true;
103+
}
100104
this.type = type;
101105
}
102106

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
/** Oncall type. */
22+
@JsonSerialize(
23+
using = EntityResponseIncludedOncallType.EntityResponseIncludedOncallTypeSerializer.class)
24+
public class EntityResponseIncludedOncallType extends ModelEnum<String> {
25+
26+
private static final Set<String> allowedValues = new HashSet<String>(Arrays.asList("oncall"));
27+
28+
public static final EntityResponseIncludedOncallType ONCALL =
29+
new EntityResponseIncludedOncallType("oncall");
30+
31+
EntityResponseIncludedOncallType(String value) {
32+
super(value, allowedValues);
33+
}
34+
35+
public static class EntityResponseIncludedOncallTypeSerializer
36+
extends StdSerializer<EntityResponseIncludedOncallType> {
37+
public EntityResponseIncludedOncallTypeSerializer(Class<EntityResponseIncludedOncallType> t) {
38+
super(t);
39+
}
40+
41+
public EntityResponseIncludedOncallTypeSerializer() {
42+
this(null);
43+
}
44+
45+
@Override
46+
public void serialize(
47+
EntityResponseIncludedOncallType value, JsonGenerator jgen, SerializerProvider provider)
48+
throws IOException, JsonProcessingException {
49+
jgen.writeObject(value.value);
50+
}
51+
}
52+
53+
@JsonCreator
54+
public static EntityResponseIncludedOncallType fromValue(String value) {
55+
return new EntityResponseIncludedOncallType(value);
56+
}
57+
}

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class EntityResponseIncludedRawSchema {
3333
private String id;
3434

3535
public static final String JSON_PROPERTY_TYPE = "type";
36-
private String type;
36+
private EntityResponseIncludedRawSchemaType type;
3737

3838
public EntityResponseIncludedRawSchema attributes(
3939
EntityResponseIncludedRawSchemaAttributes attributes) {
@@ -79,8 +79,9 @@ public void setId(String id) {
7979
this.id = id;
8080
}
8181

82-
public EntityResponseIncludedRawSchema type(String type) {
82+
public EntityResponseIncludedRawSchema type(EntityResponseIncludedRawSchemaType type) {
8383
this.type = type;
84+
this.unparsed |= !type.isValid();
8485
return this;
8586
}
8687

@@ -92,11 +93,14 @@ public EntityResponseIncludedRawSchema type(String type) {
9293
@jakarta.annotation.Nullable
9394
@JsonProperty(JSON_PROPERTY_TYPE)
9495
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
95-
public String getType() {
96+
public EntityResponseIncludedRawSchemaType getType() {
9697
return type;
9798
}
9899

99-
public void setType(String type) {
100+
public void setType(EntityResponseIncludedRawSchemaType type) {
101+
if (!type.isValid()) {
102+
this.unparsed = true;
103+
}
100104
this.type = type;
101105
}
102106

0 commit comments

Comments
 (0)