From 473721122ff4d5084b5465348d9d12a582ae620c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 3 Sep 2026 17:02:09 +0000 Subject: [PATCH] Regenerate client from commit 24d86a0 of spec repo --- .generator/schemas/v2/openapi.yaml | 183 +++++++++ .../GetLLMObsAnnotatedInteraction.java | 28 ++ ...LLMObsAnnotatedInteraction_3394378457.java | 30 ++ .../com/datadog/api/client/ApiClient.java | 1 + .../client/v2/api/AgentObservabilityApi.java | 352 ++++++++++++++++++ ...atedInteractionDataAttributesResponse.java | 276 ++++++++++++++ ...LMObsAnnotatedInteractionDataResponse.java | 216 +++++++++++ .../LLMObsAnnotatedInteractionEvent.java | 209 +++++++++++ .../LLMObsAnnotatedInteractionResponse.java | 151 ++++++++ .../client/v2/api/agent_observability.feature | 36 ++ .../com/datadog/api/client/v2/api/undo.json | 6 + 11 files changed, 1488 insertions(+) create mode 100644 examples/v2/agent-observability/GetLLMObsAnnotatedInteraction.java create mode 100644 examples/v2/agent-observability/GetLLMObsAnnotatedInteraction_3394378457.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionDataAttributesResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionDataResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionEvent.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionResponse.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 324b65c3ebd..68c9c54a6d7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -988,6 +988,14 @@ components: required: true schema: type: string + LLMObsAnnotationQueueInteractionIDPathParameter: + description: The ID of the interaction in the annotation queue. + example: "interaction-456" + in: path + name: interaction_id + required: true + schema: + type: string LLMObsDatasetIDPathParameter: description: The ID of the Agent Observability dataset. example: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d" @@ -56166,11 +56174,89 @@ components: - can_annotate - annotations type: object + LLMObsAnnotatedInteractionDataAttributesResponse: + description: Attributes containing an annotated interaction and its related events. + properties: + annotated_interaction: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionItem" + events: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionEvents" + interaction_type: + $ref: "#/components/schemas/LLMObsAnyInteractionType" + next_cursor: + description: Cursor to retrieve the next page of events. Absent when there are no more events. + example: "eyJzdGFydCI6MTAwfQ==" + type: string + required: + - annotated_interaction + - interaction_type + - events + type: object + LLMObsAnnotatedInteractionDataResponse: + description: Data object for a single annotated interaction. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionDataAttributesResponse" + id: + description: Unique identifier of the interaction. + example: "interaction-456" + type: string + type: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsType" + required: + - id + - type + - attributes + type: object + LLMObsAnnotatedInteractionEvent: + description: An event associated with an annotated interaction. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionEventAttributes" + id: + description: Unique identifier of the event. + example: "span-7a1b2c3d" + type: string + type: + description: Type of the event. + example: span + type: string + required: + - id + - type + - attributes + type: object + LLMObsAnnotatedInteractionEventAttributes: + additionalProperties: {} + description: Attributes of an event associated with an annotated interaction. + example: + duration: 1500000000 + ml_app: my-llm-app + name: agent_workflow + span_id: span-7a1b2c3d + span_kind: agent + start_ns: 1705314600000000000 + status: ok + trace_id: trace-abc-123 + type: object + LLMObsAnnotatedInteractionEvents: + description: Page of events associated with the annotated interaction. + items: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionEvent" + type: array LLMObsAnnotatedInteractionItem: description: An interaction with its associated annotations. oneOf: - $ref: "#/components/schemas/LLMObsTraceAnnotatedInteractionItem" - $ref: "#/components/schemas/LLMObsDisplayBlockAnnotatedInteractionItem" + LLMObsAnnotatedInteractionResponse: + description: Response containing a single annotated interaction and its related events. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionDataResponse" + required: + - data + type: object LLMObsAnnotatedInteractionsByTraceDataAttributesResponse: description: Attributes of the cross-queue annotated interactions response. properties: @@ -166482,6 +166568,103 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}: + get: + description: Retrieve an interaction, its annotations, and a page of related events from an annotation queue. + operationId: GetLLMObsAnnotatedInteraction + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + - $ref: "#/components/parameters/LLMObsAnnotationQueueInteractionIDPathParameter" + - description: Maximum number of events to return. Defaults to 10. + in: query + name: limit + schema: + default: 10 + format: int32 + maximum: 1000 + minimum: 1 + type: integer + - description: Cursor from the previous response to retrieve the next page of events. + in: query + name: cursor + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + annotated_interaction: + annotations: [] + can_annotate: true + content_id: trace-abc-123 + created_at: "2024-01-15T10:30:00Z" + id: interaction-456 + modified_at: "2024-01-15T10:30:00Z" + type: trace + events: + - attributes: + duration: 1500000000 + ml_app: my-llm-app + name: agent_workflow + span_id: span-7a1b2c3d + span_kind: agent + start_ns: 1705314600000000000 + status: ok + trace_id: trace-abc-123 + id: span-7a1b2c3d + type: span + interaction_type: session + next_cursor: eyJzdGFydCI6MTAwfQ== + id: interaction-456 + type: annotated_interactions + schema: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get an annotated queue interaction + tags: + - Agent Observability + x-pagination: + cursorParam: cursor + cursorPath: data.attributes.next_cursor + limitParam: limit + resultsPath: data.attributes.events + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations: post: description: |- diff --git a/examples/v2/agent-observability/GetLLMObsAnnotatedInteraction.java b/examples/v2/agent-observability/GetLLMObsAnnotatedInteraction.java new file mode 100644 index 00000000000..9db5a278dc4 --- /dev/null +++ b/examples/v2/agent-observability/GetLLMObsAnnotatedInteraction.java @@ -0,0 +1,28 @@ +// Get an annotated queue interaction returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AgentObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getLLMObsAnnotatedInteraction", true); + AgentObservabilityApi apiInstance = new AgentObservabilityApi(defaultClient); + + try { + LLMObsAnnotatedInteractionResponse result = + apiInstance.getLLMObsAnnotatedInteraction( + "00000000-0000-0000-0000-000000000001", "interaction-456"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling AgentObservabilityApi#getLLMObsAnnotatedInteraction"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/agent-observability/GetLLMObsAnnotatedInteraction_3394378457.java b/examples/v2/agent-observability/GetLLMObsAnnotatedInteraction_3394378457.java new file mode 100644 index 00000000000..09b54e626df --- /dev/null +++ b/examples/v2/agent-observability/GetLLMObsAnnotatedInteraction_3394378457.java @@ -0,0 +1,30 @@ +// Get an annotated queue interaction returns "OK" response with pagination + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.PaginationIterable; +import com.datadog.api.client.v2.api.AgentObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionEvent; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getLLMObsAnnotatedInteraction", true); + AgentObservabilityApi apiInstance = new AgentObservabilityApi(defaultClient); + + try { + PaginationIterable iterable = + apiInstance.getLLMObsAnnotatedInteractionWithPagination( + "00000000-0000-0000-0000-000000000001", "interaction-456"); + + for (LLMObsAnnotatedInteractionEvent item : iterable) { + System.out.println(item); + } + } catch (RuntimeException e) { + System.err.println( + "Exception when calling" + + " AgentObservabilityApi#getLLMObsAnnotatedInteractionWithPagination"); + System.err.println("Reason: " + e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 9635aa7aab5..a6c79c482af 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -868,6 +868,7 @@ public class ApiClient { put("v2.deleteLLMObsProjects", false); put("v2.deleteLLMObsPrompt", false); put("v2.exportLLMObsDataset", false); + put("v2.getLLMObsAnnotatedInteraction", false); put("v2.getLLMObsAnnotatedInteractions", false); put("v2.getLLMObsAnnotatedInteractionsByTraceIDs", false); put("v2.getLLMObsAnnotationQueueLabelSchema", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/AgentObservabilityApi.java b/src/main/java/com/datadog/api/client/v2/api/AgentObservabilityApi.java index 698682c017c..b3f6273901f 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AgentObservabilityApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AgentObservabilityApi.java @@ -3,7 +3,10 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionEvent; +import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionResponse; import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionsByTraceResponse; import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionsResponse; import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsRequest; @@ -89,6 +92,7 @@ import java.io.File; import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -4401,6 +4405,354 @@ public CompletableFuture> exportLLMObsDatasetWithHttpInfoAsy new GenericType() {}); } + /** Manage optional parameters to getLLMObsAnnotatedInteraction. */ + public static class GetLLMObsAnnotatedInteractionOptionalParameters { + private Integer limit; + private String cursor; + + /** + * Set limit. + * + * @param limit Maximum number of events to return. Defaults to 10. (optional, default to 10) + * @return GetLLMObsAnnotatedInteractionOptionalParameters + */ + public GetLLMObsAnnotatedInteractionOptionalParameters limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Set cursor. + * + * @param cursor Cursor from the previous response to retrieve the next page of events. + * (optional) + * @return GetLLMObsAnnotatedInteractionOptionalParameters + */ + public GetLLMObsAnnotatedInteractionOptionalParameters cursor(String cursor) { + this.cursor = cursor; + return this; + } + } + + /** + * Get an annotated queue interaction. + * + *

