From 75e1c3d0185b129a7b162e0ac4614d0ddccda478 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 20 Aug 2026 04:39:15 +0000 Subject: [PATCH] Regenerate client from commit bf15a79 of spec repo --- .generator/schemas/v2/openapi.yaml | 142 +++++++++++++++++- .../CreateLLMObsAnnotationQueue.java | 5 +- .../UpdateLLMObsAnnotationQueue.java | 5 +- .../UpsertLLMObsAnnotations.java | 6 +- .../client/v2/api/LlmObservabilityApi.java | 15 +- ...LLMObsAnnotatedInteractionByTraceItem.java | 29 ++++ .../v2/model/LLMObsAnnotationError.java | 34 ++++- .../v2/model/LLMObsAnnotationErrorCode.java | 60 ++++++++ ...sAnnotationQueueDataAttributesRequest.java | 115 +++++++++++++- ...AnnotationQueueDataAttributesResponse.java | 137 ++++++++++++++++- ...ationQueueUpdateDataAttributesRequest.java | 115 +++++++++++++- ...sDisplayBlockAnnotatedInteractionItem.java | 31 +++- .../LLMObsTraceAnnotatedInteractionItem.java | 30 +++- .../client/v2/api/llm_observability.feature | 14 +- 14 files changed, 708 insertions(+), 30 deletions(-) create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationErrorCode.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 982af418809..7be9692f62b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -55263,6 +55263,10 @@ components: items: $ref: "#/components/schemas/LLMObsAnnotationItem" type: array + can_annotate: + description: Whether the current caller can annotate this interaction. + example: true + type: boolean content_id: description: Upstream entity identifier (trace ID, session ID, or deterministic display_block ID). example: "trace-abc-123" @@ -55301,6 +55305,7 @@ components: - modified_at - queue_id - queue_name + - can_annotate - annotations type: object LLMObsAnnotatedInteractionItem: @@ -55365,6 +55370,7 @@ components: description: List of interactions with their annotations. example: - annotations: [] + can_annotate: true content_id: trace-abc-123 id: "interaction-456" type: trace @@ -55423,6 +55429,8 @@ components: description: ID of the annotation that failed, if applicable. example: "00000000-0000-0000-0000-000000000000" type: string + code: + $ref: "#/components/schemas/LLMObsAnnotationErrorCode" error: description: Error message. example: "interaction not found" @@ -55435,6 +55443,14 @@ components: - interaction_id - error type: object + LLMObsAnnotationErrorCode: + description: Stable error code. `permission_denied` indicates the item was rejected by queue access rules. + enum: + - permission_denied + example: permission_denied + type: string + x-enum-varnames: + - PERMISSION_DENIED LLMObsAnnotationItem: description: A single annotation on an interaction. properties: @@ -55613,6 +55629,21 @@ components: description: Identifier of the project this queue belongs to. example: "00000000-0000-0000-0000-000000000002" type: string + restrict_to_assignees: + description: Whether annotation access is restricted to assigned users. + example: false + type: boolean + restrict_to_reviewers: + description: Whether annotation access is restricted to queue reviewers. + example: true + type: boolean + reviewer_emails: + description: Email addresses of reviewers who can access the annotation queue. + example: + - "reviewer@example.com" + items: + type: string + type: array required: - name - project_id @@ -55622,6 +55653,11 @@ components: properties: annotation_schema: $ref: "#/components/schemas/LLMObsAnnotationSchema" + can_manage_access: + description: Whether the current caller can manage access for the annotation queue. + example: true + readOnly: true + type: boolean created_at: description: Timestamp when the queue was created. example: "2024-01-15T10:30:00Z" @@ -55656,6 +55692,21 @@ components: description: Identifier of the project this queue belongs to. example: "00000000-0000-0000-0000-000000000002" type: string + restrict_to_assignees: + description: Whether annotation access is restricted to assigned users. + example: false + type: boolean + restrict_to_reviewers: + description: Whether annotation access is restricted to queue reviewers. + example: true + type: boolean + reviewer_emails: + description: Email addresses of reviewers for the annotation queue. Returned only when the caller can manage queue access. + example: + - "reviewer@example.com" + items: + type: string + type: array required: - name - project_id @@ -55665,6 +55716,9 @@ components: - modified_by - modified_at - owned_by + - restrict_to_reviewers + - restrict_to_assignees + - can_manage_access type: object LLMObsAnnotationQueueDataRequest: description: Data object for creating an LLM Observability annotation queue. @@ -55881,6 +55935,21 @@ components: description: Updated name of the annotation queue. example: "Updated queue name" type: string + restrict_to_assignees: + description: Whether annotation access is restricted to assigned users. + example: false + type: boolean + restrict_to_reviewers: + description: Whether annotation access is restricted to queue reviewers. + example: true + type: boolean + reviewer_emails: + description: Updated email addresses of reviewers who can access the annotation queue. + example: + - "reviewer@example.com" + items: + type: string + type: array type: object LLMObsAnnotationQueueUpdateDataRequest: description: Data object for updating an LLM Observability annotation queue. @@ -57765,6 +57834,10 @@ components: items: $ref: "#/components/schemas/LLMObsAnnotationItem" type: array + can_annotate: + description: Whether the current caller can annotate this interaction. + example: true + type: boolean content_id: description: Server-generated deterministic identifier derived from the block list. example: "9a87f3e2b1d4c5a6f8b3e2d1c4a7b5f6e3d2a1c4b7e5f8a3d6c2e1b4a7d5f8c2" @@ -57781,6 +57854,7 @@ components: - id - type - content_id + - can_annotate - annotations - display_block type: object @@ -61771,6 +61845,10 @@ components: items: $ref: "#/components/schemas/LLMObsAnnotationItem" type: array + can_annotate: + description: Whether the current caller can annotate this interaction. + example: true + type: boolean content_id: description: Upstream entity identifier supplied by the caller. example: "trace-abc-123" @@ -61797,6 +61875,7 @@ components: - content_id - created_at - modified_at + - can_annotate - annotations type: object LLMObsTraceInteractionItem: @@ -159315,6 +159394,7 @@ paths: value: good modified_at: "0001-01-01T00:00:00Z" modified_by: "00000000-0000-0000-0000-000000000002" + can_annotate: true content_id: trace-abc-123 created_at: "2025-06-01T12:00:00Z" id: interaction-456 @@ -159392,6 +159472,7 @@ paths: value: data: - attributes: + can_manage_access: true created_at: "2024-01-15T10:30:00Z" created_by: 00000000-0000-0000-0000-000000000002 description: Queue for annotating customer support traces @@ -159400,6 +159481,10 @@ paths: name: My annotation queue owned_by: 00000000-0000-0000-0000-000000000002 project_id: 00000000-0000-0000-0000-000000000002 + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com id: 00000000-0000-0000-0000-000000000001 type: queues schema: @@ -159438,6 +159523,7 @@ paths: description: |- Create an annotation queue. The `name` and `project_id` fields are required. An optional `annotation_schema` can be provided to define the labels for the queue. + Optional access-control fields can restrict annotation access to reviewers or assignees. Fields such as `created_by`, `owned_by`, `created_at`, `modified_by`, and `modified_at` are inferred by the backend. operationId: CreateLLMObsAnnotationQueue @@ -159453,6 +159539,19 @@ paths: name: My annotation queue project_id: 00000000-0000-0000-0000-000000000002 type: queues + with_access_controls: + summary: Create queue with access controls + value: + data: + attributes: + description: Queue for annotating customer support traces + name: Restricted annotation queue + project_id: 00000000-0000-0000-0000-000000000002 + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com + type: queues with_schema: summary: Create queue with annotation schema value: @@ -159488,6 +159587,7 @@ paths: value: data: attributes: + can_manage_access: true created_at: "2024-01-15T10:30:00Z" created_by: 00000000-0000-0000-0000-000000000002 description: Queue for annotating customer support traces @@ -159496,6 +159596,10 @@ paths: name: My annotation queue owned_by: 00000000-0000-0000-0000-000000000002 project_id: 00000000-0000-0000-0000-000000000002 + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com id: 00000000-0000-0000-0000-000000000001 type: queues schema: @@ -159570,7 +159674,7 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: description: |- - Partially update an annotation queue. The `name`, `description`, and `annotation_schema` fields can be updated. + Partially update an annotation queue. The `name`, `description`, `annotation_schema`, `reviewer_emails`, `restrict_to_reviewers`, and `restrict_to_assignees` fields can be updated. operationId: UpdateLLMObsAnnotationQueue parameters: - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" @@ -159584,6 +159688,10 @@ paths: attributes: description: Updated description name: Updated queue name + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com type: queues schema: $ref: "#/components/schemas/LLMObsAnnotationQueueUpdateRequest" @@ -159598,6 +159706,7 @@ paths: value: data: attributes: + can_manage_access: true created_at: "2024-01-15T10:30:00Z" created_by: 00000000-0000-0000-0000-000000000002 description: Queue for annotating customer support traces @@ -159606,6 +159715,10 @@ paths: name: My annotation queue owned_by: 00000000-0000-0000-0000-000000000002 project_id: 00000000-0000-0000-0000-000000000002 + restrict_to_assignees: false + restrict_to_reviewers: true + reviewer_emails: + - reviewer@example.com id: 00000000-0000-0000-0000-000000000001 type: queues schema: @@ -159663,6 +159776,7 @@ paths: attributes: annotated_interactions: - annotations: [] + can_annotate: true content_id: trace-abc-123 id: interaction-456 type: trace @@ -159713,6 +159827,7 @@ paths: by `interaction_id` and the requesting user's identity. Results and errors in the response are linked to request items by `interaction_id`. Errors for individual items are returned in the `errors` field without blocking the rest of the batch. + Requests where every item is denied by queue access rules return `403`. operationId: UpsertLLMObsAnnotations parameters: - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" @@ -159757,9 +159872,30 @@ paths: modified_by: 00000000-0000-0000-0000-000000000002 id: 00000000-0000-0000-0000-000000000001 type: annotations + mixed_access_denied: + summary: Some annotations were denied by queue access rules + value: + data: + attributes: + annotations: + - created_at: "2024-01-15T10:30:00Z" + created_by: 00000000-0000-0000-0000-000000000002 + id: 00000000-0000-0000-0000-000000000000 + interaction_id: 00000000-0000-0000-0000-000000000001 + label_values: + - label_schema_id: abc-123 + value: good + modified_at: "2024-01-15T10:30:00Z" + modified_by: 00000000-0000-0000-0000-000000000002 + errors: + - code: permission_denied + error: permission denied + interaction_id: 00000000-0000-0000-0000-000000000003 + id: 00000000-0000-0000-0000-000000000001 + type: annotations schema: $ref: "#/components/schemas/LLMObsAnnotationsResponse" - description: OK — annotations created or updated. Per-item errors are listed in `errors`. + description: OK — annotations created or updated. Mixed batches list denied items and other per-item errors in `errors` "400": content: application/json: @@ -159777,7 +159913,7 @@ paths: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden + description: Forbidden — all request items were denied by queue access rules "404": content: application/json: diff --git a/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.java b/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.java index 9fae258b15b..726f5e60a99 100644 --- a/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.java +++ b/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.java @@ -44,7 +44,10 @@ public static void main(String[] args) { .values(Arrays.asList("good", "bad", "neutral"))))) .description("Queue for annotating customer support traces") .name("My annotation queue") - .projectId("00000000-0000-0000-0000-000000000002")) + .projectId("00000000-0000-0000-0000-000000000002") + .restrictToAssignees(false) + .restrictToReviewers(true) + .reviewerEmails(Collections.singletonList("reviewer@example.com"))) .type(LLMObsAnnotationQueueType.QUEUES)); try { diff --git a/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.java b/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.java index 87be0779fc6..782b098d115 100644 --- a/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.java +++ b/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.java @@ -43,7 +43,10 @@ public static void main(String[] args) { .type(LLMObsLabelSchemaType.SCORE) .values(Arrays.asList("good", "bad", "neutral"))))) .description("Updated description") - .name("Updated queue name")) + .name("Updated queue name") + .restrictToAssignees(false) + .restrictToReviewers(true) + .reviewerEmails(Collections.singletonList("reviewer@example.com"))) .type(LLMObsAnnotationQueueType.QUEUES)); try { diff --git a/examples/v2/llm-observability/UpsertLLMObsAnnotations.java b/examples/v2/llm-observability/UpsertLLMObsAnnotations.java index 9a252be4615..d9629cf1db9 100644 --- a/examples/v2/llm-observability/UpsertLLMObsAnnotations.java +++ b/examples/v2/llm-observability/UpsertLLMObsAnnotations.java @@ -1,6 +1,6 @@ -// Create or update annotations returns "OK — annotations created or updated. Per-item errors are -// listed in `errors`." -// response +// Create or update annotations returns "OK — annotations created or updated. Mixed batches list +// denied items and other +// per-item errors in `errors`" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java b/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java index d3020ac8b20..ac1ba3900f2 100644 --- a/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java @@ -725,7 +725,8 @@ public CompletableFuture createLLMObsAnnotationQu /** * Create an annotation queue. The name and project_id fields are * required. An optional annotation_schema can be provided to define the labels for - * the queue. Fields such as created_by, owned_by, created_at + * the queue. Optional access-control fields can restrict annotation access to reviewers or + * assignees. Fields such as created_by, owned_by, created_at * , modified_by, and modified_at are inferred by the backend. * * @param body Create annotation queue payload. (required) @@ -11668,8 +11669,9 @@ public CompletableFuture updateLLMObsAnnotationQu } /** - * Partially update an annotation queue. The name, description, and - * annotation_schema fields can be updated. + * Partially update an annotation queue. The name, description, + * annotation_schema, reviewer_emails, restrict_to_reviewers, and + * restrict_to_assignees fields can be updated. * * @param queueId The ID of the LLM Observability annotation queue. (required) * @param body Update annotation queue payload. (required) @@ -13711,7 +13713,8 @@ public CompletableFuture upsertLLMObsAnnotationsAsync * Create or update annotations on interactions in a queue. Each annotation is matched by * interaction_id and the requesting user's identity. Results and errors in the response * are linked to request items by interaction_id. Errors for individual items are - * returned in the errors field without blocking the rest of the batch. + * returned in the errors field without blocking the rest of the batch. Requests + * where every item is denied by queue access rules return 403. * * @param queueId The ID of the LLM Observability annotation queue. (required) * @param body Payload for creating or updating annotations. (required) @@ -13721,10 +13724,10 @@ public CompletableFuture upsertLLMObsAnnotationsAsync * * * - * + * * * - * + * * * *
Response details
Status Code Description Response Headers
200 OK — annotations created or updated. Per-item errors are listed in `errors`. -
200 OK — annotations created or updated. Mixed batches list denied items and other per-item errors in `errors` -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
403 Forbidden — all request items were denied by queue access rules -
404 Not Found — the queue does not exist. -
429 Too many requests -
diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionByTraceItem.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionByTraceItem.java index 665600218fa..7c7aea80267 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionByTraceItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionByTraceItem.java @@ -25,6 +25,7 @@ */ @JsonPropertyOrder({ LLMObsAnnotatedInteractionByTraceItem.JSON_PROPERTY_ANNOTATIONS, + LLMObsAnnotatedInteractionByTraceItem.JSON_PROPERTY_CAN_ANNOTATE, LLMObsAnnotatedInteractionByTraceItem.JSON_PROPERTY_CONTENT_ID, LLMObsAnnotatedInteractionByTraceItem.JSON_PROPERTY_CREATED_AT, LLMObsAnnotatedInteractionByTraceItem.JSON_PROPERTY_DISPLAY_BLOCK, @@ -41,6 +42,9 @@ public class LLMObsAnnotatedInteractionByTraceItem { public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; private List annotations = new ArrayList<>(); + public static final String JSON_PROPERTY_CAN_ANNOTATE = "can_annotate"; + private Boolean canAnnotate; + public static final String JSON_PROPERTY_CONTENT_ID = "content_id"; private String contentId; @@ -71,6 +75,7 @@ public LLMObsAnnotatedInteractionByTraceItem() {} public LLMObsAnnotatedInteractionByTraceItem( @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATIONS) List annotations, + @JsonProperty(required = true, value = JSON_PROPERTY_CAN_ANNOTATE) Boolean canAnnotate, @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT_ID) String contentId, @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, @@ -82,6 +87,7 @@ public LLMObsAnnotatedInteractionByTraceItem( for (LLMObsAnnotationItem item : annotations) { this.unparsed |= item.unparsed; } + this.canAnnotate = canAnnotate; this.contentId = contentId; this.createdAt = createdAt; this.id = id; @@ -127,6 +133,26 @@ public void setAnnotations(List annotations) { } } + public LLMObsAnnotatedInteractionByTraceItem canAnnotate(Boolean canAnnotate) { + this.canAnnotate = canAnnotate; + return this; + } + + /** + * Whether the current caller can annotate this interaction. + * + * @return canAnnotate + */ + @JsonProperty(JSON_PROPERTY_CAN_ANNOTATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getCanAnnotate() { + return canAnnotate; + } + + public void setCanAnnotate(Boolean canAnnotate) { + this.canAnnotate = canAnnotate; + } + public LLMObsAnnotatedInteractionByTraceItem contentId(String contentId) { this.contentId = contentId; return this; @@ -371,6 +397,7 @@ public boolean equals(Object o) { LLMObsAnnotatedInteractionByTraceItem llmObsAnnotatedInteractionByTraceItem = (LLMObsAnnotatedInteractionByTraceItem) o; return Objects.equals(this.annotations, llmObsAnnotatedInteractionByTraceItem.annotations) + && Objects.equals(this.canAnnotate, llmObsAnnotatedInteractionByTraceItem.canAnnotate) && Objects.equals(this.contentId, llmObsAnnotatedInteractionByTraceItem.contentId) && Objects.equals(this.createdAt, llmObsAnnotatedInteractionByTraceItem.createdAt) && Objects.equals(this.displayBlock, llmObsAnnotatedInteractionByTraceItem.displayBlock) @@ -387,6 +414,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( annotations, + canAnnotate, contentId, createdAt, displayBlock, @@ -403,6 +431,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsAnnotatedInteractionByTraceItem {\n"); sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" canAnnotate: ").append(toIndentedString(canAnnotate)).append("\n"); sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" displayBlock: ").append(toIndentedString(displayBlock)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationError.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationError.java index 86c8f4e21bc..266dc6e97d2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationError.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationError.java @@ -20,6 +20,7 @@ /** A partial error for a single annotation that could not be processed. */ @JsonPropertyOrder({ LLMObsAnnotationError.JSON_PROPERTY_ANNOTATION_ID, + LLMObsAnnotationError.JSON_PROPERTY_CODE, LLMObsAnnotationError.JSON_PROPERTY_ERROR, LLMObsAnnotationError.JSON_PROPERTY_INTERACTION_ID }) @@ -30,6 +31,9 @@ public class LLMObsAnnotationError { public static final String JSON_PROPERTY_ANNOTATION_ID = "annotation_id"; private String annotationId; + public static final String JSON_PROPERTY_CODE = "code"; + private LLMObsAnnotationErrorCode code; + public static final String JSON_PROPERTY_ERROR = "error"; private String error; @@ -67,6 +71,32 @@ public void setAnnotationId(String annotationId) { this.annotationId = annotationId; } + public LLMObsAnnotationError code(LLMObsAnnotationErrorCode code) { + this.code = code; + this.unparsed |= !code.isValid(); + return this; + } + + /** + * Stable error code. permission_denied indicates the item was rejected by queue + * access rules. + * + * @return code + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsAnnotationErrorCode getCode() { + return code; + } + + public void setCode(LLMObsAnnotationErrorCode code) { + if (!code.isValid()) { + this.unparsed = true; + } + this.code = code; + } + public LLMObsAnnotationError error(String error) { this.error = error; return this; @@ -164,6 +194,7 @@ public boolean equals(Object o) { } LLMObsAnnotationError llmObsAnnotationError = (LLMObsAnnotationError) o; return Objects.equals(this.annotationId, llmObsAnnotationError.annotationId) + && Objects.equals(this.code, llmObsAnnotationError.code) && Objects.equals(this.error, llmObsAnnotationError.error) && Objects.equals(this.interactionId, llmObsAnnotationError.interactionId) && Objects.equals(this.additionalProperties, llmObsAnnotationError.additionalProperties); @@ -171,7 +202,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(annotationId, error, interactionId, additionalProperties); + return Objects.hash(annotationId, code, error, interactionId, additionalProperties); } @Override @@ -179,6 +210,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsAnnotationError {\n"); sb.append(" annotationId: ").append(toIndentedString(annotationId)).append("\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" error: ").append(toIndentedString(error)).append("\n"); sb.append(" interactionId: ").append(toIndentedString(interactionId)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationErrorCode.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationErrorCode.java new file mode 100644 index 00000000000..240eecd8b9f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationErrorCode.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Stable error code. permission_denied indicates the item was rejected by queue access + * rules. + */ +@JsonSerialize(using = LLMObsAnnotationErrorCode.LLMObsAnnotationErrorCodeSerializer.class) +public class LLMObsAnnotationErrorCode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("permission_denied")); + + public static final LLMObsAnnotationErrorCode PERMISSION_DENIED = + new LLMObsAnnotationErrorCode("permission_denied"); + + LLMObsAnnotationErrorCode(String value) { + super(value, allowedValues); + } + + public static class LLMObsAnnotationErrorCodeSerializer + extends StdSerializer { + public LLMObsAnnotationErrorCodeSerializer(Class t) { + super(t); + } + + public LLMObsAnnotationErrorCodeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsAnnotationErrorCode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsAnnotationErrorCode fromValue(String value) { + return new LLMObsAnnotationErrorCode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueDataAttributesRequest.java index 06600a05316..74937ed7ca3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueDataAttributesRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueDataAttributesRequest.java @@ -13,7 +13,9 @@ 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; @@ -22,7 +24,10 @@ LLMObsAnnotationQueueDataAttributesRequest.JSON_PROPERTY_ANNOTATION_SCHEMA, LLMObsAnnotationQueueDataAttributesRequest.JSON_PROPERTY_DESCRIPTION, LLMObsAnnotationQueueDataAttributesRequest.JSON_PROPERTY_NAME, - LLMObsAnnotationQueueDataAttributesRequest.JSON_PROPERTY_PROJECT_ID + LLMObsAnnotationQueueDataAttributesRequest.JSON_PROPERTY_PROJECT_ID, + LLMObsAnnotationQueueDataAttributesRequest.JSON_PROPERTY_RESTRICT_TO_ASSIGNEES, + LLMObsAnnotationQueueDataAttributesRequest.JSON_PROPERTY_RESTRICT_TO_REVIEWERS, + LLMObsAnnotationQueueDataAttributesRequest.JSON_PROPERTY_REVIEWER_EMAILS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -40,6 +45,15 @@ public class LLMObsAnnotationQueueDataAttributesRequest { public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; private String projectId; + public static final String JSON_PROPERTY_RESTRICT_TO_ASSIGNEES = "restrict_to_assignees"; + private Boolean restrictToAssignees; + + public static final String JSON_PROPERTY_RESTRICT_TO_REVIEWERS = "restrict_to_reviewers"; + private Boolean restrictToReviewers; + + public static final String JSON_PROPERTY_REVIEWER_EMAILS = "reviewer_emails"; + private List reviewerEmails = null; + public LLMObsAnnotationQueueDataAttributesRequest() {} @JsonCreator @@ -137,6 +151,80 @@ public void setProjectId(String projectId) { this.projectId = projectId; } + public LLMObsAnnotationQueueDataAttributesRequest restrictToAssignees( + Boolean restrictToAssignees) { + this.restrictToAssignees = restrictToAssignees; + return this; + } + + /** + * Whether annotation access is restricted to assigned users. + * + * @return restrictToAssignees + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICT_TO_ASSIGNEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRestrictToAssignees() { + return restrictToAssignees; + } + + public void setRestrictToAssignees(Boolean restrictToAssignees) { + this.restrictToAssignees = restrictToAssignees; + } + + public LLMObsAnnotationQueueDataAttributesRequest restrictToReviewers( + Boolean restrictToReviewers) { + this.restrictToReviewers = restrictToReviewers; + return this; + } + + /** + * Whether annotation access is restricted to queue reviewers. + * + * @return restrictToReviewers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICT_TO_REVIEWERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRestrictToReviewers() { + return restrictToReviewers; + } + + public void setRestrictToReviewers(Boolean restrictToReviewers) { + this.restrictToReviewers = restrictToReviewers; + } + + public LLMObsAnnotationQueueDataAttributesRequest reviewerEmails(List reviewerEmails) { + this.reviewerEmails = reviewerEmails; + return this; + } + + public LLMObsAnnotationQueueDataAttributesRequest addReviewerEmailsItem( + String reviewerEmailsItem) { + if (this.reviewerEmails == null) { + this.reviewerEmails = new ArrayList<>(); + } + this.reviewerEmails.add(reviewerEmailsItem); + return this; + } + + /** + * Email addresses of reviewers who can access the annotation queue. + * + * @return reviewerEmails + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVIEWER_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReviewerEmails() { + return reviewerEmails; + } + + public void setReviewerEmails(List reviewerEmails) { + this.reviewerEmails = reviewerEmails; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -200,6 +288,14 @@ public boolean equals(Object o) { && Objects.equals(this.description, llmObsAnnotationQueueDataAttributesRequest.description) && Objects.equals(this.name, llmObsAnnotationQueueDataAttributesRequest.name) && Objects.equals(this.projectId, llmObsAnnotationQueueDataAttributesRequest.projectId) + && Objects.equals( + this.restrictToAssignees, + llmObsAnnotationQueueDataAttributesRequest.restrictToAssignees) + && Objects.equals( + this.restrictToReviewers, + llmObsAnnotationQueueDataAttributesRequest.restrictToReviewers) + && Objects.equals( + this.reviewerEmails, llmObsAnnotationQueueDataAttributesRequest.reviewerEmails) && Objects.equals( this.additionalProperties, llmObsAnnotationQueueDataAttributesRequest.additionalProperties); @@ -207,7 +303,15 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(annotationSchema, description, name, projectId, additionalProperties); + return Objects.hash( + annotationSchema, + description, + name, + projectId, + restrictToAssignees, + restrictToReviewers, + reviewerEmails, + additionalProperties); } @Override @@ -218,6 +322,13 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" restrictToAssignees: ") + .append(toIndentedString(restrictToAssignees)) + .append("\n"); + sb.append(" restrictToReviewers: ") + .append(toIndentedString(restrictToReviewers)) + .append("\n"); + sb.append(" reviewerEmails: ").append(toIndentedString(reviewerEmails)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueDataAttributesResponse.java index d00b09306ad..de9ff729714 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueDataAttributesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueDataAttributesResponse.java @@ -14,13 +14,16 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; /** Attributes of an LLM Observability annotation queue. */ @JsonPropertyOrder({ LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_ANNOTATION_SCHEMA, + LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_CAN_MANAGE_ACCESS, LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_CREATED_AT, LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_CREATED_BY, LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_DESCRIPTION, @@ -28,7 +31,10 @@ LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_MODIFIED_BY, LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_NAME, LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_OWNED_BY, - LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_PROJECT_ID + LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_PROJECT_ID, + LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_RESTRICT_TO_ASSIGNEES, + LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_RESTRICT_TO_REVIEWERS, + LLMObsAnnotationQueueDataAttributesResponse.JSON_PROPERTY_REVIEWER_EMAILS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -37,6 +43,9 @@ public class LLMObsAnnotationQueueDataAttributesResponse { public static final String JSON_PROPERTY_ANNOTATION_SCHEMA = "annotation_schema"; private LLMObsAnnotationSchema annotationSchema; + public static final String JSON_PROPERTY_CAN_MANAGE_ACCESS = "can_manage_access"; + private Boolean canManageAccess; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private OffsetDateTime createdAt; @@ -61,10 +70,21 @@ public class LLMObsAnnotationQueueDataAttributesResponse { public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; private String projectId; + public static final String JSON_PROPERTY_RESTRICT_TO_ASSIGNEES = "restrict_to_assignees"; + private Boolean restrictToAssignees; + + public static final String JSON_PROPERTY_RESTRICT_TO_REVIEWERS = "restrict_to_reviewers"; + private Boolean restrictToReviewers; + + public static final String JSON_PROPERTY_REVIEWER_EMAILS = "reviewer_emails"; + private List reviewerEmails = null; + public LLMObsAnnotationQueueDataAttributesResponse() {} @JsonCreator public LLMObsAnnotationQueueDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CAN_MANAGE_ACCESS) + Boolean canManageAccess, @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY) String createdBy, @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, @@ -72,7 +92,12 @@ public LLMObsAnnotationQueueDataAttributesResponse( @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_BY) String modifiedBy, @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, @JsonProperty(required = true, value = JSON_PROPERTY_OWNED_BY) String ownedBy, - @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_ID) String projectId) { + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_ID) String projectId, + @JsonProperty(required = true, value = JSON_PROPERTY_RESTRICT_TO_ASSIGNEES) + Boolean restrictToAssignees, + @JsonProperty(required = true, value = JSON_PROPERTY_RESTRICT_TO_REVIEWERS) + Boolean restrictToReviewers) { + this.canManageAccess = canManageAccess; this.createdAt = createdAt; this.createdBy = createdBy; this.description = description; @@ -81,6 +106,8 @@ public LLMObsAnnotationQueueDataAttributesResponse( this.name = name; this.ownedBy = ownedBy; this.projectId = projectId; + this.restrictToAssignees = restrictToAssignees; + this.restrictToReviewers = restrictToReviewers; } public LLMObsAnnotationQueueDataAttributesResponse annotationSchema( @@ -109,6 +136,17 @@ public void setAnnotationSchema(LLMObsAnnotationSchema annotationSchema) { } } + /** + * Whether the current caller can manage access for the annotation queue. + * + * @return canManageAccess + */ + @JsonProperty(JSON_PROPERTY_CAN_MANAGE_ACCESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getCanManageAccess() { + return canManageAccess; + } + public LLMObsAnnotationQueueDataAttributesResponse createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; return this; @@ -269,6 +307,79 @@ public void setProjectId(String projectId) { this.projectId = projectId; } + public LLMObsAnnotationQueueDataAttributesResponse restrictToAssignees( + Boolean restrictToAssignees) { + this.restrictToAssignees = restrictToAssignees; + return this; + } + + /** + * Whether annotation access is restricted to assigned users. + * + * @return restrictToAssignees + */ + @JsonProperty(JSON_PROPERTY_RESTRICT_TO_ASSIGNEES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRestrictToAssignees() { + return restrictToAssignees; + } + + public void setRestrictToAssignees(Boolean restrictToAssignees) { + this.restrictToAssignees = restrictToAssignees; + } + + public LLMObsAnnotationQueueDataAttributesResponse restrictToReviewers( + Boolean restrictToReviewers) { + this.restrictToReviewers = restrictToReviewers; + return this; + } + + /** + * Whether annotation access is restricted to queue reviewers. + * + * @return restrictToReviewers + */ + @JsonProperty(JSON_PROPERTY_RESTRICT_TO_REVIEWERS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRestrictToReviewers() { + return restrictToReviewers; + } + + public void setRestrictToReviewers(Boolean restrictToReviewers) { + this.restrictToReviewers = restrictToReviewers; + } + + public LLMObsAnnotationQueueDataAttributesResponse reviewerEmails(List reviewerEmails) { + this.reviewerEmails = reviewerEmails; + return this; + } + + public LLMObsAnnotationQueueDataAttributesResponse addReviewerEmailsItem( + String reviewerEmailsItem) { + if (this.reviewerEmails == null) { + this.reviewerEmails = new ArrayList<>(); + } + this.reviewerEmails.add(reviewerEmailsItem); + return this; + } + + /** + * Email addresses of reviewers for the annotation queue. Returned only when the caller can manage + * queue access. + * + * @return reviewerEmails + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVIEWER_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReviewerEmails() { + return reviewerEmails; + } + + public void setReviewerEmails(List reviewerEmails) { + this.reviewerEmails = reviewerEmails; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -329,6 +440,8 @@ public boolean equals(Object o) { (LLMObsAnnotationQueueDataAttributesResponse) o; return Objects.equals( this.annotationSchema, llmObsAnnotationQueueDataAttributesResponse.annotationSchema) + && Objects.equals( + this.canManageAccess, llmObsAnnotationQueueDataAttributesResponse.canManageAccess) && Objects.equals(this.createdAt, llmObsAnnotationQueueDataAttributesResponse.createdAt) && Objects.equals(this.createdBy, llmObsAnnotationQueueDataAttributesResponse.createdBy) && Objects.equals(this.description, llmObsAnnotationQueueDataAttributesResponse.description) @@ -337,6 +450,14 @@ public boolean equals(Object o) { && Objects.equals(this.name, llmObsAnnotationQueueDataAttributesResponse.name) && Objects.equals(this.ownedBy, llmObsAnnotationQueueDataAttributesResponse.ownedBy) && Objects.equals(this.projectId, llmObsAnnotationQueueDataAttributesResponse.projectId) + && Objects.equals( + this.restrictToAssignees, + llmObsAnnotationQueueDataAttributesResponse.restrictToAssignees) + && Objects.equals( + this.restrictToReviewers, + llmObsAnnotationQueueDataAttributesResponse.restrictToReviewers) + && Objects.equals( + this.reviewerEmails, llmObsAnnotationQueueDataAttributesResponse.reviewerEmails) && Objects.equals( this.additionalProperties, llmObsAnnotationQueueDataAttributesResponse.additionalProperties); @@ -346,6 +467,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( annotationSchema, + canManageAccess, createdAt, createdBy, description, @@ -354,6 +476,9 @@ public int hashCode() { name, ownedBy, projectId, + restrictToAssignees, + restrictToReviewers, + reviewerEmails, additionalProperties); } @@ -362,6 +487,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsAnnotationQueueDataAttributesResponse {\n"); sb.append(" annotationSchema: ").append(toIndentedString(annotationSchema)).append("\n"); + sb.append(" canManageAccess: ").append(toIndentedString(canManageAccess)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); @@ -370,6 +496,13 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" ownedBy: ").append(toIndentedString(ownedBy)).append("\n"); sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" restrictToAssignees: ") + .append(toIndentedString(restrictToAssignees)) + .append("\n"); + sb.append(" restrictToReviewers: ") + .append(toIndentedString(restrictToReviewers)) + .append("\n"); + sb.append(" reviewerEmails: ").append(toIndentedString(reviewerEmails)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueUpdateDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueUpdateDataAttributesRequest.java index 65a83de5845..aa9949da7bb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueUpdateDataAttributesRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationQueueUpdateDataAttributesRequest.java @@ -12,7 +12,9 @@ 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; @@ -20,7 +22,10 @@ @JsonPropertyOrder({ LLMObsAnnotationQueueUpdateDataAttributesRequest.JSON_PROPERTY_ANNOTATION_SCHEMA, LLMObsAnnotationQueueUpdateDataAttributesRequest.JSON_PROPERTY_DESCRIPTION, - LLMObsAnnotationQueueUpdateDataAttributesRequest.JSON_PROPERTY_NAME + LLMObsAnnotationQueueUpdateDataAttributesRequest.JSON_PROPERTY_NAME, + LLMObsAnnotationQueueUpdateDataAttributesRequest.JSON_PROPERTY_RESTRICT_TO_ASSIGNEES, + LLMObsAnnotationQueueUpdateDataAttributesRequest.JSON_PROPERTY_RESTRICT_TO_REVIEWERS, + LLMObsAnnotationQueueUpdateDataAttributesRequest.JSON_PROPERTY_REVIEWER_EMAILS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -35,6 +40,15 @@ public class LLMObsAnnotationQueueUpdateDataAttributesRequest { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_RESTRICT_TO_ASSIGNEES = "restrict_to_assignees"; + private Boolean restrictToAssignees; + + public static final String JSON_PROPERTY_RESTRICT_TO_REVIEWERS = "restrict_to_reviewers"; + private Boolean restrictToReviewers; + + public static final String JSON_PROPERTY_REVIEWER_EMAILS = "reviewer_emails"; + private List reviewerEmails = null; + public LLMObsAnnotationQueueUpdateDataAttributesRequest annotationSchema( LLMObsAnnotationSchema annotationSchema) { this.annotationSchema = annotationSchema; @@ -103,6 +117,81 @@ public void setName(String name) { this.name = name; } + public LLMObsAnnotationQueueUpdateDataAttributesRequest restrictToAssignees( + Boolean restrictToAssignees) { + this.restrictToAssignees = restrictToAssignees; + return this; + } + + /** + * Whether annotation access is restricted to assigned users. + * + * @return restrictToAssignees + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICT_TO_ASSIGNEES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRestrictToAssignees() { + return restrictToAssignees; + } + + public void setRestrictToAssignees(Boolean restrictToAssignees) { + this.restrictToAssignees = restrictToAssignees; + } + + public LLMObsAnnotationQueueUpdateDataAttributesRequest restrictToReviewers( + Boolean restrictToReviewers) { + this.restrictToReviewers = restrictToReviewers; + return this; + } + + /** + * Whether annotation access is restricted to queue reviewers. + * + * @return restrictToReviewers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESTRICT_TO_REVIEWERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRestrictToReviewers() { + return restrictToReviewers; + } + + public void setRestrictToReviewers(Boolean restrictToReviewers) { + this.restrictToReviewers = restrictToReviewers; + } + + public LLMObsAnnotationQueueUpdateDataAttributesRequest reviewerEmails( + List reviewerEmails) { + this.reviewerEmails = reviewerEmails; + return this; + } + + public LLMObsAnnotationQueueUpdateDataAttributesRequest addReviewerEmailsItem( + String reviewerEmailsItem) { + if (this.reviewerEmails == null) { + this.reviewerEmails = new ArrayList<>(); + } + this.reviewerEmails.add(reviewerEmailsItem); + return this; + } + + /** + * Updated email addresses of reviewers who can access the annotation queue. + * + * @return reviewerEmails + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REVIEWER_EMAILS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getReviewerEmails() { + return reviewerEmails; + } + + public void setReviewerEmails(List reviewerEmails) { + this.reviewerEmails = reviewerEmails; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -168,6 +257,14 @@ public boolean equals(Object o) { && Objects.equals( this.description, llmObsAnnotationQueueUpdateDataAttributesRequest.description) && Objects.equals(this.name, llmObsAnnotationQueueUpdateDataAttributesRequest.name) + && Objects.equals( + this.restrictToAssignees, + llmObsAnnotationQueueUpdateDataAttributesRequest.restrictToAssignees) + && Objects.equals( + this.restrictToReviewers, + llmObsAnnotationQueueUpdateDataAttributesRequest.restrictToReviewers) + && Objects.equals( + this.reviewerEmails, llmObsAnnotationQueueUpdateDataAttributesRequest.reviewerEmails) && Objects.equals( this.additionalProperties, llmObsAnnotationQueueUpdateDataAttributesRequest.additionalProperties); @@ -175,7 +272,14 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(annotationSchema, description, name, additionalProperties); + return Objects.hash( + annotationSchema, + description, + name, + restrictToAssignees, + restrictToReviewers, + reviewerEmails, + additionalProperties); } @Override @@ -185,6 +289,13 @@ public String toString() { sb.append(" annotationSchema: ").append(toIndentedString(annotationSchema)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" restrictToAssignees: ") + .append(toIndentedString(restrictToAssignees)) + .append("\n"); + sb.append(" restrictToReviewers: ") + .append(toIndentedString(restrictToReviewers)) + .append("\n"); + sb.append(" reviewerEmails: ").append(toIndentedString(reviewerEmails)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDisplayBlockAnnotatedInteractionItem.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDisplayBlockAnnotatedInteractionItem.java index 7ff7cbe79bf..2d3e7f4b05a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsDisplayBlockAnnotatedInteractionItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDisplayBlockAnnotatedInteractionItem.java @@ -22,6 +22,7 @@ /** A display_block interaction with its associated annotations. */ @JsonPropertyOrder({ LLMObsDisplayBlockAnnotatedInteractionItem.JSON_PROPERTY_ANNOTATIONS, + LLMObsDisplayBlockAnnotatedInteractionItem.JSON_PROPERTY_CAN_ANNOTATE, LLMObsDisplayBlockAnnotatedInteractionItem.JSON_PROPERTY_CONTENT_ID, LLMObsDisplayBlockAnnotatedInteractionItem.JSON_PROPERTY_DISPLAY_BLOCK, LLMObsDisplayBlockAnnotatedInteractionItem.JSON_PROPERTY_ID, @@ -34,6 +35,9 @@ public class LLMObsDisplayBlockAnnotatedInteractionItem { public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; private List annotations = new ArrayList<>(); + public static final String JSON_PROPERTY_CAN_ANNOTATE = "can_annotate"; + private Boolean canAnnotate; + public static final String JSON_PROPERTY_CONTENT_ID = "content_id"; private String contentId; @@ -52,6 +56,7 @@ public LLMObsDisplayBlockAnnotatedInteractionItem() {} public LLMObsDisplayBlockAnnotatedInteractionItem( @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATIONS) List annotations, + @JsonProperty(required = true, value = JSON_PROPERTY_CAN_ANNOTATE) Boolean canAnnotate, @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT_ID) String contentId, @JsonProperty(required = true, value = JSON_PROPERTY_DISPLAY_BLOCK) List displayBlock, @@ -62,6 +67,7 @@ public LLMObsDisplayBlockAnnotatedInteractionItem( for (LLMObsAnnotationItem item : annotations) { this.unparsed |= item.unparsed; } + this.canAnnotate = canAnnotate; this.contentId = contentId; this.displayBlock = displayBlock; for (LLMObsContentBlock item : displayBlock) { @@ -108,6 +114,26 @@ public void setAnnotations(List annotations) { } } + public LLMObsDisplayBlockAnnotatedInteractionItem canAnnotate(Boolean canAnnotate) { + this.canAnnotate = canAnnotate; + return this; + } + + /** + * Whether the current caller can annotate this interaction. + * + * @return canAnnotate + */ + @JsonProperty(JSON_PROPERTY_CAN_ANNOTATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getCanAnnotate() { + return canAnnotate; + } + + public void setCanAnnotate(Boolean canAnnotate) { + this.canAnnotate = canAnnotate; + } + public LLMObsDisplayBlockAnnotatedInteractionItem contentId(String contentId) { this.contentId = contentId; return this; @@ -268,6 +294,7 @@ public boolean equals(Object o) { LLMObsDisplayBlockAnnotatedInteractionItem llmObsDisplayBlockAnnotatedInteractionItem = (LLMObsDisplayBlockAnnotatedInteractionItem) o; return Objects.equals(this.annotations, llmObsDisplayBlockAnnotatedInteractionItem.annotations) + && Objects.equals(this.canAnnotate, llmObsDisplayBlockAnnotatedInteractionItem.canAnnotate) && Objects.equals(this.contentId, llmObsDisplayBlockAnnotatedInteractionItem.contentId) && Objects.equals( this.displayBlock, llmObsDisplayBlockAnnotatedInteractionItem.displayBlock) @@ -280,7 +307,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(annotations, contentId, displayBlock, id, type, additionalProperties); + return Objects.hash( + annotations, canAnnotate, contentId, displayBlock, id, type, additionalProperties); } @Override @@ -288,6 +316,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsDisplayBlockAnnotatedInteractionItem {\n"); sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" canAnnotate: ").append(toIndentedString(canAnnotate)).append("\n"); sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); sb.append(" displayBlock: ").append(toIndentedString(displayBlock)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsTraceAnnotatedInteractionItem.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsTraceAnnotatedInteractionItem.java index 61ba73876ce..456019d5b26 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsTraceAnnotatedInteractionItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsTraceAnnotatedInteractionItem.java @@ -23,6 +23,7 @@ /** A trace, experiment trace, or session interaction with its associated annotations. */ @JsonPropertyOrder({ LLMObsTraceAnnotatedInteractionItem.JSON_PROPERTY_ANNOTATIONS, + LLMObsTraceAnnotatedInteractionItem.JSON_PROPERTY_CAN_ANNOTATE, LLMObsTraceAnnotatedInteractionItem.JSON_PROPERTY_CONTENT_ID, LLMObsTraceAnnotatedInteractionItem.JSON_PROPERTY_CREATED_AT, LLMObsTraceAnnotatedInteractionItem.JSON_PROPERTY_ID, @@ -36,6 +37,9 @@ public class LLMObsTraceAnnotatedInteractionItem { public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; private List annotations = new ArrayList<>(); + public static final String JSON_PROPERTY_CAN_ANNOTATE = "can_annotate"; + private Boolean canAnnotate; + public static final String JSON_PROPERTY_CONTENT_ID = "content_id"; private String contentId; @@ -57,6 +61,7 @@ public LLMObsTraceAnnotatedInteractionItem() {} public LLMObsTraceAnnotatedInteractionItem( @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATIONS) List annotations, + @JsonProperty(required = true, value = JSON_PROPERTY_CAN_ANNOTATE) Boolean canAnnotate, @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT_ID) String contentId, @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, @@ -66,6 +71,7 @@ public LLMObsTraceAnnotatedInteractionItem( for (LLMObsAnnotationItem item : annotations) { this.unparsed |= item.unparsed; } + this.canAnnotate = canAnnotate; this.contentId = contentId; this.createdAt = createdAt; this.id = id; @@ -109,6 +115,26 @@ public void setAnnotations(List annotations) { } } + public LLMObsTraceAnnotatedInteractionItem canAnnotate(Boolean canAnnotate) { + this.canAnnotate = canAnnotate; + return this; + } + + /** + * Whether the current caller can annotate this interaction. + * + * @return canAnnotate + */ + @JsonProperty(JSON_PROPERTY_CAN_ANNOTATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getCanAnnotate() { + return canAnnotate; + } + + public void setCanAnnotate(Boolean canAnnotate) { + this.canAnnotate = canAnnotate; + } + public LLMObsTraceAnnotatedInteractionItem contentId(String contentId) { this.contentId = contentId; return this; @@ -271,6 +297,7 @@ public boolean equals(Object o) { LLMObsTraceAnnotatedInteractionItem llmObsTraceAnnotatedInteractionItem = (LLMObsTraceAnnotatedInteractionItem) o; return Objects.equals(this.annotations, llmObsTraceAnnotatedInteractionItem.annotations) + && Objects.equals(this.canAnnotate, llmObsTraceAnnotatedInteractionItem.canAnnotate) && Objects.equals(this.contentId, llmObsTraceAnnotatedInteractionItem.contentId) && Objects.equals(this.createdAt, llmObsTraceAnnotatedInteractionItem.createdAt) && Objects.equals(this.id, llmObsTraceAnnotatedInteractionItem.id) @@ -283,7 +310,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - annotations, contentId, createdAt, id, modifiedAt, type, additionalProperties); + annotations, canAnnotate, contentId, createdAt, id, modifiedAt, type, additionalProperties); } @Override @@ -291,6 +318,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsTraceAnnotatedInteractionItem {\n"); sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" canAnnotate: ").append(toIndentedString(canAnnotate)).append("\n"); sb.append(" contentId: ").append(toIndentedString(contentId)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); diff --git a/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature b/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature index 8cb53cdc5a9..0ad39189a69 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature @@ -212,7 +212,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability annotation queue returns "Bad Request" response Given operation "CreateLLMObsAnnotationQueue" enabled And new "CreateLLMObsAnnotationQueue" request - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "00000000-0000-0000-0000-000000000002"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "00000000-0000-0000-0000-000000000002", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 400 Bad Request @@ -220,7 +220,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability annotation queue returns "Created" response Given operation "CreateLLMObsAnnotationQueue" enabled And new "CreateLLMObsAnnotationQueue" request - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "00000000-0000-0000-0000-000000000002"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "00000000-0000-0000-0000-000000000002", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 201 Created @@ -412,13 +412,13 @@ Feature: LLM Observability Then the response status is 404 Not Found — the queue does not exist. @generated @skip @team:DataDog/ml-observability - Scenario: Create or update annotations returns "OK — annotations created or updated. Per-item errors are listed in `errors`." response + Scenario: Create or update annotations returns "OK — annotations created or updated. Mixed batches list denied items and other per-item errors in `errors`" response Given operation "UpsertLLMObsAnnotations" enabled And new "UpsertLLMObsAnnotations" request And request contains "queue_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"annotations": [{"interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}} When the request is sent - Then the response status is 200 OK — annotations created or updated. Per-item errors are listed in `errors`. + Then the response status is 200 OK — annotations created or updated. Mixed batches list denied items and other per-item errors in `errors` @generated @skip @team:DataDog/ml-observability Scenario: Delete LLM Observability dataset records returns "Bad Request" response @@ -1522,7 +1522,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsAnnotationQueue" enabled And new "UpdateLLMObsAnnotationQueue" request And request contains "queue_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 400 Bad Request @@ -1531,7 +1531,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsAnnotationQueue" enabled And new "UpdateLLMObsAnnotationQueue" request And request contains "queue_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 404 Not Found @@ -1540,7 +1540,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsAnnotationQueue" enabled And new "UpdateLLMObsAnnotationQueue" request And request contains "queue_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}} + And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "abc-123", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name", "restrict_to_assignees": false, "restrict_to_reviewers": true, "reviewer_emails": ["reviewer@example.com"]}, "type": "queues"}} When the request is sent Then the response status is 200 OK