From d7380bc1664ef71081b13ca65be7087ec984b2ef Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 22 Jul 2026 17:16:44 +0000 Subject: [PATCH 1/2] Regenerate client from commit 8e56bc6 of spec repo --- .generator/schemas/v2/openapi.yaml | 83 ++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 90e1196820e..7fd739443a9 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -34676,6 +34676,7 @@ components: - $ref: "#/components/schemas/EntityV3Queue" - $ref: "#/components/schemas/EntityV3System" - $ref: "#/components/schemas/EntityV3API" + - $ref: "#/components/schemas/EntityV3Repository" EntityV3API: additionalProperties: false description: Schema for API entities. @@ -35151,6 +35152,88 @@ components: description: The type of queue. type: string type: object + EntityV3Repository: + additionalProperties: false + description: Schema for repository entities. + properties: + apiVersion: + $ref: "#/components/schemas/EntityV3APIVersion" + datadog: + $ref: "#/components/schemas/EntityV3RepositoryDatadog" + extensions: + additionalProperties: {} + description: Custom extensions. This is the free-formed field to send client-side metadata. No Datadog features are affected by this field. + type: object + integrations: + $ref: "#/components/schemas/EntityV3Integrations" + kind: + $ref: "#/components/schemas/EntityV3RepositoryKind" + metadata: + $ref: "#/components/schemas/EntityV3Metadata" + spec: + $ref: "#/components/schemas/EntityV3RepositorySpec" + required: + - apiVersion + - kind + - metadata + type: object + EntityV3RepositoryDatadog: + additionalProperties: false + description: Datadog product integrations for the repository entity. + properties: + codeLocations: + $ref: "#/components/schemas/EntityV3DatadogCodeLocations" + events: + $ref: "#/components/schemas/EntityV3DatadogEvents" + logs: + $ref: "#/components/schemas/EntityV3DatadogLogs" + performanceData: + $ref: "#/components/schemas/EntityV3DatadogPerformance" + pipelines: + $ref: "#/components/schemas/EntityV3DatadogPipelines" + type: object + EntityV3RepositoryKind: + description: The definition of Entity V3 Repository Kind object. + enum: + - repository + example: repository + type: string + x-enum-varnames: + - REPOSITORY + EntityV3RepositorySpec: + additionalProperties: false + description: The definition of Entity V3 Repository Spec object. + properties: + componentOf: + description: A list of components the repository is a part of. + items: + description: A component entity reference string. + type: string + type: array + dependencyOf: + description: A list of components that the repository is a dependency of. + items: + description: A component entity reference string. + type: string + type: array + dependsOn: + description: A list of components that the repository depends on. + items: + description: A component entity reference string. + type: string + type: array + lifecycle: + description: The lifecycle state of the repository. + minLength: 1 + type: string + tier: + description: The importance of the repository. + minLength: 1 + type: string + type: + description: The type of repository. + type: string + type: object EntityV3Service: additionalProperties: false description: Schema for service entities. From 43051c9d0dfc794398fece32213aa08dd4f33b36 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 22 Jul 2026 17:20:18 +0000 Subject: [PATCH 2/2] pre-commit fixes --- .../datadog/api/client/v2/model/EntityV3.java | 73 ++++- .../client/v2/model/EntityV3Repository.java | 296 ++++++++++++++++++ .../v2/model/EntityV3RepositoryDatadog.java | 260 +++++++++++++++ .../v2/model/EntityV3RepositoryKind.java | 55 ++++ .../v2/model/EntityV3RepositorySpec.java | 244 +++++++++++++++ 5 files changed, 924 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/datadog/api/client/v2/model/EntityV3Repository.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/EntityV3RepositoryDatadog.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/EntityV3RepositoryKind.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/EntityV3RepositorySpec.java diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityV3.java b/src/main/java/com/datadog/api/client/v2/model/EntityV3.java index c2986f8f996..4ba468fb274 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityV3.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityV3.java @@ -295,6 +295,50 @@ public EntityV3 deserialize(JsonParser jp, DeserializationContext ctxt) log.log(Level.FINER, "Input data does not match schema 'EntityV3API'", e); } + // deserialize EntityV3Repository + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EntityV3Repository.class.equals(Integer.class) + || EntityV3Repository.class.equals(Long.class) + || EntityV3Repository.class.equals(Float.class) + || EntityV3Repository.class.equals(Double.class) + || EntityV3Repository.class.equals(Boolean.class) + || EntityV3Repository.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((EntityV3Repository.class.equals(Integer.class) + || EntityV3Repository.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((EntityV3Repository.class.equals(Float.class) + || EntityV3Repository.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (EntityV3Repository.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (EntityV3Repository.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(EntityV3Repository.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 (!((EntityV3Repository) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'EntityV3Repository'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EntityV3Repository'", e); + } + EntityV3 ret = new EntityV3(); if (match == 1) { ret.setActualInstance(deserialized); @@ -348,12 +392,18 @@ public EntityV3(EntityV3API o) { setActualInstance(o); } + public EntityV3(EntityV3Repository o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + static { schemas.put("EntityV3Service", new GenericType() {}); schemas.put("EntityV3Datastore", new GenericType() {}); schemas.put("EntityV3Queue", new GenericType() {}); schemas.put("EntityV3System", new GenericType() {}); schemas.put("EntityV3API", new GenericType() {}); + schemas.put("EntityV3Repository", new GenericType() {}); JSON.registerDescendants(EntityV3.class, Collections.unmodifiableMap(schemas)); } @@ -365,7 +415,7 @@ public Map getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid * against the oneOf child schemas: EntityV3Service, EntityV3Datastore, EntityV3Queue, - * EntityV3System, EntityV3API + * EntityV3System, EntityV3API, EntityV3Repository * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). @@ -392,6 +442,10 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(EntityV3Repository.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { super.setActualInstance(instance); @@ -399,15 +453,15 @@ public void setActualInstance(Object instance) { } throw new RuntimeException( "Invalid instance type. Must be EntityV3Service, EntityV3Datastore, EntityV3Queue," - + " EntityV3System, EntityV3API"); + + " EntityV3System, EntityV3API, EntityV3Repository"); } /** * Get the actual instance, which can be the following: EntityV3Service, EntityV3Datastore, - * EntityV3Queue, EntityV3System, EntityV3API + * EntityV3Queue, EntityV3System, EntityV3API, EntityV3Repository * * @return The actual instance (EntityV3Service, EntityV3Datastore, EntityV3Queue, EntityV3System, - * EntityV3API) + * EntityV3API, EntityV3Repository) */ @Override public Object getActualInstance() { @@ -468,4 +522,15 @@ public EntityV3System getEntityV3System() throws ClassCastException { public EntityV3API getEntityV3API() throws ClassCastException { return (EntityV3API) super.getActualInstance(); } + + /** + * Get the actual instance of `EntityV3Repository`. If the actual instance is not + * `EntityV3Repository`, the ClassCastException will be thrown. + * + * @return The actual instance of `EntityV3Repository` + * @throws ClassCastException if the instance is not `EntityV3Repository` + */ + public EntityV3Repository getEntityV3Repository() throws ClassCastException { + return (EntityV3Repository) super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityV3Repository.java b/src/main/java/com/datadog/api/client/v2/model/EntityV3Repository.java new file mode 100644 index 00000000000..4ee740499fa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityV3Repository.java @@ -0,0 +1,296 @@ +/* + * 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.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; + +/** Schema for repository entities. */ +@JsonPropertyOrder({ + EntityV3Repository.JSON_PROPERTY_API_VERSION, + EntityV3Repository.JSON_PROPERTY_DATADOG, + EntityV3Repository.JSON_PROPERTY_EXTENSIONS, + EntityV3Repository.JSON_PROPERTY_INTEGRATIONS, + EntityV3Repository.JSON_PROPERTY_KIND, + EntityV3Repository.JSON_PROPERTY_METADATA, + EntityV3Repository.JSON_PROPERTY_SPEC +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityV3Repository { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_API_VERSION = "apiVersion"; + private EntityV3APIVersion apiVersion; + + public static final String JSON_PROPERTY_DATADOG = "datadog"; + private EntityV3RepositoryDatadog datadog; + + public static final String JSON_PROPERTY_EXTENSIONS = "extensions"; + private Map extensions = null; + + public static final String JSON_PROPERTY_INTEGRATIONS = "integrations"; + private EntityV3Integrations integrations; + + public static final String JSON_PROPERTY_KIND = "kind"; + private EntityV3RepositoryKind kind; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private EntityV3Metadata metadata; + + public static final String JSON_PROPERTY_SPEC = "spec"; + private EntityV3RepositorySpec spec; + + public EntityV3Repository() {} + + @JsonCreator + public EntityV3Repository( + @JsonProperty(required = true, value = JSON_PROPERTY_API_VERSION) + EntityV3APIVersion apiVersion, + @JsonProperty(required = true, value = JSON_PROPERTY_KIND) EntityV3RepositoryKind kind, + @JsonProperty(required = true, value = JSON_PROPERTY_METADATA) EntityV3Metadata metadata) { + this.apiVersion = apiVersion; + this.unparsed |= !apiVersion.isValid(); + this.kind = kind; + this.unparsed |= !kind.isValid(); + this.metadata = metadata; + this.unparsed |= metadata.unparsed; + } + + public EntityV3Repository apiVersion(EntityV3APIVersion apiVersion) { + this.apiVersion = apiVersion; + this.unparsed |= !apiVersion.isValid(); + return this; + } + + /** + * The version of the schema data that was used to populate this entity's data. This could be via + * the API, Terraform, or YAML file in a repository. The field is known as schema-version in the + * previous version. + * + * @return apiVersion + */ + @JsonProperty(JSON_PROPERTY_API_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityV3APIVersion getApiVersion() { + return apiVersion; + } + + public void setApiVersion(EntityV3APIVersion apiVersion) { + if (!apiVersion.isValid()) { + this.unparsed = true; + } + this.apiVersion = apiVersion; + } + + public EntityV3Repository datadog(EntityV3RepositoryDatadog datadog) { + this.datadog = datadog; + this.unparsed |= datadog.unparsed; + return this; + } + + /** + * Datadog product integrations for the repository entity. + * + * @return datadog + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATADOG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityV3RepositoryDatadog getDatadog() { + return datadog; + } + + public void setDatadog(EntityV3RepositoryDatadog datadog) { + this.datadog = datadog; + if (datadog != null) { + this.unparsed |= datadog.unparsed; + } + } + + public EntityV3Repository extensions(Map extensions) { + this.extensions = extensions; + return this; + } + + public EntityV3Repository putExtensionsItem(String key, Object extensionsItem) { + if (this.extensions == null) { + this.extensions = new HashMap<>(); + } + this.extensions.put(key, extensionsItem); + return this; + } + + /** + * Custom extensions. This is the free-formed field to send client-side metadata. No Datadog + * features are affected by this field. + * + * @return extensions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTENSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getExtensions() { + return extensions; + } + + public void setExtensions(Map extensions) { + this.extensions = extensions; + } + + public EntityV3Repository integrations(EntityV3Integrations integrations) { + this.integrations = integrations; + this.unparsed |= integrations.unparsed; + return this; + } + + /** + * A base schema for defining third-party integrations. + * + * @return integrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityV3Integrations getIntegrations() { + return integrations; + } + + public void setIntegrations(EntityV3Integrations integrations) { + this.integrations = integrations; + if (integrations != null) { + this.unparsed |= integrations.unparsed; + } + } + + public EntityV3Repository kind(EntityV3RepositoryKind kind) { + this.kind = kind; + this.unparsed |= !kind.isValid(); + return this; + } + + /** + * The definition of Entity V3 Repository Kind object. + * + * @return kind + */ + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityV3RepositoryKind getKind() { + return kind; + } + + public void setKind(EntityV3RepositoryKind kind) { + if (!kind.isValid()) { + this.unparsed = true; + } + this.kind = kind; + } + + public EntityV3Repository metadata(EntityV3Metadata metadata) { + this.metadata = metadata; + this.unparsed |= metadata.unparsed; + return this; + } + + /** + * The definition of Entity V3 Metadata object. + * + * @return metadata + */ + @JsonProperty(JSON_PROPERTY_METADATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityV3Metadata getMetadata() { + return metadata; + } + + public void setMetadata(EntityV3Metadata metadata) { + this.metadata = metadata; + if (metadata != null) { + this.unparsed |= metadata.unparsed; + } + } + + public EntityV3Repository spec(EntityV3RepositorySpec spec) { + this.spec = spec; + this.unparsed |= spec.unparsed; + return this; + } + + /** + * The definition of Entity V3 Repository Spec object. + * + * @return spec + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SPEC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityV3RepositorySpec getSpec() { + return spec; + } + + public void setSpec(EntityV3RepositorySpec spec) { + this.spec = spec; + if (spec != null) { + this.unparsed |= spec.unparsed; + } + } + + /** Return true if this EntityV3Repository object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityV3Repository entityV3Repository = (EntityV3Repository) o; + return Objects.equals(this.apiVersion, entityV3Repository.apiVersion) + && Objects.equals(this.datadog, entityV3Repository.datadog) + && Objects.equals(this.extensions, entityV3Repository.extensions) + && Objects.equals(this.integrations, entityV3Repository.integrations) + && Objects.equals(this.kind, entityV3Repository.kind) + && Objects.equals(this.metadata, entityV3Repository.metadata) + && Objects.equals(this.spec, entityV3Repository.spec); + } + + @Override + public int hashCode() { + return Objects.hash(apiVersion, datadog, extensions, integrations, kind, metadata, spec); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityV3Repository {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" datadog: ").append(toIndentedString(datadog)).append("\n"); + sb.append(" extensions: ").append(toIndentedString(extensions)).append("\n"); + sb.append(" integrations: ").append(toIndentedString(integrations)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" spec: ").append(toIndentedString(spec)).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/EntityV3RepositoryDatadog.java b/src/main/java/com/datadog/api/client/v2/model/EntityV3RepositoryDatadog.java new file mode 100644 index 00000000000..c876df01f55 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityV3RepositoryDatadog.java @@ -0,0 +1,260 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** Datadog product integrations for the repository entity. */ +@JsonPropertyOrder({ + EntityV3RepositoryDatadog.JSON_PROPERTY_CODE_LOCATIONS, + EntityV3RepositoryDatadog.JSON_PROPERTY_EVENTS, + EntityV3RepositoryDatadog.JSON_PROPERTY_LOGS, + EntityV3RepositoryDatadog.JSON_PROPERTY_PERFORMANCE_DATA, + EntityV3RepositoryDatadog.JSON_PROPERTY_PIPELINES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityV3RepositoryDatadog { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CODE_LOCATIONS = "codeLocations"; + private List codeLocations = null; + + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events = null; + + public static final String JSON_PROPERTY_LOGS = "logs"; + private List logs = null; + + public static final String JSON_PROPERTY_PERFORMANCE_DATA = "performanceData"; + private EntityV3DatadogPerformance performanceData; + + public static final String JSON_PROPERTY_PIPELINES = "pipelines"; + private EntityV3DatadogPipelines pipelines; + + public EntityV3RepositoryDatadog codeLocations( + List codeLocations) { + this.codeLocations = codeLocations; + if (codeLocations != null) { + for (EntityV3DatadogCodeLocationItem item : codeLocations) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public EntityV3RepositoryDatadog addCodeLocationsItem( + EntityV3DatadogCodeLocationItem codeLocationsItem) { + if (this.codeLocations == null) { + this.codeLocations = new ArrayList<>(); + } + this.codeLocations.add(codeLocationsItem); + this.unparsed |= codeLocationsItem.unparsed; + return this; + } + + /** + * Schema for mapping source code locations to an entity. + * + * @return codeLocations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE_LOCATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCodeLocations() { + return codeLocations; + } + + public void setCodeLocations(List codeLocations) { + this.codeLocations = codeLocations; + if (codeLocations != null) { + for (EntityV3DatadogCodeLocationItem item : codeLocations) { + this.unparsed |= item.unparsed; + } + } + } + + public EntityV3RepositoryDatadog events(List events) { + this.events = events; + if (events != null) { + for (EntityV3DatadogEventItem item : events) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public EntityV3RepositoryDatadog addEventsItem(EntityV3DatadogEventItem eventsItem) { + if (this.events == null) { + this.events = new ArrayList<>(); + } + this.events.add(eventsItem); + this.unparsed |= eventsItem.unparsed; + return this; + } + + /** + * Events associations. + * + * @return events + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + if (events != null) { + for (EntityV3DatadogEventItem item : events) { + this.unparsed |= item.unparsed; + } + } + } + + public EntityV3RepositoryDatadog logs(List logs) { + this.logs = logs; + if (logs != null) { + for (EntityV3DatadogLogItem item : logs) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public EntityV3RepositoryDatadog addLogsItem(EntityV3DatadogLogItem logsItem) { + if (this.logs == null) { + this.logs = new ArrayList<>(); + } + this.logs.add(logsItem); + this.unparsed |= logsItem.unparsed; + return this; + } + + /** + * Logs association. + * + * @return logs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLogs() { + return logs; + } + + public void setLogs(List logs) { + this.logs = logs; + if (logs != null) { + for (EntityV3DatadogLogItem item : logs) { + this.unparsed |= item.unparsed; + } + } + } + + public EntityV3RepositoryDatadog performanceData(EntityV3DatadogPerformance performanceData) { + this.performanceData = performanceData; + this.unparsed |= performanceData.unparsed; + return this; + } + + /** + * Performance stats association. + * + * @return performanceData + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERFORMANCE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityV3DatadogPerformance getPerformanceData() { + return performanceData; + } + + public void setPerformanceData(EntityV3DatadogPerformance performanceData) { + this.performanceData = performanceData; + if (performanceData != null) { + this.unparsed |= performanceData.unparsed; + } + } + + public EntityV3RepositoryDatadog pipelines(EntityV3DatadogPipelines pipelines) { + this.pipelines = pipelines; + this.unparsed |= pipelines.unparsed; + return this; + } + + /** + * CI Pipelines association. + * + * @return pipelines + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PIPELINES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityV3DatadogPipelines getPipelines() { + return pipelines; + } + + public void setPipelines(EntityV3DatadogPipelines pipelines) { + this.pipelines = pipelines; + if (pipelines != null) { + this.unparsed |= pipelines.unparsed; + } + } + + /** Return true if this EntityV3RepositoryDatadog object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityV3RepositoryDatadog entityV3RepositoryDatadog = (EntityV3RepositoryDatadog) o; + return Objects.equals(this.codeLocations, entityV3RepositoryDatadog.codeLocations) + && Objects.equals(this.events, entityV3RepositoryDatadog.events) + && Objects.equals(this.logs, entityV3RepositoryDatadog.logs) + && Objects.equals(this.performanceData, entityV3RepositoryDatadog.performanceData) + && Objects.equals(this.pipelines, entityV3RepositoryDatadog.pipelines); + } + + @Override + public int hashCode() { + return Objects.hash(codeLocations, events, logs, performanceData, pipelines); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityV3RepositoryDatadog {\n"); + sb.append(" codeLocations: ").append(toIndentedString(codeLocations)).append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" logs: ").append(toIndentedString(logs)).append("\n"); + sb.append(" performanceData: ").append(toIndentedString(performanceData)).append("\n"); + sb.append(" pipelines: ").append(toIndentedString(pipelines)).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/EntityV3RepositoryKind.java b/src/main/java/com/datadog/api/client/v2/model/EntityV3RepositoryKind.java new file mode 100644 index 00000000000..d1327ba5c7d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityV3RepositoryKind.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 definition of Entity V3 Repository Kind object. */ +@JsonSerialize(using = EntityV3RepositoryKind.EntityV3RepositoryKindSerializer.class) +public class EntityV3RepositoryKind extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("repository")); + + public static final EntityV3RepositoryKind REPOSITORY = new EntityV3RepositoryKind("repository"); + + EntityV3RepositoryKind(String value) { + super(value, allowedValues); + } + + public static class EntityV3RepositoryKindSerializer + extends StdSerializer { + public EntityV3RepositoryKindSerializer(Class t) { + super(t); + } + + public EntityV3RepositoryKindSerializer() { + this(null); + } + + @Override + public void serialize( + EntityV3RepositoryKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityV3RepositoryKind fromValue(String value) { + return new EntityV3RepositoryKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityV3RepositorySpec.java b/src/main/java/com/datadog/api/client/v2/model/EntityV3RepositorySpec.java new file mode 100644 index 00000000000..48baae83bbc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityV3RepositorySpec.java @@ -0,0 +1,244 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** The definition of Entity V3 Repository Spec object. */ +@JsonPropertyOrder({ + EntityV3RepositorySpec.JSON_PROPERTY_COMPONENT_OF, + EntityV3RepositorySpec.JSON_PROPERTY_DEPENDENCY_OF, + EntityV3RepositorySpec.JSON_PROPERTY_DEPENDS_ON, + EntityV3RepositorySpec.JSON_PROPERTY_LIFECYCLE, + EntityV3RepositorySpec.JSON_PROPERTY_TIER, + EntityV3RepositorySpec.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityV3RepositorySpec { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf"; + private List componentOf = null; + + public static final String JSON_PROPERTY_DEPENDENCY_OF = "dependencyOf"; + private List dependencyOf = null; + + public static final String JSON_PROPERTY_DEPENDS_ON = "dependsOn"; + private List dependsOn = null; + + public static final String JSON_PROPERTY_LIFECYCLE = "lifecycle"; + private String lifecycle; + + public static final String JSON_PROPERTY_TIER = "tier"; + private String tier; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public EntityV3RepositorySpec componentOf(List componentOf) { + this.componentOf = componentOf; + return this; + } + + public EntityV3RepositorySpec addComponentOfItem(String componentOfItem) { + if (this.componentOf == null) { + this.componentOf = new ArrayList<>(); + } + this.componentOf.add(componentOfItem); + return this; + } + + /** + * A list of components the repository is a part of. + * + * @return componentOf + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPONENT_OF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getComponentOf() { + return componentOf; + } + + public void setComponentOf(List componentOf) { + this.componentOf = componentOf; + } + + public EntityV3RepositorySpec dependencyOf(List dependencyOf) { + this.dependencyOf = dependencyOf; + return this; + } + + public EntityV3RepositorySpec addDependencyOfItem(String dependencyOfItem) { + if (this.dependencyOf == null) { + this.dependencyOf = new ArrayList<>(); + } + this.dependencyOf.add(dependencyOfItem); + return this; + } + + /** + * A list of components that the repository is a dependency of. + * + * @return dependencyOf + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPENDENCY_OF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDependencyOf() { + return dependencyOf; + } + + public void setDependencyOf(List dependencyOf) { + this.dependencyOf = dependencyOf; + } + + public EntityV3RepositorySpec dependsOn(List dependsOn) { + this.dependsOn = dependsOn; + return this; + } + + public EntityV3RepositorySpec addDependsOnItem(String dependsOnItem) { + if (this.dependsOn == null) { + this.dependsOn = new ArrayList<>(); + } + this.dependsOn.add(dependsOnItem); + return this; + } + + /** + * A list of components that the repository depends on. + * + * @return dependsOn + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPENDS_ON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDependsOn() { + return dependsOn; + } + + public void setDependsOn(List dependsOn) { + this.dependsOn = dependsOn; + } + + public EntityV3RepositorySpec lifecycle(String lifecycle) { + this.lifecycle = lifecycle; + return this; + } + + /** + * The lifecycle state of the repository. + * + * @return lifecycle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIFECYCLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLifecycle() { + return lifecycle; + } + + public void setLifecycle(String lifecycle) { + this.lifecycle = lifecycle; + } + + public EntityV3RepositorySpec tier(String tier) { + this.tier = tier; + return this; + } + + /** + * The importance of the repository. + * + * @return tier + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTier() { + return tier; + } + + public void setTier(String tier) { + this.tier = tier; + } + + public EntityV3RepositorySpec type(String type) { + this.type = type; + return this; + } + + /** + * The type of repository. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** Return true if this EntityV3RepositorySpec object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityV3RepositorySpec entityV3RepositorySpec = (EntityV3RepositorySpec) o; + return Objects.equals(this.componentOf, entityV3RepositorySpec.componentOf) + && Objects.equals(this.dependencyOf, entityV3RepositorySpec.dependencyOf) + && Objects.equals(this.dependsOn, entityV3RepositorySpec.dependsOn) + && Objects.equals(this.lifecycle, entityV3RepositorySpec.lifecycle) + && Objects.equals(this.tier, entityV3RepositorySpec.tier) + && Objects.equals(this.type, entityV3RepositorySpec.type); + } + + @Override + public int hashCode() { + return Objects.hash(componentOf, dependencyOf, dependsOn, lifecycle, tier, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityV3RepositorySpec {\n"); + sb.append(" componentOf: ").append(toIndentedString(componentOf)).append("\n"); + sb.append(" dependencyOf: ").append(toIndentedString(dependencyOf)).append("\n"); + sb.append(" dependsOn: ").append(toIndentedString(dependsOn)).append("\n"); + sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n"); + sb.append(" tier: ").append(toIndentedString(tier)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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 "); + } +}