diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5d738d0d1f0..7c89835b6ed 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -6968,15 +6968,21 @@ components: BatchUpsertRowsRequestDataAttributes: description: Attributes containing row data values for row creation or update operations. + example: + values: + age: 25 + example_key_value: primary_key_value + name: row_name properties: values: additionalProperties: - x-required-field: true - description: Key-value pairs representing row data, where keys are field - names from the schema. - example: - example_key_value: primary_key_value - name: row_name + oneOf: + - type: string + - format: int32 + maximum: 2147483647 + type: integer + description: Key-value pairs representing row data, where keys are schema + field names and values match the corresponding column types. type: object required: - values @@ -69084,9 +69090,6 @@ paths: operator: OR permissions: - incident_read - x-unstable: '**Note**: This endpoint is in Preview. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' post: description: Create an impact for an incident. operationId: CreateIncidentImpact @@ -69130,9 +69133,6 @@ paths: operator: OR permissions: - incident_write - x-unstable: '**Note**: This endpoint is in Preview. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/incidents/{incident_id}/impacts/{impact_id}: delete: description: Delete an incident impact. @@ -69163,9 +69163,6 @@ paths: operator: OR permissions: - incident_write - x-unstable: '**Note**: This endpoint is in Preview. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/incidents/{incident_id}/relationships/integrations: get: description: Get all integration metadata for an incident. diff --git a/examples/v2/reference-tables/UpsertRows.java b/examples/v2/reference-tables/UpsertRows.java index c336192695f..4524255cc2a 100644 --- a/examples/v2/reference-tables/UpsertRows.java +++ b/examples/v2/reference-tables/UpsertRows.java @@ -24,6 +24,7 @@ public static void main(String[] args) { new BatchUpsertRowsRequestDataAttributes() .values( Map.ofEntries( + Map.entry("age", 25), Map.entry("example_key_value", "primary_key_value"), Map.entry("name", "row_name")))) .id("primary_key_value") diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 0f5877d1071..00e0a8a9303 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -748,14 +748,12 @@ public class ApiClient { put("v2.updateDeploymentGate", false); put("v2.updateDeploymentRule", false); put("v2.createIncident", false); - put("v2.createIncidentImpact", false); put("v2.createIncidentIntegration", false); put("v2.createIncidentNotificationRule", false); put("v2.createIncidentNotificationTemplate", false); put("v2.createIncidentTodo", false); put("v2.createIncidentType", false); put("v2.deleteIncident", false); - put("v2.deleteIncidentImpact", false); put("v2.deleteIncidentIntegration", false); put("v2.deleteIncidentNotificationRule", false); put("v2.deleteIncidentNotificationTemplate", false); @@ -768,7 +766,6 @@ public class ApiClient { put("v2.getIncidentTodo", false); put("v2.getIncidentType", false); put("v2.listIncidentAttachments", false); - put("v2.listIncidentImpacts", false); put("v2.listIncidentIntegrations", false); put("v2.listIncidentNotificationRules", false); put("v2.listIncidentNotificationTemplates", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java b/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java index a36c2a39abf..b739642b319 100644 --- a/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/IncidentsApi.java @@ -353,13 +353,6 @@ public ApiResponse createIncidentImpactWithHttpInfo( IncidentImpactCreateRequest body, CreateIncidentImpactOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "createIncidentImpact"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = body; // verify the required parameter 'incidentId' is set @@ -420,16 +413,6 @@ public ApiResponse createIncidentImpactWithHttpInfo( String incidentId, IncidentImpactCreateRequest body, CreateIncidentImpactOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "createIncidentImpact"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = body; // verify the required parameter 'incidentId' is set @@ -1518,13 +1501,6 @@ public CompletableFuture deleteIncidentImpactAsync(String incidentId, Stri */ public ApiResponse deleteIncidentImpactWithHttpInfo(String incidentId, String impactId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "deleteIncidentImpact"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; // verify the required parameter 'incidentId' is set @@ -1578,16 +1554,6 @@ public ApiResponse deleteIncidentImpactWithHttpInfo(String incidentId, Str */ public CompletableFuture> deleteIncidentImpactWithHttpInfoAsync( String incidentId, String impactId) { - // Check if unstable operation is enabled - String operationId = "deleteIncidentImpact"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = null; // verify the required parameter 'incidentId' is set @@ -4141,13 +4107,6 @@ public CompletableFuture listIncidentImpactsAsync( */ public ApiResponse listIncidentImpactsWithHttpInfo( String incidentId, ListIncidentImpactsOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listIncidentImpacts"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } Object localVarPostBody = null; // verify the required parameter 'incidentId' is set @@ -4199,16 +4158,6 @@ public ApiResponse listIncidentImpactsWithHttpInfo( public CompletableFuture> listIncidentImpactsWithHttpInfoAsync( String incidentId, ListIncidentImpactsOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listIncidentImpacts"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } Object localVarPostBody = null; // verify the required parameter 'incidentId' is set diff --git a/src/main/java/com/datadog/api/client/v2/model/BatchUpsertRowsRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/BatchUpsertRowsRequestDataAttributes.java index 80d0068fd1f..8ee9c8632a3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/BatchUpsertRowsRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/BatchUpsertRowsRequestDataAttributes.java @@ -45,7 +45,8 @@ public BatchUpsertRowsRequestDataAttributes putValuesItem(String key, Object val } /** - * Key-value pairs representing row data, where keys are field names from the schema. + * Key-value pairs representing row data, where keys are schema field names and values match the + * corresponding column types. * * @return values */ diff --git a/src/test/resources/com/datadog/api/client/v2/api/incidents.feature b/src/test/resources/com/datadog/api/client/v2/api/incidents.feature index 74ae965968f..12ab3e2f5ba 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/incidents.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/incidents.feature @@ -806,16 +806,14 @@ Feature: Incidents @generated @skip @team:DataDog/incident-app Scenario: List an incident's impacts returns "Bad Request" response - Given operation "ListIncidentImpacts" enabled - And new "ListIncidentImpacts" request + Given new "ListIncidentImpacts" request And request contains "incident_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/incident-app Scenario: List an incident's impacts returns "Not Found" response - Given operation "ListIncidentImpacts" enabled - And new "ListIncidentImpacts" request + Given new "ListIncidentImpacts" request And request contains "incident_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found diff --git a/src/test/resources/com/datadog/api/client/v2/api/reference_tables.feature b/src/test/resources/com/datadog/api/client/v2/api/reference_tables.feature index 45a2861c15b..a233a6330ff 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/reference_tables.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/reference_tables.feature @@ -148,7 +148,7 @@ Feature: Reference Tables Scenario: Upsert rows returns "Bad Request" response Given new "UpsertRows" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} + And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} When the request is sent Then the response status is 400 Bad Request @@ -156,7 +156,7 @@ Feature: Reference Tables Scenario: Upsert rows returns "Not Found" response Given new "UpsertRows" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} + And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} When the request is sent Then the response status is 404 Not Found @@ -164,6 +164,6 @@ Feature: Reference Tables Scenario: Upsert rows returns "Rows created or updated successfully" response Given new "UpsertRows" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": [{"attributes": {"values": {"example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} + And body with value {"data": [{"attributes": {"values": {"age": 25, "example_key_value": "primary_key_value", "name": "row_name"}}, "id": "primary_key_value", "type": "row"}]} When the request is sent Then the response status is 200 Rows created or updated successfully