From 782a5d0d493a7485979f7340e8419b50bc922b94 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 22 May 2026 14:47:09 +0000 Subject: [PATCH] Regenerate client from commit 53cfe12 of spec repo --- .generator/schemas/v2/openapi.yaml | 210 +++++++++++++ ...etLLMObsAnnotatedInteractionsByTraceIDs.rb | 8 + features/scenarios_model_mapping.rb | 5 + features/v2/llm_observability.feature | 16 + features/v2/undo.json | 6 + lib/datadog_api_client/configuration.rb | 1 + lib/datadog_api_client/inflector.rb | 6 + .../v2/api/llm_observability_api.rb | 89 ++++++ ...obs_annotated_interaction_by_trace_item.rb | 296 ++++++++++++++++++ ...tions_by_trace_data_attributes_response.rb | 150 +++++++++ ...ted_interactions_by_trace_data_response.rb | 165 ++++++++++ ...nnotated_interactions_by_trace_response.rb | 123 ++++++++ ...bs_annotated_interactions_by_trace_type.rb | 26 ++ .../v2/models/llm_obs_any_interaction_type.rb | 29 ++ 14 files changed, 1130 insertions(+) create mode 100644 examples/v2/llm-observability/GetLLMObsAnnotatedInteractionsByTraceIDs.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotated_interaction_by_trace_item.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_type.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_any_interaction_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 97213ec2fe9e..22fc24351728 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -41740,11 +41740,109 @@ components: format: int64 type: integer type: object + LLMObsAnnotatedInteractionByTraceItem: + description: An annotated interaction returned by the cross-queue lookup, including the source queue metadata. + properties: + annotations: + description: List of annotations for this interaction. + items: + $ref: "#/components/schemas/LLMObsAnnotationItem" + type: array + content_id: + description: Upstream entity identifier (trace ID, session ID, or deterministic display_block ID). + example: "trace-abc-123" + type: string + created_at: + description: Timestamp when the interaction was added to the queue. + example: "2025-06-01T12:00:00Z" + format: date-time + type: string + display_block: + $ref: "#/components/schemas/LLMObsContentBlocks" + id: + description: Unique identifier of the interaction. + example: "interaction-456" + type: string + modified_at: + description: Timestamp when the interaction was last updated. + example: "2025-06-01T12:00:00Z" + format: date-time + type: string + queue_id: + description: Identifier of the annotation queue this interaction belongs to. + example: "queue-uuid-001" + type: string + queue_name: + description: Name of the annotation queue this interaction belongs to. + example: "My Annotation Queue" + type: string + type: + $ref: "#/components/schemas/LLMObsAnyInteractionType" + required: + - id + - type + - content_id + - created_at + - modified_at + - queue_id + - queue_name + - annotations + type: object LLMObsAnnotatedInteractionItem: description: An interaction with its associated annotations. oneOf: - $ref: "#/components/schemas/LLMObsTraceAnnotatedInteractionItem" - $ref: "#/components/schemas/LLMObsDisplayBlockAnnotatedInteractionItem" + LLMObsAnnotatedInteractionsByTraceDataAttributesResponse: + description: Attributes of the cross-queue annotated interactions response. + properties: + annotated_interactions: + description: List of annotated interactions across all queues for the requested content IDs. + items: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionByTraceItem" + type: array + total_count: + description: Total number of annotated interactions matching the query. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + required: + - annotated_interactions + - total_count + type: object + LLMObsAnnotatedInteractionsByTraceDataResponse: + description: Data object for the cross-queue annotated interactions response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsByTraceDataAttributesResponse" + id: + description: Opaque identifier for the response object. + example: "trace-query" + type: string + type: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsByTraceType" + required: + - id + - type + - attributes + type: object + LLMObsAnnotatedInteractionsByTraceResponse: + description: Response containing annotated interactions across all queues for the requested content IDs. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsByTraceDataResponse" + required: + - data + type: object + LLMObsAnnotatedInteractionsByTraceType: + description: Resource type for cross-queue annotated interactions lookup. + enum: + - annotated_interactions_by_trace + example: annotated_interactions_by_trace + type: string + x-enum-varnames: + - ANNOTATED_INTERACTIONS_BY_TRACE LLMObsAnnotatedInteractionsDataAttributesResponse: description: Attributes containing the list of annotated interactions. properties: @@ -42214,6 +42312,20 @@ components: - ENABLED - DISABLED - ADAPTIVE + LLMObsAnyInteractionType: + description: Type of an annotated interaction. + enum: + - trace + - experiment_trace + - session + - display_block + example: trace + type: string + x-enum-varnames: + - TRACE + - EXPERIMENT_TRACE + - SESSION + - DISPLAY_BLOCK LLMObsAzureOpenAIMetadata: description: Azure OpenAI-specific metadata for an integration account or inference request. properties: @@ -122240,6 +122352,104 @@ 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/annotated-interactions: + get: + description: Returns annotated interactions across all annotation queues for the given content IDs. Results include queue metadata (ID and name) for each interaction. + operationId: GetLLMObsAnnotatedInteractionsByTraceIDs + parameters: + - description: One or more content IDs to retrieve annotated interactions for. At least one is required. + in: query + name: contentIds + required: true + schema: + items: + type: string + type: array + - description: Pagination offset. Must be >= 0. Defaults to 0. + in: query + name: offset + schema: + default: 0 + format: int32 + maximum: 2147483647 + minimum: 0 + type: integer + - description: Maximum number of results to return. Must be > 0. Defaults to 100. + in: query + name: limit + schema: + default: 100 + format: int32 + maximum: 2147483647 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + annotated_interactions: + - annotations: + - created_at: "0001-01-01T00:00:00Z" + created_by: "00000000-0000-0000-0000-000000000002" + id: annotation-789 + interaction_id: interaction-456 + label_values: + quality: good + modified_at: "0001-01-01T00:00:00Z" + modified_by: "00000000-0000-0000-0000-000000000002" + content_id: trace-abc-123 + created_at: "2025-06-01T12:00:00Z" + id: interaction-456 + modified_at: "2025-06-01T12:00:00Z" + queue_id: queue-uuid-001 + queue_name: My Annotation Queue + type: trace + total_count: 1 + id: trace-query + type: annotated_interactions_by_trace + schema: + $ref: "#/components/schemas/LLMObsAnnotatedInteractionsByTraceResponse" + 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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get annotated interactions by content IDs + tags: + - LLM Observability + 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: get: description: |- diff --git a/examples/v2/llm-observability/GetLLMObsAnnotatedInteractionsByTraceIDs.rb b/examples/v2/llm-observability/GetLLMObsAnnotatedInteractionsByTraceIDs.rb new file mode 100644 index 000000000000..8ff665639e97 --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsAnnotatedInteractionsByTraceIDs.rb @@ -0,0 +1,8 @@ +# Get annotated interactions by content IDs returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_llm_obs_annotated_interactions_by_trace_i_ds".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new +p api_instance.get_llm_obs_annotated_interactions_by_trace_i_ds([]) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 7ddb18c79c4e..67ed43751475 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -922,6 +922,11 @@ "v2.DeleteLLMObsData" => { "body" => "LLMObsDataDeletionRequest", }, + "v2.GetLLMObsAnnotatedInteractionsByTraceIDs" => { + "content_ids" => "Array", + "offset" => "Integer", + "limit" => "Integer", + }, "v2.ListLLMObsAnnotationQueues" => { "project_id" => "String", "queue_ids" => "Array", diff --git a/features/v2/llm_observability.feature b/features/v2/llm_observability.feature index 0e1a7e984fa0..d21a1f8048c5 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -441,6 +441,22 @@ Feature: LLM Observability When the request 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 + And new "GetLLMObsAnnotatedInteractionsByTraceIDs" request + And request contains "contentIds" 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 annotated interactions by content IDs returns "OK" response + Given operation "GetLLMObsAnnotatedInteractionsByTraceIDs" enabled + And new "GetLLMObsAnnotatedInteractionsByTraceIDs" request + And request contains "contentIds" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Get annotated queue interactions returns "Bad Request" response Given operation "GetLLMObsAnnotatedInteractions" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index 7a8309d2ceff..e93351a7e237 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3704,6 +3704,12 @@ "type": "unsafe" } }, + "GetLLMObsAnnotatedInteractionsByTraceIDs": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "ListLLMObsAnnotationQueues": { "tag": "LLM Observability", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 71ce1c9cbba6..bc3da069651c 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -225,6 +225,7 @@ def initialize "v2.delete_llm_obs_experiments": false, "v2.delete_llm_obs_projects": false, "v2.get_llm_obs_annotated_interactions": false, + "v2.get_llm_obs_annotated_interactions_by_trace_i_ds": false, "v2.get_llm_obs_annotation_queue_label_schema": false, "v2.get_llm_obs_custom_eval_config": false, "v2.list_llm_obs_annotation_queues": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 483d26abc1a2..187627b2d0a6 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3702,7 +3702,12 @@ def overrides "v2.list_teams_sort" => "ListTeamsSort", "v2.list_vulnerabilities_response" => "ListVulnerabilitiesResponse", "v2.list_vulnerable_assets_response" => "ListVulnerableAssetsResponse", + "v2.llm_obs_annotated_interaction_by_trace_item" => "LLMObsAnnotatedInteractionByTraceItem", "v2.llm_obs_annotated_interaction_item" => "LLMObsAnnotatedInteractionItem", + "v2.llm_obs_annotated_interactions_by_trace_data_attributes_response" => "LLMObsAnnotatedInteractionsByTraceDataAttributesResponse", + "v2.llm_obs_annotated_interactions_by_trace_data_response" => "LLMObsAnnotatedInteractionsByTraceDataResponse", + "v2.llm_obs_annotated_interactions_by_trace_response" => "LLMObsAnnotatedInteractionsByTraceResponse", + "v2.llm_obs_annotated_interactions_by_trace_type" => "LLMObsAnnotatedInteractionsByTraceType", "v2.llm_obs_annotated_interactions_data_attributes_response" => "LLMObsAnnotatedInteractionsDataAttributesResponse", "v2.llm_obs_annotated_interactions_data_response" => "LLMObsAnnotatedInteractionsDataResponse", "v2.llm_obs_annotated_interactions_response" => "LLMObsAnnotatedInteractionsResponse", @@ -3739,6 +3744,7 @@ def overrides "v2.llm_obs_anthropic_metadata" => "LLMObsAnthropicMetadata", "v2.llm_obs_anthropic_thinking_config" => "LLMObsAnthropicThinkingConfig", "v2.llm_obs_anthropic_thinking_type" => "LLMObsAnthropicThinkingType", + "v2.llm_obs_any_interaction_type" => "LLMObsAnyInteractionType", "v2.llm_obs_azure_open_ai_metadata" => "LLMObsAzureOpenAIMetadata", "v2.llm_obs_bedrock_metadata" => "LLMObsBedrockMetadata", "v2.llm_obs_content_block" => "LLMObsContentBlock", diff --git a/lib/datadog_api_client/v2/api/llm_observability_api.rb b/lib/datadog_api_client/v2/api/llm_observability_api.rb index 4c2039ada331..b6e0f54ee607 100644 --- a/lib/datadog_api_client/v2/api/llm_observability_api.rb +++ b/lib/datadog_api_client/v2/api/llm_observability_api.rb @@ -1406,6 +1406,95 @@ def get_llm_obs_annotated_interactions_with_http_info(queue_id, opts = {}) return data, status_code, headers end + # Get annotated interactions by content IDs. + # + # @see #get_llm_obs_annotated_interactions_by_trace_i_ds_with_http_info + def get_llm_obs_annotated_interactions_by_trace_i_ds(content_ids, opts = {}) + data, _status_code, _headers = get_llm_obs_annotated_interactions_by_trace_i_ds_with_http_info(content_ids, opts) + data + end + + # Get annotated interactions by content IDs. + # + # Returns annotated interactions across all annotation queues for the given content IDs. Results include queue metadata (ID and name) for each interaction. + # + # @param content_ids [Array] One or more content IDs to retrieve annotated interactions for. At least one is required. + # @param opts [Hash] the optional parameters + # @option opts [Integer] :offset Pagination offset. Must be >= 0. Defaults to 0. + # @option opts [Integer] :limit Maximum number of results to return. Must be > 0. Defaults to 100. + # @return [Array<(LLMObsAnnotatedInteractionsByTraceResponse, Integer, Hash)>] LLMObsAnnotatedInteractionsByTraceResponse data, response status code and response headers + def get_llm_obs_annotated_interactions_by_trace_i_ds_with_http_info(content_ids, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_llm_obs_annotated_interactions_by_trace_i_ds".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_llm_obs_annotated_interactions_by_trace_i_ds") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_llm_obs_annotated_interactions_by_trace_i_ds")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.get_llm_obs_annotated_interactions_by_trace_i_ds ...' + end + # verify the required parameter 'content_ids' is set + if @api_client.config.client_side_validation && content_ids.nil? + fail ArgumentError, "Missing the required parameter 'content_ids' when calling LLMObservabilityAPI.get_llm_obs_annotated_interactions_by_trace_i_ds" + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 2147483647 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LLMObservabilityAPI.get_llm_obs_annotated_interactions_by_trace_i_ds, must be smaller than or equal to 2147483647.' + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LLMObservabilityAPI.get_llm_obs_annotated_interactions_by_trace_i_ds, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 2147483647 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LLMObservabilityAPI.get_llm_obs_annotated_interactions_by_trace_i_ds, must be smaller than or equal to 2147483647.' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LLMObservabilityAPI.get_llm_obs_annotated_interactions_by_trace_i_ds, must be greater than or equal to 1.' + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/annotated-interactions' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'contentIds'] = @api_client.build_collection_param(content_ids, :multi) + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LLMObsAnnotatedInteractionsByTraceResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_llm_obs_annotated_interactions_by_trace_i_ds, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LLMObservabilityAPI#get_llm_obs_annotated_interactions_by_trace_i_ds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get annotation queue label schema. # # @see #get_llm_obs_annotation_queue_label_schema_with_http_info diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotated_interaction_by_trace_item.rb b/lib/datadog_api_client/v2/models/llm_obs_annotated_interaction_by_trace_item.rb new file mode 100644 index 000000000000..58f26b01123a --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotated_interaction_by_trace_item.rb @@ -0,0 +1,296 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An annotated interaction returned by the cross-queue lookup, including the source queue metadata. + class LLMObsAnnotatedInteractionByTraceItem + include BaseGenericModel + + # List of annotations for this interaction. + attr_reader :annotations + + # Upstream entity identifier (trace ID, session ID, or deterministic display_block ID). + attr_reader :content_id + + # Timestamp when the interaction was added to the queue. + attr_reader :created_at + + # List of content blocks that make up a `display_block` interaction. + # Must contain at least one block. + attr_reader :display_block + + # Unique identifier of the interaction. + attr_reader :id + + # Timestamp when the interaction was last updated. + attr_reader :modified_at + + # Identifier of the annotation queue this interaction belongs to. + attr_reader :queue_id + + # Name of the annotation queue this interaction belongs to. + attr_reader :queue_name + + # Type of an annotated interaction. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'annotations' => :'annotations', + :'content_id' => :'content_id', + :'created_at' => :'created_at', + :'display_block' => :'display_block', + :'id' => :'id', + :'modified_at' => :'modified_at', + :'queue_id' => :'queue_id', + :'queue_name' => :'queue_name', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'annotations' => :'Array', + :'content_id' => :'String', + :'created_at' => :'Time', + :'display_block' => :'Array', + :'id' => :'String', + :'modified_at' => :'Time', + :'queue_id' => :'String', + :'queue_name' => :'String', + :'type' => :'LLMObsAnyInteractionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsAnnotatedInteractionByTraceItem` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'annotations') + if (value = attributes[:'annotations']).is_a?(Array) + self.annotations = value + end + end + + if attributes.key?(:'content_id') + self.content_id = attributes[:'content_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'display_block') + if (value = attributes[:'display_block']).is_a?(Array) + self.display_block = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'queue_id') + self.queue_id = attributes[:'queue_id'] + end + + if attributes.key?(:'queue_name') + self.queue_name = attributes[:'queue_name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @annotations.nil? + return false if @content_id.nil? + return false if @created_at.nil? + return false if !@display_block.nil? && @display_block.length < 1 + return false if @id.nil? + return false if @modified_at.nil? + return false if @queue_id.nil? + return false if @queue_name.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param annotations [Object] Object to be assigned + # @!visibility private + def annotations=(annotations) + if annotations.nil? + fail ArgumentError, 'invalid value for "annotations", annotations cannot be nil.' + end + @annotations = annotations + end + + # Custom attribute writer method with validation + # @param content_id [Object] Object to be assigned + # @!visibility private + def content_id=(content_id) + if content_id.nil? + fail ArgumentError, 'invalid value for "content_id", content_id cannot be nil.' + end + @content_id = content_id + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param display_block [Object] Object to be assigned + # @!visibility private + def display_block=(display_block) + if !display_block.nil? && display_block.length < 1 + fail ArgumentError, 'invalid value for "display_block", number of items must be greater than or equal to 1.' + end + @display_block = display_block + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param modified_at [Object] Object to be assigned + # @!visibility private + def modified_at=(modified_at) + if modified_at.nil? + fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.' + end + @modified_at = modified_at + end + + # Custom attribute writer method with validation + # @param queue_id [Object] Object to be assigned + # @!visibility private + def queue_id=(queue_id) + if queue_id.nil? + fail ArgumentError, 'invalid value for "queue_id", queue_id cannot be nil.' + end + @queue_id = queue_id + end + + # Custom attribute writer method with validation + # @param queue_name [Object] Object to be assigned + # @!visibility private + def queue_name=(queue_name) + if queue_name.nil? + fail ArgumentError, 'invalid value for "queue_name", queue_name cannot be nil.' + end + @queue_name = queue_name + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + annotations == o.annotations && + content_id == o.content_id && + created_at == o.created_at && + display_block == o.display_block && + id == o.id && + modified_at == o.modified_at && + queue_id == o.queue_id && + queue_name == o.queue_name && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [annotations, content_id, created_at, display_block, id, modified_at, queue_id, queue_name, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_data_attributes_response.rb b/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_data_attributes_response.rb new file mode 100644 index 000000000000..bf48c38111be --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_data_attributes_response.rb @@ -0,0 +1,150 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of the cross-queue annotated interactions response. + class LLMObsAnnotatedInteractionsByTraceDataAttributesResponse + include BaseGenericModel + + # List of annotated interactions across all queues for the requested content IDs. + attr_reader :annotated_interactions + + # Total number of annotated interactions matching the query. + attr_reader :total_count + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'annotated_interactions' => :'annotated_interactions', + :'total_count' => :'total_count' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'annotated_interactions' => :'Array', + :'total_count' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsAnnotatedInteractionsByTraceDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'annotated_interactions') + if (value = attributes[:'annotated_interactions']).is_a?(Array) + self.annotated_interactions = value + end + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @annotated_interactions.nil? + return false if @total_count.nil? + return false if @total_count > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param annotated_interactions [Object] Object to be assigned + # @!visibility private + def annotated_interactions=(annotated_interactions) + if annotated_interactions.nil? + fail ArgumentError, 'invalid value for "annotated_interactions", annotated_interactions cannot be nil.' + end + @annotated_interactions = annotated_interactions + end + + # Custom attribute writer method with validation + # @param total_count [Object] Object to be assigned + # @!visibility private + def total_count=(total_count) + if total_count.nil? + fail ArgumentError, 'invalid value for "total_count", total_count cannot be nil.' + end + if total_count > 2147483647 + fail ArgumentError, 'invalid value for "total_count", must be smaller than or equal to 2147483647.' + end + @total_count = total_count + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + annotated_interactions == o.annotated_interactions && + total_count == o.total_count && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [annotated_interactions, total_count, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_data_response.rb new file mode 100644 index 000000000000..eb6fac290bb2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data object for the cross-queue annotated interactions response. + class LLMObsAnnotatedInteractionsByTraceDataResponse + include BaseGenericModel + + # Attributes of the cross-queue annotated interactions response. + attr_reader :attributes + + # Opaque identifier for the response object. + attr_reader :id + + # Resource type for cross-queue annotated interactions lookup. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'LLMObsAnnotatedInteractionsByTraceDataAttributesResponse', + :'id' => :'String', + :'type' => :'LLMObsAnnotatedInteractionsByTraceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsAnnotatedInteractionsByTraceDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_response.rb b/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_response.rb new file mode 100644 index 000000000000..e9f1a6960521 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing annotated interactions across all queues for the requested content IDs. + class LLMObsAnnotatedInteractionsByTraceResponse + include BaseGenericModel + + # Data object for the cross-queue annotated interactions response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'LLMObsAnnotatedInteractionsByTraceDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsAnnotatedInteractionsByTraceResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_type.rb b/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_type.rb new file mode 100644 index 000000000000..7f8c7018d7b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotated_interactions_by_trace_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Resource type for cross-queue annotated interactions lookup. + class LLMObsAnnotatedInteractionsByTraceType + include BaseEnumModel + + ANNOTATED_INTERACTIONS_BY_TRACE = "annotated_interactions_by_trace".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_any_interaction_type.rb b/lib/datadog_api_client/v2/models/llm_obs_any_interaction_type.rb new file mode 100644 index 000000000000..6ff7524676af --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_any_interaction_type.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type of an annotated interaction. + class LLMObsAnyInteractionType + include BaseEnumModel + + TRACE = "trace".freeze + EXPERIMENT_TRACE = "experiment_trace".freeze + SESSION = "session".freeze + DISPLAY_BLOCK = "display_block".freeze + end +end