diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 00ba154a3a7..2b4c8780d09 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -38001,9 +38001,7 @@ components: example: 550e8400-e29b-41d4-a716-446655440001 type: string mapkind: - description: The type of source map. - example: elf - type: string + $ref: "#/components/schemas/ELFSourcemapMapKind" origin: description: The origin of the ELF file. example: debian @@ -38042,6 +38040,14 @@ components: - type - attributes type: object + ELFSourcemapMapKind: + description: The type of source map. Always `elf` for ELF source maps. + enum: + - elf + example: elf + type: string + x-enum-varnames: + - ELF EPSS: description: Vulnerability EPSS severity. properties: @@ -52567,9 +52573,7 @@ components: format: date-time type: string mapkind: - description: The type of source map. - example: flutter - type: string + $ref: "#/components/schemas/FlutterSourcemapMapKind" service: description: The service name associated with the symbol file. example: my-flutter-app @@ -52608,6 +52612,14 @@ components: - type - attributes type: object + FlutterSourcemapMapKind: + description: The type of source map. Always `flutter` for Flutter source maps. + enum: + - flutter + example: flutter + type: string + x-enum-varnames: + - FLUTTER FormData: description: A form resource object. properties: @@ -58408,9 +58420,7 @@ components: format: date-time type: string mapkind: - description: The type of source map. - example: il2cpp - type: string + $ref: "#/components/schemas/IL2CPPSourcemapMapKind" size: description: The size of the mapping file in bytes. example: 4096 @@ -58437,6 +58447,14 @@ components: - type - attributes type: object + IL2CPPSourcemapMapKind: + description: The type of source map. Always `il2cpp` for IL2CPP source maps. + enum: + - il2cpp + example: il2cpp + type: string + x-enum-varnames: + - IL2CPP IOSSourcemapAttributes: description: Attributes of an iOS dSYM source map. properties: @@ -58446,9 +58464,7 @@ components: format: date-time type: string mapkind: - description: The type of source map. - example: ios - type: string + $ref: "#/components/schemas/IOSSourcemapMapKind" size: description: The size of the dSYM file in bytes. example: 4096 @@ -58479,6 +58495,14 @@ components: - type - attributes type: object + IOSSourcemapMapKind: + description: The type of source map. Always `ios` for iOS dSYM source maps. + enum: + - ios + example: ios + type: string + x-enum-varnames: + - IOS IPAllowlistAttributes: description: Attributes of the IP allowlist. properties: @@ -66172,9 +66196,7 @@ components: example: bundle.min.js type: string mapkind: - description: The type of source map. - example: js - type: string + $ref: "#/components/schemas/JSSourcemapMapKind" service: description: The service name associated with the source map. example: my-web-service @@ -66217,6 +66239,14 @@ components: - type - attributes type: object + JSSourcemapMapKind: + description: The type of source map. Always `js` for JavaScript source maps. + enum: + - js + example: js + type: string + x-enum-varnames: + - JS JVMSourcemapAttributes: description: Attributes of a JVM mapping file. properties: @@ -66230,9 +66260,7 @@ components: format: date-time type: string mapkind: - description: The type of source map. - example: jvm - type: string + $ref: "#/components/schemas/JVMSourcemapMapKind" service: description: The service name associated with the mapping file. example: my-android-app @@ -66275,6 +66303,14 @@ components: - type - attributes type: object + JVMSourcemapMapKind: + description: The type of source map. Always `jvm` for JVM source maps. + enum: + - jvm + example: jvm + type: string + x-enum-varnames: + - JVM JiraAccountAttributes: description: Attributes of a Jira account properties: @@ -81876,9 +81912,7 @@ components: example: libmyapp.so type: string mapkind: - description: The type of source map. - example: ndk - type: string + $ref: "#/components/schemas/NDKSourcemapMapKind" size: description: The size of the symbol file in bytes. example: 32768 @@ -81905,6 +81939,14 @@ components: - type - attributes type: object + NDKSourcemapMapKind: + description: The type of source map. Always `ndk` for Android NDK source maps. + enum: + - ndk + example: ndk + type: string + x-enum-varnames: + - NDK NetworkHealthInsight: description: A single network health insight describing a service-to-service connectivity issue. properties: @@ -95546,6 +95588,56 @@ components: description: Replay track identifier indicating which recording track the session belongs to. type: string type: object + PortablePdbSourcemapAttributes: + description: Attributes of a Portable PDB file. + properties: + build_id: + description: The build identifier. + example: 550e8400e29b41d4a71644665544000012345678 + type: string + created_at: + description: The timestamp when the symbol file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + file_name: + description: The file name of the symbol file. + example: MyApplication.pdb + type: string + mapkind: + $ref: "#/components/schemas/PortablePdbSourcemapMapKind" + size: + description: The size of the symbol file in bytes. + example: 4096 + format: int64 + type: integer + required: + - mapkind + type: object + PortablePdbSourcemapData: + description: Portable PDB file data object. + properties: + attributes: + $ref: "#/components/schemas/PortablePdbSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "10" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object + PortablePdbSourcemapMapKind: + description: The type of source map. Always `portable_pdb` for Portable PDB files. + enum: + - portable_pdb + example: portable_pdb + type: string + x-enum-varnames: + - PORTABLE_PDB PostmortemAttachmentRequest: description: Request body for creating a postmortem attachment. properties: @@ -101722,9 +101814,7 @@ components: example: 550e8400-e29b-41d4-a716-446655440000 type: string mapkind: - description: The type of source map. - example: react - type: string + $ref: "#/components/schemas/ReactNativeSourcemapMapKind" platform: description: The platform the source map was built for (e.g., `ios`, `android`). example: ios @@ -101763,6 +101853,14 @@ components: - type - attributes type: object + ReactNativeSourcemapMapKind: + description: The type of source map. Always `react` for React Native source maps. + enum: + - react + example: react + type: string + x-enum-varnames: + - REACT ReadinessGate: additionalProperties: false description: Used to merge multiple branches into a single branch. @@ -122979,6 +123077,8 @@ components: - $ref: "#/components/schemas/ELFSourcemapData" - $ref: "#/components/schemas/NDKSourcemapData" - $ref: "#/components/schemas/IL2CPPSourcemapData" + - $ref: "#/components/schemas/WASMSourcemapData" + - $ref: "#/components/schemas/PortablePdbSourcemapData" SourcemapMapKind: description: The type of source map. enum: @@ -140085,6 +140185,56 @@ components: - X_CONTENT_TYPE_HEADER_MISSING - X_PATH_INJECTION - XSS + WASMSourcemapAttributes: + description: Attributes of a WebAssembly symbol file. + properties: + build_id: + description: The build identifier. + example: wasm-build-123 + type: string + created_at: + description: The timestamp when the symbol file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + file_name: + description: The file name of the symbol file. + example: module.wasm + type: string + mapkind: + $ref: "#/components/schemas/WASMSourcemapMapKind" + size: + description: The size of the symbol file in bytes. + example: 4096 + format: int64 + type: integer + required: + - mapkind + type: object + WASMSourcemapData: + description: WebAssembly symbol file data object. + properties: + attributes: + $ref: "#/components/schemas/WASMSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "9" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object + WASMSourcemapMapKind: + description: The type of source map. Always `wasm` for WebAssembly symbol files. + enum: + - wasm + example: wasm + type: string + x-enum-varnames: + - WASM Watch: description: A single RUM replay session watch resource returned by create operations. properties: diff --git a/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapAttributes.java index cb52ef408e3..c96c29ff280 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapAttributes.java @@ -55,7 +55,7 @@ public class ELFSourcemapAttributes { private String goBuildId; public static final String JSON_PROPERTY_MAPKIND = "mapkind"; - private String mapkind; + private ELFSourcemapMapKind mapkind; public static final String JSON_PROPERTY_ORIGIN = "origin"; private String origin; @@ -74,10 +74,11 @@ public ELFSourcemapAttributes() {} @JsonCreator public ELFSourcemapAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) ELFSourcemapMapKind mapkind, @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { this.createdAt = createdAt; this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); this.size = size; } @@ -206,23 +207,27 @@ public void setGoBuildId(String goBuildId) { this.goBuildId = goBuildId; } - public ELFSourcemapAttributes mapkind(String mapkind) { + public ELFSourcemapAttributes mapkind(ELFSourcemapMapKind mapkind) { this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); return this; } /** - * The type of source map. + * The type of source map. Always elf for ELF source maps. * * @return mapkind */ @JsonProperty(JSON_PROPERTY_MAPKIND) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMapkind() { + public ELFSourcemapMapKind getMapkind() { return mapkind; } - public void setMapkind(String mapkind) { + public void setMapkind(ELFSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } this.mapkind = mapkind; } diff --git a/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapMapKind.java new file mode 100644 index 00000000000..36ea428da29 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapMapKind.java @@ -0,0 +1,54 @@ +/* + * 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; + +/** The type of source map. Always elf for ELF source maps. */ +@JsonSerialize(using = ELFSourcemapMapKind.ELFSourcemapMapKindSerializer.class) +public class ELFSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("elf")); + + public static final ELFSourcemapMapKind ELF = new ELFSourcemapMapKind("elf"); + + ELFSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class ELFSourcemapMapKindSerializer extends StdSerializer { + public ELFSourcemapMapKindSerializer(Class t) { + super(t); + } + + public ELFSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + ELFSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ELFSourcemapMapKind fromValue(String value) { + return new ELFSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapAttributes.java index 5c607097986..25983c8c7df 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapAttributes.java @@ -39,7 +39,7 @@ public class FlutterSourcemapAttributes { private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MAPKIND = "mapkind"; - private String mapkind; + private FlutterSourcemapMapKind mapkind; public static final String JSON_PROPERTY_SERVICE = "service"; private String service; @@ -58,10 +58,11 @@ public FlutterSourcemapAttributes() {} @JsonCreator public FlutterSourcemapAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) FlutterSourcemapMapKind mapkind, @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { this.createdAt = createdAt; this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); this.size = size; } @@ -106,23 +107,27 @@ public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public FlutterSourcemapAttributes mapkind(String mapkind) { + public FlutterSourcemapAttributes mapkind(FlutterSourcemapMapKind mapkind) { this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); return this; } /** - * The type of source map. + * The type of source map. Always flutter for Flutter source maps. * * @return mapkind */ @JsonProperty(JSON_PROPERTY_MAPKIND) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMapkind() { + public FlutterSourcemapMapKind getMapkind() { return mapkind; } - public void setMapkind(String mapkind) { + public void setMapkind(FlutterSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } this.mapkind = mapkind; } diff --git a/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapMapKind.java new file mode 100644 index 00000000000..63929665f94 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapMapKind.java @@ -0,0 +1,55 @@ +/* + * 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; + +/** The type of source map. Always flutter for Flutter source maps. */ +@JsonSerialize(using = FlutterSourcemapMapKind.FlutterSourcemapMapKindSerializer.class) +public class FlutterSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("flutter")); + + public static final FlutterSourcemapMapKind FLUTTER = new FlutterSourcemapMapKind("flutter"); + + FlutterSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class FlutterSourcemapMapKindSerializer + extends StdSerializer { + public FlutterSourcemapMapKindSerializer(Class t) { + super(t); + } + + public FlutterSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + FlutterSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FlutterSourcemapMapKind fromValue(String value) { + return new FlutterSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapAttributes.java index febaade72c3..a6c675c3ec8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapAttributes.java @@ -36,7 +36,7 @@ public class IL2CPPSourcemapAttributes { private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MAPKIND = "mapkind"; - private String mapkind; + private IL2CPPSourcemapMapKind mapkind; public static final String JSON_PROPERTY_SIZE = "size"; private Long size; @@ -46,10 +46,11 @@ public IL2CPPSourcemapAttributes() {} @JsonCreator public IL2CPPSourcemapAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) IL2CPPSourcemapMapKind mapkind, @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { this.createdAt = createdAt; this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); this.size = size; } @@ -94,23 +95,27 @@ public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public IL2CPPSourcemapAttributes mapkind(String mapkind) { + public IL2CPPSourcemapAttributes mapkind(IL2CPPSourcemapMapKind mapkind) { this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); return this; } /** - * The type of source map. + * The type of source map. Always il2cpp for IL2CPP source maps. * * @return mapkind */ @JsonProperty(JSON_PROPERTY_MAPKIND) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMapkind() { + public IL2CPPSourcemapMapKind getMapkind() { return mapkind; } - public void setMapkind(String mapkind) { + public void setMapkind(IL2CPPSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } this.mapkind = mapkind; } diff --git a/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapMapKind.java new file mode 100644 index 00000000000..74d8bb517a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapMapKind.java @@ -0,0 +1,55 @@ +/* + * 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; + +/** The type of source map. Always il2cpp for IL2CPP source maps. */ +@JsonSerialize(using = IL2CPPSourcemapMapKind.IL2CPPSourcemapMapKindSerializer.class) +public class IL2CPPSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("il2cpp")); + + public static final IL2CPPSourcemapMapKind IL2CPP = new IL2CPPSourcemapMapKind("il2cpp"); + + IL2CPPSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class IL2CPPSourcemapMapKindSerializer + extends StdSerializer { + public IL2CPPSourcemapMapKindSerializer(Class t) { + super(t); + } + + public IL2CPPSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + IL2CPPSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IL2CPPSourcemapMapKind fromValue(String value) { + return new IL2CPPSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapAttributes.java index 6d4ce6f717c..bb8e561ca89 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapAttributes.java @@ -33,7 +33,7 @@ public class IOSSourcemapAttributes { private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MAPKIND = "mapkind"; - private String mapkind; + private IOSSourcemapMapKind mapkind; public static final String JSON_PROPERTY_SIZE = "size"; private Long size; @@ -46,10 +46,11 @@ public IOSSourcemapAttributes() {} @JsonCreator public IOSSourcemapAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) IOSSourcemapMapKind mapkind, @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { this.createdAt = createdAt; this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); this.size = size; } @@ -73,23 +74,27 @@ public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public IOSSourcemapAttributes mapkind(String mapkind) { + public IOSSourcemapAttributes mapkind(IOSSourcemapMapKind mapkind) { this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); return this; } /** - * The type of source map. + * The type of source map. Always ios for iOS dSYM source maps. * * @return mapkind */ @JsonProperty(JSON_PROPERTY_MAPKIND) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMapkind() { + public IOSSourcemapMapKind getMapkind() { return mapkind; } - public void setMapkind(String mapkind) { + public void setMapkind(IOSSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } this.mapkind = mapkind; } diff --git a/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapMapKind.java new file mode 100644 index 00000000000..181108ebae7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapMapKind.java @@ -0,0 +1,54 @@ +/* + * 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; + +/** The type of source map. Always ios for iOS dSYM source maps. */ +@JsonSerialize(using = IOSSourcemapMapKind.IOSSourcemapMapKindSerializer.class) +public class IOSSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("ios")); + + public static final IOSSourcemapMapKind IOS = new IOSSourcemapMapKind("ios"); + + IOSSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class IOSSourcemapMapKindSerializer extends StdSerializer { + public IOSSourcemapMapKindSerializer(Class t) { + super(t); + } + + public IOSSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + IOSSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IOSSourcemapMapKind fromValue(String value) { + return new IOSSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/JSSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/JSSourcemapAttributes.java index f28f7682cde..c86079c7dce 100644 --- a/src/main/java/com/datadog/api/client/v2/model/JSSourcemapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/JSSourcemapAttributes.java @@ -61,7 +61,7 @@ public class JSSourcemapAttributes { private String fileName; public static final String JSON_PROPERTY_MAPKIND = "mapkind"; - private String mapkind; + private JSSourcemapMapKind mapkind; public static final String JSON_PROPERTY_SERVICE = "service"; private String service; @@ -83,10 +83,11 @@ public JSSourcemapAttributes() {} @JsonCreator public JSSourcemapAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) JSSourcemapMapKind mapkind, @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { this.createdAt = createdAt; this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); this.size = size; } @@ -237,23 +238,27 @@ public void setFileName(String fileName) { this.fileName = fileName; } - public JSSourcemapAttributes mapkind(String mapkind) { + public JSSourcemapAttributes mapkind(JSSourcemapMapKind mapkind) { this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); return this; } /** - * The type of source map. + * The type of source map. Always js for JavaScript source maps. * * @return mapkind */ @JsonProperty(JSON_PROPERTY_MAPKIND) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMapkind() { + public JSSourcemapMapKind getMapkind() { return mapkind; } - public void setMapkind(String mapkind) { + public void setMapkind(JSSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } this.mapkind = mapkind; } diff --git a/src/main/java/com/datadog/api/client/v2/model/JSSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/JSSourcemapMapKind.java new file mode 100644 index 00000000000..30a123cf74b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/JSSourcemapMapKind.java @@ -0,0 +1,53 @@ +/* + * 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; + +/** The type of source map. Always js for JavaScript source maps. */ +@JsonSerialize(using = JSSourcemapMapKind.JSSourcemapMapKindSerializer.class) +public class JSSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("js")); + + public static final JSSourcemapMapKind JS = new JSSourcemapMapKind("js"); + + JSSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class JSSourcemapMapKindSerializer extends StdSerializer { + public JSSourcemapMapKindSerializer(Class t) { + super(t); + } + + public JSSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize(JSSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static JSSourcemapMapKind fromValue(String value) { + return new JSSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapAttributes.java index 7c3d1021693..ceed66ad8f7 100644 --- a/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapAttributes.java @@ -40,7 +40,7 @@ public class JVMSourcemapAttributes { private OffsetDateTime createdAt; public static final String JSON_PROPERTY_MAPKIND = "mapkind"; - private String mapkind; + private JVMSourcemapMapKind mapkind; public static final String JSON_PROPERTY_SERVICE = "service"; private String service; @@ -62,10 +62,11 @@ public JVMSourcemapAttributes() {} @JsonCreator public JVMSourcemapAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) JVMSourcemapMapKind mapkind, @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { this.createdAt = createdAt; this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); this.size = size; } @@ -110,23 +111,27 @@ public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public JVMSourcemapAttributes mapkind(String mapkind) { + public JVMSourcemapAttributes mapkind(JVMSourcemapMapKind mapkind) { this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); return this; } /** - * The type of source map. + * The type of source map. Always jvm for JVM source maps. * * @return mapkind */ @JsonProperty(JSON_PROPERTY_MAPKIND) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMapkind() { + public JVMSourcemapMapKind getMapkind() { return mapkind; } - public void setMapkind(String mapkind) { + public void setMapkind(JVMSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } this.mapkind = mapkind; } diff --git a/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapMapKind.java new file mode 100644 index 00000000000..c516608c484 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapMapKind.java @@ -0,0 +1,54 @@ +/* + * 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; + +/** The type of source map. Always jvm for JVM source maps. */ +@JsonSerialize(using = JVMSourcemapMapKind.JVMSourcemapMapKindSerializer.class) +public class JVMSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("jvm")); + + public static final JVMSourcemapMapKind JVM = new JVMSourcemapMapKind("jvm"); + + JVMSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class JVMSourcemapMapKindSerializer extends StdSerializer { + public JVMSourcemapMapKindSerializer(Class t) { + super(t); + } + + public JVMSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + JVMSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static JVMSourcemapMapKind fromValue(String value) { + return new JVMSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapAttributes.java index fafc101776f..1e2e4546a20 100644 --- a/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapAttributes.java @@ -44,7 +44,7 @@ public class NDKSourcemapAttributes { private String fileName; public static final String JSON_PROPERTY_MAPKIND = "mapkind"; - private String mapkind; + private NDKSourcemapMapKind mapkind; public static final String JSON_PROPERTY_SIZE = "size"; private Long size; @@ -54,10 +54,11 @@ public NDKSourcemapAttributes() {} @JsonCreator public NDKSourcemapAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) NDKSourcemapMapKind mapkind, @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { this.createdAt = createdAt; this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); this.size = size; } @@ -144,23 +145,27 @@ public void setFileName(String fileName) { this.fileName = fileName; } - public NDKSourcemapAttributes mapkind(String mapkind) { + public NDKSourcemapAttributes mapkind(NDKSourcemapMapKind mapkind) { this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); return this; } /** - * The type of source map. + * The type of source map. Always ndk for Android NDK source maps. * * @return mapkind */ @JsonProperty(JSON_PROPERTY_MAPKIND) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMapkind() { + public NDKSourcemapMapKind getMapkind() { return mapkind; } - public void setMapkind(String mapkind) { + public void setMapkind(NDKSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } this.mapkind = mapkind; } diff --git a/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapMapKind.java new file mode 100644 index 00000000000..d41b98e581b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapMapKind.java @@ -0,0 +1,54 @@ +/* + * 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; + +/** The type of source map. Always ndk for Android NDK source maps. */ +@JsonSerialize(using = NDKSourcemapMapKind.NDKSourcemapMapKindSerializer.class) +public class NDKSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("ndk")); + + public static final NDKSourcemapMapKind NDK = new NDKSourcemapMapKind("ndk"); + + NDKSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class NDKSourcemapMapKindSerializer extends StdSerializer { + public NDKSourcemapMapKindSerializer(Class t) { + super(t); + } + + public NDKSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + NDKSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static NDKSourcemapMapKind fromValue(String value) { + return new NDKSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapAttributes.java new file mode 100644 index 00000000000..bb7f6c30d0f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapAttributes.java @@ -0,0 +1,262 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Portable PDB file. */ +@JsonPropertyOrder({ + PortablePdbSourcemapAttributes.JSON_PROPERTY_BUILD_ID, + PortablePdbSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + PortablePdbSourcemapAttributes.JSON_PROPERTY_FILE_NAME, + PortablePdbSourcemapAttributes.JSON_PROPERTY_MAPKIND, + PortablePdbSourcemapAttributes.JSON_PROPERTY_SIZE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PortablePdbSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUILD_ID = "build_id"; + private String buildId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + private String fileName; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private PortablePdbSourcemapMapKind mapkind; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public PortablePdbSourcemapAttributes() {} + + @JsonCreator + public PortablePdbSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) + PortablePdbSourcemapMapKind mapkind) { + this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); + } + + public PortablePdbSourcemapAttributes buildId(String buildId) { + this.buildId = buildId; + return this; + } + + /** + * The build identifier. + * + * @return buildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuildId() { + return buildId; + } + + public void setBuildId(String buildId) { + this.buildId = buildId; + } + + public PortablePdbSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the symbol file was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public PortablePdbSourcemapAttributes fileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * The file name of the symbol file. + * + * @return fileName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public PortablePdbSourcemapAttributes mapkind(PortablePdbSourcemapMapKind mapkind) { + this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); + return this; + } + + /** + * The type of source map. Always portable_pdb for Portable PDB files. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PortablePdbSourcemapMapKind getMapkind() { + return mapkind; + } + + public void setMapkind(PortablePdbSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } + this.mapkind = mapkind; + } + + public PortablePdbSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the symbol file in bytes. + * + * @return size + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + /** + * 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 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 PortablePdbSourcemapAttributes + */ + @JsonAnySetter + public PortablePdbSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map 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 PortablePdbSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PortablePdbSourcemapAttributes portablePdbSourcemapAttributes = + (PortablePdbSourcemapAttributes) o; + return Objects.equals(this.buildId, portablePdbSourcemapAttributes.buildId) + && Objects.equals(this.createdAt, portablePdbSourcemapAttributes.createdAt) + && Objects.equals(this.fileName, portablePdbSourcemapAttributes.fileName) + && Objects.equals(this.mapkind, portablePdbSourcemapAttributes.mapkind) + && Objects.equals(this.size, portablePdbSourcemapAttributes.size) + && Objects.equals( + this.additionalProperties, portablePdbSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(buildId, createdAt, fileName, mapkind, size, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PortablePdbSourcemapAttributes {\n"); + sb.append(" buildId: ").append(toIndentedString(buildId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).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 "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapData.java new file mode 100644 index 00000000000..bad6292ac44 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapData.java @@ -0,0 +1,212 @@ +/* + * 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.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Portable PDB file data object. */ +@JsonPropertyOrder({ + PortablePdbSourcemapData.JSON_PROPERTY_ATTRIBUTES, + PortablePdbSourcemapData.JSON_PROPERTY_ID, + PortablePdbSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PortablePdbSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PortablePdbSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public PortablePdbSourcemapData() {} + + @JsonCreator + public PortablePdbSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + PortablePdbSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PortablePdbSourcemapData attributes(PortablePdbSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Portable PDB file. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PortablePdbSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(PortablePdbSourcemapAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public PortablePdbSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PortablePdbSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * 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 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 PortablePdbSourcemapData + */ + @JsonAnySetter + public PortablePdbSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map 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 PortablePdbSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PortablePdbSourcemapData portablePdbSourcemapData = (PortablePdbSourcemapData) o; + return Objects.equals(this.attributes, portablePdbSourcemapData.attributes) + && Objects.equals(this.id, portablePdbSourcemapData.id) + && Objects.equals(this.type, portablePdbSourcemapData.type) + && Objects.equals(this.additionalProperties, portablePdbSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PortablePdbSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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 "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapMapKind.java new file mode 100644 index 00000000000..206d01470d3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PortablePdbSourcemapMapKind.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; + +/** The type of source map. Always portable_pdb for Portable PDB files. */ +@JsonSerialize(using = PortablePdbSourcemapMapKind.PortablePdbSourcemapMapKindSerializer.class) +public class PortablePdbSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("portable_pdb")); + + public static final PortablePdbSourcemapMapKind PORTABLE_PDB = + new PortablePdbSourcemapMapKind("portable_pdb"); + + PortablePdbSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class PortablePdbSourcemapMapKindSerializer + extends StdSerializer { + public PortablePdbSourcemapMapKindSerializer(Class t) { + super(t); + } + + public PortablePdbSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + PortablePdbSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static PortablePdbSourcemapMapKind fromValue(String value) { + return new PortablePdbSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapAttributes.java index 15aef24fa08..44665893394 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapAttributes.java @@ -51,7 +51,7 @@ public class ReactNativeSourcemapAttributes { private String debugId; public static final String JSON_PROPERTY_MAPKIND = "mapkind"; - private String mapkind; + private ReactNativeSourcemapMapKind mapkind; public static final String JSON_PROPERTY_PLATFORM = "platform"; private String platform; @@ -70,10 +70,12 @@ public ReactNativeSourcemapAttributes() {} @JsonCreator public ReactNativeSourcemapAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, - @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) + ReactNativeSourcemapMapKind mapkind, @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { this.createdAt = createdAt; this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); this.size = size; } @@ -181,23 +183,27 @@ public void setDebugId(String debugId) { this.debugId = debugId; } - public ReactNativeSourcemapAttributes mapkind(String mapkind) { + public ReactNativeSourcemapAttributes mapkind(ReactNativeSourcemapMapKind mapkind) { this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); return this; } /** - * The type of source map. + * The type of source map. Always react for React Native source maps. * * @return mapkind */ @JsonProperty(JSON_PROPERTY_MAPKIND) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getMapkind() { + public ReactNativeSourcemapMapKind getMapkind() { return mapkind; } - public void setMapkind(String mapkind) { + public void setMapkind(ReactNativeSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } this.mapkind = mapkind; } diff --git a/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapMapKind.java new file mode 100644 index 00000000000..d3ede3e48ff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapMapKind.java @@ -0,0 +1,55 @@ +/* + * 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; + +/** The type of source map. Always react for React Native source maps. */ +@JsonSerialize(using = ReactNativeSourcemapMapKind.ReactNativeSourcemapMapKindSerializer.class) +public class ReactNativeSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("react")); + + public static final ReactNativeSourcemapMapKind REACT = new ReactNativeSourcemapMapKind("react"); + + ReactNativeSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class ReactNativeSourcemapMapKindSerializer + extends StdSerializer { + public ReactNativeSourcemapMapKindSerializer(Class t) { + super(t); + } + + public ReactNativeSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + ReactNativeSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReactNativeSourcemapMapKind fromValue(String value) { + return new ReactNativeSourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapItem.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapItem.java index a53de2b5646..0f7dd089014 100644 --- a/src/main/java/com/datadog/api/client/v2/model/SourcemapItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapItem.java @@ -431,6 +431,95 @@ public SourcemapItem deserialize(JsonParser jp, DeserializationContext ctxt) log.log(Level.FINER, "Input data does not match schema 'IL2CPPSourcemapData'", e); } + // deserialize WASMSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (WASMSourcemapData.class.equals(Integer.class) + || WASMSourcemapData.class.equals(Long.class) + || WASMSourcemapData.class.equals(Float.class) + || WASMSourcemapData.class.equals(Double.class) + || WASMSourcemapData.class.equals(Boolean.class) + || WASMSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((WASMSourcemapData.class.equals(Integer.class) + || WASMSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((WASMSourcemapData.class.equals(Float.class) + || WASMSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (WASMSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (WASMSourcemapData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(WASMSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((WASMSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'WASMSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'WASMSourcemapData'", e); + } + + // deserialize PortablePdbSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (PortablePdbSourcemapData.class.equals(Integer.class) + || PortablePdbSourcemapData.class.equals(Long.class) + || PortablePdbSourcemapData.class.equals(Float.class) + || PortablePdbSourcemapData.class.equals(Double.class) + || PortablePdbSourcemapData.class.equals(Boolean.class) + || PortablePdbSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((PortablePdbSourcemapData.class.equals(Integer.class) + || PortablePdbSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((PortablePdbSourcemapData.class.equals(Float.class) + || PortablePdbSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (PortablePdbSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (PortablePdbSourcemapData.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(PortablePdbSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((PortablePdbSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'PortablePdbSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'PortablePdbSourcemapData'", e); + } + SourcemapItem ret = new SourcemapItem(); if (match == 1) { ret.setActualInstance(deserialized); @@ -499,6 +588,16 @@ public SourcemapItem(IL2CPPSourcemapData o) { setActualInstance(o); } + public SourcemapItem(WASMSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SourcemapItem(PortablePdbSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + static { schemas.put("JSSourcemapData", new GenericType() {}); schemas.put("ReactNativeSourcemapData", new GenericType() {}); @@ -508,6 +607,8 @@ public SourcemapItem(IL2CPPSourcemapData o) { schemas.put("ELFSourcemapData", new GenericType() {}); schemas.put("NDKSourcemapData", new GenericType() {}); schemas.put("IL2CPPSourcemapData", new GenericType() {}); + schemas.put("WASMSourcemapData", new GenericType() {}); + schemas.put("PortablePdbSourcemapData", new GenericType() {}); JSON.registerDescendants(SourcemapItem.class, Collections.unmodifiableMap(schemas)); } @@ -519,7 +620,8 @@ public Map getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid * against the oneOf child schemas: JSSourcemapData, ReactNativeSourcemapData, IOSSourcemapData, - * JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData, NDKSourcemapData, IL2CPPSourcemapData + * JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData, NDKSourcemapData, + * IL2CPPSourcemapData, WASMSourcemapData, PortablePdbSourcemapData * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). @@ -558,6 +660,14 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(WASMSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(PortablePdbSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { super.setActualInstance(instance); @@ -566,17 +676,18 @@ public void setActualInstance(Object instance) { throw new RuntimeException( "Invalid instance type. Must be JSSourcemapData, ReactNativeSourcemapData," + " IOSSourcemapData, JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData," - + " NDKSourcemapData, IL2CPPSourcemapData"); + + " NDKSourcemapData, IL2CPPSourcemapData, WASMSourcemapData," + + " PortablePdbSourcemapData"); } /** * Get the actual instance, which can be the following: JSSourcemapData, ReactNativeSourcemapData, * IOSSourcemapData, JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData, NDKSourcemapData, - * IL2CPPSourcemapData + * IL2CPPSourcemapData, WASMSourcemapData, PortablePdbSourcemapData * * @return The actual instance (JSSourcemapData, ReactNativeSourcemapData, IOSSourcemapData, * JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData, NDKSourcemapData, - * IL2CPPSourcemapData) + * IL2CPPSourcemapData, WASMSourcemapData, PortablePdbSourcemapData) */ @Override public Object getActualInstance() { @@ -670,4 +781,26 @@ public NDKSourcemapData getNDKSourcemapData() throws ClassCastException { public IL2CPPSourcemapData getIL2CPPSourcemapData() throws ClassCastException { return (IL2CPPSourcemapData) super.getActualInstance(); } + + /** + * Get the actual instance of `WASMSourcemapData`. If the actual instance is not + * `WASMSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `WASMSourcemapData` + * @throws ClassCastException if the instance is not `WASMSourcemapData` + */ + public WASMSourcemapData getWASMSourcemapData() throws ClassCastException { + return (WASMSourcemapData) super.getActualInstance(); + } + + /** + * Get the actual instance of `PortablePdbSourcemapData`. If the actual instance is not + * `PortablePdbSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `PortablePdbSourcemapData` + * @throws ClassCastException if the instance is not `PortablePdbSourcemapData` + */ + public PortablePdbSourcemapData getPortablePdbSourcemapData() throws ClassCastException { + return (PortablePdbSourcemapData) super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapAttributes.java new file mode 100644 index 00000000000..c20f15cdc77 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapAttributes.java @@ -0,0 +1,259 @@ +/* + * 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.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a WebAssembly symbol file. */ +@JsonPropertyOrder({ + WASMSourcemapAttributes.JSON_PROPERTY_BUILD_ID, + WASMSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + WASMSourcemapAttributes.JSON_PROPERTY_FILE_NAME, + WASMSourcemapAttributes.JSON_PROPERTY_MAPKIND, + WASMSourcemapAttributes.JSON_PROPERTY_SIZE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class WASMSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUILD_ID = "build_id"; + private String buildId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + private String fileName; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private WASMSourcemapMapKind mapkind; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public WASMSourcemapAttributes() {} + + @JsonCreator + public WASMSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) WASMSourcemapMapKind mapkind) { + this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); + } + + public WASMSourcemapAttributes buildId(String buildId) { + this.buildId = buildId; + return this; + } + + /** + * The build identifier. + * + * @return buildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuildId() { + return buildId; + } + + public void setBuildId(String buildId) { + this.buildId = buildId; + } + + public WASMSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the symbol file was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public WASMSourcemapAttributes fileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * The file name of the symbol file. + * + * @return fileName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public WASMSourcemapAttributes mapkind(WASMSourcemapMapKind mapkind) { + this.mapkind = mapkind; + this.unparsed |= !mapkind.isValid(); + return this; + } + + /** + * The type of source map. Always wasm for WebAssembly symbol files. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WASMSourcemapMapKind getMapkind() { + return mapkind; + } + + public void setMapkind(WASMSourcemapMapKind mapkind) { + if (!mapkind.isValid()) { + this.unparsed = true; + } + this.mapkind = mapkind; + } + + public WASMSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the symbol file in bytes. + * + * @return size + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + /** + * 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 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 WASMSourcemapAttributes + */ + @JsonAnySetter + public WASMSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map 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 WASMSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WASMSourcemapAttributes wasmSourcemapAttributes = (WASMSourcemapAttributes) o; + return Objects.equals(this.buildId, wasmSourcemapAttributes.buildId) + && Objects.equals(this.createdAt, wasmSourcemapAttributes.createdAt) + && Objects.equals(this.fileName, wasmSourcemapAttributes.fileName) + && Objects.equals(this.mapkind, wasmSourcemapAttributes.mapkind) + && Objects.equals(this.size, wasmSourcemapAttributes.size) + && Objects.equals(this.additionalProperties, wasmSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(buildId, createdAt, fileName, mapkind, size, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WASMSourcemapAttributes {\n"); + sb.append(" buildId: ").append(toIndentedString(buildId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).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 "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapData.java new file mode 100644 index 00000000000..3879e3a3b3f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapData.java @@ -0,0 +1,212 @@ +/* + * 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.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** WebAssembly symbol file data object. */ +@JsonPropertyOrder({ + WASMSourcemapData.JSON_PROPERTY_ATTRIBUTES, + WASMSourcemapData.JSON_PROPERTY_ID, + WASMSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class WASMSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private WASMSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public WASMSourcemapData() {} + + @JsonCreator + public WASMSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + WASMSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public WASMSourcemapData attributes(WASMSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a WebAssembly symbol file. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public WASMSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(WASMSourcemapAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public WASMSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public WASMSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * 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 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 WASMSourcemapData + */ + @JsonAnySetter + public WASMSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map 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 WASMSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WASMSourcemapData wasmSourcemapData = (WASMSourcemapData) o; + return Objects.equals(this.attributes, wasmSourcemapData.attributes) + && Objects.equals(this.id, wasmSourcemapData.id) + && Objects.equals(this.type, wasmSourcemapData.type) + && Objects.equals(this.additionalProperties, wasmSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WASMSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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 "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapMapKind.java new file mode 100644 index 00000000000..ff41d4ea54a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/WASMSourcemapMapKind.java @@ -0,0 +1,54 @@ +/* + * 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; + +/** The type of source map. Always wasm for WebAssembly symbol files. */ +@JsonSerialize(using = WASMSourcemapMapKind.WASMSourcemapMapKindSerializer.class) +public class WASMSourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("wasm")); + + public static final WASMSourcemapMapKind WASM = new WASMSourcemapMapKind("wasm"); + + WASMSourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class WASMSourcemapMapKindSerializer extends StdSerializer { + public WASMSourcemapMapKindSerializer(Class t) { + super(t); + } + + public WASMSourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize( + WASMSourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static WASMSourcemapMapKind fromValue(String value) { + return new WASMSourcemapMapKind(value); + } +}