diff --git a/.apigentools-info b/.apigentools-info index 0cbd8d35cf3..33b8f078344 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.5", - "regenerated": "2023-07-06 20:39:48.258694", - "spec_repo_commit": "45b9e51d" + "regenerated": "2023-07-07 15:50:16.611825", + "spec_repo_commit": "6f781b6c" }, "v2": { "apigentools_version": "1.6.5", - "regenerated": "2023-07-06 20:39:48.275571", - "spec_repo_commit": "45b9e51d" + "regenerated": "2023-07-07 15:50:16.631822", + "spec_repo_commit": "6f781b6c" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 545ecdc4fb6..6010d5a702e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -3116,6 +3116,12 @@ components: ConfluentAccountResourceAttributes: description: Attributes object for updating a Confluent resource. properties: + enable_custom_metrics: + default: false + description: Enable the `custom.consumer_lag_offset` metric, which contains + extra metric tags. + example: false + type: boolean id: description: The ID associated with a Confluent resource. example: resource-id-123 @@ -3256,6 +3262,12 @@ components: ConfluentResourceRequestAttributes: description: Attributes object for updating a Confluent resource. properties: + enable_custom_metrics: + default: false + description: Enable the `custom.consumer_lag_offset` metric, which contains + extra metric tags. + example: false + type: boolean resource_type: description: The resource type of the Resource. Can be `kafka`, `connector`, `ksql`, or `schema_registry`. @@ -3298,6 +3310,12 @@ components: ConfluentResourceResponseAttributes: description: Model representation of a Confluent Cloud resource. properties: + enable_custom_metrics: + default: false + description: Enable the `custom.consumer_lag_offset` metric, which contains + extra metric tags. + example: false + type: boolean resource_type: description: The resource type of the Resource. Can be `kafka`, `connector`, `ksql`, or `schema_registry`. diff --git a/examples/v2/confluent-cloud/CreateConfluentAccount.java b/examples/v2/confluent-cloud/CreateConfluentAccount.java index 3591219f6df..380cabfbe60 100644 --- a/examples/v2/confluent-cloud/CreateConfluentAccount.java +++ b/examples/v2/confluent-cloud/CreateConfluentAccount.java @@ -28,6 +28,7 @@ public static void main(String[] args) { .resources( Collections.singletonList( new ConfluentAccountResourceAttributes() + .enableCustomMetrics(false) .id("resource-id-123") .resourceType("kafka") .tags(Arrays.asList("myTag", "myTag2:myValue")))) diff --git a/examples/v2/confluent-cloud/CreateConfluentResource.java b/examples/v2/confluent-cloud/CreateConfluentResource.java index 20ae5db8d49..f6ab32bb285 100644 --- a/examples/v2/confluent-cloud/CreateConfluentResource.java +++ b/examples/v2/confluent-cloud/CreateConfluentResource.java @@ -25,7 +25,8 @@ public static void main(String[] args) { .attributes( new ConfluentResourceRequestAttributes() .resourceType("kafka") - .tags(Arrays.asList("myTag", "myTag2:myValue"))) + .tags(Arrays.asList("myTag", "myTag2:myValue")) + .enableCustomMetrics(false)) .id("exampleconfluentcloud") .type(ConfluentResourceType.CONFLUENT_CLOUD_RESOURCES)); diff --git a/examples/v2/confluent-cloud/UpdateConfluentResource.java b/examples/v2/confluent-cloud/UpdateConfluentResource.java index a3639933964..e3e24b13c4d 100644 --- a/examples/v2/confluent-cloud/UpdateConfluentResource.java +++ b/examples/v2/confluent-cloud/UpdateConfluentResource.java @@ -21,6 +21,7 @@ public static void main(String[] args) { new ConfluentResourceRequestData() .attributes( new ConfluentResourceRequestAttributes() + .enableCustomMetrics(false) .resourceType("kafka") .tags(Arrays.asList("myTag", "myTag2:myValue"))) .id("resource-id-123") diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResourceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResourceAttributes.java index 1ec8bd714d4..093406a6bcb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResourceAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentAccountResourceAttributes.java @@ -21,6 +21,7 @@ /** Attributes object for updating a Confluent resource. */ @JsonPropertyOrder({ + ConfluentAccountResourceAttributes.JSON_PROPERTY_ENABLE_CUSTOM_METRICS, ConfluentAccountResourceAttributes.JSON_PROPERTY_ID, ConfluentAccountResourceAttributes.JSON_PROPERTY_RESOURCE_TYPE, ConfluentAccountResourceAttributes.JSON_PROPERTY_TAGS @@ -29,6 +30,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentAccountResourceAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLE_CUSTOM_METRICS = "enable_custom_metrics"; + private Boolean enableCustomMetrics = false; + public static final String JSON_PROPERTY_ID = "id"; private String id; @@ -46,6 +50,27 @@ public ConfluentAccountResourceAttributes( this.resourceType = resourceType; } + public ConfluentAccountResourceAttributes enableCustomMetrics(Boolean enableCustomMetrics) { + this.enableCustomMetrics = enableCustomMetrics; + return this; + } + + /** + * Enable the custom.consumer_lag_offset metric, which contains extra metric tags. + * + * @return enableCustomMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_CUSTOM_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableCustomMetrics() { + return enableCustomMetrics; + } + + public void setEnableCustomMetrics(Boolean enableCustomMetrics) { + this.enableCustomMetrics = enableCustomMetrics; + } + public ConfluentAccountResourceAttributes id(String id) { this.id = id; return this; @@ -175,7 +200,9 @@ public boolean equals(Object o) { } ConfluentAccountResourceAttributes confluentAccountResourceAttributes = (ConfluentAccountResourceAttributes) o; - return Objects.equals(this.id, confluentAccountResourceAttributes.id) + return Objects.equals( + this.enableCustomMetrics, confluentAccountResourceAttributes.enableCustomMetrics) + && Objects.equals(this.id, confluentAccountResourceAttributes.id) && Objects.equals(this.resourceType, confluentAccountResourceAttributes.resourceType) && Objects.equals(this.tags, confluentAccountResourceAttributes.tags) && Objects.equals( @@ -184,13 +211,16 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, resourceType, tags, additionalProperties); + return Objects.hash(enableCustomMetrics, id, resourceType, tags, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ConfluentAccountResourceAttributes {\n"); + sb.append(" enableCustomMetrics: ") + .append(toIndentedString(enableCustomMetrics)) + .append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestAttributes.java index 984e9d9dc99..2fc362e720b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceRequestAttributes.java @@ -21,6 +21,7 @@ /** Attributes object for updating a Confluent resource. */ @JsonPropertyOrder({ + ConfluentResourceRequestAttributes.JSON_PROPERTY_ENABLE_CUSTOM_METRICS, ConfluentResourceRequestAttributes.JSON_PROPERTY_RESOURCE_TYPE, ConfluentResourceRequestAttributes.JSON_PROPERTY_TAGS }) @@ -28,6 +29,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourceRequestAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLE_CUSTOM_METRICS = "enable_custom_metrics"; + private Boolean enableCustomMetrics = false; + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; private String resourceType; @@ -42,6 +46,27 @@ public ConfluentResourceRequestAttributes( this.resourceType = resourceType; } + public ConfluentResourceRequestAttributes enableCustomMetrics(Boolean enableCustomMetrics) { + this.enableCustomMetrics = enableCustomMetrics; + return this; + } + + /** + * Enable the custom.consumer_lag_offset metric, which contains extra metric tags. + * + * @return enableCustomMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_CUSTOM_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableCustomMetrics() { + return enableCustomMetrics; + } + + public void setEnableCustomMetrics(Boolean enableCustomMetrics) { + this.enableCustomMetrics = enableCustomMetrics; + } + public ConfluentResourceRequestAttributes resourceType(String resourceType) { this.resourceType = resourceType; return this; @@ -150,7 +175,9 @@ public boolean equals(Object o) { } ConfluentResourceRequestAttributes confluentResourceRequestAttributes = (ConfluentResourceRequestAttributes) o; - return Objects.equals(this.resourceType, confluentResourceRequestAttributes.resourceType) + return Objects.equals( + this.enableCustomMetrics, confluentResourceRequestAttributes.enableCustomMetrics) + && Objects.equals(this.resourceType, confluentResourceRequestAttributes.resourceType) && Objects.equals(this.tags, confluentResourceRequestAttributes.tags) && Objects.equals( this.additionalProperties, confluentResourceRequestAttributes.additionalProperties); @@ -158,13 +185,16 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(resourceType, tags, additionalProperties); + return Objects.hash(enableCustomMetrics, resourceType, tags, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ConfluentResourceRequestAttributes {\n"); + sb.append(" enableCustomMetrics: ") + .append(toIndentedString(enableCustomMetrics)) + .append("\n"); sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseAttributes.java index 938f7394fd0..634442a6c00 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ConfluentResourceResponseAttributes.java @@ -21,6 +21,7 @@ /** Model representation of a Confluent Cloud resource. */ @JsonPropertyOrder({ + ConfluentResourceResponseAttributes.JSON_PROPERTY_ENABLE_CUSTOM_METRICS, ConfluentResourceResponseAttributes.JSON_PROPERTY_RESOURCE_TYPE, ConfluentResourceResponseAttributes.JSON_PROPERTY_TAGS }) @@ -28,6 +29,9 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ConfluentResourceResponseAttributes { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLE_CUSTOM_METRICS = "enable_custom_metrics"; + private Boolean enableCustomMetrics = false; + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; private String resourceType; @@ -42,6 +46,27 @@ public ConfluentResourceResponseAttributes( this.resourceType = resourceType; } + public ConfluentResourceResponseAttributes enableCustomMetrics(Boolean enableCustomMetrics) { + this.enableCustomMetrics = enableCustomMetrics; + return this; + } + + /** + * Enable the custom.consumer_lag_offset metric, which contains extra metric tags. + * + * @return enableCustomMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLE_CUSTOM_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnableCustomMetrics() { + return enableCustomMetrics; + } + + public void setEnableCustomMetrics(Boolean enableCustomMetrics) { + this.enableCustomMetrics = enableCustomMetrics; + } + public ConfluentResourceResponseAttributes resourceType(String resourceType) { this.resourceType = resourceType; return this; @@ -150,7 +175,9 @@ public boolean equals(Object o) { } ConfluentResourceResponseAttributes confluentResourceResponseAttributes = (ConfluentResourceResponseAttributes) o; - return Objects.equals(this.resourceType, confluentResourceResponseAttributes.resourceType) + return Objects.equals( + this.enableCustomMetrics, confluentResourceResponseAttributes.enableCustomMetrics) + && Objects.equals(this.resourceType, confluentResourceResponseAttributes.resourceType) && Objects.equals(this.tags, confluentResourceResponseAttributes.tags) && Objects.equals( this.additionalProperties, confluentResourceResponseAttributes.additionalProperties); @@ -158,13 +185,16 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(resourceType, tags, additionalProperties); + return Objects.hash(enableCustomMetrics, resourceType, tags, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ConfluentResourceResponseAttributes {\n"); + sb.append(" enableCustomMetrics: ") + .append(toIndentedString(enableCustomMetrics)) + .append("\n"); sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/test/resources/cassettes/features/v2/Add_resource_to_Confluent_account_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Add_resource_to_Confluent_account_returns_OK_response.freeze index 557155f5243..d02e14e62f4 100644 --- a/src/test/resources/cassettes/features/v2/Add_resource_to_Confluent_account_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Add_resource_to_Confluent_account_returns_OK_response.freeze @@ -1 +1 @@ -2023-04-06T14:00:35.438Z \ No newline at end of file +2023-07-03T14:38:40.799Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Add_resource_to_Confluent_account_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Add_resource_to_Confluent_account_returns_OK_response.json index 4b28eb47004..8494b3d49fc 100644 --- a/src/test/resources/cassettes/features/v2/Add_resource_to_Confluent_account_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Add_resource_to_Confluent_account_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"api_key\":\"TestAddresourcetoConfluentaccountreturnsOKresponse1680789635\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" + "json": "{\"data\":{\"attributes\":{\"api_key\":\"TestAddresourcetoConfluentaccountreturnsOKresponse1688395120\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"confluent-cloud-accounts\",\"attributes\":{\"tags\":[\"tag1\",\"tag2:val2\"],\"api_key\":\"TestAddresourcetoConfluentaccountreturnsOKresponse1680789635\",\"resources\":[{\"tags\":[\"tag1\",\"tag2:val2\"],\"resource_type\":\"kafka\",\"id\":\"test-resource-id\"}]},\"id\":\"cc6lo3zoip\"}}\n", + "body": "{\"data\":{\"type\":\"confluent-cloud-accounts\",\"attributes\":{\"tags\":[\"tag1\",\"tag2:val2\"],\"resources\":[{\"id\":\"test-resource-id\",\"enable_custom_metrics\":false,\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"api_key\":\"TestAddresourcetoConfluentaccountreturnsOKresponse1688395120\"},\"id\":\"ca66091df9181d4c62d17f0484461a0d\"}}\n", "headers": { "Content-Type": [ "application/json" @@ -27,22 +27,22 @@ "timeToLive": { "unlimited": true }, - "id": "60221833-9eeb-958d-bff2-cb35633e7b1a" + "id": "4ee58e40-959a-3243-a98e-5b27158c3a2f" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"resource_type\":\"kafka\",\"tags\":[\"myTag\",\"myTag2:myValue\"]},\"id\":\"testaddresourcetoconfluentaccountreturnsokresponse1680789635\",\"type\":\"confluent-cloud-resources\"}}" + "json": "{\"data\":{\"attributes\":{\"enable_custom_metrics\":false,\"resource_type\":\"kafka\",\"tags\":[\"myTag\",\"myTag2:myValue\"]},\"id\":\"testaddresourcetoconfluentaccountreturnsokresponse1688395120\",\"type\":\"confluent-cloud-resources\"}}" }, "headers": {}, "method": "POST", - "path": "/api/v2/integrations/confluent-cloud/accounts/cc6lo3zoip/resources", + "path": "/api/v2/integrations/confluent-cloud/accounts/ca66091df9181d4c62d17f0484461a0d/resources", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"confluent-cloud-resources\",\"attributes\":{\"tags\":[\"mytag\",\"mytag2:myvalue\"],\"resource_type\":\"kafka\"},\"id\":\"testaddresourcetoconfluentaccountreturnsokresponse1680789635\"}}\n", + "body": "{\"data\":{\"type\":\"confluent-cloud-resources\",\"attributes\":{\"enable_custom_metrics\":false,\"tags\":[\"mytag\",\"mytag2:myvalue\"],\"resource_type\":\"kafka\"},\"id\":\"testaddresourcetoconfluentaccountreturnsokresponse1688395120\"}}\n", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "a97b16fc-b20e-d59a-c298-ce43f624213c" + "id": "18138a64-7808-5df7-dcbf-6f410b2302ed" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/integrations/confluent-cloud/accounts/cc6lo3zoip", + "path": "/api/v2/integrations/confluent-cloud/accounts/ca66091df9181d4c62d17f0484461a0d", "keepAlive": false, "secure": true }, @@ -82,6 +82,6 @@ "timeToLive": { "unlimited": true }, - "id": "67351ab7-7775-fb3a-c03d-faf0ca6840a5" + "id": "a614ffb7-77e1-6eaa-c1ff-5aba97dc7e68" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_Confluent_account_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_Confluent_account_returns_OK_response.freeze index ef860b78c53..1b8f5f804af 100644 --- a/src/test/resources/cassettes/features/v2/Get_Confluent_account_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_Confluent_account_returns_OK_response.freeze @@ -1 +1 @@ -2022-10-06T21:02:45.471Z \ No newline at end of file +2023-07-03T14:38:41.593Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_Confluent_account_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_Confluent_account_returns_OK_response.json index 9f28f98a086..722fa8e0d44 100644 --- a/src/test/resources/cassettes/features/v2/Get_Confluent_account_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_Confluent_account_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1665090165\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" + "json": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1688395121\",\"api_secret\":\"test-api-secret\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1665090165\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"d43d474jxm\"}}\n", + "body": "{\"data\":{\"type\":\"confluent-cloud-accounts\",\"id\":\"8a03a240e4d322d42edf6d4f4654a624\",\"attributes\":{\"resources\":[{\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"],\"enable_custom_metrics\":false,\"id\":\"test-resource-id\"}],\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1688395121\",\"tags\":[\"tag1\",\"tag2:val2\"]}}}\n", "headers": { "Content-Type": [ "application/json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "664cac62-9cad-7cfe-0349-80ce3082a3e1" + "id": "8819d649-0151-9634-e602-6debce0340fc" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/integrations/confluent-cloud/accounts/d43d474jxm", + "path": "/api/v2/integrations/confluent-cloud/accounts/8a03a240e4d322d42edf6d4f4654a624", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"attributes\":{\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1665090165\",\"resources\":[{\"id\":\"test-resource-id\",\"resource_type\":\"kafka\",\"tags\":[\"tag1\",\"tag2:val2\"]}],\"tags\":[\"tag1\",\"tag2:val2\"]},\"type\":\"confluent-cloud-accounts\",\"id\":\"d43d474jxm\"}}\n", + "body": "{\"data\":{\"type\":\"confluent-cloud-accounts\",\"attributes\":{\"resources\":[{\"enable_custom_metrics\":false,\"id\":\"test-resource-id\",\"tags\":[\"tag1\",\"tag2:val2\"],\"resource_type\":\"kafka\"}],\"api_key\":\"TestGetConfluentaccountreturnsOKresponse1688395121\",\"tags\":[\"tag1\",\"tag2:val2\"]},\"id\":\"8a03a240e4d322d42edf6d4f4654a624\"}}\n", "headers": { "Content-Type": [ "application/json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "e3672a63-9af4-9dfb-4ff6-0a8a8bf2168f" + "id": "ba343b3b-f024-4959-0e33-a156abe4ac50" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/integrations/confluent-cloud/accounts/d43d474jxm", + "path": "/api/v2/integrations/confluent-cloud/accounts/8a03a240e4d322d42edf6d4f4654a624", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "14ba4899-ea29-4f17-253b-507c5e07a486" + "id": "3eba4a48-96a7-0e8d-eb2d-8e8df92655a7" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/confluent_cloud.feature b/src/test/resources/com/datadog/api/client/v2/api/confluent_cloud.feature index a4b035fc4ef..f1c66a20d9e 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/confluent_cloud.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/confluent_cloud.feature @@ -11,21 +11,21 @@ Feature: Confluent Cloud @generated @skip @team:Datadog/web-integrations Scenario: Add Confluent account returns "Bad Request" response Given new "CreateConfluentAccount" request - And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"enable_custom_metrics": false, "id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:Datadog/web-integrations Scenario: Add Confluent account returns "Not Found" response Given new "CreateConfluentAccount" request - And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"enable_custom_metrics": false, "id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} When the request is sent Then the response status is 404 Not Found @generated @skip @team:Datadog/web-integrations Scenario: Add Confluent account returns "OK" response Given new "CreateConfluentAccount" request - And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} + And body with value {"data": {"attributes": {"api_key": "TESTAPIKEY123", "api_secret": "test-api-secret-123", "resources": [{"enable_custom_metrics": false, "id": "resource-id-123", "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}], "tags": ["myTag", "myTag2:myValue"]}, "type": "confluent-cloud-accounts"}} When the request is sent Then the response status is 201 OK @@ -33,7 +33,7 @@ Feature: Confluent Cloud Scenario: Add resource to Confluent account returns "Bad Request" response Given new "CreateConfluentResource" request And request contains "account_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + And body with value {"data": {"attributes": {"enable_custom_metrics": false, "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} When the request is sent Then the response status is 400 Bad Request @@ -41,7 +41,7 @@ Feature: Confluent Cloud Scenario: Add resource to Confluent account returns "Not Found" response Given new "CreateConfluentResource" request And request contains "account_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + And body with value {"data": {"attributes": {"enable_custom_metrics": false, "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} When the request is sent Then the response status is 404 Not Found @@ -50,7 +50,7 @@ Feature: Confluent Cloud Given there is a valid "confluent_account" in the system And new "CreateConfluentResource" request And request contains "account_id" parameter from "confluent_account.data.id" - And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "{{ unique_lower_alnum }}", "type": "confluent-cloud-resources"}} + And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"], "enable_custom_metrics": false}, "id": "{{ unique_lower_alnum }}", "type": "confluent-cloud-resources"}} When the request is sent Then the response status is 201 OK And the response "data.id" is equal to "{{ unique_lower_alnum }}" @@ -126,6 +126,7 @@ Feature: Confluent Cloud And the response "data.type" is equal to "confluent-cloud-accounts" And the response "data.attributes.api_key" is equal to "{{ unique_alnum }}" And the response "data.attributes.resources[0].resource_type" is equal to "kafka" + And the response "data.attributes.resources[0].enable_custom_metrics" is equal to false @generated @skip @team:Datadog/web-integrations Scenario: Get resource from Confluent account returns "Bad Request" response @@ -224,7 +225,7 @@ Feature: Confluent Cloud Given new "UpdateConfluentResource" request And request contains "account_id" parameter from "REPLACE.ME" And request contains "resource_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + And body with value {"data": {"attributes": {"enable_custom_metrics": false, "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} When the request is sent Then the response status is 400 Bad Request @@ -233,7 +234,7 @@ Feature: Confluent Cloud Given new "UpdateConfluentResource" request And request contains "account_id" parameter from "REPLACE.ME" And request contains "resource_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + And body with value {"data": {"attributes": {"enable_custom_metrics": false, "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} When the request is sent Then the response status is 404 Not Found @@ -242,6 +243,6 @@ Feature: Confluent Cloud Given new "UpdateConfluentResource" request And request contains "account_id" parameter from "REPLACE.ME" And request contains "resource_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} + And body with value {"data": {"attributes": {"enable_custom_metrics": false, "resource_type": "kafka", "tags": ["myTag", "myTag2:myValue"]}, "id": "resource-id-123", "type": "confluent-cloud-resources"}} When the request is sent Then the response status is 200 OK