diff --git a/.apigentools-info b/.apigentools-info index fba0ff60e10..ae06adda6fa 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-02 19:55:33.181521", - "spec_repo_commit": "1cc45c45" + "regenerated": "2025-04-02 20:49:30.088491", + "spec_repo_commit": "9ea284b5" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-04-02 19:55:33.196965", - "spec_repo_commit": "1cc45c45" + "regenerated": "2025-04-02 20:49:30.104275", + "spec_repo_commit": "9ea284b5" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 1072d1213ef..b5a66e5d975 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -12431,6 +12431,11 @@ components: additionalProperties: false description: The definition of Entity V3 Datastore Spec object. properties: + componentOf: + description: A list of components the datastore is a part of + items: + type: string + type: array lifecycle: description: The lifecycle state of the datastore. minLength: 1 @@ -12629,6 +12634,11 @@ components: additionalProperties: false description: The definition of Entity V3 Queue Spec object. properties: + componentOf: + description: A list of components the queue is a part of + items: + type: string + type: array lifecycle: description: The lifecycle state of the queue. minLength: 1 @@ -12694,6 +12704,11 @@ components: additionalProperties: false description: The definition of Entity V3 Service Spec object. properties: + componentOf: + description: A list of components the service is a part of + items: + type: string + type: array dependsOn: description: A list of components the service depends on. items: diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityV3DatastoreSpec.java b/src/main/java/com/datadog/api/client/v2/model/EntityV3DatastoreSpec.java index 203c82602da..51371b8ae60 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityV3DatastoreSpec.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityV3DatastoreSpec.java @@ -10,10 +10,13 @@ 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 Datastore Spec object. */ @JsonPropertyOrder({ + EntityV3DatastoreSpec.JSON_PROPERTY_COMPONENT_OF, EntityV3DatastoreSpec.JSON_PROPERTY_LIFECYCLE, EntityV3DatastoreSpec.JSON_PROPERTY_TIER, EntityV3DatastoreSpec.JSON_PROPERTY_TYPE @@ -22,6 +25,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EntityV3DatastoreSpec { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf"; + private List componentOf = null; + public static final String JSON_PROPERTY_LIFECYCLE = "lifecycle"; private String lifecycle; @@ -31,6 +37,35 @@ public class EntityV3DatastoreSpec { public static final String JSON_PROPERTY_TYPE = "type"; private String type; + public EntityV3DatastoreSpec componentOf(List componentOf) { + this.componentOf = componentOf; + return this; + } + + public EntityV3DatastoreSpec addComponentOfItem(String componentOfItem) { + if (this.componentOf == null) { + this.componentOf = new ArrayList<>(); + } + this.componentOf.add(componentOfItem); + return this; + } + + /** + * A list of components the datastore 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 EntityV3DatastoreSpec lifecycle(String lifecycle) { this.lifecycle = lifecycle; return this; @@ -104,20 +139,22 @@ public boolean equals(Object o) { return false; } EntityV3DatastoreSpec entityV3DatastoreSpec = (EntityV3DatastoreSpec) o; - return Objects.equals(this.lifecycle, entityV3DatastoreSpec.lifecycle) + return Objects.equals(this.componentOf, entityV3DatastoreSpec.componentOf) + && Objects.equals(this.lifecycle, entityV3DatastoreSpec.lifecycle) && Objects.equals(this.tier, entityV3DatastoreSpec.tier) && Objects.equals(this.type, entityV3DatastoreSpec.type); } @Override public int hashCode() { - return Objects.hash(lifecycle, tier, type); + return Objects.hash(componentOf, lifecycle, tier, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityV3DatastoreSpec {\n"); + sb.append(" componentOf: ").append(toIndentedString(componentOf)).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"); diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityV3QueueSpec.java b/src/main/java/com/datadog/api/client/v2/model/EntityV3QueueSpec.java index 22ebc627e41..3dbadb2d448 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityV3QueueSpec.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityV3QueueSpec.java @@ -10,10 +10,13 @@ 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 Queue Spec object. */ @JsonPropertyOrder({ + EntityV3QueueSpec.JSON_PROPERTY_COMPONENT_OF, EntityV3QueueSpec.JSON_PROPERTY_LIFECYCLE, EntityV3QueueSpec.JSON_PROPERTY_TIER, EntityV3QueueSpec.JSON_PROPERTY_TYPE @@ -22,6 +25,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EntityV3QueueSpec { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf"; + private List componentOf = null; + public static final String JSON_PROPERTY_LIFECYCLE = "lifecycle"; private String lifecycle; @@ -31,6 +37,35 @@ public class EntityV3QueueSpec { public static final String JSON_PROPERTY_TYPE = "type"; private String type; + public EntityV3QueueSpec componentOf(List componentOf) { + this.componentOf = componentOf; + return this; + } + + public EntityV3QueueSpec addComponentOfItem(String componentOfItem) { + if (this.componentOf == null) { + this.componentOf = new ArrayList<>(); + } + this.componentOf.add(componentOfItem); + return this; + } + + /** + * A list of components the queue 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 EntityV3QueueSpec lifecycle(String lifecycle) { this.lifecycle = lifecycle; return this; @@ -104,20 +139,22 @@ public boolean equals(Object o) { return false; } EntityV3QueueSpec entityV3QueueSpec = (EntityV3QueueSpec) o; - return Objects.equals(this.lifecycle, entityV3QueueSpec.lifecycle) + return Objects.equals(this.componentOf, entityV3QueueSpec.componentOf) + && Objects.equals(this.lifecycle, entityV3QueueSpec.lifecycle) && Objects.equals(this.tier, entityV3QueueSpec.tier) && Objects.equals(this.type, entityV3QueueSpec.type); } @Override public int hashCode() { - return Objects.hash(lifecycle, tier, type); + return Objects.hash(componentOf, lifecycle, tier, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityV3QueueSpec {\n"); + sb.append(" componentOf: ").append(toIndentedString(componentOf)).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"); diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityV3ServiceSpec.java b/src/main/java/com/datadog/api/client/v2/model/EntityV3ServiceSpec.java index d172ec0890e..fa1ed2d700a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/EntityV3ServiceSpec.java +++ b/src/main/java/com/datadog/api/client/v2/model/EntityV3ServiceSpec.java @@ -16,6 +16,7 @@ /** The definition of Entity V3 Service Spec object. */ @JsonPropertyOrder({ + EntityV3ServiceSpec.JSON_PROPERTY_COMPONENT_OF, EntityV3ServiceSpec.JSON_PROPERTY_DEPENDS_ON, EntityV3ServiceSpec.JSON_PROPERTY_LANGUAGES, EntityV3ServiceSpec.JSON_PROPERTY_LIFECYCLE, @@ -26,6 +27,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class EntityV3ServiceSpec { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPONENT_OF = "componentOf"; + private List componentOf = null; + public static final String JSON_PROPERTY_DEPENDS_ON = "dependsOn"; private List dependsOn = null; @@ -41,6 +45,35 @@ public class EntityV3ServiceSpec { public static final String JSON_PROPERTY_TYPE = "type"; private String type; + public EntityV3ServiceSpec componentOf(List componentOf) { + this.componentOf = componentOf; + return this; + } + + public EntityV3ServiceSpec addComponentOfItem(String componentOfItem) { + if (this.componentOf == null) { + this.componentOf = new ArrayList<>(); + } + this.componentOf.add(componentOfItem); + return this; + } + + /** + * A list of components the service 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 EntityV3ServiceSpec dependsOn(List dependsOn) { this.dependsOn = dependsOn; return this; @@ -172,7 +205,8 @@ public boolean equals(Object o) { return false; } EntityV3ServiceSpec entityV3ServiceSpec = (EntityV3ServiceSpec) o; - return Objects.equals(this.dependsOn, entityV3ServiceSpec.dependsOn) + return Objects.equals(this.componentOf, entityV3ServiceSpec.componentOf) + && Objects.equals(this.dependsOn, entityV3ServiceSpec.dependsOn) && Objects.equals(this.languages, entityV3ServiceSpec.languages) && Objects.equals(this.lifecycle, entityV3ServiceSpec.lifecycle) && Objects.equals(this.tier, entityV3ServiceSpec.tier) @@ -181,13 +215,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(dependsOn, languages, lifecycle, tier, type); + return Objects.hash(componentOf, dependsOn, languages, lifecycle, tier, type); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class EntityV3ServiceSpec {\n"); + sb.append(" componentOf: ").append(toIndentedString(componentOf)).append("\n"); sb.append(" dependsOn: ").append(toIndentedString(dependsOn)).append("\n"); sb.append(" languages: ").append(toIndentedString(languages)).append("\n"); sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n"); diff --git a/src/test/resources/com/datadog/api/client/v2/api/software_catalog.feature b/src/test/resources/com/datadog/api/client/v2/api/software_catalog.feature index 282607a3834..fd8e62bad35 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/software_catalog.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/software_catalog.feature @@ -10,14 +10,14 @@ Feature: Software Catalog @generated @skip @team:DataDog/service-catalog Scenario: Create or update entities returns "ACCEPTED" response Given new "UpsertCatalogEntity" request - And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"dependsOn": [], "languages": []}} + And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"componentOf": [], "dependsOn": [], "languages": []}} When the request is sent Then the response status is 202 ACCEPTED @generated @skip @team:DataDog/service-catalog Scenario: Create or update entities returns "Bad Request" response Given new "UpsertCatalogEntity" request - And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"dependsOn": [], "languages": []}} + And body with value {"apiVersion": "v3", "datadog": {"codeLocations": [{"paths": []}], "events": [{}], "logs": [{}], "performanceData": {"tags": []}, "pipelines": {"fingerprints": []}}, "integrations": {"opsgenie": {"serviceURL": "https://www.opsgenie.com/service/shopping-cart"}, "pagerduty": {"serviceURL": "https://www.pagerduty.com/service-directory/Pshopping-cart"}}, "kind": "service", "metadata": {"additionalOwners": [{"name": ""}], "contacts": [{"contact": "https://slack/", "type": "slack"}], "id": "4b163705-23c0-4573-b2fb-f6cea2163fcb", "inheritFrom": "application:default/myapp", "links": [{"name": "mylink", "type": "link", "url": "https://mylink"}], "name": "myService", "namespace": "default", "tags": ["this:tag", "that:tag"]}, "spec": {"componentOf": [], "dependsOn": [], "languages": []}} When the request is sent Then the response status is 400 Bad Request