From a5f1ca2388a4b817e005469ea80b6bdbf268d5c7 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 16:29:21 +0000 Subject: [PATCH 1/2] Document Annotations label schema API for AI Observability (#3268) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 381 +++++++++++++++++- .../CreateLLMObsAnnotationQueue.rb | 22 + .../GetLLMObsAnnotationQueueLabelSchema.rb | 8 + .../UpdateLLMObsAnnotationQueue.rb | 22 + .../UpdateLLMObsAnnotationQueueLabelSchema.rb | 38 ++ features/scenarios_model_mapping.rb | 7 + features/v2/llm_observability.feature | 53 ++- features/v2/undo.json | 12 + lib/datadog_api_client/configuration.rb | 2 + lib/datadog_api_client/inflector.rb | 9 + .../v2/api/llm_observability_api.rb | 160 +++++++- ...nnotation_queue_data_attributes_request.rb | 12 +- ...notation_queue_data_attributes_response.rb | 12 +- ...nnotation_queue_label_schema_attributes.rb | 123 ++++++ ..._obs_annotation_queue_label_schema_data.rb | 165 ++++++++ ..._annotation_queue_label_schema_response.rb | 123 ++++++ ...on_queue_label_schema_update_attributes.rb | 123 ++++++ ...notation_queue_label_schema_update_data.rb | 144 +++++++ ...ation_queue_label_schema_update_request.rb | 123 ++++++ ...on_queue_update_data_attributes_request.rb | 12 +- .../v2/models/llm_obs_annotation_schema.rb | 125 ++++++ .../v2/models/llm_obs_label_schema.rb | 246 +++++++++++ .../v2/models/llm_obs_label_schema_type.rb | 29 ++ 23 files changed, 1937 insertions(+), 14 deletions(-) create mode 100644 examples/v2/llm-observability/GetLLMObsAnnotationQueueLabelSchema.rb create mode 100644 examples/v2/llm-observability/UpdateLLMObsAnnotationQueueLabelSchema.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_data.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_data.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_annotation_schema.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_label_schema.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_label_schema_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9041f8a00394..5b3f25722be3 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -38071,6 +38071,8 @@ components: LLMObsAnnotationQueueDataAttributesRequest: description: Attributes for creating an LLM Observability annotation queue. properties: + annotation_schema: + $ref: "#/components/schemas/LLMObsAnnotationSchema" description: description: Description of the annotation queue. example: "Queue for annotating customer support traces" @@ -38090,6 +38092,8 @@ components: LLMObsAnnotationQueueDataAttributesResponse: description: Attributes of an LLM Observability annotation queue. properties: + annotation_schema: + $ref: "#/components/schemas/LLMObsAnnotationSchema" created_at: description: Timestamp when the queue was created. example: "2024-01-15T10:30:00Z" @@ -38271,6 +38275,65 @@ components: type: string x-enum-varnames: - INTERACTIONS + LLMObsAnnotationQueueLabelSchemaAttributes: + description: Attributes of an annotation queue label schema. + properties: + annotation_schema: + $ref: "#/components/schemas/LLMObsAnnotationSchema" + required: + - annotation_schema + type: object + LLMObsAnnotationQueueLabelSchemaData: + description: Data object for an annotation queue label schema. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationQueueLabelSchemaAttributes" + id: + description: Unique identifier of the annotation queue. + example: "b5e7f3a1-9c2d-4f8b-a1e6-3d7e9f0a2b4c" + type: string + type: + $ref: "#/components/schemas/LLMObsAnnotationQueueType" + required: + - id + - type + - attributes + type: object + LLMObsAnnotationQueueLabelSchemaResponse: + description: Response containing the label schema of an annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationQueueLabelSchemaData" + required: + - data + type: object + LLMObsAnnotationQueueLabelSchemaUpdateAttributes: + description: Attributes for updating an annotation queue label schema. + properties: + annotation_schema: + $ref: "#/components/schemas/LLMObsAnnotationSchema" + required: + - annotation_schema + type: object + LLMObsAnnotationQueueLabelSchemaUpdateData: + description: Data object for updating an annotation queue label schema. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationQueueLabelSchemaUpdateAttributes" + type: + $ref: "#/components/schemas/LLMObsAnnotationQueueType" + required: + - type + - attributes + type: object + LLMObsAnnotationQueueLabelSchemaUpdateRequest: + description: Request to update the label schema of an annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationQueueLabelSchemaUpdateData" + required: + - data + type: object LLMObsAnnotationQueueRequest: description: Request to create an LLM Observability annotation queue. properties: @@ -38298,6 +38361,8 @@ components: LLMObsAnnotationQueueUpdateDataAttributesRequest: description: Attributes for updating an LLM Observability annotation queue. All fields are optional. properties: + annotation_schema: + $ref: "#/components/schemas/LLMObsAnnotationSchema" description: description: Updated description of the annotation queue. example: "Updated description" @@ -38337,6 +38402,17 @@ components: required: - data type: object + LLMObsAnnotationSchema: + description: Schema defining the labels for an annotation queue. + properties: + label_schemas: + description: List of label schema definitions. + items: + $ref: "#/components/schemas/LLMObsLabelSchema" + type: array + required: + - label_schemas + type: object LLMObsCursorMeta: description: Pagination cursor metadata. properties: @@ -39634,6 +39710,81 @@ components: x-enum-varnames: - TRACE - EXPERIMENT_TRACE + LLMObsLabelSchema: + description: Schema definition for a single label in an annotation queue. + properties: + description: + description: Description of the label. + example: "Rating of the response quality." + type: string + has_assessment: + description: Whether this label includes an assessment field. + example: false + type: boolean + has_reasoning: + description: Whether this label includes a reasoning field. + example: false + type: boolean + id: + description: Unique identifier of the label schema. Assigned by the server if not provided. + example: "ab12cd34" + type: string + is_assessment: + description: Whether the boolean label represents an assessment. Requires `has_assessment` to be true. + example: false + type: boolean + is_integer: + description: Whether score values must be integers. Applicable to score-type labels. + example: false + type: boolean + is_required: + description: Whether this label is required for an annotation. + example: true + type: boolean + max: + description: Maximum value for score-type labels. + example: 5.0 + format: double + type: number + min: + description: Minimum value for score-type labels. + example: 0.0 + format: double + type: number + name: + description: Name of the label. Must match the pattern `^[a-zA-Z0-9_-]+$` and be unique within the queue. + example: "quality" + type: string + type: + $ref: "#/components/schemas/LLMObsLabelSchemaType" + values: + description: Allowed values for categorical-type labels. Must contain at least one non-empty, unique value. + example: + - "good" + - "bad" + - "neutral" + items: + description: An allowed value for a categorical label. + type: string + type: array + required: + - name + - type + type: object + LLMObsLabelSchemaType: + description: Type of a label in an annotation queue label schema. + enum: + - score + - categorical + - boolean + - text + example: score + type: string + x-enum-varnames: + - SCORE + - CATEGORICAL + - BOOLEAN + - TEXT LLMObsMetricAssessment: description: Assessment result for an LLM Observability experiment metric. enum: @@ -103821,8 +103972,10 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: |- - Create a new annotation queue. Only `name`, `project_id`, and `description` are accepted. - Fields such as `created_by`, `owned_by`, `created_at`, `modified_by`, and `modified_at` are inferred by the backend. + 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`, `modified_by`, + and `modified_at` are inferred by the backend. operationId: CreateLLMObsAnnotationQueue requestBody: content: @@ -103836,6 +103989,28 @@ paths: name: My annotation queue project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 type: queues + with_schema: + summary: Create queue with annotation schema + value: + data: + attributes: + annotation_schema: + label_schemas: + - is_required: true + max: 5.0 + min: 0.0 + name: quality + type: score + - name: sentiment + type: categorical + values: + - positive + - negative + - neutral + description: Queue for annotating customer support traces + name: My annotation queue + project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + type: queues schema: $ref: "#/components/schemas/LLMObsAnnotationQueueRequest" description: Create annotation queue payload. @@ -103916,7 +104091,7 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: description: |- - Partially update an annotation queue. Only `name` and `description` can be updated. + Partially update an annotation queue. The `name`, `description`, and `annotation_schema` fields can be updated. operationId: UpdateLLMObsAnnotationQueue parameters: - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" @@ -104151,6 +104326,206 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema: + get: + description: Retrieve the label schema for a given annotation queue. + operationId: GetLLMObsAnnotationQueueLabelSchema + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + annotation_schema: + label_schemas: + - id: "ab12cd34" + is_required: true + max: 5.0 + min: 0.0 + name: quality + type: score + - id: "ef56gh78" + name: sentiment + type: categorical + values: + - positive + - negative + - neutral + id: "b5e7f3a1-9c2d-4f8b-a1e6-3d7e9f0a2b4c" + type: queues + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueLabelSchemaResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get annotation queue label schema + 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/). + put: + description: |- + Create or replace the label schema for a given annotation queue. + The label schema defines the labels annotators can apply to interactions in the queue. + Label names must be unique within the queue and match the pattern `^[a-zA-Z0-9_-]+$`. + Each label must have a valid type: score, categorical, boolean, or text. + operationId: UpdateLLMObsAnnotationQueueLabelSchema + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + requestBody: + content: + application/json: + examples: + boolean_label: + summary: Boolean label schema + value: + data: + attributes: + annotation_schema: + label_schemas: + - has_assessment: true + is_assessment: true + is_required: true + name: is_correct + type: boolean + type: queues + categorical_label: + summary: Categorical label schema + value: + data: + attributes: + annotation_schema: + label_schemas: + - is_required: true + name: sentiment + type: categorical + values: + - positive + - negative + - neutral + type: queues + default: + value: + data: + attributes: + annotation_schema: + label_schemas: + - is_required: true + max: 5.0 + min: 0.0 + name: quality + type: score + type: queues + score_label: + summary: Score label schema + value: + data: + attributes: + annotation_schema: + label_schemas: + - has_reasoning: true + is_required: true + max: 5.0 + min: 0.0 + name: quality + type: score + type: queues + text_label: + summary: Text label schema + value: + data: + attributes: + annotation_schema: + label_schemas: + - is_required: false + name: feedback + type: text + type: queues + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueLabelSchemaUpdateRequest" + description: Update label schema payload. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/LLMObsAnnotationQueueLabelSchemaResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Update annotation queue label schema + 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/experiments: get: description: List all LLM Observability experiments sorted by creation date, newest first. diff --git a/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb b/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb index c431504ca17f..49ca25060d94 100644 --- a/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb +++ b/examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb @@ -9,6 +9,28 @@ body = DatadogAPIClient::V2::LLMObsAnnotationQueueRequest.new({ data: DatadogAPIClient::V2::LLMObsAnnotationQueueDataRequest.new({ attributes: DatadogAPIClient::V2::LLMObsAnnotationQueueDataAttributesRequest.new({ + annotation_schema: DatadogAPIClient::V2::LLMObsAnnotationSchema.new({ + label_schemas: [ + DatadogAPIClient::V2::LLMObsLabelSchema.new({ + description: "Rating of the response quality.", + has_assessment: false, + has_reasoning: false, + id: "ab12cd34", + is_assessment: false, + is_integer: false, + is_required: true, + max: 5.0, + min: 0.0, + name: "quality", + type: DatadogAPIClient::V2::LLMObsLabelSchemaType::SCORE, + values: [ + "good", + "bad", + "neutral", + ], + }), + ], + }), description: "Queue for annotating customer support traces", name: "My annotation queue", project_id: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751", diff --git a/examples/v2/llm-observability/GetLLMObsAnnotationQueueLabelSchema.rb b/examples/v2/llm-observability/GetLLMObsAnnotationQueueLabelSchema.rb new file mode 100644 index 000000000000..fe6366c37ede --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsAnnotationQueueLabelSchema.rb @@ -0,0 +1,8 @@ +# Get annotation queue label schema returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_llm_obs_annotation_queue_label_schema".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new +p api_instance.get_llm_obs_annotation_queue_label_schema("queue_id") diff --git a/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb b/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb index 1fb1048a5a80..932b77ab4f92 100644 --- a/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb +++ b/examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb @@ -9,6 +9,28 @@ body = DatadogAPIClient::V2::LLMObsAnnotationQueueUpdateRequest.new({ data: DatadogAPIClient::V2::LLMObsAnnotationQueueUpdateDataRequest.new({ attributes: DatadogAPIClient::V2::LLMObsAnnotationQueueUpdateDataAttributesRequest.new({ + annotation_schema: DatadogAPIClient::V2::LLMObsAnnotationSchema.new({ + label_schemas: [ + DatadogAPIClient::V2::LLMObsLabelSchema.new({ + description: "Rating of the response quality.", + has_assessment: false, + has_reasoning: false, + id: "ab12cd34", + is_assessment: false, + is_integer: false, + is_required: true, + max: 5.0, + min: 0.0, + name: "quality", + type: DatadogAPIClient::V2::LLMObsLabelSchemaType::SCORE, + values: [ + "good", + "bad", + "neutral", + ], + }), + ], + }), description: "Updated description", name: "Updated queue name", }), diff --git a/examples/v2/llm-observability/UpdateLLMObsAnnotationQueueLabelSchema.rb b/examples/v2/llm-observability/UpdateLLMObsAnnotationQueueLabelSchema.rb new file mode 100644 index 000000000000..4ae73f1e2c27 --- /dev/null +++ b/examples/v2/llm-observability/UpdateLLMObsAnnotationQueueLabelSchema.rb @@ -0,0 +1,38 @@ +# Update annotation queue label schema returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_llm_obs_annotation_queue_label_schema".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new + +body = DatadogAPIClient::V2::LLMObsAnnotationQueueLabelSchemaUpdateRequest.new({ + data: DatadogAPIClient::V2::LLMObsAnnotationQueueLabelSchemaUpdateData.new({ + attributes: DatadogAPIClient::V2::LLMObsAnnotationQueueLabelSchemaUpdateAttributes.new({ + annotation_schema: DatadogAPIClient::V2::LLMObsAnnotationSchema.new({ + label_schemas: [ + DatadogAPIClient::V2::LLMObsLabelSchema.new({ + description: "Rating of the response quality.", + has_assessment: false, + has_reasoning: false, + id: "ab12cd34", + is_assessment: false, + is_integer: false, + is_required: true, + max: 5.0, + min: 0.0, + name: "quality", + type: DatadogAPIClient::V2::LLMObsLabelSchemaType::SCORE, + values: [ + "good", + "bad", + "neutral", + ], + }), + ], + }), + }), + type: DatadogAPIClient::V2::LLMObsAnnotationQueueType::QUEUES, + }), +}) +p api_instance.update_llm_obs_annotation_queue_label_schema("queue_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 790e6bc46768..c4803c055c8c 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -944,6 +944,13 @@ "queue_id" => "String", "body" => "LLMObsDeleteAnnotationQueueInteractionsRequest", }, + "v2.GetLLMObsAnnotationQueueLabelSchema" => { + "queue_id" => "String", + }, + "v2.UpdateLLMObsAnnotationQueueLabelSchema" => { + "queue_id" => "String", + "body" => "LLMObsAnnotationQueueLabelSchemaUpdateRequest", + }, "v2.ListLLMObsExperiments" => { "filter_project_id" => "String", "filter_dataset_id" => "String", diff --git a/features/v2/llm_observability.feature b/features/v2/llm_observability.feature index dc0a15364b94..e9c054c73667 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -79,7 +79,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": {"description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "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": "ab12cd34", "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": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "queues"}} When the request is sent Then the response status is 400 Bad Request @@ -87,7 +87,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": {"description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "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": "ab12cd34", "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": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "queues"}} When the request is sent Then the response status is 201 Created @@ -415,6 +415,22 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get annotation queue label schema returns "Not Found" response + Given operation "GetLLMObsAnnotationQueueLabelSchema" enabled + And new "GetLLMObsAnnotationQueueLabelSchema" request + And request contains "queue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get annotation queue label schema returns "OK" response + Given operation "GetLLMObsAnnotationQueueLabelSchema" enabled + And new "GetLLMObsAnnotationQueueLabelSchema" request + And request contains "queue_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: List LLM Observability annotation queues returns "Bad Request" response Given operation "ListLLMObsAnnotationQueues" enabled @@ -570,7 +586,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": {"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": "ab12cd34", "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"}} When the request is sent Then the response status is 400 Bad Request @@ -579,7 +595,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": {"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": "ab12cd34", "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"}} When the request is sent Then the response status is 404 Not Found @@ -588,7 +604,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": {"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": "ab12cd34", "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"}} When the request is sent Then the response status is 200 OK @@ -675,3 +691,30 @@ Feature: LLM Observability And body with value {"data": {"attributes": {}, "type": "projects"}} When the request is sent Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: Update annotation queue label schema returns "Bad Request" response + Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled + And new "UpdateLLMObsAnnotationQueueLabelSchema" 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": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}}, "type": "queues"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Update annotation queue label schema returns "Not Found" response + Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled + And new "UpdateLLMObsAnnotationQueueLabelSchema" 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": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}}, "type": "queues"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Update annotation queue label schema returns "OK" response + Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled + And new "UpdateLLMObsAnnotationQueueLabelSchema" 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": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}}, "type": "queues"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 8c591eca8c28..f606e4a86587 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3267,6 +3267,18 @@ "type": "idempotent" } }, + "GetLLMObsAnnotationQueueLabelSchema": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "UpdateLLMObsAnnotationQueueLabelSchema": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, "ListLLMObsExperiments": { "tag": "LLM Observability", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index ef86a243dbca..031c2d6f8076 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -222,6 +222,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_annotation_queue_label_schema": false, "v2.get_llm_obs_custom_eval_config": false, "v2.list_llm_obs_annotation_queues": false, "v2.list_llm_obs_dataset_records": false, @@ -229,6 +230,7 @@ def initialize "v2.list_llm_obs_experiments": false, "v2.list_llm_obs_projects": false, "v2.update_llm_obs_annotation_queue": false, + "v2.update_llm_obs_annotation_queue_label_schema": false, "v2.update_llm_obs_custom_eval_config": false, "v2.update_llm_obs_dataset": false, "v2.update_llm_obs_dataset_records": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 63d4ad681a22..c6d4b2871855 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3496,6 +3496,12 @@ def overrides "v2.llm_obs_annotation_queue_interactions_request" => "LLMObsAnnotationQueueInteractionsRequest", "v2.llm_obs_annotation_queue_interactions_response" => "LLMObsAnnotationQueueInteractionsResponse", "v2.llm_obs_annotation_queue_interactions_type" => "LLMObsAnnotationQueueInteractionsType", + "v2.llm_obs_annotation_queue_label_schema_attributes" => "LLMObsAnnotationQueueLabelSchemaAttributes", + "v2.llm_obs_annotation_queue_label_schema_data" => "LLMObsAnnotationQueueLabelSchemaData", + "v2.llm_obs_annotation_queue_label_schema_response" => "LLMObsAnnotationQueueLabelSchemaResponse", + "v2.llm_obs_annotation_queue_label_schema_update_attributes" => "LLMObsAnnotationQueueLabelSchemaUpdateAttributes", + "v2.llm_obs_annotation_queue_label_schema_update_data" => "LLMObsAnnotationQueueLabelSchemaUpdateData", + "v2.llm_obs_annotation_queue_label_schema_update_request" => "LLMObsAnnotationQueueLabelSchemaUpdateRequest", "v2.llm_obs_annotation_queue_request" => "LLMObsAnnotationQueueRequest", "v2.llm_obs_annotation_queue_response" => "LLMObsAnnotationQueueResponse", "v2.llm_obs_annotation_queues_response" => "LLMObsAnnotationQueuesResponse", @@ -3503,6 +3509,7 @@ def overrides "v2.llm_obs_annotation_queue_update_data_attributes_request" => "LLMObsAnnotationQueueUpdateDataAttributesRequest", "v2.llm_obs_annotation_queue_update_data_request" => "LLMObsAnnotationQueueUpdateDataRequest", "v2.llm_obs_annotation_queue_update_request" => "LLMObsAnnotationQueueUpdateRequest", + "v2.llm_obs_annotation_schema" => "LLMObsAnnotationSchema", "v2.llm_obs_cursor_meta" => "LLMObsCursorMeta", "v2.llm_obs_custom_eval_config_assessment_criteria" => "LLMObsCustomEvalConfigAssessmentCriteria", "v2.llm_obs_custom_eval_config_attributes" => "LLMObsCustomEvalConfigAttributes", @@ -3587,6 +3594,8 @@ def overrides "v2.llm_obs_experiment_update_data_request" => "LLMObsExperimentUpdateDataRequest", "v2.llm_obs_experiment_update_request" => "LLMObsExperimentUpdateRequest", "v2.llm_obs_interaction_type" => "LLMObsInteractionType", + "v2.llm_obs_label_schema" => "LLMObsLabelSchema", + "v2.llm_obs_label_schema_type" => "LLMObsLabelSchemaType", "v2.llm_obs_metric_assessment" => "LLMObsMetricAssessment", "v2.llm_obs_metric_score_type" => "LLMObsMetricScoreType", "v2.llm_obs_project_data_attributes_request" => "LLMObsProjectDataAttributesRequest", 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 c41159b32fc8..cc58db487a77 100644 --- a/lib/datadog_api_client/v2/api/llm_observability_api.rb +++ b/lib/datadog_api_client/v2/api/llm_observability_api.rb @@ -33,8 +33,10 @@ def create_llm_obs_annotation_queue(body, opts = {}) # Create an LLM Observability annotation queue. # - # Create a new annotation queue. Only `name`, `project_id`, and `description` are accepted. - # Fields such as `created_by`, `owned_by`, `created_at`, `modified_by`, and `modified_at` are inferred by the backend. + # 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`, `modified_by`, + # and `modified_at` are inferred by the backend. # # @param body [LLMObsAnnotationQueueRequest] Create annotation queue payload. # @param opts [Hash] the optional parameters @@ -1159,6 +1161,77 @@ def get_llm_obs_annotated_interactions_with_http_info(queue_id, opts = {}) return data, status_code, headers end + # Get annotation queue label schema. + # + # @see #get_llm_obs_annotation_queue_label_schema_with_http_info + def get_llm_obs_annotation_queue_label_schema(queue_id, opts = {}) + data, _status_code, _headers = get_llm_obs_annotation_queue_label_schema_with_http_info(queue_id, opts) + data + end + + # Get annotation queue label schema. + # + # Retrieve the label schema for a given annotation queue. + # + # @param queue_id [String] The ID of the LLM Observability annotation queue. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsAnnotationQueueLabelSchemaResponse, Integer, Hash)>] LLMObsAnnotationQueueLabelSchemaResponse data, response status code and response headers + def get_llm_obs_annotation_queue_label_schema_with_http_info(queue_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_llm_obs_annotation_queue_label_schema".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_llm_obs_annotation_queue_label_schema") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_llm_obs_annotation_queue_label_schema")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.get_llm_obs_annotation_queue_label_schema ...' + end + # verify the required parameter 'queue_id' is set + if @api_client.config.client_side_validation && queue_id.nil? + fail ArgumentError, "Missing the required parameter 'queue_id' when calling LLMObservabilityAPI.get_llm_obs_annotation_queue_label_schema" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema'.sub('{queue_id}', CGI.escape(queue_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # 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] || 'LLMObsAnnotationQueueLabelSchemaResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_llm_obs_annotation_queue_label_schema, + :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" + ) + + 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_annotation_queue_label_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a custom evaluator configuration. # # @see #get_llm_obs_custom_eval_config_with_http_info @@ -1623,7 +1696,7 @@ def update_llm_obs_annotation_queue(queue_id, body, opts = {}) # Update an LLM Observability annotation queue. # - # Partially update an annotation queue. Only `name` and `description` can be updated. + # Partially update an annotation queue. The `name`, `description`, and `annotation_schema` fields can be updated. # # @param queue_id [String] The ID of the LLM Observability annotation queue. # @param body [LLMObsAnnotationQueueUpdateRequest] Update annotation queue payload. @@ -1691,6 +1764,87 @@ def update_llm_obs_annotation_queue_with_http_info(queue_id, body, opts = {}) return data, status_code, headers end + # Update annotation queue label schema. + # + # @see #update_llm_obs_annotation_queue_label_schema_with_http_info + def update_llm_obs_annotation_queue_label_schema(queue_id, body, opts = {}) + data, _status_code, _headers = update_llm_obs_annotation_queue_label_schema_with_http_info(queue_id, body, opts) + data + end + + # Update annotation queue label schema. + # + # Create or replace the label schema for a given annotation queue. + # The label schema defines the labels annotators can apply to interactions in the queue. + # Label names must be unique within the queue and match the pattern `^[a-zA-Z0-9_-]+$`. + # Each label must have a valid type: score, categorical, boolean, or text. + # + # @param queue_id [String] The ID of the LLM Observability annotation queue. + # @param body [LLMObsAnnotationQueueLabelSchemaUpdateRequest] Update label schema payload. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsAnnotationQueueLabelSchemaResponse, Integer, Hash)>] LLMObsAnnotationQueueLabelSchemaResponse data, response status code and response headers + def update_llm_obs_annotation_queue_label_schema_with_http_info(queue_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_llm_obs_annotation_queue_label_schema".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_llm_obs_annotation_queue_label_schema") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_llm_obs_annotation_queue_label_schema")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.update_llm_obs_annotation_queue_label_schema ...' + end + # verify the required parameter 'queue_id' is set + if @api_client.config.client_side_validation && queue_id.nil? + fail ArgumentError, "Missing the required parameter 'queue_id' when calling LLMObservabilityAPI.update_llm_obs_annotation_queue_label_schema" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling LLMObservabilityAPI.update_llm_obs_annotation_queue_label_schema" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema'.sub('{queue_id}', CGI.escape(queue_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'LLMObsAnnotationQueueLabelSchemaResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_llm_obs_annotation_queue_label_schema, + :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" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LLMObservabilityAPI#update_llm_obs_annotation_queue_label_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create or update a custom evaluator configuration. # # @see #update_llm_obs_custom_eval_config_with_http_info diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_request.rb index 90d79a40f1db..4a71521ca893 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_request.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_request.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class LLMObsAnnotationQueueDataAttributesRequest include BaseGenericModel + # Schema defining the labels for an annotation queue. + attr_accessor :annotation_schema + # Description of the annotation queue. attr_accessor :description @@ -36,6 +39,7 @@ class LLMObsAnnotationQueueDataAttributesRequest # @!visibility private def self.attribute_map { + :'annotation_schema' => :'annotation_schema', :'description' => :'description', :'name' => :'name', :'project_id' => :'project_id' @@ -46,6 +50,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'annotation_schema' => :'LLMObsAnnotationSchema', :'description' => :'String', :'name' => :'String', :'project_id' => :'String' @@ -70,6 +75,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'annotation_schema') + self.annotation_schema = attributes[:'annotation_schema'] + end + if attributes.key?(:'description') self.description = attributes[:'description'] end @@ -138,6 +147,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + annotation_schema == o.annotation_schema && description == o.description && name == o.name && project_id == o.project_id && @@ -148,7 +158,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [description, name, project_id, additional_properties].hash + [annotation_schema, description, name, project_id, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_response.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_response.rb index 55ddfc3a2e8a..e8f86a8d09bd 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_response.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_data_attributes_response.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class LLMObsAnnotationQueueDataAttributesResponse include BaseGenericModel + # Schema defining the labels for an annotation queue. + attr_accessor :annotation_schema + # Timestamp when the queue was created. attr_reader :created_at @@ -51,6 +54,7 @@ class LLMObsAnnotationQueueDataAttributesResponse # @!visibility private def self.attribute_map { + :'annotation_schema' => :'annotation_schema', :'created_at' => :'created_at', :'created_by' => :'created_by', :'description' => :'description', @@ -66,6 +70,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'annotation_schema' => :'LLMObsAnnotationSchema', :'created_at' => :'Time', :'created_by' => :'String', :'description' => :'String', @@ -95,6 +100,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'annotation_schema') + self.annotation_schema = attributes[:'annotation_schema'] + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -249,6 +258,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + annotation_schema == o.annotation_schema && created_at == o.created_at && created_by == o.created_by && description == o.description && @@ -264,7 +274,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_at, created_by, description, modified_at, modified_by, name, owned_by, project_id, additional_properties].hash + [annotation_schema, created_at, created_by, description, modified_at, modified_by, name, owned_by, project_id, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_attributes.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_attributes.rb new file mode 100644 index 000000000000..0fbcb6d8ae1c --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_attributes.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 + # Attributes of an annotation queue label schema. + class LLMObsAnnotationQueueLabelSchemaAttributes + include BaseGenericModel + + # Schema defining the labels for an annotation queue. + attr_reader :annotation_schema + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'annotation_schema' => :'annotation_schema' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'annotation_schema' => :'LLMObsAnnotationSchema' + } + 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::LLMObsAnnotationQueueLabelSchemaAttributes` 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?(:'annotation_schema') + self.annotation_schema = attributes[:'annotation_schema'] + 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 @annotation_schema.nil? + true + end + + # Custom attribute writer method with validation + # @param annotation_schema [Object] Object to be assigned + # @!visibility private + def annotation_schema=(annotation_schema) + if annotation_schema.nil? + fail ArgumentError, 'invalid value for "annotation_schema", annotation_schema cannot be nil.' + end + @annotation_schema = annotation_schema + 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 && + annotation_schema == o.annotation_schema && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [annotation_schema, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_data.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_data.rb new file mode 100644 index 000000000000..7636bdb4675c --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_data.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 an annotation queue label schema. + class LLMObsAnnotationQueueLabelSchemaData + include BaseGenericModel + + # Attributes of an annotation queue label schema. + attr_reader :attributes + + # Unique identifier of the annotation queue. + attr_reader :id + + # Resource type of an LLM Observability annotation queue. + 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' => :'LLMObsAnnotationQueueLabelSchemaAttributes', + :'id' => :'String', + :'type' => :'LLMObsAnnotationQueueType' + } + 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::LLMObsAnnotationQueueLabelSchemaData` 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_annotation_queue_label_schema_response.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_response.rb new file mode 100644 index 000000000000..fac8baf053d6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_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 the label schema of an annotation queue. + class LLMObsAnnotationQueueLabelSchemaResponse + include BaseGenericModel + + # Data object for an annotation queue label schema. + 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' => :'LLMObsAnnotationQueueLabelSchemaData' + } + 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::LLMObsAnnotationQueueLabelSchemaResponse` 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_annotation_queue_label_schema_update_attributes.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_attributes.rb new file mode 100644 index 000000000000..036a4d6d0cc9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_attributes.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 + # Attributes for updating an annotation queue label schema. + class LLMObsAnnotationQueueLabelSchemaUpdateAttributes + include BaseGenericModel + + # Schema defining the labels for an annotation queue. + attr_reader :annotation_schema + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'annotation_schema' => :'annotation_schema' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'annotation_schema' => :'LLMObsAnnotationSchema' + } + 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::LLMObsAnnotationQueueLabelSchemaUpdateAttributes` 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?(:'annotation_schema') + self.annotation_schema = attributes[:'annotation_schema'] + 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 @annotation_schema.nil? + true + end + + # Custom attribute writer method with validation + # @param annotation_schema [Object] Object to be assigned + # @!visibility private + def annotation_schema=(annotation_schema) + if annotation_schema.nil? + fail ArgumentError, 'invalid value for "annotation_schema", annotation_schema cannot be nil.' + end + @annotation_schema = annotation_schema + 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 && + annotation_schema == o.annotation_schema && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [annotation_schema, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_data.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_data.rb new file mode 100644 index 000000000000..92bc8a1b8e05 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_data.rb @@ -0,0 +1,144 @@ +=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 updating an annotation queue label schema. + class LLMObsAnnotationQueueLabelSchemaUpdateData + include BaseGenericModel + + # Attributes for updating an annotation queue label schema. + attr_reader :attributes + + # Resource type of an LLM Observability annotation queue. + 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'LLMObsAnnotationQueueLabelSchemaUpdateAttributes', + :'type' => :'LLMObsAnnotationQueueType' + } + 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::LLMObsAnnotationQueueLabelSchemaUpdateData` 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?(:'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 @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 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 && + 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, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_request.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_request.rb new file mode 100644 index 000000000000..1a5e9be80fc7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_label_schema_update_request.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 + # Request to update the label schema of an annotation queue. + class LLMObsAnnotationQueueLabelSchemaUpdateRequest + include BaseGenericModel + + # Data object for updating an annotation queue label schema. + 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' => :'LLMObsAnnotationQueueLabelSchemaUpdateData' + } + 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::LLMObsAnnotationQueueLabelSchemaUpdateRequest` 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_annotation_queue_update_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_update_data_attributes_request.rb index f0f608e312a5..3b008c079661 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_update_data_attributes_request.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_queue_update_data_attributes_request.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class LLMObsAnnotationQueueUpdateDataAttributesRequest include BaseGenericModel + # Schema defining the labels for an annotation queue. + attr_accessor :annotation_schema + # Updated description of the annotation queue. attr_accessor :description @@ -33,6 +36,7 @@ class LLMObsAnnotationQueueUpdateDataAttributesRequest # @!visibility private def self.attribute_map { + :'annotation_schema' => :'annotation_schema', :'description' => :'description', :'name' => :'name' } @@ -42,6 +46,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'annotation_schema' => :'LLMObsAnnotationSchema', :'description' => :'String', :'name' => :'String' } @@ -65,6 +70,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'annotation_schema') + self.annotation_schema = attributes[:'annotation_schema'] + end + if attributes.key?(:'description') self.description = attributes[:'description'] end @@ -100,6 +109,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + annotation_schema == o.annotation_schema && description == o.description && name == o.name && additional_properties == o.additional_properties @@ -109,7 +119,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [description, name, additional_properties].hash + [annotation_schema, description, name, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_annotation_schema.rb b/lib/datadog_api_client/v2/models/llm_obs_annotation_schema.rb new file mode 100644 index 000000000000..f28b02427cd5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_annotation_schema.rb @@ -0,0 +1,125 @@ +=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 + # Schema defining the labels for an annotation queue. + class LLMObsAnnotationSchema + include BaseGenericModel + + # List of label schema definitions. + attr_reader :label_schemas + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'label_schemas' => :'label_schemas' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'label_schemas' => :'Array' + } + 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::LLMObsAnnotationSchema` 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?(:'label_schemas') + if (value = attributes[:'label_schemas']).is_a?(Array) + self.label_schemas = value + end + 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 @label_schemas.nil? + true + end + + # Custom attribute writer method with validation + # @param label_schemas [Object] Object to be assigned + # @!visibility private + def label_schemas=(label_schemas) + if label_schemas.nil? + fail ArgumentError, 'invalid value for "label_schemas", label_schemas cannot be nil.' + end + @label_schemas = label_schemas + 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 && + label_schemas == o.label_schemas && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [label_schemas, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_label_schema.rb b/lib/datadog_api_client/v2/models/llm_obs_label_schema.rb new file mode 100644 index 000000000000..8c74b5741117 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_label_schema.rb @@ -0,0 +1,246 @@ +=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 + # Schema definition for a single label in an annotation queue. + class LLMObsLabelSchema + include BaseGenericModel + + # Description of the label. + attr_accessor :description + + # Whether this label includes an assessment field. + attr_accessor :has_assessment + + # Whether this label includes a reasoning field. + attr_accessor :has_reasoning + + # Unique identifier of the label schema. Assigned by the server if not provided. + attr_accessor :id + + # Whether the boolean label represents an assessment. Requires `has_assessment` to be true. + attr_accessor :is_assessment + + # Whether score values must be integers. Applicable to score-type labels. + attr_accessor :is_integer + + # Whether this label is required for an annotation. + attr_accessor :is_required + + # Maximum value for score-type labels. + attr_accessor :max + + # Minimum value for score-type labels. + attr_accessor :min + + # Name of the label. Must match the pattern `^[a-zA-Z0-9_-]+$` and be unique within the queue. + attr_reader :name + + # Type of a label in an annotation queue label schema. + attr_reader :type + + # Allowed values for categorical-type labels. Must contain at least one non-empty, unique value. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'has_assessment' => :'has_assessment', + :'has_reasoning' => :'has_reasoning', + :'id' => :'id', + :'is_assessment' => :'is_assessment', + :'is_integer' => :'is_integer', + :'is_required' => :'is_required', + :'max' => :'max', + :'min' => :'min', + :'name' => :'name', + :'type' => :'type', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'has_assessment' => :'Boolean', + :'has_reasoning' => :'Boolean', + :'id' => :'String', + :'is_assessment' => :'Boolean', + :'is_integer' => :'Boolean', + :'is_required' => :'Boolean', + :'max' => :'Float', + :'min' => :'Float', + :'name' => :'String', + :'type' => :'LLMObsLabelSchemaType', + :'values' => :'Array' + } + 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::LLMObsLabelSchema` 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?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'has_assessment') + self.has_assessment = attributes[:'has_assessment'] + end + + if attributes.key?(:'has_reasoning') + self.has_reasoning = attributes[:'has_reasoning'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'is_assessment') + self.is_assessment = attributes[:'is_assessment'] + end + + if attributes.key?(:'is_integer') + self.is_integer = attributes[:'is_integer'] + end + + if attributes.key?(:'is_required') + self.is_required = attributes[:'is_required'] + end + + if attributes.key?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = value + end + 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 @name.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = 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 && + description == o.description && + has_assessment == o.has_assessment && + has_reasoning == o.has_reasoning && + id == o.id && + is_assessment == o.is_assessment && + is_integer == o.is_integer && + is_required == o.is_required && + max == o.max && + min == o.min && + name == o.name && + type == o.type && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, has_assessment, has_reasoning, id, is_assessment, is_integer, is_required, max, min, name, type, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_label_schema_type.rb b/lib/datadog_api_client/v2/models/llm_obs_label_schema_type.rb new file mode 100644 index 000000000000..5c6044f87085 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_label_schema_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 a label in an annotation queue label schema. + class LLMObsLabelSchemaType + include BaseEnumModel + + SCORE = "score".freeze + CATEGORICAL = "categorical".freeze + BOOLEAN = "boolean".freeze + TEXT = "text".freeze + end +end From 8a5a4a56762df79bba2ab7702d045ba7d7bed1c6 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 15:59:41 -0400 Subject: [PATCH 2/2] Regenerate client from commit 749c35a of spec repo (#3266) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v2/openapi.yaml | 69 +++++ lib/datadog_api_client/inflector.rb | 3 + ...bility_pipeline_config_destination_item.rb | 1 + ...pipeline_databricks_zerobus_destination.rb | 263 ++++++++++++++++++ ...ine_databricks_zerobus_destination_auth.rb | 133 +++++++++ ...ine_databricks_zerobus_destination_type.rb | 26 ++ 6 files changed, 495 insertions(+) create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination_auth.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5b3f25722be3..e5175c1dc60a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -46522,6 +46522,7 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineSplunkHecDestination" - $ref: "#/components/schemas/ObservabilityPipelineSumoLogicDestination" - $ref: "#/components/schemas/ObservabilityPipelineSyslogNgDestination" + - $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestination" - $ref: "#/components/schemas/ObservabilityPipelineDatadogMetricsDestination" ObservabilityPipelineConfigPipelineType: default: logs @@ -46806,6 +46807,74 @@ components: - name - config type: object + ObservabilityPipelineDatabricksZerobusDestination: + description: |- + The `databricks_zerobus` destination sends logs to Databricks using the Zerobus ingestion API, streaming data directly into your Databricks Lakehouse. + + **Supported pipeline types:** Logs, rehydration + properties: + auth: + $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestinationAuth" + buffer: + $ref: "#/components/schemas/ObservabilityPipelineBufferOptions" + id: + description: The unique identifier for this component. + example: databricks-zerobus-destination + type: string + ingestion_endpoint: + description: Your Databricks Zerobus ingestion endpoint. This is the endpoint used to stream data directly into your Databricks Lakehouse. + example: https://my-workspace-id.zerobus.us-east-1.cloud.databricks.com + type: string + inputs: + description: A list of component IDs whose output is used as the `input` for this component. + example: ["filter-processor"] + items: + description: The ID of a component whose output is used as input for this destination. + type: string + type: array + table_name: + description: The fully qualified name of your target Databricks table. Make sure this table already exists in your Databricks workspace before deploying. + example: catalog.schema.table + type: string + type: + $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestinationType" + unity_catalog_endpoint: + description: Your Databricks workspace URL. This is used to communicate with the Unity Catalog API. + example: https://my-workspace.cloud.databricks.com + type: string + required: + - id + - type + - inputs + - ingestion_endpoint + - table_name + - unity_catalog_endpoint + - auth + type: object + x-pipeline-types: [logs, rehydration] + ObservabilityPipelineDatabricksZerobusDestinationAuth: + description: OAuth credentials for authenticating with the Databricks Zerobus ingestion API. + properties: + client_id: + description: Your service principal application ID (UUID). + example: 9a8b7c6d-1234-5678-abcd-ef0123456789 + type: string + client_secret_key: + description: Name of the environment variable or secret that holds the OAuth client secret used to authenticate with the Databricks ingestion endpoint. + example: DD_OP_DESTINATION_DATABRICKS_ZEROBUS_OAUTH_CLIENT_SECRET + type: string + required: + - client_id + type: object + ObservabilityPipelineDatabricksZerobusDestinationType: + default: databricks_zerobus + description: The destination type. The value must be `databricks_zerobus`. + enum: + - databricks_zerobus + example: databricks_zerobus + type: string + x-enum-varnames: + - DATABRICKS_ZEROBUS ObservabilityPipelineDatadogAgentSource: description: |- The `datadog_agent` source collects logs/metrics from the Datadog Agent. diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c6d4b2871855..4ae62f21a88a 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4001,6 +4001,9 @@ def overrides "v2.observability_pipeline_custom_processor_type" => "ObservabilityPipelineCustomProcessorType", "v2.observability_pipeline_data" => "ObservabilityPipelineData", "v2.observability_pipeline_data_attributes" => "ObservabilityPipelineDataAttributes", + "v2.observability_pipeline_databricks_zerobus_destination" => "ObservabilityPipelineDatabricksZerobusDestination", + "v2.observability_pipeline_databricks_zerobus_destination_auth" => "ObservabilityPipelineDatabricksZerobusDestinationAuth", + "v2.observability_pipeline_databricks_zerobus_destination_type" => "ObservabilityPipelineDatabricksZerobusDestinationType", "v2.observability_pipeline_datadog_agent_source" => "ObservabilityPipelineDatadogAgentSource", "v2.observability_pipeline_datadog_agent_source_type" => "ObservabilityPipelineDatadogAgentSourceType", "v2.observability_pipeline_datadog_logs_destination" => "ObservabilityPipelineDatadogLogsDestination", diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb index e51008deb906..2da684a6eb50 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb @@ -49,6 +49,7 @@ def openapi_one_of :'ObservabilityPipelineSplunkHecDestination', :'ObservabilityPipelineSumoLogicDestination', :'ObservabilityPipelineSyslogNgDestination', + :'ObservabilityPipelineDatabricksZerobusDestination', :'ObservabilityPipelineDatadogMetricsDestination' ] end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination.rb new file mode 100644 index 000000000000..b34d4233a710 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination.rb @@ -0,0 +1,263 @@ +=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 + # The `databricks_zerobus` destination sends logs to Databricks using the Zerobus ingestion API, streaming data directly into your Databricks Lakehouse. + # + # **Supported pipeline types:** Logs, rehydration + class ObservabilityPipelineDatabricksZerobusDestination + include BaseGenericModel + + # OAuth credentials for authenticating with the Databricks Zerobus ingestion API. + attr_reader :auth + + # Configuration for buffer settings on destination components. + attr_accessor :buffer + + # The unique identifier for this component. + attr_reader :id + + # Your Databricks Zerobus ingestion endpoint. This is the endpoint used to stream data directly into your Databricks Lakehouse. + attr_reader :ingestion_endpoint + + # A list of component IDs whose output is used as the `input` for this component. + attr_reader :inputs + + # The fully qualified name of your target Databricks table. Make sure this table already exists in your Databricks workspace before deploying. + attr_reader :table_name + + # The destination type. The value must be `databricks_zerobus`. + attr_reader :type + + # Your Databricks workspace URL. This is used to communicate with the Unity Catalog API. + attr_reader :unity_catalog_endpoint + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth' => :'auth', + :'buffer' => :'buffer', + :'id' => :'id', + :'ingestion_endpoint' => :'ingestion_endpoint', + :'inputs' => :'inputs', + :'table_name' => :'table_name', + :'type' => :'type', + :'unity_catalog_endpoint' => :'unity_catalog_endpoint' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth' => :'ObservabilityPipelineDatabricksZerobusDestinationAuth', + :'buffer' => :'ObservabilityPipelineBufferOptions', + :'id' => :'String', + :'ingestion_endpoint' => :'String', + :'inputs' => :'Array', + :'table_name' => :'String', + :'type' => :'ObservabilityPipelineDatabricksZerobusDestinationType', + :'unity_catalog_endpoint' => :'String' + } + 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::ObservabilityPipelineDatabricksZerobusDestination` 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?(:'auth') + self.auth = attributes[:'auth'] + end + + if attributes.key?(:'buffer') + self.buffer = attributes[:'buffer'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'ingestion_endpoint') + self.ingestion_endpoint = attributes[:'ingestion_endpoint'] + end + + if attributes.key?(:'inputs') + if (value = attributes[:'inputs']).is_a?(Array) + self.inputs = value + end + end + + if attributes.key?(:'table_name') + self.table_name = attributes[:'table_name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'unity_catalog_endpoint') + self.unity_catalog_endpoint = attributes[:'unity_catalog_endpoint'] + 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 @auth.nil? + return false if @id.nil? + return false if @ingestion_endpoint.nil? + return false if @inputs.nil? + return false if @table_name.nil? + return false if @type.nil? + return false if @unity_catalog_endpoint.nil? + true + end + + # Custom attribute writer method with validation + # @param auth [Object] Object to be assigned + # @!visibility private + def auth=(auth) + if auth.nil? + fail ArgumentError, 'invalid value for "auth", auth cannot be nil.' + end + @auth = auth + 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 ingestion_endpoint [Object] Object to be assigned + # @!visibility private + def ingestion_endpoint=(ingestion_endpoint) + if ingestion_endpoint.nil? + fail ArgumentError, 'invalid value for "ingestion_endpoint", ingestion_endpoint cannot be nil.' + end + @ingestion_endpoint = ingestion_endpoint + end + + # Custom attribute writer method with validation + # @param inputs [Object] Object to be assigned + # @!visibility private + def inputs=(inputs) + if inputs.nil? + fail ArgumentError, 'invalid value for "inputs", inputs cannot be nil.' + end + @inputs = inputs + end + + # Custom attribute writer method with validation + # @param table_name [Object] Object to be assigned + # @!visibility private + def table_name=(table_name) + if table_name.nil? + fail ArgumentError, 'invalid value for "table_name", table_name cannot be nil.' + end + @table_name = table_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 + + # Custom attribute writer method with validation + # @param unity_catalog_endpoint [Object] Object to be assigned + # @!visibility private + def unity_catalog_endpoint=(unity_catalog_endpoint) + if unity_catalog_endpoint.nil? + fail ArgumentError, 'invalid value for "unity_catalog_endpoint", unity_catalog_endpoint cannot be nil.' + end + @unity_catalog_endpoint = unity_catalog_endpoint + 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 && + auth == o.auth && + buffer == o.buffer && + id == o.id && + ingestion_endpoint == o.ingestion_endpoint && + inputs == o.inputs && + table_name == o.table_name && + type == o.type && + unity_catalog_endpoint == o.unity_catalog_endpoint && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth, buffer, id, ingestion_endpoint, inputs, table_name, type, unity_catalog_endpoint, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination_auth.rb b/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination_auth.rb new file mode 100644 index 000000000000..9e6aa9a30cf6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination_auth.rb @@ -0,0 +1,133 @@ +=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 + # OAuth credentials for authenticating with the Databricks Zerobus ingestion API. + class ObservabilityPipelineDatabricksZerobusDestinationAuth + include BaseGenericModel + + # Your service principal application ID (UUID). + attr_reader :client_id + + # Name of the environment variable or secret that holds the OAuth client secret used to authenticate with the Databricks ingestion endpoint. + attr_accessor :client_secret_key + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'client_id' => :'client_id', + :'client_secret_key' => :'client_secret_key' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'client_id' => :'String', + :'client_secret_key' => :'String' + } + 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::ObservabilityPipelineDatabricksZerobusDestinationAuth` 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?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'client_secret_key') + self.client_secret_key = attributes[:'client_secret_key'] + 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 @client_id.nil? + true + end + + # Custom attribute writer method with validation + # @param client_id [Object] Object to be assigned + # @!visibility private + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'invalid value for "client_id", client_id cannot be nil.' + end + @client_id = client_id + 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 && + client_id == o.client_id && + client_secret_key == o.client_secret_key && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [client_id, client_secret_key, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination_type.rb new file mode 100644 index 000000000000..0ade50565aaa --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_databricks_zerobus_destination_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 + # The destination type. The value must be `databricks_zerobus`. + class ObservabilityPipelineDatabricksZerobusDestinationType + include BaseEnumModel + + DATABRICKS_ZEROBUS = "databricks_zerobus".freeze + end +end