diff --git a/.apigentools-info b/.apigentools-info index 6fa74c740d5..54dece8534c 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-03-20 15:01:18.145313", - "spec_repo_commit": "0f5c928e" + "regenerated": "2025-03-24 14:58:29.224495", + "spec_repo_commit": "764de5f0" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-03-20 15:01:18.161824", - "spec_repo_commit": "0f5c928e" + "regenerated": "2025-03-24 14:58:29.240267", + "spec_repo_commit": "764de5f0" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index aa344b25b5e..cd3b7d730ba 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -11936,9 +11936,15 @@ components: description: Incident ID. type: string type: - description: Incident description. - type: string + $ref: '#/components/schemas/EntityResponseIncludedIncidentType' type: object + EntityResponseIncludedIncidentType: + description: Incident description. + enum: + - incident + type: string + x-enum-varnames: + - INCIDENT EntityResponseIncludedOncall: description: Included oncall. properties: @@ -11948,9 +11954,15 @@ components: description: Oncall ID. type: string type: - description: Oncall type. - type: string + $ref: '#/components/schemas/EntityResponseIncludedOncallType' type: object + EntityResponseIncludedOncallType: + description: Oncall type. + enum: + - oncall + type: string + x-enum-varnames: + - ONCALL EntityResponseIncludedRawSchema: description: Included raw schema. properties: @@ -11960,8 +11972,7 @@ components: description: Raw schema ID. type: string type: - description: Raw schema type. - type: string + $ref: '#/components/schemas/EntityResponseIncludedRawSchemaType' type: object EntityResponseIncludedRawSchemaAttributes: description: Included raw schema attributes. @@ -11970,6 +11981,13 @@ components: description: Schema from user input in base64 encoding. type: string type: object + EntityResponseIncludedRawSchemaType: + description: Raw schema type. + enum: + - rawSchema + type: string + x-enum-varnames: + - RAW_SCHEMA EntityResponseIncludedRelatedEntity: description: Included related entity. properties: @@ -11981,8 +11999,7 @@ components: meta: $ref: '#/components/schemas/EntityResponseIncludedRelatedEntityMeta' type: - description: Related entity. - type: string + $ref: '#/components/schemas/EntityResponseIncludedRelatedEntityType' type: object EntityResponseIncludedRelatedEntityAttributes: description: Related entity attributes. @@ -12018,6 +12035,13 @@ components: description: Entity relation source. type: string type: object + EntityResponseIncludedRelatedEntityType: + description: Related entity. + enum: + - relatedEntity + type: string + x-enum-varnames: + - RELATED_ENTITY EntityResponseIncludedRelatedIncidentAttributes: description: Incident attributes. properties: @@ -12075,8 +12099,7 @@ components: description: Entity ID. type: string type: - description: Schema type. - type: string + $ref: '#/components/schemas/EntityResponseIncludedSchemaType' type: object EntityResponseIncludedSchemaAttributes: description: Included schema. @@ -12084,6 +12107,13 @@ components: schema: $ref: '#/components/schemas/EntityV3' type: object + EntityResponseIncludedSchemaType: + description: Schema type. + enum: + - schema + type: string + x-enum-varnames: + - SCHEMA EntityResponseMeta: description: Entity metadata. properties: diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedIncident.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedIncident.java index bbb13760050..246d3c42442 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedIncident.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedIncident.java @@ -33,7 +33,7 @@ public class EntityResponseIncludedIncident { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private EntityResponseIncludedIncidentType type; public EntityResponseIncludedIncident attributes( EntityResponseIncludedRelatedIncidentAttributes attributes) { @@ -79,8 +79,9 @@ public void setId(String id) { this.id = id; } - public EntityResponseIncludedIncident type(String type) { + public EntityResponseIncludedIncident type(EntityResponseIncludedIncidentType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } @@ -92,11 +93,14 @@ public EntityResponseIncludedIncident type(String type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public EntityResponseIncludedIncidentType getType() { return type; } - public void setType(String type) { + public void setType(EntityResponseIncludedIncidentType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedIncidentType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedIncidentType.java new file mode 100644 index 00000000000..f68d08faccb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedIncidentType.java @@ -0,0 +1,58 @@ +/* + * 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.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident description. */ +@JsonSerialize( + using = EntityResponseIncludedIncidentType.EntityResponseIncludedIncidentTypeSerializer.class) +public class EntityResponseIncludedIncidentType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("incident")); + + public static final EntityResponseIncludedIncidentType INCIDENT = + new EntityResponseIncludedIncidentType("incident"); + + EntityResponseIncludedIncidentType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseIncludedIncidentTypeSerializer + extends StdSerializer { + public EntityResponseIncludedIncidentTypeSerializer( + Class t) { + super(t); + } + + public EntityResponseIncludedIncidentTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseIncludedIncidentType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseIncludedIncidentType fromValue(String value) { + return new EntityResponseIncludedIncidentType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedOncall.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedOncall.java index 0490841d2bb..9cdb7159947 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedOncall.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedOncall.java @@ -33,7 +33,7 @@ public class EntityResponseIncludedOncall { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private EntityResponseIncludedOncallType type; public EntityResponseIncludedOncall attributes( EntityResponseIncludedRelatedOncallAttributes attributes) { @@ -79,8 +79,9 @@ public void setId(String id) { this.id = id; } - public EntityResponseIncludedOncall type(String type) { + public EntityResponseIncludedOncall type(EntityResponseIncludedOncallType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } @@ -92,11 +93,14 @@ public EntityResponseIncludedOncall type(String type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public EntityResponseIncludedOncallType getType() { return type; } - public void setType(String type) { + public void setType(EntityResponseIncludedOncallType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedOncallType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedOncallType.java new file mode 100644 index 00000000000..d6b221bde12 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedOncallType.java @@ -0,0 +1,57 @@ +/* + * 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.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Oncall type. */ +@JsonSerialize( + using = EntityResponseIncludedOncallType.EntityResponseIncludedOncallTypeSerializer.class) +public class EntityResponseIncludedOncallType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("oncall")); + + public static final EntityResponseIncludedOncallType ONCALL = + new EntityResponseIncludedOncallType("oncall"); + + EntityResponseIncludedOncallType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseIncludedOncallTypeSerializer + extends StdSerializer { + public EntityResponseIncludedOncallTypeSerializer(Class t) { + super(t); + } + + public EntityResponseIncludedOncallTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseIncludedOncallType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseIncludedOncallType fromValue(String value) { + return new EntityResponseIncludedOncallType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRawSchema.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRawSchema.java index 9cb52a1de29..814033614f6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRawSchema.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRawSchema.java @@ -33,7 +33,7 @@ public class EntityResponseIncludedRawSchema { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private EntityResponseIncludedRawSchemaType type; public EntityResponseIncludedRawSchema attributes( EntityResponseIncludedRawSchemaAttributes attributes) { @@ -79,8 +79,9 @@ public void setId(String id) { this.id = id; } - public EntityResponseIncludedRawSchema type(String type) { + public EntityResponseIncludedRawSchema type(EntityResponseIncludedRawSchemaType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } @@ -92,11 +93,14 @@ public EntityResponseIncludedRawSchema type(String type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public EntityResponseIncludedRawSchemaType getType() { return type; } - public void setType(String type) { + public void setType(EntityResponseIncludedRawSchemaType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRawSchemaType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRawSchemaType.java new file mode 100644 index 00000000000..fbf90cc855e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRawSchemaType.java @@ -0,0 +1,58 @@ +/* + * 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.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Raw schema type. */ +@JsonSerialize( + using = EntityResponseIncludedRawSchemaType.EntityResponseIncludedRawSchemaTypeSerializer.class) +public class EntityResponseIncludedRawSchemaType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("rawSchema")); + + public static final EntityResponseIncludedRawSchemaType RAW_SCHEMA = + new EntityResponseIncludedRawSchemaType("rawSchema"); + + EntityResponseIncludedRawSchemaType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseIncludedRawSchemaTypeSerializer + extends StdSerializer { + public EntityResponseIncludedRawSchemaTypeSerializer( + Class t) { + super(t); + } + + public EntityResponseIncludedRawSchemaTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseIncludedRawSchemaType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseIncludedRawSchemaType fromValue(String value) { + return new EntityResponseIncludedRawSchemaType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRelatedEntity.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRelatedEntity.java index b13774f2a79..8751579c88d 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRelatedEntity.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRelatedEntity.java @@ -37,7 +37,7 @@ public class EntityResponseIncludedRelatedEntity { private EntityResponseIncludedRelatedEntityMeta meta; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private EntityResponseIncludedRelatedEntityType type; public EntityResponseIncludedRelatedEntity attributes( EntityResponseIncludedRelatedEntityAttributes attributes) { @@ -105,8 +105,9 @@ public void setMeta(EntityResponseIncludedRelatedEntityMeta meta) { this.meta = meta; } - public EntityResponseIncludedRelatedEntity type(String type) { + public EntityResponseIncludedRelatedEntity type(EntityResponseIncludedRelatedEntityType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } @@ -118,11 +119,14 @@ public EntityResponseIncludedRelatedEntity type(String type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public EntityResponseIncludedRelatedEntityType getType() { return type; } - public void setType(String type) { + public void setType(EntityResponseIncludedRelatedEntityType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRelatedEntityType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRelatedEntityType.java new file mode 100644 index 00000000000..37934fdd6b4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedRelatedEntityType.java @@ -0,0 +1,63 @@ +/* + * 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.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Related entity. */ +@JsonSerialize( + using = + EntityResponseIncludedRelatedEntityType.EntityResponseIncludedRelatedEntityTypeSerializer + .class) +public class EntityResponseIncludedRelatedEntityType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("relatedEntity")); + + public static final EntityResponseIncludedRelatedEntityType RELATED_ENTITY = + new EntityResponseIncludedRelatedEntityType("relatedEntity"); + + EntityResponseIncludedRelatedEntityType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseIncludedRelatedEntityTypeSerializer + extends StdSerializer { + public EntityResponseIncludedRelatedEntityTypeSerializer( + Class t) { + super(t); + } + + public EntityResponseIncludedRelatedEntityTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseIncludedRelatedEntityType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseIncludedRelatedEntityType fromValue(String value) { + return new EntityResponseIncludedRelatedEntityType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedSchema.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedSchema.java index 42d7c2f709b..6b36dbd83ea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedSchema.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedSchema.java @@ -33,7 +33,7 @@ public class EntityResponseIncludedSchema { private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private EntityResponseIncludedSchemaType type; public EntityResponseIncludedSchema attributes( EntityResponseIncludedSchemaAttributes attributes) { @@ -79,8 +79,9 @@ public void setId(String id) { this.id = id; } - public EntityResponseIncludedSchema type(String type) { + public EntityResponseIncludedSchema type(EntityResponseIncludedSchemaType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } @@ -92,11 +93,14 @@ public EntityResponseIncludedSchema type(String type) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public EntityResponseIncludedSchemaType getType() { return type; } - public void setType(String type) { + public void setType(EntityResponseIncludedSchemaType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedSchemaType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedSchemaType.java new file mode 100644 index 00000000000..4325dff8a1d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseIncludedSchemaType.java @@ -0,0 +1,57 @@ +/* + * 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.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Schema type. */ +@JsonSerialize( + using = EntityResponseIncludedSchemaType.EntityResponseIncludedSchemaTypeSerializer.class) +public class EntityResponseIncludedSchemaType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("schema")); + + public static final EntityResponseIncludedSchemaType SCHEMA = + new EntityResponseIncludedSchemaType("schema"); + + EntityResponseIncludedSchemaType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseIncludedSchemaTypeSerializer + extends StdSerializer { + public EntityResponseIncludedSchemaTypeSerializer(Class t) { + super(t); + } + + public EntityResponseIncludedSchemaTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseIncludedSchemaType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseIncludedSchemaType fromValue(String value) { + return new EntityResponseIncludedSchemaType(value); + } +}