See {@link #getLLMObsAnnotatedInteractionWithHttpInfo}. + * + * @param queueId The ID of the Agent Observability annotation queue. (required) + * @param interactionId The ID of the interaction in the annotation queue. (required) + * @return LLMObsAnnotatedInteractionResponse + * @throws ApiException if fails to make API call + */ + public LLMObsAnnotatedInteractionResponse getLLMObsAnnotatedInteraction( + String queueId, String interactionId) throws ApiException { + return getLLMObsAnnotatedInteractionWithHttpInfo( + queueId, interactionId, new GetLLMObsAnnotatedInteractionOptionalParameters()) + .getData(); + } + + /** + * Get an annotated queue interaction. + * + *

See {@link #getLLMObsAnnotatedInteractionWithHttpInfoAsync}. + * + * @param queueId The ID of the Agent Observability annotation queue. (required) + * @param interactionId The ID of the interaction in the annotation queue. (required) + * @return CompletableFuture<LLMObsAnnotatedInteractionResponse> + */ + public CompletableFuture getLLMObsAnnotatedInteractionAsync( + String queueId, String interactionId) { + return getLLMObsAnnotatedInteractionWithHttpInfoAsync( + queueId, interactionId, new GetLLMObsAnnotatedInteractionOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an annotated queue interaction. + * + *

See {@link #getLLMObsAnnotatedInteractionWithHttpInfo}. + * + * @param queueId The ID of the Agent Observability annotation queue. (required) + * @param interactionId The ID of the interaction in the annotation queue. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsAnnotatedInteractionResponse + * @throws ApiException if fails to make API call + */ + public LLMObsAnnotatedInteractionResponse getLLMObsAnnotatedInteraction( + String queueId, + String interactionId, + GetLLMObsAnnotatedInteractionOptionalParameters parameters) + throws ApiException { + return getLLMObsAnnotatedInteractionWithHttpInfo(queueId, interactionId, parameters).getData(); + } + + /** + * Get an annotated queue interaction. + * + *

See {@link #getLLMObsAnnotatedInteractionWithHttpInfoAsync}. + * + * @param queueId The ID of the Agent Observability annotation queue. (required) + * @param interactionId The ID of the interaction in the annotation queue. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsAnnotatedInteractionResponse> + */ + public CompletableFuture getLLMObsAnnotatedInteractionAsync( + String queueId, + String interactionId, + GetLLMObsAnnotatedInteractionOptionalParameters parameters) { + return getLLMObsAnnotatedInteractionWithHttpInfoAsync(queueId, interactionId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an annotated queue interaction. + * + *

See {@link #getLLMObsAnnotatedInteractionWithHttpInfo}. + * + * @param queueId The ID of the Agent Observability annotation queue. (required) + * @param interactionId The ID of the interaction in the annotation queue. (required) + * @return PaginationIterable<LLMObsAnnotatedInteractionEvent> + */ + public PaginationIterable + getLLMObsAnnotatedInteractionWithPagination(String queueId, String interactionId) { + GetLLMObsAnnotatedInteractionOptionalParameters parameters = + new GetLLMObsAnnotatedInteractionOptionalParameters(); + return getLLMObsAnnotatedInteractionWithPagination(queueId, interactionId, parameters); + } + + /** + * Get an annotated queue interaction. + * + *

See {@link #getLLMObsAnnotatedInteractionWithHttpInfo}. + * + * @param queueId The ID of the Agent Observability annotation queue. (required) + * @param interactionId The ID of the interaction in the annotation queue. (required) + * @return LLMObsAnnotatedInteractionResponse + */ + public PaginationIterable + getLLMObsAnnotatedInteractionWithPagination( + String queueId, + String interactionId, + GetLLMObsAnnotatedInteractionOptionalParameters parameters) { + String resultsPath = "getData.getAttributes.getEvents"; + String valueGetterPath = "getData.getAttributes.getNextCursor"; + String valueSetterPath = "cursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + if (parameters.limit == null) { + limit = 10; + parameters.limit(limit); + } else { + limit = parameters.limit; + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("queueId", queueId); + args.put("interactionId", interactionId); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "getLLMObsAnnotatedInteraction", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + true, + limit, + args, + 0); + + return iterator; + } + + /** + * Retrieve an interaction, its annotations, and a page of related events from an annotation + * queue. + * + * @param queueId The ID of the Agent Observability annotation queue. (required) + * @param interactionId The ID of the interaction in the annotation queue. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsAnnotatedInteractionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getLLMObsAnnotatedInteractionWithHttpInfo( + String queueId, + String interactionId, + GetLLMObsAnnotatedInteractionOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getLLMObsAnnotatedInteraction"; + 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 'queueId' is set + if (queueId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'queueId' when calling getLLMObsAnnotatedInteraction"); + } + + // verify the required parameter 'interactionId' is set + if (interactionId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'interactionId' when calling" + + " getLLMObsAnnotatedInteraction"); + } + Integer limit = parameters.limit; + String cursor = parameters.cursor; + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())) + .replaceAll( + "\\{" + "interaction_id" + "\\}", apiClient.escapeString(interactionId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AgentObservabilityApi.getLLMObsAnnotatedInteraction", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an annotated queue interaction. + * + *

See {@link #getLLMObsAnnotatedInteractionWithHttpInfo}. + * + * @param queueId The ID of the Agent Observability annotation queue. (required) + * @param interactionId The ID of the interaction in the annotation queue. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsAnnotatedInteractionResponse>> + */ + public CompletableFuture> + getLLMObsAnnotatedInteractionWithHttpInfoAsync( + String queueId, + String interactionId, + GetLLMObsAnnotatedInteractionOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getLLMObsAnnotatedInteraction"; + 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 'queueId' is set + if (queueId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'queueId' when calling" + + " getLLMObsAnnotatedInteraction")); + return result; + } + + // verify the required parameter 'interactionId' is set + if (interactionId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'interactionId' when calling" + + " getLLMObsAnnotatedInteraction")); + return result; + } + Integer limit = parameters.limit; + String cursor = parameters.cursor; + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())) + .replaceAll( + "\\{" + "interaction_id" + "\\}", apiClient.escapeString(interactionId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AgentObservabilityApi.getLLMObsAnnotatedInteraction", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get annotated queue interactions. * diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionDataAttributesResponse.java new file mode 100644 index 00000000000..a36c91efd71 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionDataAttributesResponse.java @@ -0,0 +1,276 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes containing an annotated interaction and its related events. */ +@JsonPropertyOrder({ + LLMObsAnnotatedInteractionDataAttributesResponse.JSON_PROPERTY_ANNOTATED_INTERACTION, + LLMObsAnnotatedInteractionDataAttributesResponse.JSON_PROPERTY_EVENTS, + LLMObsAnnotatedInteractionDataAttributesResponse.JSON_PROPERTY_INTERACTION_TYPE, + LLMObsAnnotatedInteractionDataAttributesResponse.JSON_PROPERTY_NEXT_CURSOR +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotatedInteractionDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANNOTATED_INTERACTION = "annotated_interaction"; + private LLMObsAnnotatedInteractionItem annotatedInteraction; + + public static final String JSON_PROPERTY_EVENTS = "events"; + private List events = new ArrayList<>(); + + public static final String JSON_PROPERTY_INTERACTION_TYPE = "interaction_type"; + private LLMObsAnyInteractionType interactionType; + + public static final String JSON_PROPERTY_NEXT_CURSOR = "next_cursor"; + private String nextCursor; + + public LLMObsAnnotatedInteractionDataAttributesResponse() {} + + @JsonCreator + public LLMObsAnnotatedInteractionDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATED_INTERACTION) + LLMObsAnnotatedInteractionItem annotatedInteraction, + @JsonProperty(required = true, value = JSON_PROPERTY_EVENTS) + List events, + @JsonProperty(required = true, value = JSON_PROPERTY_INTERACTION_TYPE) + LLMObsAnyInteractionType interactionType) { + this.annotatedInteraction = annotatedInteraction; + this.unparsed |= annotatedInteraction.unparsed; + this.events = events; + for (LLMObsAnnotatedInteractionEvent item : events) { + this.unparsed |= item.unparsed; + } + this.interactionType = interactionType; + this.unparsed |= !interactionType.isValid(); + } + + public LLMObsAnnotatedInteractionDataAttributesResponse annotatedInteraction( + LLMObsAnnotatedInteractionItem annotatedInteraction) { + this.annotatedInteraction = annotatedInteraction; + this.unparsed |= annotatedInteraction.unparsed; + return this; + } + + /** + * An interaction with its associated annotations. + * + * @return annotatedInteraction + */ + @JsonProperty(JSON_PROPERTY_ANNOTATED_INTERACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotatedInteractionItem getAnnotatedInteraction() { + return annotatedInteraction; + } + + public void setAnnotatedInteraction(LLMObsAnnotatedInteractionItem annotatedInteraction) { + this.annotatedInteraction = annotatedInteraction; + if (annotatedInteraction != null) { + this.unparsed |= annotatedInteraction.unparsed; + } + } + + public LLMObsAnnotatedInteractionDataAttributesResponse events( + List events) { + this.events = events; + for (LLMObsAnnotatedInteractionEvent item : events) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsAnnotatedInteractionDataAttributesResponse addEventsItem( + LLMObsAnnotatedInteractionEvent eventsItem) { + this.events.add(eventsItem); + this.unparsed |= eventsItem.unparsed; + return this; + } + + /** + * Page of events associated with the annotated interaction. + * + * @return events + */ + @JsonProperty(JSON_PROPERTY_EVENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + if (events != null) { + for (LLMObsAnnotatedInteractionEvent item : events) { + this.unparsed |= item.unparsed; + } + } + } + + public LLMObsAnnotatedInteractionDataAttributesResponse interactionType( + LLMObsAnyInteractionType interactionType) { + this.interactionType = interactionType; + this.unparsed |= !interactionType.isValid(); + return this; + } + + /** + * Type of an annotated interaction. + * + * @return interactionType + */ + @JsonProperty(JSON_PROPERTY_INTERACTION_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnyInteractionType getInteractionType() { + return interactionType; + } + + public void setInteractionType(LLMObsAnyInteractionType interactionType) { + if (!interactionType.isValid()) { + this.unparsed = true; + } + this.interactionType = interactionType; + } + + public LLMObsAnnotatedInteractionDataAttributesResponse nextCursor(String nextCursor) { + this.nextCursor = nextCursor; + return this; + } + + /** + * Cursor to retrieve the next page of events. Absent when there are no more events. + * + * @return nextCursor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNextCursor() { + return nextCursor; + } + + public void setNextCursor(String nextCursor) { + this.nextCursor = nextCursor; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotatedInteractionDataAttributesResponse + */ + @JsonAnySetter + public LLMObsAnnotatedInteractionDataAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotatedInteractionDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotatedInteractionDataAttributesResponse + llmObsAnnotatedInteractionDataAttributesResponse = + (LLMObsAnnotatedInteractionDataAttributesResponse) o; + return Objects.equals( + this.annotatedInteraction, + llmObsAnnotatedInteractionDataAttributesResponse.annotatedInteraction) + && Objects.equals(this.events, llmObsAnnotatedInteractionDataAttributesResponse.events) + && Objects.equals( + this.interactionType, llmObsAnnotatedInteractionDataAttributesResponse.interactionType) + && Objects.equals( + this.nextCursor, llmObsAnnotatedInteractionDataAttributesResponse.nextCursor) + && Objects.equals( + this.additionalProperties, + llmObsAnnotatedInteractionDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + annotatedInteraction, events, interactionType, nextCursor, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotatedInteractionDataAttributesResponse {\n"); + sb.append(" annotatedInteraction: ") + .append(toIndentedString(annotatedInteraction)) + .append("\n"); + sb.append(" events: ").append(toIndentedString(events)).append("\n"); + sb.append(" interactionType: ").append(toIndentedString(interactionType)).append("\n"); + sb.append(" nextCursor: ").append(toIndentedString(nextCursor)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionDataResponse.java new file mode 100644 index 00000000000..308b325b52c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionDataResponse.java @@ -0,0 +1,216 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for a single annotated interaction. */ +@JsonPropertyOrder({ + LLMObsAnnotatedInteractionDataResponse.JSON_PROPERTY_ATTRIBUTES, + LLMObsAnnotatedInteractionDataResponse.JSON_PROPERTY_ID, + LLMObsAnnotatedInteractionDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotatedInteractionDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsAnnotatedInteractionDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsAnnotatedInteractionsType type; + + public LLMObsAnnotatedInteractionDataResponse() {} + + @JsonCreator + public LLMObsAnnotatedInteractionDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsAnnotatedInteractionDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsAnnotatedInteractionsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsAnnotatedInteractionDataResponse attributes( + LLMObsAnnotatedInteractionDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes containing an annotated interaction and its related events. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotatedInteractionDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsAnnotatedInteractionDataAttributesResponse attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsAnnotatedInteractionDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the interaction. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsAnnotatedInteractionDataResponse type(LLMObsAnnotatedInteractionsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for annotated interactions. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotatedInteractionsType getType() { + return type; + } + + public void setType(LLMObsAnnotatedInteractionsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotatedInteractionDataResponse + */ + @JsonAnySetter + public LLMObsAnnotatedInteractionDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotatedInteractionDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotatedInteractionDataResponse llmObsAnnotatedInteractionDataResponse = + (LLMObsAnnotatedInteractionDataResponse) o; + return Objects.equals(this.attributes, llmObsAnnotatedInteractionDataResponse.attributes) + && Objects.equals(this.id, llmObsAnnotatedInteractionDataResponse.id) + && Objects.equals(this.type, llmObsAnnotatedInteractionDataResponse.type) + && Objects.equals( + this.additionalProperties, llmObsAnnotatedInteractionDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotatedInteractionDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionEvent.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionEvent.java new file mode 100644 index 00000000000..775adfaadc6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionEvent.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** An event associated with an annotated interaction. */ +@JsonPropertyOrder({ + LLMObsAnnotatedInteractionEvent.JSON_PROPERTY_ATTRIBUTES, + LLMObsAnnotatedInteractionEvent.JSON_PROPERTY_ID, + LLMObsAnnotatedInteractionEvent.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotatedInteractionEvent { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private Map attributes = new HashMap(); + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public LLMObsAnnotatedInteractionEvent() {} + + @JsonCreator + public LLMObsAnnotatedInteractionEvent( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + Map attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.attributes = attributes; + this.id = id; + this.type = type; + } + + public LLMObsAnnotatedInteractionEvent attributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public LLMObsAnnotatedInteractionEvent putAttributesItem(String key, Object attributesItem) { + this.attributes.put(key, attributesItem); + return this; + } + + /** + * Attributes of an event associated with an annotated interaction. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getAttributes() { + return attributes; + } + + public void setAttributes(Map attributes) { + this.attributes = attributes; + } + + public LLMObsAnnotatedInteractionEvent id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the event. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsAnnotatedInteractionEvent type(String type) { + this.type = type; + return this; + } + + /** + * Type of the event. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotatedInteractionEvent + */ + @JsonAnySetter + public LLMObsAnnotatedInteractionEvent putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotatedInteractionEvent object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotatedInteractionEvent llmObsAnnotatedInteractionEvent = + (LLMObsAnnotatedInteractionEvent) o; + return Objects.equals(this.attributes, llmObsAnnotatedInteractionEvent.attributes) + && Objects.equals(this.id, llmObsAnnotatedInteractionEvent.id) + && Objects.equals(this.type, llmObsAnnotatedInteractionEvent.type) + && Objects.equals( + this.additionalProperties, llmObsAnnotatedInteractionEvent.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotatedInteractionEvent {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionResponse.java new file mode 100644 index 00000000000..0f5360a5b95 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionResponse.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a single annotated interaction and its related events. */ +@JsonPropertyOrder({LLMObsAnnotatedInteractionResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotatedInteractionResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsAnnotatedInteractionDataResponse data; + + public LLMObsAnnotatedInteractionResponse() {} + + @JsonCreator + public LLMObsAnnotatedInteractionResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsAnnotatedInteractionDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsAnnotatedInteractionResponse data(LLMObsAnnotatedInteractionDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a single annotated interaction. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotatedInteractionDataResponse getData() { + return data; + } + + public void setData(LLMObsAnnotatedInteractionDataResponse data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotatedInteractionResponse + */ + @JsonAnySetter + public LLMObsAnnotatedInteractionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotatedInteractionResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotatedInteractionResponse llmObsAnnotatedInteractionResponse = + (LLMObsAnnotatedInteractionResponse) o; + return Objects.equals(this.data, llmObsAnnotatedInteractionResponse.data) + && Objects.equals( + this.additionalProperties, llmObsAnnotatedInteractionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotatedInteractionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/agent_observability.feature b/src/test/resources/com/datadog/api/client/v2/api/agent_observability.feature index acf08cf0dd8..8cc3d342377 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/agent_observability.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/agent_observability.feature @@ -782,6 +782,42 @@ Feature: Agent Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get an annotated queue interaction returns "Bad Request" response + Given operation "GetLLMObsAnnotatedInteraction" enabled + And new "GetLLMObsAnnotatedInteraction" request + And request contains "queue_id" parameter from "REPLACE.ME" + And request contains "interaction_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get an annotated queue interaction returns "Not Found" response + Given operation "GetLLMObsAnnotatedInteraction" enabled + And new "GetLLMObsAnnotatedInteraction" request + And request contains "queue_id" parameter from "REPLACE.ME" + And request contains "interaction_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get an annotated queue interaction returns "OK" response + Given operation "GetLLMObsAnnotatedInteraction" enabled + And new "GetLLMObsAnnotatedInteraction" request + And request contains "queue_id" parameter from "REPLACE.ME" + And request contains "interaction_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability @with-pagination + Scenario: Get an annotated queue interaction returns "OK" response with pagination + Given operation "GetLLMObsAnnotatedInteraction" enabled + And new "GetLLMObsAnnotatedInteraction" request + And request contains "queue_id" parameter from "REPLACE.ME" + And request contains "interaction_id" parameter from "REPLACE.ME" + When the request with pagination is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Get annotated interactions by content IDs returns "Bad Request" response Given operation "GetLLMObsAnnotatedInteractionsByTraceIDs" enabled diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 383d0fec6e5..960023eb2f2 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -4636,6 +4636,12 @@ "type": "safe" } }, + "GetLLMObsAnnotatedInteraction": { + "tag": "Agent Observability", + "undo": { + "type": "safe" + } + }, "UpsertLLMObsAnnotations": { "tag": "Agent Observability", "undo": {