From e78e3555d75bf3ee02cc2ffe643ef5b04afb62f5 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 19 May 2026 20:06:12 +0000 Subject: [PATCH] Regenerate client from commit 9acf91f of spec repo --- .generator/schemas/v2/openapi.yaml | 1068 +++++++++++++++++ .../AggregateLLMObsExperimentation.rb | 41 + .../ListLLMObsExperimentEvents.rb | 8 + .../SearchLLMObsExperimentation.rb | 35 + .../SimpleSearchLLMObsExperimentation.rb | 41 + features/scenarios_model_mapping.rb | 14 + features/v2/llm_observability.feature | 80 ++ features/v2/undo.json | 35 +- lib/datadog_api_client/configuration.rb | 4 + lib/datadog_api_client/inflector.rb | 41 + .../v2/api/llm_observability_api.rb | 304 +++++ .../llm_obs_experiment_eval_metric_event.rb | 270 +++++ .../models/llm_obs_experiment_events_type.rb | 26 + ...ment_events_v2_data_attributes_response.rb | 148 +++ ..._obs_experiment_events_v2_data_response.rb | 165 +++ .../llm_obs_experiment_events_v2_response.rb | 133 ++ .../llm_obs_experiment_run_data_response.rb | 171 +++ .../llm_obs_experiment_span_with_evals.rb | 237 ++++ ...obs_experimentation_analytics_aggregate.rb | 239 ++++ ...m_obs_experimentation_analytics_compute.rb | 133 ++ ...ation_analytics_data_attributes_request.rb | 123 ++ ...tion_analytics_data_attributes_response.rb | 144 +++ ..._experimentation_analytics_data_request.rb | 144 +++ ...experimentation_analytics_data_response.rb | 165 +++ ..._obs_experimentation_analytics_group_by.rb | 123 ++ ...m_obs_experimentation_analytics_request.rb | 123 ++ ..._obs_experimentation_analytics_response.rb | 123 ++ ...lm_obs_experimentation_analytics_result.rb | 125 ++ ...lm_obs_experimentation_analytics_search.rb | 123 ++ ...bs_experimentation_analytics_time_range.rb | 144 +++ ...llm_obs_experimentation_analytics_value.rb | 133 ++ ...llm_obs_experimentation_content_preview.rb | 105 ++ .../llm_obs_experimentation_cursor_page.rb | 115 ++ .../models/llm_obs_experimentation_filter.rb | 173 +++ .../models/llm_obs_experimentation_include.rb | 105 ++ .../llm_obs_experimentation_number_page.rb | 148 +++ ...entation_search_data_attributes_request.rb | 153 +++ ...obs_experimentation_search_data_request.rb | 144 +++ ...bs_experimentation_search_data_response.rb | 165 +++ .../llm_obs_experimentation_search_request.rb | 123 ++ ...llm_obs_experimentation_search_response.rb | 133 ++ .../llm_obs_experimentation_search_results.rb | 167 +++ ...n_simple_search_data_attributes_request.rb | 165 +++ ...erimentation_simple_search_data_request.rb | 144 +++ ...rimentation_simple_search_data_response.rb | 165 +++ ..._obs_experimentation_simple_search_meta.rb | 105 ++ ...experimentation_simple_search_meta_page.rb | 186 +++ ...s_experimentation_simple_search_request.rb | 123 ++ ..._experimentation_simple_search_response.rb | 133 ++ .../llm_obs_experimentation_sort_field.rb | 133 ++ ...bs_experimentation_sort_field_direction.rb | 27 + .../v2/models/llm_obs_experimentation_type.rb | 26 + 52 files changed, 7397 insertions(+), 4 deletions(-) create mode 100644 examples/v2/llm-observability/AggregateLLMObsExperimentation.rb create mode 100644 examples/v2/llm-observability/ListLLMObsExperimentEvents.rb create mode 100644 examples/v2/llm-observability/SearchLLMObsExperimentation.rb create mode 100644 examples/v2/llm-observability/SimpleSearchLLMObsExperimentation.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_eval_metric_event.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_events_type.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_run_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_span_with_evals.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_aggregate.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_compute.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_group_by.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_result.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_search.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_time_range.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_value.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_content_preview.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_cursor_page.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_filter.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_include.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_number_page.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_results.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta_page.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field_direction.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 14eb084725ad..786a3e224674 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -43107,6 +43107,75 @@ components: - type - attributes type: object + LLMObsExperimentEvalMetricEvent: + description: An evaluation metric event associated with an experiment span. + properties: + assessment: + $ref: "#/components/schemas/LLMObsMetricAssessment" + boolean_value: + description: Boolean value. Present when `metric_type` is `boolean`. + nullable: true + type: boolean + categorical_value: + description: Categorical value. Present when `metric_type` is `categorical`. + nullable: true + type: string + eval_source_type: + description: Source type of the evaluation. + example: "managed" + type: string + id: + description: Unique identifier of the evaluation metric event. + example: "00000000-0000-0000-0000-000000000001" + type: string + json_value: + additionalProperties: {} + description: JSON value. Present when `metric_type` is `json`. + nullable: true + type: object + label: + description: Label or name for the metric. + example: "faithfulness" + type: string + metadata: + additionalProperties: {} + description: Arbitrary metadata associated with the metric. + nullable: true + type: object + metric_source: + description: Source of the metric. Either `custom` (user-submitted) or `summary` (experiment-level aggregate). + example: "custom" + type: string + metric_type: + $ref: "#/components/schemas/LLMObsMetricScoreType" + reasoning: + description: Human-readable reasoning for the metric value. + nullable: true + type: string + score_value: + description: Numeric score. Present when `metric_type` is `score`. + format: double + nullable: true + type: number + span_id: + description: Span ID this metric is associated with. + example: "span-7a1b2c3d" + type: string + tags: + description: Tags associated with the metric. + items: + type: string + type: array + timestamp_ms: + description: Timestamp when the metric was recorded, in milliseconds since Unix epoch. + example: 1705314600000 + format: int64 + type: integer + trace_id: + description: Trace ID linking this metric to a span. + example: "abc123def456" + type: string + type: object LLMObsExperimentEventsDataAttributesRequest: description: Attributes for pushing experiment events including spans and metrics. properties: @@ -43140,6 +43209,57 @@ components: required: - data type: object + LLMObsExperimentEventsType: + description: Resource type for an experiment events collection. + enum: + - experiment_events + example: experiment_events + type: string + x-enum-varnames: + - EXPERIMENT_EVENTS + LLMObsExperimentEventsV2DataAttributesResponse: + description: Attributes of an experiment events response. + properties: + spans: + description: Experiment spans, each enriched with their associated evaluation metrics. + items: + $ref: "#/components/schemas/LLMObsExperimentSpanWithEvals" + type: array + summary_metrics: + description: Experiment-level summary evaluation metrics (not tied to individual spans). + items: + $ref: "#/components/schemas/LLMObsExperimentEvalMetricEvent" + type: array + required: + - spans + - summary_metrics + type: object + LLMObsExperimentEventsV2DataResponse: + description: JSON:API data object for an experiment events response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentEventsV2DataAttributesResponse" + id: + description: Identifier for this events resource. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentEventsType" + required: + - id + - type + - attributes + type: object + LLMObsExperimentEventsV2Response: + description: Response for listing experiment events (v2/v3). Returns spans and summary metrics in a single resource. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentEventsV2DataResponse" + meta: + $ref: "#/components/schemas/LLMObsCursorMeta" + required: + - data + type: object LLMObsExperimentMetric: description: A metric associated with an LLM Observability experiment span. properties: @@ -43218,6 +43338,34 @@ components: required: - data type: object + LLMObsExperimentRunDataResponse: + description: Data object for an LLM Observability experiment run. + properties: + aggregate_data: + additionalProperties: {} + description: Aggregated metric data for this run. + nullable: true + type: object + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + experiment_id: + description: Identifier of the experiment this run belongs to. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + id: + description: Unique identifier of the experiment run. + example: "7a1b2c3d-4e5f-6789-abcd-ef0123456789" + type: string + run_number: + description: Sequential number of this run within the experiment. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + type: object LLMObsExperimentSpan: description: A span associated with an LLM Observability experiment. properties: @@ -43311,6 +43459,63 @@ components: x-enum-varnames: - OK - ERROR + LLMObsExperimentSpanWithEvals: + description: An experiment span enriched with its associated evaluation metrics. + properties: + dataset_record_id: + description: ID of the dataset record this span evaluated. + nullable: true + type: string + duration: + description: Duration of the span in nanoseconds. + example: 1500000000.0 + format: double + type: number + eval_metrics: + description: Evaluation metrics associated with this span. + items: + $ref: "#/components/schemas/LLMObsExperimentEvalMetricEvent" + type: array + id: + description: Unique identifier of the span. + example: "00000000-0000-0000-0000-000000000001" + type: string + meta: + $ref: "#/components/schemas/LLMObsExperimentSpanMeta" + metrics: + additionalProperties: + format: double + type: number + description: Numeric metrics attached to the span. + type: object + name: + description: Name of the span. + example: "llm_call" + type: string + parent_id: + description: Parent span ID, if any. + type: string + span_id: + description: Span ID. + example: "span-7a1b2c3d" + type: string + start_ns: + description: Start time in nanoseconds since Unix epoch. + example: 1705314600000000000 + format: int64 + type: integer + status: + $ref: "#/components/schemas/LLMObsExperimentSpanStatus" + tags: + description: Tags associated with the span. + items: + type: string + type: array + trace_id: + description: Trace ID. + example: "abc123def456" + type: string + type: object LLMObsExperimentType: description: Resource type of an LLM Observability experiment. enum: @@ -43348,6 +43553,493 @@ components: required: - data type: object + LLMObsExperimentationAnalyticsAggregate: + description: Analytics aggregation parameters. + properties: + compute: + description: List of metric computations to perform. + items: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsCompute" + minItems: 1 + type: array + dataset_version: + description: Filter to a specific dataset version. + format: int64 + nullable: true + type: integer + group_by: + description: Fields to group results by. + items: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsGroupBy" + type: array + indexes: + description: Data indexes to query. At least one is required. + example: + - "experiment-evals" + items: + type: string + minItems: 1 + type: array + limit: + description: Maximum number of results to return. + example: 1000 + format: int32 + maximum: 2147483647 + nullable: true + type: integer + search: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsSearch" + time: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsTimeRange" + required: + - compute + - indexes + - search + type: object + LLMObsExperimentationAnalyticsCompute: + description: A single metric computation definition. + properties: + metric: + description: Name of the metric to compute. + example: "score_value" + type: string + name: + description: Optional alias for this computation in the response. + example: "avg_faithfulness" + type: string + required: + - metric + type: object + LLMObsExperimentationAnalyticsDataAttributesRequest: + description: Attributes for an analytics request. + properties: + aggregate: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsAggregate" + required: + - aggregate + type: object + LLMObsExperimentationAnalyticsDataAttributesResponse: + description: Attributes of an analytics response. + properties: + hit_count: + description: Total number of events matched by the query before grouping. + example: 1500 + format: int64 + type: integer + result: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsResult" + required: + - hit_count + - result + type: object + LLMObsExperimentationAnalyticsDataRequest: + description: Data object for an analytics request. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - type + - attributes + type: object + LLMObsExperimentationAnalyticsDataResponse: + description: JSON:API data object for an analytics response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsDataAttributesResponse" + id: + description: Server-generated identifier for this analytics result. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - id + - type + - attributes + type: object + LLMObsExperimentationAnalyticsGroupBy: + description: A field to group analytics results by. + properties: + field: + description: Field name to group by. + example: "span_id" + type: string + required: + - field + type: object + LLMObsExperimentationAnalyticsRequest: + description: Request to run an analytics aggregation over LLM Observability experimentation data. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsDataRequest" + required: + - data + type: object + LLMObsExperimentationAnalyticsResponse: + description: Response to an analytics query. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsDataResponse" + required: + - data + type: object + LLMObsExperimentationAnalyticsResult: + description: Analytics query result containing all buckets. + properties: + values: + description: List of result buckets. + items: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsValue" + type: array + required: + - values + type: object + LLMObsExperimentationAnalyticsSearch: + description: Search query for filtering analytics data. + properties: + query: + description: Filter expression. + example: "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + required: + - query + type: object + LLMObsExperimentationAnalyticsTimeRange: + description: Unix-millisecond time range for filtering analytics data. + properties: + from: + description: Start of the time range in milliseconds since Unix epoch. + example: 1705312200000 + format: int64 + type: integer + to: + description: End of the time range in milliseconds since Unix epoch. + example: 1705315800000 + format: int64 + type: integer + required: + - from + - to + type: object + LLMObsExperimentationAnalyticsValue: + description: A single analytics result bucket. + properties: + by: + additionalProperties: {} + description: The group-by field values for this bucket. + example: + span_id: "span-7a1b2c3d" + type: object + metrics: + additionalProperties: {} + description: Computed metric values for this bucket. + example: + score_value: 0.85 + type: object + required: + - metrics + type: object + LLMObsExperimentationContentPreview: + description: Options to control content preview truncation. + properties: + limit: + description: Maximum number of characters to include in content previews. + example: 500 + format: int64 + type: integer + type: object + LLMObsExperimentationCursorPage: + description: Cursor-based pagination parameters. + properties: + cursor: + description: Opaque cursor returned from a previous response to fetch the next page. + type: string + limit: + description: Maximum number of results per page. + example: 100 + format: int64 + type: integer + type: object + LLMObsExperimentationFilter: + description: Filter criteria for an experimentation search request. + properties: + include_deleted: + default: false + description: When `true`, include soft-deleted entities alongside active ones. + type: boolean + is_deleted: + default: false + description: When `true`, return only soft-deleted entities. + type: boolean + query: + description: Free-text search query. + example: "my experiment" + type: string + scope: + description: >- + Entity types to search. Valid values are `projects`, `datasets`, `dataset_records`, `experiments`, and `experiment_runs`. + example: + - "experiments" + items: + example: "experiments" + type: string + type: array + version: + description: Filter dataset records by a specific dataset version. + format: int64 + nullable: true + type: integer + required: + - scope + type: object + LLMObsExperimentationInclude: + description: Additional data to include in the response. + properties: + user_data: + default: false + description: When `true`, enrich results with author user data (name and email). + type: boolean + type: object + LLMObsExperimentationNumberPage: + description: Offset-based pagination parameters for simple search. + properties: + limit: + description: Maximum number of results per page. + example: 50 + format: int32 + maximum: 2147483647 + type: integer + number: + description: Page number to retrieve (1-indexed). + example: 1 + format: int32 + maximum: 2147483647 + minimum: 1 + type: integer + type: object + LLMObsExperimentationSearchDataAttributesRequest: + description: Attributes for an experimentation search request. + properties: + content_preview: + $ref: "#/components/schemas/LLMObsExperimentationContentPreview" + filter: + $ref: "#/components/schemas/LLMObsExperimentationFilter" + include: + $ref: "#/components/schemas/LLMObsExperimentationInclude" + page: + $ref: "#/components/schemas/LLMObsExperimentationCursorPage" + required: + - filter + type: object + LLMObsExperimentationSearchDataRequest: + description: Data object for an experimentation search request. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationSearchDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - type + - attributes + type: object + LLMObsExperimentationSearchDataResponse: + description: JSON:API data object for an experimentation search response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationSearchResults" + id: + description: Server-generated identifier for this search result. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - id + - type + - attributes + type: object + LLMObsExperimentationSearchRequest: + description: Request to search across LLM Observability experimentation entities using cursor-based pagination. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationSearchDataRequest" + required: + - data + type: object + LLMObsExperimentationSearchResponse: + description: Response to a cursor-based experimentation search. Returns `200 OK` when all results fit in one page; `206 Partial Content` when a next-page cursor is available. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationSearchDataResponse" + meta: + $ref: "#/components/schemas/LLMObsCursorMeta" + required: + - data + type: object + LLMObsExperimentationSearchResults: + description: The matching experimentation entities grouped by type. + properties: + dataset_records: + description: Matching dataset records. Present when `dataset_records` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsDatasetRecordDataResponse" + nullable: true + type: array + datasets: + description: Matching datasets. Present when `datasets` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsDatasetDataResponse" + nullable: true + type: array + experiment_runs: + description: Matching experiment runs. Present when `experiment_runs` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsExperimentRunDataResponse" + nullable: true + type: array + experiments: + description: Matching experiments. Present when `experiments` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsExperimentDataAttributesResponse" + nullable: true + type: array + projects: + description: Matching projects. Present when `projects` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsProjectDataResponse" + nullable: true + type: array + type: object + LLMObsExperimentationSimpleSearchDataAttributesRequest: + description: Attributes for an experimentation simple search request. + properties: + content_preview: + $ref: "#/components/schemas/LLMObsExperimentationContentPreview" + filter: + $ref: "#/components/schemas/LLMObsExperimentationFilter" + include: + $ref: "#/components/schemas/LLMObsExperimentationInclude" + page: + $ref: "#/components/schemas/LLMObsExperimentationNumberPage" + sort: + description: Sort order for results. + items: + $ref: "#/components/schemas/LLMObsExperimentationSortField" + type: array + required: + - filter + type: object + LLMObsExperimentationSimpleSearchDataRequest: + description: Data object for an experimentation simple search request. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - type + - attributes + type: object + LLMObsExperimentationSimpleSearchDataResponse: + description: JSON:API data object for a simple search response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationSearchResults" + id: + description: Server-generated identifier for this search result. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - id + - type + - attributes + type: object + LLMObsExperimentationSimpleSearchMeta: + description: Pagination metadata for a simple search response. + properties: + page: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchMetaPage" + type: object + LLMObsExperimentationSimpleSearchMetaPage: + description: Page metadata. + properties: + current: + description: Current page number. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + limit: + description: Page size used for this response. + example: 50 + format: int32 + maximum: 2147483647 + type: integer + total_count: + description: Total number of matching results (capped at the maximum search limit). + example: 193 + format: int32 + maximum: 2147483647 + type: integer + total_pages: + description: Total number of pages available. + example: 4 + format: int32 + maximum: 2147483647 + type: integer + type: object + LLMObsExperimentationSimpleSearchRequest: + description: Request to search across LLM Observability experimentation entities using offset-based pagination. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchDataRequest" + required: + - data + type: object + LLMObsExperimentationSimpleSearchResponse: + description: Response to an offset-based experimentation simple search. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchDataResponse" + meta: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchMeta" + required: + - data + type: object + LLMObsExperimentationSortField: + description: A field and direction to sort results by. + properties: + direction: + $ref: "#/components/schemas/LLMObsExperimentationSortFieldDirection" + field: + description: The field name to sort on. + example: "created_at" + type: string + required: + - field + type: object + LLMObsExperimentationSortFieldDirection: + description: Sort direction. + enum: + - asc + - desc + example: "desc" + type: string + x-enum-varnames: + - ASC + - DESC + LLMObsExperimentationType: + description: Resource type for experimentation search and analytics operations. + enum: + - experimentation + example: experimentation + type: string + x-enum-varnames: + - EXPERIMENTATION LLMObsExperimentsResponse: description: Response containing a list of LLM Observability experiments. properties: @@ -118672,6 +119364,296 @@ 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/experimentation/analytics: + post: + description: |- + Execute an analytics aggregation over LLM Observability experimentation data. + Use this endpoint to compute metrics (for example average eval scores) grouped by fields such as `span_id` or `experiment_id`. + + At least one `compute` definition and one `index` must be provided. + operationId: AggregateLLMObsExperimentation + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + aggregate: + compute: + - metric: score_value + name: avg_faithfulness + group_by: + - field: span_id + indexes: + - experiment-evals + search: + query: "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness" + type: experimentation + schema: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsRequest" + description: Analytics payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + hit_count: 42 + result: + values: + - by: + span_id: span-7a1b2c3d + metrics: + avg_faithfulness: 0.87 + id: 00000000-0000-0000-0000-000000000001 + type: experimentation + schema: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Aggregate LLM Observability experimentation + 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/experimentation/search: + post: + description: |- + Search across LLM Observability experimentation entities — projects, datasets, dataset records, experiments, and experiment runs — using cursor-based pagination. + + The `filter.scope` field controls which entity types are returned. At least one valid scope must be provided. + + Returns `200 OK` when all results fit in a single page. Returns `206 Partial Content` with a cursor in `meta.after` when additional pages are available. + operationId: SearchLLMObsExperimentation + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + filter: + query: "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751" + scope: + - experiments + page: + limit: 50 + type: experimentation + schema: + $ref: "#/components/schemas/LLMObsExperimentationSearchRequest" + description: Experimentation search payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + experiments: + - created_at: "2024-01-01T00:00:00+00:00" + dataset_id: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d + description: "" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + name: My Experiment v1 + project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000001 + type: experimentation + meta: + after: + schema: + $ref: "#/components/schemas/LLMObsExperimentationSearchResponse" + description: OK — all results returned in a single page. + "206": + content: + application/json: + examples: + default: + value: + data: + attributes: + experiments: + - created_at: "2024-01-01T00:00:00+00:00" + dataset_id: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d + description: "" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + name: My Experiment v1 + project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000001 + type: experimentation + meta: + after: eyJpZCI6ImFiYzEyMyJ9 + schema: + $ref: "#/components/schemas/LLMObsExperimentationSearchResponse" + description: Partial Content — more results are available. Use `meta.after` as the next `page.cursor`. + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Search LLM Observability experimentation entities + 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/experimentation/simple-search: + post: + description: |- + Search across LLM Observability experimentation entities using offset-based (page-number) pagination. + Use this endpoint when you need total page count or want to navigate to a specific page number. + + The `filter.scope` field controls which entity types are returned. At least one valid scope must be provided. + operationId: SimpleSearchLLMObsExperimentation + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + filter: + query: "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751" + scope: + - experiments + page: + limit: 50 + number: 1 + sort: + - direction: desc + field: created_at + type: experimentation + schema: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchRequest" + description: Simple search payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + experiments: + - created_at: "2024-01-01T00:00:00+00:00" + description: "" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + name: My Experiment v1 + project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000001 + type: experimentation + meta: + page: + current: 1 + limit: 50 + total_count: 63 + total_pages: 2 + schema: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Simple search experimentation entities + 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. @@ -119937,6 +120919,92 @@ 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/v3/experiments/{experiment_id}/events: + get: + description: Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based pagination. + operationId: ListLLMObsExperimentEvents + parameters: + - $ref: "#/components/parameters/LLMObsExperimentIDPathParameter" + - description: Maximum number of spans to return per page. Defaults to 5000. + in: query + name: page[limit] + schema: + default: 5000 + format: int64 + type: integer + - description: Opaque cursor from a previous response to fetch the next page of results. + in: query + name: page[cursor] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + spans: + - duration: 1500000000.0 + eval_metrics: [] + id: 00000000-0000-0000-0000-000000000002 + name: llm_call + span_id: span-7a1b2c3d + start_ns: 1705314600000000000 + status: ok + tags: [] + trace_id: abc123def456 + summary_metrics: [] + id: 00000000-0000-0000-0000-000000000001 + type: experiment_events + meta: + after: + schema: + $ref: "#/components/schemas/LLMObsExperimentEventsV2Response" + 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: List events for an LLM Observability experiment + 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/logs: post: description: |- diff --git a/examples/v2/llm-observability/AggregateLLMObsExperimentation.rb b/examples/v2/llm-observability/AggregateLLMObsExperimentation.rb new file mode 100644 index 000000000000..2dfba37bc76a --- /dev/null +++ b/examples/v2/llm-observability/AggregateLLMObsExperimentation.rb @@ -0,0 +1,41 @@ +# Aggregate LLM Observability experimentation returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.aggregate_llm_obs_experimentation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new + +body = DatadogAPIClient::V2::LLMObsExperimentationAnalyticsRequest.new({ + data: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsDataRequest.new({ + attributes: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsDataAttributesRequest.new({ + aggregate: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsAggregate.new({ + compute: [ + DatadogAPIClient::V2::LLMObsExperimentationAnalyticsCompute.new({ + metric: "score_value", + name: "avg_faithfulness", + }), + ], + dataset_version: nil, + group_by: [ + DatadogAPIClient::V2::LLMObsExperimentationAnalyticsGroupBy.new({ + field: "span_id", + }), + ], + indexes: [ + "experiment-evals", + ], + limit: 1000, + search: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsSearch.new({ + query: "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012", + }), + time: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsTimeRange.new({ + from: 1705312200000, + to: 1705315800000, + }), + }), + }), + type: DatadogAPIClient::V2::LLMObsExperimentationType::EXPERIMENTATION, + }), +}) +p api_instance.aggregate_llm_obs_experimentation(body) diff --git a/examples/v2/llm-observability/ListLLMObsExperimentEvents.rb b/examples/v2/llm-observability/ListLLMObsExperimentEvents.rb new file mode 100644 index 000000000000..5c8f78774b04 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsExperimentEvents.rb @@ -0,0 +1,8 @@ +# List events for an LLM Observability experiment returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_llm_obs_experiment_events".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new +p api_instance.list_llm_obs_experiment_events("experiment_id") diff --git a/examples/v2/llm-observability/SearchLLMObsExperimentation.rb b/examples/v2/llm-observability/SearchLLMObsExperimentation.rb new file mode 100644 index 000000000000..180dafb61d8e --- /dev/null +++ b/examples/v2/llm-observability/SearchLLMObsExperimentation.rb @@ -0,0 +1,35 @@ +# Search LLM Observability experimentation entities returns "Partial Content — more results are available. Use +# `meta.after` as the next `page.cursor`." response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.search_llm_obs_experimentation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new + +body = DatadogAPIClient::V2::LLMObsExperimentationSearchRequest.new({ + data: DatadogAPIClient::V2::LLMObsExperimentationSearchDataRequest.new({ + attributes: DatadogAPIClient::V2::LLMObsExperimentationSearchDataAttributesRequest.new({ + content_preview: DatadogAPIClient::V2::LLMObsExperimentationContentPreview.new({ + limit: 500, + }), + filter: DatadogAPIClient::V2::LLMObsExperimentationFilter.new({ + include_deleted: false, + is_deleted: false, + query: "my experiment", + scope: [ + "experiments", + ], + version: nil, + }), + include: DatadogAPIClient::V2::LLMObsExperimentationInclude.new({ + user_data: false, + }), + page: DatadogAPIClient::V2::LLMObsExperimentationCursorPage.new({ + limit: 100, + }), + }), + type: DatadogAPIClient::V2::LLMObsExperimentationType::EXPERIMENTATION, + }), +}) +p api_instance.search_llm_obs_experimentation(body) diff --git a/examples/v2/llm-observability/SimpleSearchLLMObsExperimentation.rb b/examples/v2/llm-observability/SimpleSearchLLMObsExperimentation.rb new file mode 100644 index 000000000000..bd9ca69ca71a --- /dev/null +++ b/examples/v2/llm-observability/SimpleSearchLLMObsExperimentation.rb @@ -0,0 +1,41 @@ +# Simple search experimentation entities returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.simple_search_llm_obs_experimentation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new + +body = DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchRequest.new({ + data: DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchDataRequest.new({ + attributes: DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchDataAttributesRequest.new({ + content_preview: DatadogAPIClient::V2::LLMObsExperimentationContentPreview.new({ + limit: 500, + }), + filter: DatadogAPIClient::V2::LLMObsExperimentationFilter.new({ + include_deleted: false, + is_deleted: false, + query: "my experiment", + scope: [ + "experiments", + ], + version: nil, + }), + include: DatadogAPIClient::V2::LLMObsExperimentationInclude.new({ + user_data: false, + }), + page: DatadogAPIClient::V2::LLMObsExperimentationNumberPage.new({ + limit: 50, + number: 1, + }), + sort: [ + DatadogAPIClient::V2::LLMObsExperimentationSortField.new({ + direction: DatadogAPIClient::V2::LLMObsExperimentationSortFieldDirection::DESC, + field: "created_at", + }), + ], + }), + type: DatadogAPIClient::V2::LLMObsExperimentationType::EXPERIMENTATION, + }), +}) +p api_instance.simple_search_llm_obs_experimentation(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 6991636cd55c..090f8f1abd3f 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -951,6 +951,15 @@ "queue_id" => "String", "body" => "LLMObsAnnotationQueueLabelSchemaUpdateRequest", }, + "v2.AggregateLLMObsExperimentation" => { + "body" => "LLMObsExperimentationAnalyticsRequest", + }, + "v2.SearchLLMObsExperimentation" => { + "body" => "LLMObsExperimentationSearchRequest", + }, + "v2.SimpleSearchLLMObsExperimentation" => { + "body" => "LLMObsExperimentationSimpleSearchRequest", + }, "v2.ListLLMObsExperiments" => { "filter_project_id" => "String", "filter_dataset_id" => "String", @@ -1030,6 +1039,11 @@ "dataset_id" => "String", "body" => "LLMObsDeleteDatasetRecordsRequest", }, + "v2.ListLLMObsExperimentEvents" => { + "experiment_id" => "String", + "page_limit" => "Integer", + "page_cursor" => "String", + }, "v2.CreateDatastore" => { "body" => "CreateAppsDatastoreRequest", }, diff --git a/features/v2/llm_observability.feature b/features/v2/llm_observability.feature index 20b95487da8b..e8661824fd46 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -53,6 +53,22 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability + Scenario: Aggregate LLM Observability experimentation returns "Bad Request" response + Given operation "AggregateLLMObsExperimentation" enabled + And new "AggregateLLMObsExperimentation" request + And body with value {"data": {"attributes": {"aggregate": {"compute": [{"metric": "score_value", "name": "avg_faithfulness"}], "dataset_version": null, "group_by": [{"field": "span_id"}], "indexes": ["experiment-evals"], "limit": 1000, "search": {"query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012"}, "time": {"from": 1705312200000, "to": 1705315800000}}}, "type": "experimentation"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Aggregate LLM Observability experimentation returns "OK" response + Given operation "AggregateLLMObsExperimentation" enabled + And new "AggregateLLMObsExperimentation" request + And body with value {"data": {"attributes": {"aggregate": {"compute": [{"metric": "score_value", "name": "avg_faithfulness"}], "dataset_version": null, "group_by": [{"field": "span_id"}], "indexes": ["experiment-evals"], "limit": 1000, "search": {"query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012"}, "time": {"from": 1705312200000, "to": 1705315800000}}}, "type": "experimentation"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Append records to an LLM Observability dataset returns "Bad Request" response Given operation "CreateLLMObsDatasetRecords" enabled @@ -542,6 +558,30 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: List events for an LLM Observability experiment returns "Bad Request" response + Given operation "ListLLMObsExperimentEvents" enabled + And new "ListLLMObsExperimentEvents" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List events for an LLM Observability experiment returns "Not Found" response + Given operation "ListLLMObsExperimentEvents" enabled + And new "ListLLMObsExperimentEvents" request + And request contains "experiment_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: List events for an LLM Observability experiment returns "OK" response + Given operation "ListLLMObsExperimentEvents" enabled + And new "ListLLMObsExperimentEvents" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Push events for an LLM Observability experiment returns "Accepted" response Given operation "CreateLLMObsExperimentEvents" enabled @@ -569,6 +609,46 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability + Scenario: Search LLM Observability experimentation entities returns "Bad Request" response + Given operation "SearchLLMObsExperimentation" enabled + And new "SearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 100}}, "type": "experimentation"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Search LLM Observability experimentation entities returns "OK — all results returned in a single page." response + Given operation "SearchLLMObsExperimentation" enabled + And new "SearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 100}}, "type": "experimentation"}} + When the request is sent + Then the response status is 200 OK — all results returned in a single page. + + @generated @skip @team:DataDog/ml-observability + Scenario: Search LLM Observability experimentation entities returns "Partial Content — more results are available. Use `meta.after` as the next `page.cursor`." response + Given operation "SearchLLMObsExperimentation" enabled + And new "SearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 100}}, "type": "experimentation"}} + When the request is sent + Then the response status is 206 Partial Content — more results are available. Use `meta.after` as the next `page.cursor`. + + @generated @skip @team:DataDog/ml-observability + Scenario: Simple search experimentation entities returns "Bad Request" response + Given operation "SimpleSearchLLMObsExperimentation" enabled + And new "SimpleSearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 50, "number": 1}, "sort": [{"direction": "desc", "field": "created_at"}]}, "type": "experimentation"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Simple search experimentation entities returns "OK" response + Given operation "SimpleSearchLLMObsExperimentation" enabled + And new "SimpleSearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 50, "number": 1}, "sort": [{"direction": "desc", "field": "created_at"}]}, "type": "experimentation"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Update LLM Observability dataset records returns "Bad Request" response Given operation "UpdateLLMObsDatasetRecords" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index 23608c3f57a3..87b091b20509 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3732,6 +3732,24 @@ "type": "idempotent" } }, + "AggregateLLMObsExperimentation": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "SearchLLMObsExperimentation": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "SimpleSearchLLMObsExperimentation": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "ListLLMObsExperiments": { "tag": "LLM Observability", "undo": { @@ -3741,15 +3759,19 @@ "CreateLLMObsExperiment": { "tag": "LLM Observability", "undo": { - "operationId": "TODO", - "parameters": [], + "operationId": "DeleteLLMObsExperiments", + "parameters": [ + { + "name": "body", + "template": "{\"data\": {\"attributes\": {\"experiment_ids\": [\"{{ data.id }}\"]}, \"type\": \"experiments\"}}" + } + ], "type": "unsafe" } }, "DeleteLLMObsExperiments": { "tag": "LLM Observability", "undo": { - "operationId": "TODO", "parameters": [], "type": "unsafe" } @@ -3763,7 +3785,6 @@ "CreateLLMObsExperimentEvents": { "tag": "LLM Observability", "undo": { - "operationId": "TODO", "parameters": [], "type": "unsafe" } @@ -3861,6 +3882,12 @@ "type": "unsafe" } }, + "ListLLMObsExperimentEvents": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "SubmitLog": { "tag": "Logs", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 6e22aee19a43..45d551b99441 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -207,6 +207,7 @@ def initialize "v2.list_fleet_tracers": false, "v2.trigger_fleet_schedule": false, "v2.update_fleet_schedule": false, + "v2.aggregate_llm_obs_experimentation": false, "v2.create_llm_obs_annotation_queue": false, "v2.create_llm_obs_annotation_queue_interactions": false, "v2.create_llm_obs_dataset": false, @@ -227,8 +228,11 @@ def initialize "v2.list_llm_obs_annotation_queues": false, "v2.list_llm_obs_dataset_records": false, "v2.list_llm_obs_datasets": false, + "v2.list_llm_obs_experiment_events": false, "v2.list_llm_obs_experiments": false, "v2.list_llm_obs_projects": false, + "v2.search_llm_obs_experimentation": false, + "v2.simple_search_llm_obs_experimentation": 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, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index f16ca47bd9fd..de4099659ff1 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3785,21 +3785,62 @@ def overrides "v2.llm_obs_display_block_interaction_response_item" => "LLMObsDisplayBlockInteractionResponseItem", "v2.llm_obs_display_block_interaction_type" => "LLMObsDisplayBlockInteractionType", "v2.llm_obs_event_type" => "LLMObsEventType", + "v2.llm_obs_experimentation_analytics_aggregate" => "LLMObsExperimentationAnalyticsAggregate", + "v2.llm_obs_experimentation_analytics_compute" => "LLMObsExperimentationAnalyticsCompute", + "v2.llm_obs_experimentation_analytics_data_attributes_request" => "LLMObsExperimentationAnalyticsDataAttributesRequest", + "v2.llm_obs_experimentation_analytics_data_attributes_response" => "LLMObsExperimentationAnalyticsDataAttributesResponse", + "v2.llm_obs_experimentation_analytics_data_request" => "LLMObsExperimentationAnalyticsDataRequest", + "v2.llm_obs_experimentation_analytics_data_response" => "LLMObsExperimentationAnalyticsDataResponse", + "v2.llm_obs_experimentation_analytics_group_by" => "LLMObsExperimentationAnalyticsGroupBy", + "v2.llm_obs_experimentation_analytics_request" => "LLMObsExperimentationAnalyticsRequest", + "v2.llm_obs_experimentation_analytics_response" => "LLMObsExperimentationAnalyticsResponse", + "v2.llm_obs_experimentation_analytics_result" => "LLMObsExperimentationAnalyticsResult", + "v2.llm_obs_experimentation_analytics_search" => "LLMObsExperimentationAnalyticsSearch", + "v2.llm_obs_experimentation_analytics_time_range" => "LLMObsExperimentationAnalyticsTimeRange", + "v2.llm_obs_experimentation_analytics_value" => "LLMObsExperimentationAnalyticsValue", + "v2.llm_obs_experimentation_content_preview" => "LLMObsExperimentationContentPreview", + "v2.llm_obs_experimentation_cursor_page" => "LLMObsExperimentationCursorPage", + "v2.llm_obs_experimentation_filter" => "LLMObsExperimentationFilter", + "v2.llm_obs_experimentation_include" => "LLMObsExperimentationInclude", + "v2.llm_obs_experimentation_number_page" => "LLMObsExperimentationNumberPage", + "v2.llm_obs_experimentation_search_data_attributes_request" => "LLMObsExperimentationSearchDataAttributesRequest", + "v2.llm_obs_experimentation_search_data_request" => "LLMObsExperimentationSearchDataRequest", + "v2.llm_obs_experimentation_search_data_response" => "LLMObsExperimentationSearchDataResponse", + "v2.llm_obs_experimentation_search_request" => "LLMObsExperimentationSearchRequest", + "v2.llm_obs_experimentation_search_response" => "LLMObsExperimentationSearchResponse", + "v2.llm_obs_experimentation_search_results" => "LLMObsExperimentationSearchResults", + "v2.llm_obs_experimentation_simple_search_data_attributes_request" => "LLMObsExperimentationSimpleSearchDataAttributesRequest", + "v2.llm_obs_experimentation_simple_search_data_request" => "LLMObsExperimentationSimpleSearchDataRequest", + "v2.llm_obs_experimentation_simple_search_data_response" => "LLMObsExperimentationSimpleSearchDataResponse", + "v2.llm_obs_experimentation_simple_search_meta" => "LLMObsExperimentationSimpleSearchMeta", + "v2.llm_obs_experimentation_simple_search_meta_page" => "LLMObsExperimentationSimpleSearchMetaPage", + "v2.llm_obs_experimentation_simple_search_request" => "LLMObsExperimentationSimpleSearchRequest", + "v2.llm_obs_experimentation_simple_search_response" => "LLMObsExperimentationSimpleSearchResponse", + "v2.llm_obs_experimentation_sort_field" => "LLMObsExperimentationSortField", + "v2.llm_obs_experimentation_sort_field_direction" => "LLMObsExperimentationSortFieldDirection", + "v2.llm_obs_experimentation_type" => "LLMObsExperimentationType", "v2.llm_obs_experiment_data_attributes_request" => "LLMObsExperimentDataAttributesRequest", "v2.llm_obs_experiment_data_attributes_response" => "LLMObsExperimentDataAttributesResponse", "v2.llm_obs_experiment_data_request" => "LLMObsExperimentDataRequest", "v2.llm_obs_experiment_data_response" => "LLMObsExperimentDataResponse", + "v2.llm_obs_experiment_eval_metric_event" => "LLMObsExperimentEvalMetricEvent", "v2.llm_obs_experiment_events_data_attributes_request" => "LLMObsExperimentEventsDataAttributesRequest", "v2.llm_obs_experiment_events_data_request" => "LLMObsExperimentEventsDataRequest", "v2.llm_obs_experiment_events_request" => "LLMObsExperimentEventsRequest", + "v2.llm_obs_experiment_events_type" => "LLMObsExperimentEventsType", + "v2.llm_obs_experiment_events_v2_data_attributes_response" => "LLMObsExperimentEventsV2DataAttributesResponse", + "v2.llm_obs_experiment_events_v2_data_response" => "LLMObsExperimentEventsV2DataResponse", + "v2.llm_obs_experiment_events_v2_response" => "LLMObsExperimentEventsV2Response", "v2.llm_obs_experiment_metric" => "LLMObsExperimentMetric", "v2.llm_obs_experiment_metric_error" => "LLMObsExperimentMetricError", "v2.llm_obs_experiment_request" => "LLMObsExperimentRequest", "v2.llm_obs_experiment_response" => "LLMObsExperimentResponse", + "v2.llm_obs_experiment_run_data_response" => "LLMObsExperimentRunDataResponse", "v2.llm_obs_experiment_span" => "LLMObsExperimentSpan", "v2.llm_obs_experiment_span_error" => "LLMObsExperimentSpanError", "v2.llm_obs_experiment_span_meta" => "LLMObsExperimentSpanMeta", "v2.llm_obs_experiment_span_status" => "LLMObsExperimentSpanStatus", + "v2.llm_obs_experiment_span_with_evals" => "LLMObsExperimentSpanWithEvals", "v2.llm_obs_experiments_response" => "LLMObsExperimentsResponse", "v2.llm_obs_experiment_type" => "LLMObsExperimentType", "v2.llm_obs_experiment_update_data_attributes_request" => "LLMObsExperimentUpdateDataAttributesRequest", 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 5686a030aca6..e3a6d14ebece 100644 --- a/lib/datadog_api_client/v2/api/llm_observability_api.rb +++ b/lib/datadog_api_client/v2/api/llm_observability_api.rb @@ -23,6 +23,82 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end + # Aggregate LLM Observability experimentation. + # + # @see #aggregate_llm_obs_experimentation_with_http_info + def aggregate_llm_obs_experimentation(body, opts = {}) + data, _status_code, _headers = aggregate_llm_obs_experimentation_with_http_info(body, opts) + data + end + + # Aggregate LLM Observability experimentation. + # + # Execute an analytics aggregation over LLM Observability experimentation data. + # Use this endpoint to compute metrics (for example average eval scores) grouped by fields such as `span_id` or `experiment_id`. + # + # At least one `compute` definition and one `index` must be provided. + # + # @param body [LLMObsExperimentationAnalyticsRequest] Analytics payload. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsExperimentationAnalyticsResponse, Integer, Hash)>] LLMObsExperimentationAnalyticsResponse data, response status code and response headers + def aggregate_llm_obs_experimentation_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.aggregate_llm_obs_experimentation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.aggregate_llm_obs_experimentation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.aggregate_llm_obs_experimentation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.aggregate_llm_obs_experimentation ...' + 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.aggregate_llm_obs_experimentation" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/experimentation/analytics' + + # 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] || 'LLMObsExperimentationAnalyticsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :aggregate_llm_obs_experimentation, + :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::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LLMObservabilityAPI#aggregate_llm_obs_experimentation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create an LLM Observability annotation queue. # # @see #create_llm_obs_annotation_queue_with_http_info @@ -1544,6 +1620,81 @@ def list_llm_obs_datasets_with_http_info(project_id, opts = {}) return data, status_code, headers end + # List events for an LLM Observability experiment. + # + # @see #list_llm_obs_experiment_events_with_http_info + def list_llm_obs_experiment_events(experiment_id, opts = {}) + data, _status_code, _headers = list_llm_obs_experiment_events_with_http_info(experiment_id, opts) + data + end + + # List events for an LLM Observability experiment. + # + # Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based pagination. + # + # @param experiment_id [String] The ID of the LLM Observability experiment. + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_limit Maximum number of spans to return per page. Defaults to 5000. + # @option opts [String] :page_cursor Opaque cursor from a previous response to fetch the next page of results. + # @return [Array<(LLMObsExperimentEventsV2Response, Integer, Hash)>] LLMObsExperimentEventsV2Response data, response status code and response headers + def list_llm_obs_experiment_events_with_http_info(experiment_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_llm_obs_experiment_events".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_llm_obs_experiment_events") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_llm_obs_experiment_events")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.list_llm_obs_experiment_events ...' + end + # verify the required parameter 'experiment_id' is set + if @api_client.config.client_side_validation && experiment_id.nil? + fail ArgumentError, "Missing the required parameter 'experiment_id' when calling LLMObservabilityAPI.list_llm_obs_experiment_events" + end + # resource path + local_var_path = '/api/v2/llm-obs/v3/experiments/{experiment_id}/events'.sub('{experiment_id}', CGI.escape(experiment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'LLMObsExperimentEventsV2Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_llm_obs_experiment_events, + :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#list_llm_obs_experiment_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List LLM Observability experiments. # # @see #list_llm_obs_experiments_with_http_info @@ -1694,6 +1845,159 @@ def list_llm_obs_projects_with_http_info(opts = {}) return data, status_code, headers end + # Search LLM Observability experimentation entities. + # + # @see #search_llm_obs_experimentation_with_http_info + def search_llm_obs_experimentation(body, opts = {}) + data, _status_code, _headers = search_llm_obs_experimentation_with_http_info(body, opts) + data + end + + # Search LLM Observability experimentation entities. + # + # Search across LLM Observability experimentation entities — projects, datasets, dataset records, experiments, and experiment runs — using cursor-based pagination. + # + # The `filter.scope` field controls which entity types are returned. At least one valid scope must be provided. + # + # Returns `200 OK` when all results fit in a single page. Returns `206 Partial Content` with a cursor in `meta.after` when additional pages are available. + # + # @param body [LLMObsExperimentationSearchRequest] Experimentation search payload. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsExperimentationSearchResponse, Integer, Hash)>] LLMObsExperimentationSearchResponse data, response status code and response headers + def search_llm_obs_experimentation_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.search_llm_obs_experimentation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_llm_obs_experimentation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_llm_obs_experimentation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.search_llm_obs_experimentation ...' + 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.search_llm_obs_experimentation" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/experimentation/search' + + # 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] || 'LLMObsExperimentationSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :search_llm_obs_experimentation, + :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::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LLMObservabilityAPI#search_llm_obs_experimentation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Simple search experimentation entities. + # + # @see #simple_search_llm_obs_experimentation_with_http_info + def simple_search_llm_obs_experimentation(body, opts = {}) + data, _status_code, _headers = simple_search_llm_obs_experimentation_with_http_info(body, opts) + data + end + + # Simple search experimentation entities. + # + # Search across LLM Observability experimentation entities using offset-based (page-number) pagination. + # Use this endpoint when you need total page count or want to navigate to a specific page number. + # + # The `filter.scope` field controls which entity types are returned. At least one valid scope must be provided. + # + # @param body [LLMObsExperimentationSimpleSearchRequest] Simple search payload. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsExperimentationSimpleSearchResponse, Integer, Hash)>] LLMObsExperimentationSimpleSearchResponse data, response status code and response headers + def simple_search_llm_obs_experimentation_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.simple_search_llm_obs_experimentation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.simple_search_llm_obs_experimentation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.simple_search_llm_obs_experimentation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.simple_search_llm_obs_experimentation ...' + 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.simple_search_llm_obs_experimentation" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/experimentation/simple-search' + + # 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] || 'LLMObsExperimentationSimpleSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :simple_search_llm_obs_experimentation, + :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::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LLMObservabilityAPI#simple_search_llm_obs_experimentation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update an LLM Observability annotation queue. # # @see #update_llm_obs_annotation_queue_with_http_info diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_eval_metric_event.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_eval_metric_event.rb new file mode 100644 index 000000000000..9b7ff13830a4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_eval_metric_event.rb @@ -0,0 +1,270 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An evaluation metric event associated with an experiment span. + class LLMObsExperimentEvalMetricEvent + include BaseGenericModel + + # Assessment result for an LLM Observability experiment metric. + attr_accessor :assessment + + # Boolean value. Present when `metric_type` is `boolean`. + attr_accessor :boolean_value + + # Categorical value. Present when `metric_type` is `categorical`. + attr_accessor :categorical_value + + # Source type of the evaluation. + attr_accessor :eval_source_type + + # Unique identifier of the evaluation metric event. + attr_accessor :id + + # JSON value. Present when `metric_type` is `json`. + attr_accessor :json_value + + # Label or name for the metric. + attr_accessor :label + + # Arbitrary metadata associated with the metric. + attr_accessor :metadata + + # Source of the metric. Either `custom` (user-submitted) or `summary` (experiment-level aggregate). + attr_accessor :metric_source + + # Type of metric recorded for an LLM Observability experiment. + attr_accessor :metric_type + + # Human-readable reasoning for the metric value. + attr_accessor :reasoning + + # Numeric score. Present when `metric_type` is `score`. + attr_accessor :score_value + + # Span ID this metric is associated with. + attr_accessor :span_id + + # Tags associated with the metric. + attr_accessor :tags + + # Timestamp when the metric was recorded, in milliseconds since Unix epoch. + attr_accessor :timestamp_ms + + # Trace ID linking this metric to a span. + attr_accessor :trace_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'assessment' => :'assessment', + :'boolean_value' => :'boolean_value', + :'categorical_value' => :'categorical_value', + :'eval_source_type' => :'eval_source_type', + :'id' => :'id', + :'json_value' => :'json_value', + :'label' => :'label', + :'metadata' => :'metadata', + :'metric_source' => :'metric_source', + :'metric_type' => :'metric_type', + :'reasoning' => :'reasoning', + :'score_value' => :'score_value', + :'span_id' => :'span_id', + :'tags' => :'tags', + :'timestamp_ms' => :'timestamp_ms', + :'trace_id' => :'trace_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'assessment' => :'LLMObsMetricAssessment', + :'boolean_value' => :'Boolean', + :'categorical_value' => :'String', + :'eval_source_type' => :'String', + :'id' => :'String', + :'json_value' => :'Hash', + :'label' => :'String', + :'metadata' => :'Hash', + :'metric_source' => :'String', + :'metric_type' => :'LLMObsMetricScoreType', + :'reasoning' => :'String', + :'score_value' => :'Float', + :'span_id' => :'String', + :'tags' => :'Array', + :'timestamp_ms' => :'Integer', + :'trace_id' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'boolean_value', + :'categorical_value', + :'json_value', + :'metadata', + :'reasoning', + :'score_value', + ]) + 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::LLMObsExperimentEvalMetricEvent` 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?(:'assessment') + self.assessment = attributes[:'assessment'] + end + + if attributes.key?(:'boolean_value') + self.boolean_value = attributes[:'boolean_value'] + end + + if attributes.key?(:'categorical_value') + self.categorical_value = attributes[:'categorical_value'] + end + + if attributes.key?(:'eval_source_type') + self.eval_source_type = attributes[:'eval_source_type'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'json_value') + self.json_value = attributes[:'json_value'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'metric_source') + self.metric_source = attributes[:'metric_source'] + end + + if attributes.key?(:'metric_type') + self.metric_type = attributes[:'metric_type'] + end + + if attributes.key?(:'reasoning') + self.reasoning = attributes[:'reasoning'] + end + + if attributes.key?(:'score_value') + self.score_value = attributes[:'score_value'] + end + + if attributes.key?(:'span_id') + self.span_id = attributes[:'span_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'trace_id') + self.trace_id = attributes[:'trace_id'] + end + 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 && + assessment == o.assessment && + boolean_value == o.boolean_value && + categorical_value == o.categorical_value && + eval_source_type == o.eval_source_type && + id == o.id && + json_value == o.json_value && + label == o.label && + metadata == o.metadata && + metric_source == o.metric_source && + metric_type == o.metric_type && + reasoning == o.reasoning && + score_value == o.score_value && + span_id == o.span_id && + tags == o.tags && + timestamp_ms == o.timestamp_ms && + trace_id == o.trace_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [assessment, boolean_value, categorical_value, eval_source_type, id, json_value, label, metadata, metric_source, metric_type, reasoning, score_value, span_id, tags, timestamp_ms, trace_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_events_type.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_type.rb new file mode 100644 index 000000000000..ff6fb3802e2d --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Resource type for an experiment events collection. + class LLMObsExperimentEventsType + include BaseEnumModel + + EXPERIMENT_EVENTS = "experiment_events".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_attributes_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_attributes_response.rb new file mode 100644 index 000000000000..07e10fb1615a --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_attributes_response.rb @@ -0,0 +1,148 @@ +=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 experiment events response. + class LLMObsExperimentEventsV2DataAttributesResponse + include BaseGenericModel + + # Experiment spans, each enriched with their associated evaluation metrics. + attr_reader :spans + + # Experiment-level summary evaluation metrics (not tied to individual spans). + attr_reader :summary_metrics + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'spans' => :'spans', + :'summary_metrics' => :'summary_metrics' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'spans' => :'Array', + :'summary_metrics' => :'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::LLMObsExperimentEventsV2DataAttributesResponse` 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?(:'spans') + if (value = attributes[:'spans']).is_a?(Array) + self.spans = value + end + end + + if attributes.key?(:'summary_metrics') + if (value = attributes[:'summary_metrics']).is_a?(Array) + self.summary_metrics = 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 @spans.nil? + return false if @summary_metrics.nil? + true + end + + # Custom attribute writer method with validation + # @param spans [Object] Object to be assigned + # @!visibility private + def spans=(spans) + if spans.nil? + fail ArgumentError, 'invalid value for "spans", spans cannot be nil.' + end + @spans = spans + end + + # Custom attribute writer method with validation + # @param summary_metrics [Object] Object to be assigned + # @!visibility private + def summary_metrics=(summary_metrics) + if summary_metrics.nil? + fail ArgumentError, 'invalid value for "summary_metrics", summary_metrics cannot be nil.' + end + @summary_metrics = summary_metrics + 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 && + spans == o.spans && + summary_metrics == o.summary_metrics && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [spans, summary_metrics, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_response.rb new file mode 100644 index 000000000000..5c02bb0492f3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API data object for an experiment events response. + class LLMObsExperimentEventsV2DataResponse + include BaseGenericModel + + # Attributes of an experiment events response. + attr_reader :attributes + + # Identifier for this events resource. + attr_reader :id + + # Resource type for an experiment events collection. + 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' => :'LLMObsExperimentEventsV2DataAttributesResponse', + :'id' => :'String', + :'type' => :'LLMObsExperimentEventsType' + } + 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::LLMObsExperimentEventsV2DataResponse` 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_experiment_events_v2_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_response.rb new file mode 100644 index 000000000000..4457dc1c42da --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_response.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 + # Response for listing experiment events (v2/v3). Returns spans and summary metrics in a single resource. + class LLMObsExperimentEventsV2Response + include BaseGenericModel + + # JSON:API data object for an experiment events response. + attr_reader :data + + # Pagination cursor metadata. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'LLMObsExperimentEventsV2DataResponse', + :'meta' => :'LLMObsCursorMeta' + } + 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::LLMObsExperimentEventsV2Response` 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 + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_run_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_run_data_response.rb new file mode 100644 index 000000000000..1abea49a31d2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_run_data_response.rb @@ -0,0 +1,171 @@ +=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 LLM Observability experiment run. + class LLMObsExperimentRunDataResponse + include BaseGenericModel + + # Aggregated metric data for this run. + attr_accessor :aggregate_data + + # Timestamp when the run was created. + attr_accessor :created_at + + # Identifier of the experiment this run belongs to. + attr_accessor :experiment_id + + # Unique identifier of the experiment run. + attr_accessor :id + + # Sequential number of this run within the experiment. + attr_reader :run_number + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregate_data' => :'aggregate_data', + :'created_at' => :'created_at', + :'experiment_id' => :'experiment_id', + :'id' => :'id', + :'run_number' => :'run_number' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregate_data' => :'Hash', + :'created_at' => :'Time', + :'experiment_id' => :'String', + :'id' => :'String', + :'run_number' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'aggregate_data', + ]) + 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::LLMObsExperimentRunDataResponse` 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?(:'aggregate_data') + self.aggregate_data = attributes[:'aggregate_data'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'experiment_id') + self.experiment_id = attributes[:'experiment_id'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'run_number') + self.run_number = attributes[:'run_number'] + 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 !@run_number.nil? && @run_number > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param run_number [Object] Object to be assigned + # @!visibility private + def run_number=(run_number) + if !run_number.nil? && run_number > 2147483647 + fail ArgumentError, 'invalid value for "run_number", must be smaller than or equal to 2147483647.' + end + @run_number = run_number + 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 && + aggregate_data == o.aggregate_data && + created_at == o.created_at && + experiment_id == o.experiment_id && + id == o.id && + run_number == o.run_number && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregate_data, created_at, experiment_id, id, run_number, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_span_with_evals.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_span_with_evals.rb new file mode 100644 index 000000000000..17892fe3915a --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_span_with_evals.rb @@ -0,0 +1,237 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An experiment span enriched with its associated evaluation metrics. + class LLMObsExperimentSpanWithEvals + include BaseGenericModel + + # ID of the dataset record this span evaluated. + attr_accessor :dataset_record_id + + # Duration of the span in nanoseconds. + attr_accessor :duration + + # Evaluation metrics associated with this span. + attr_accessor :eval_metrics + + # Unique identifier of the span. + attr_accessor :id + + # Metadata associated with an experiment span. + attr_accessor :meta + + # Numeric metrics attached to the span. + attr_accessor :metrics + + # Name of the span. + attr_accessor :name + + # Parent span ID, if any. + attr_accessor :parent_id + + # Span ID. + attr_accessor :span_id + + # Start time in nanoseconds since Unix epoch. + attr_accessor :start_ns + + # Status of the span. + attr_accessor :status + + # Tags associated with the span. + attr_accessor :tags + + # Trace ID. + attr_accessor :trace_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dataset_record_id' => :'dataset_record_id', + :'duration' => :'duration', + :'eval_metrics' => :'eval_metrics', + :'id' => :'id', + :'meta' => :'meta', + :'metrics' => :'metrics', + :'name' => :'name', + :'parent_id' => :'parent_id', + :'span_id' => :'span_id', + :'start_ns' => :'start_ns', + :'status' => :'status', + :'tags' => :'tags', + :'trace_id' => :'trace_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dataset_record_id' => :'String', + :'duration' => :'Float', + :'eval_metrics' => :'Array', + :'id' => :'String', + :'meta' => :'LLMObsExperimentSpanMeta', + :'metrics' => :'Hash', + :'name' => :'String', + :'parent_id' => :'String', + :'span_id' => :'String', + :'start_ns' => :'Integer', + :'status' => :'LLMObsExperimentSpanStatus', + :'tags' => :'Array', + :'trace_id' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'dataset_record_id', + ]) + 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::LLMObsExperimentSpanWithEvals` 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?(:'dataset_record_id') + self.dataset_record_id = attributes[:'dataset_record_id'] + end + + if attributes.key?(:'duration') + self.duration = attributes[:'duration'] + end + + if attributes.key?(:'eval_metrics') + if (value = attributes[:'eval_metrics']).is_a?(Array) + self.eval_metrics = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'metrics') + self.metrics = attributes[:'metrics'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'parent_id') + self.parent_id = attributes[:'parent_id'] + end + + if attributes.key?(:'span_id') + self.span_id = attributes[:'span_id'] + end + + if attributes.key?(:'start_ns') + self.start_ns = attributes[:'start_ns'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'trace_id') + self.trace_id = attributes[:'trace_id'] + end + 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 && + dataset_record_id == o.dataset_record_id && + duration == o.duration && + eval_metrics == o.eval_metrics && + id == o.id && + meta == o.meta && + metrics == o.metrics && + name == o.name && + parent_id == o.parent_id && + span_id == o.span_id && + start_ns == o.start_ns && + status == o.status && + tags == o.tags && + trace_id == o.trace_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dataset_record_id, duration, eval_metrics, id, meta, metrics, name, parent_id, span_id, start_ns, status, tags, trace_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_aggregate.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_aggregate.rb new file mode 100644 index 000000000000..9ad1e85cf0df --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_aggregate.rb @@ -0,0 +1,239 @@ +=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 + # Analytics aggregation parameters. + class LLMObsExperimentationAnalyticsAggregate + include BaseGenericModel + + # List of metric computations to perform. + attr_reader :compute + + # Filter to a specific dataset version. + attr_accessor :dataset_version + + # Fields to group results by. + attr_accessor :group_by + + # Data indexes to query. At least one is required. + attr_reader :indexes + + # Maximum number of results to return. + attr_reader :limit + + # Search query for filtering analytics data. + attr_reader :search + + # Unix-millisecond time range for filtering analytics data. + attr_accessor :time + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compute' => :'compute', + :'dataset_version' => :'dataset_version', + :'group_by' => :'group_by', + :'indexes' => :'indexes', + :'limit' => :'limit', + :'search' => :'search', + :'time' => :'time' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compute' => :'Array', + :'dataset_version' => :'Integer', + :'group_by' => :'Array', + :'indexes' => :'Array', + :'limit' => :'Integer', + :'search' => :'LLMObsExperimentationAnalyticsSearch', + :'time' => :'LLMObsExperimentationAnalyticsTimeRange' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'dataset_version', + :'limit', + ]) + 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::LLMObsExperimentationAnalyticsAggregate` 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?(:'compute') + if (value = attributes[:'compute']).is_a?(Array) + self.compute = value + end + end + + if attributes.key?(:'dataset_version') + self.dataset_version = attributes[:'dataset_version'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'indexes') + if (value = attributes[:'indexes']).is_a?(Array) + self.indexes = value + end + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + 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 @compute.nil? + return false if @compute.length < 1 + return false if @indexes.nil? + return false if @indexes.length < 1 + return false if !@limit.nil? && @limit > 2147483647 + return false if @search.nil? + true + end + + # Custom attribute writer method with validation + # @param compute [Object] Object to be assigned + # @!visibility private + def compute=(compute) + if compute.nil? + fail ArgumentError, 'invalid value for "compute", compute cannot be nil.' + end + if compute.length < 1 + fail ArgumentError, 'invalid value for "compute", number of items must be greater than or equal to 1.' + end + @compute = compute + end + + # Custom attribute writer method with validation + # @param indexes [Object] Object to be assigned + # @!visibility private + def indexes=(indexes) + if indexes.nil? + fail ArgumentError, 'invalid value for "indexes", indexes cannot be nil.' + end + if indexes.length < 1 + fail ArgumentError, 'invalid value for "indexes", number of items must be greater than or equal to 1.' + end + @indexes = indexes + end + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if !limit.nil? && limit > 2147483647 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 2147483647.' + end + @limit = limit + end + + # Custom attribute writer method with validation + # @param search [Object] Object to be assigned + # @!visibility private + def search=(search) + if search.nil? + fail ArgumentError, 'invalid value for "search", search cannot be nil.' + end + @search = search + 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 && + compute == o.compute && + dataset_version == o.dataset_version && + group_by == o.group_by && + indexes == o.indexes && + limit == o.limit && + search == o.search && + time == o.time && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compute, dataset_version, group_by, indexes, limit, search, time, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_compute.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_compute.rb new file mode 100644 index 000000000000..d0c48b4599cf --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_compute.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 + # A single metric computation definition. + class LLMObsExperimentationAnalyticsCompute + include BaseGenericModel + + # Name of the metric to compute. + attr_reader :metric + + # Optional alias for this computation in the response. + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'metric' => :'metric', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'metric' => :'String', + :'name' => :'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::LLMObsExperimentationAnalyticsCompute` 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?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 @metric.nil? + true + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + 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 && + metric == o.metric && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [metric, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_request.rb new file mode 100644 index 000000000000..5a1795213adf --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_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 + # Attributes for an analytics request. + class LLMObsExperimentationAnalyticsDataAttributesRequest + include BaseGenericModel + + # Analytics aggregation parameters. + attr_reader :aggregate + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregate' => :'aggregate' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregate' => :'LLMObsExperimentationAnalyticsAggregate' + } + 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::LLMObsExperimentationAnalyticsDataAttributesRequest` 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?(:'aggregate') + self.aggregate = attributes[:'aggregate'] + 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 @aggregate.nil? + true + end + + # Custom attribute writer method with validation + # @param aggregate [Object] Object to be assigned + # @!visibility private + def aggregate=(aggregate) + if aggregate.nil? + fail ArgumentError, 'invalid value for "aggregate", aggregate cannot be nil.' + end + @aggregate = aggregate + 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 && + aggregate == o.aggregate && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregate, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_response.rb new file mode 100644 index 000000000000..a4b74a4eccb6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_response.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 + # Attributes of an analytics response. + class LLMObsExperimentationAnalyticsDataAttributesResponse + include BaseGenericModel + + # Total number of events matched by the query before grouping. + attr_reader :hit_count + + # Analytics query result containing all buckets. + attr_reader :result + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hit_count' => :'hit_count', + :'result' => :'result' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hit_count' => :'Integer', + :'result' => :'LLMObsExperimentationAnalyticsResult' + } + 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::LLMObsExperimentationAnalyticsDataAttributesResponse` 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?(:'hit_count') + self.hit_count = attributes[:'hit_count'] + end + + if attributes.key?(:'result') + self.result = attributes[:'result'] + 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 @hit_count.nil? + return false if @result.nil? + true + end + + # Custom attribute writer method with validation + # @param hit_count [Object] Object to be assigned + # @!visibility private + def hit_count=(hit_count) + if hit_count.nil? + fail ArgumentError, 'invalid value for "hit_count", hit_count cannot be nil.' + end + @hit_count = hit_count + end + + # Custom attribute writer method with validation + # @param result [Object] Object to be assigned + # @!visibility private + def result=(result) + if result.nil? + fail ArgumentError, 'invalid value for "result", result cannot be nil.' + end + @result = result + 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 && + hit_count == o.hit_count && + result == o.result && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hit_count, result, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_request.rb new file mode 100644 index 000000000000..0813ff01cc97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_request.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 an analytics request. + class LLMObsExperimentationAnalyticsDataRequest + include BaseGenericModel + + # Attributes for an analytics request. + attr_reader :attributes + + # Resource type for experimentation search and analytics operations. + 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' => :'LLMObsExperimentationAnalyticsDataAttributesRequest', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationAnalyticsDataRequest` 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_experimentation_analytics_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_response.rb new file mode 100644 index 000000000000..0e7ad1158462 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API data object for an analytics response. + class LLMObsExperimentationAnalyticsDataResponse + include BaseGenericModel + + # Attributes of an analytics response. + attr_reader :attributes + + # Server-generated identifier for this analytics result. + attr_reader :id + + # Resource type for experimentation search and analytics operations. + 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' => :'LLMObsExperimentationAnalyticsDataAttributesResponse', + :'id' => :'String', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationAnalyticsDataResponse` 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_experimentation_analytics_group_by.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_group_by.rb new file mode 100644 index 000000000000..a045290a76e4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_group_by.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 + # A field to group analytics results by. + class LLMObsExperimentationAnalyticsGroupBy + include BaseGenericModel + + # Field name to group by. + attr_reader :field + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'field' => :'field' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'field' => :'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::LLMObsExperimentationAnalyticsGroupBy` 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?(:'field') + self.field = attributes[:'field'] + 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 @field.nil? + true + end + + # Custom attribute writer method with validation + # @param field [Object] Object to be assigned + # @!visibility private + def field=(field) + if field.nil? + fail ArgumentError, 'invalid value for "field", field cannot be nil.' + end + @field = field + 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 && + field == o.field && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [field, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_request.rb new file mode 100644 index 000000000000..a804ad63c95a --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_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 run an analytics aggregation over LLM Observability experimentation data. + class LLMObsExperimentationAnalyticsRequest + include BaseGenericModel + + # Data object for an analytics request. + 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' => :'LLMObsExperimentationAnalyticsDataRequest' + } + 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::LLMObsExperimentationAnalyticsRequest` 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_experimentation_analytics_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_response.rb new file mode 100644 index 000000000000..b29c66ef32fb --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_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 to an analytics query. + class LLMObsExperimentationAnalyticsResponse + include BaseGenericModel + + # JSON:API data object for an analytics response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'LLMObsExperimentationAnalyticsDataResponse' + } + 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::LLMObsExperimentationAnalyticsResponse` 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_experimentation_analytics_result.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_result.rb new file mode 100644 index 000000000000..1baf781fffda --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_result.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 + # Analytics query result containing all buckets. + class LLMObsExperimentationAnalyticsResult + include BaseGenericModel + + # List of result buckets. + attr_reader :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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::LLMObsExperimentationAnalyticsResult` 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?(:'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 @values.nil? + true + end + + # Custom attribute writer method with validation + # @param values [Object] Object to be assigned + # @!visibility private + def values=(values) + if values.nil? + fail ArgumentError, 'invalid value for "values", values cannot be nil.' + end + @values = values + 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 && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_search.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_search.rb new file mode 100644 index 000000000000..2b580413d84f --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_search.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 + # Search query for filtering analytics data. + class LLMObsExperimentationAnalyticsSearch + include BaseGenericModel + + # Filter expression. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'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::LLMObsExperimentationAnalyticsSearch` 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?(:'query') + self.query = attributes[:'query'] + 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 @query.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + 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 && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_time_range.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_time_range.rb new file mode 100644 index 000000000000..fd7fc3cb67cf --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_time_range.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 + # Unix-millisecond time range for filtering analytics data. + class LLMObsExperimentationAnalyticsTimeRange + include BaseGenericModel + + # Start of the time range in milliseconds since Unix epoch. + attr_reader :from + + # End of the time range in milliseconds since Unix epoch. + attr_reader :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'to' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsExperimentationAnalyticsTimeRange` 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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 @from.nil? + return false if @to.nil? + true + end + + # Custom attribute writer method with validation + # @param from [Object] Object to be assigned + # @!visibility private + def from=(from) + if from.nil? + fail ArgumentError, 'invalid value for "from", from cannot be nil.' + end + @from = from + end + + # Custom attribute writer method with validation + # @param to [Object] Object to be assigned + # @!visibility private + def to=(to) + if to.nil? + fail ArgumentError, 'invalid value for "to", to cannot be nil.' + end + @to = to + 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 && + from == o.from && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_value.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_value.rb new file mode 100644 index 000000000000..79090a1ef3a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_value.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 + # A single analytics result bucket. + class LLMObsExperimentationAnalyticsValue + include BaseGenericModel + + # The group-by field values for this bucket. + attr_accessor :by + + # Computed metric values for this bucket. + attr_reader :metrics + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'by' => :'by', + :'metrics' => :'metrics' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'by' => :'Hash', + :'metrics' => :'Hash' + } + 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::LLMObsExperimentationAnalyticsValue` 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?(:'by') + self.by = attributes[:'by'] + end + + if attributes.key?(:'metrics') + self.metrics = attributes[:'metrics'] + 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 @metrics.nil? + true + end + + # Custom attribute writer method with validation + # @param metrics [Object] Object to be assigned + # @!visibility private + def metrics=(metrics) + if metrics.nil? + fail ArgumentError, 'invalid value for "metrics", metrics cannot be nil.' + end + @metrics = metrics + 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 && + by == o.by && + metrics == o.metrics && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [by, metrics, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_content_preview.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_content_preview.rb new file mode 100644 index 000000000000..636aa02d3892 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_content_preview.rb @@ -0,0 +1,105 @@ +=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 + # Options to control content preview truncation. + class LLMObsExperimentationContentPreview + include BaseGenericModel + + # Maximum number of characters to include in content previews. + attr_accessor :limit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'limit' => :'limit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'limit' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsExperimentationContentPreview` 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?(:'limit') + self.limit = attributes[:'limit'] + end + 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 && + limit == o.limit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [limit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_cursor_page.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_cursor_page.rb new file mode 100644 index 000000000000..bc8ad05914bc --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_cursor_page.rb @@ -0,0 +1,115 @@ +=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 + # Cursor-based pagination parameters. + class LLMObsExperimentationCursorPage + include BaseGenericModel + + # Opaque cursor returned from a previous response to fetch the next page. + attr_accessor :cursor + + # Maximum number of results per page. + attr_accessor :limit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cursor' => :'cursor', + :'limit' => :'limit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cursor' => :'String', + :'limit' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsExperimentationCursorPage` 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?(:'cursor') + self.cursor = attributes[:'cursor'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + 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 && + cursor == o.cursor && + limit == o.limit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cursor, limit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_filter.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_filter.rb new file mode 100644 index 000000000000..aa10dd4324f6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_filter.rb @@ -0,0 +1,173 @@ +=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 + # Filter criteria for an experimentation search request. + class LLMObsExperimentationFilter + include BaseGenericModel + + # When `true`, include soft-deleted entities alongside active ones. + attr_accessor :include_deleted + + # When `true`, return only soft-deleted entities. + attr_accessor :is_deleted + + # Free-text search query. + attr_accessor :query + + # Entity types to search. Valid values are `projects`, `datasets`, `dataset_records`, `experiments`, and `experiment_runs`. + attr_reader :scope + + # Filter dataset records by a specific dataset version. + attr_accessor :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'include_deleted' => :'include_deleted', + :'is_deleted' => :'is_deleted', + :'query' => :'query', + :'scope' => :'scope', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'include_deleted' => :'Boolean', + :'is_deleted' => :'Boolean', + :'query' => :'String', + :'scope' => :'Array', + :'version' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'version', + ]) + 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::LLMObsExperimentationFilter` 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?(:'include_deleted') + self.include_deleted = attributes[:'include_deleted'] + end + + if attributes.key?(:'is_deleted') + self.is_deleted = attributes[:'is_deleted'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'scope') + if (value = attributes[:'scope']).is_a?(Array) + self.scope = value + end + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + 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 @scope.nil? + true + end + + # Custom attribute writer method with validation + # @param scope [Object] Object to be assigned + # @!visibility private + def scope=(scope) + if scope.nil? + fail ArgumentError, 'invalid value for "scope", scope cannot be nil.' + end + @scope = scope + 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 && + include_deleted == o.include_deleted && + is_deleted == o.is_deleted && + query == o.query && + scope == o.scope && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [include_deleted, is_deleted, query, scope, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_include.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_include.rb new file mode 100644 index 000000000000..43ffee46bcd9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_include.rb @@ -0,0 +1,105 @@ +=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 + # Additional data to include in the response. + class LLMObsExperimentationInclude + include BaseGenericModel + + # When `true`, enrich results with author user data (name and email). + attr_accessor :user_data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'user_data' => :'user_data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'user_data' => :'Boolean' + } + 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::LLMObsExperimentationInclude` 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?(:'user_data') + self.user_data = attributes[:'user_data'] + end + 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 && + user_data == o.user_data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [user_data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_number_page.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_number_page.rb new file mode 100644 index 000000000000..3156bc48a9ba --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_number_page.rb @@ -0,0 +1,148 @@ +=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 + # Offset-based pagination parameters for simple search. + class LLMObsExperimentationNumberPage + include BaseGenericModel + + # Maximum number of results per page. + attr_reader :limit + + # Page number to retrieve (1-indexed). + attr_reader :number + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'limit' => :'limit', + :'number' => :'number' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'limit' => :'Integer', + :'number' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsExperimentationNumberPage` 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?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'number') + self.number = attributes[:'number'] + 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 !@limit.nil? && @limit > 2147483647 + return false if !@number.nil? && @number > 2147483647 + return false if !@number.nil? && @number < 1 + true + end + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if !limit.nil? && limit > 2147483647 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 2147483647.' + end + @limit = limit + end + + # Custom attribute writer method with validation + # @param number [Object] Object to be assigned + # @!visibility private + def number=(number) + if !number.nil? && number > 2147483647 + fail ArgumentError, 'invalid value for "number", must be smaller than or equal to 2147483647.' + end + if !number.nil? && number < 1 + fail ArgumentError, 'invalid value for "number", must be greater than or equal to 1.' + end + @number = number + 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 && + limit == o.limit && + number == o.number && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [limit, number, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_attributes_request.rb new file mode 100644 index 000000000000..f75a01216bdb --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_attributes_request.rb @@ -0,0 +1,153 @@ +=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 an experimentation search request. + class LLMObsExperimentationSearchDataAttributesRequest + include BaseGenericModel + + # Options to control content preview truncation. + attr_accessor :content_preview + + # Filter criteria for an experimentation search request. + attr_reader :filter + + # Additional data to include in the response. + attr_accessor :include + + # Cursor-based pagination parameters. + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'content_preview' => :'content_preview', + :'filter' => :'filter', + :'include' => :'include', + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'content_preview' => :'LLMObsExperimentationContentPreview', + :'filter' => :'LLMObsExperimentationFilter', + :'include' => :'LLMObsExperimentationInclude', + :'page' => :'LLMObsExperimentationCursorPage' + } + 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::LLMObsExperimentationSearchDataAttributesRequest` 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?(:'content_preview') + self.content_preview = attributes[:'content_preview'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'page') + self.page = attributes[:'page'] + 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 @filter.nil? + true + end + + # Custom attribute writer method with validation + # @param filter [Object] Object to be assigned + # @!visibility private + def filter=(filter) + if filter.nil? + fail ArgumentError, 'invalid value for "filter", filter cannot be nil.' + end + @filter = filter + 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 && + content_preview == o.content_preview && + filter == o.filter && + include == o.include && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [content_preview, filter, include, page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_request.rb new file mode 100644 index 000000000000..68e9cddd9d97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_request.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 an experimentation search request. + class LLMObsExperimentationSearchDataRequest + include BaseGenericModel + + # Attributes for an experimentation search request. + attr_reader :attributes + + # Resource type for experimentation search and analytics operations. + 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' => :'LLMObsExperimentationSearchDataAttributesRequest', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationSearchDataRequest` 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_experimentation_search_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_response.rb new file mode 100644 index 000000000000..d6452983aeb1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API data object for an experimentation search response. + class LLMObsExperimentationSearchDataResponse + include BaseGenericModel + + # The matching experimentation entities grouped by type. + attr_reader :attributes + + # Server-generated identifier for this search result. + attr_reader :id + + # Resource type for experimentation search and analytics operations. + 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' => :'LLMObsExperimentationSearchResults', + :'id' => :'String', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationSearchDataResponse` 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_experimentation_search_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_request.rb new file mode 100644 index 000000000000..4b0a4f91c585 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_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 search across LLM Observability experimentation entities using cursor-based pagination. + class LLMObsExperimentationSearchRequest + include BaseGenericModel + + # Data object for an experimentation search request. + 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' => :'LLMObsExperimentationSearchDataRequest' + } + 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::LLMObsExperimentationSearchRequest` 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_experimentation_search_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_response.rb new file mode 100644 index 000000000000..e4818e213c41 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_response.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 + # Response to a cursor-based experimentation search. Returns `200 OK` when all results fit in one page; `206 Partial Content` when a next-page cursor is available. + class LLMObsExperimentationSearchResponse + include BaseGenericModel + + # JSON:API data object for an experimentation search response. + attr_reader :data + + # Pagination cursor metadata. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'LLMObsExperimentationSearchDataResponse', + :'meta' => :'LLMObsCursorMeta' + } + 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::LLMObsExperimentationSearchResponse` 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 + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_results.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_results.rb new file mode 100644 index 000000000000..92a46a0b90ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_results.rb @@ -0,0 +1,167 @@ +=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 matching experimentation entities grouped by type. + class LLMObsExperimentationSearchResults + include BaseGenericModel + + # Matching dataset records. Present when `dataset_records` is included in `filter.scope`. + attr_accessor :dataset_records + + # Matching datasets. Present when `datasets` is included in `filter.scope`. + attr_accessor :datasets + + # Matching experiment runs. Present when `experiment_runs` is included in `filter.scope`. + attr_accessor :experiment_runs + + # Matching experiments. Present when `experiments` is included in `filter.scope`. + attr_accessor :experiments + + # Matching projects. Present when `projects` is included in `filter.scope`. + attr_accessor :projects + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dataset_records' => :'dataset_records', + :'datasets' => :'datasets', + :'experiment_runs' => :'experiment_runs', + :'experiments' => :'experiments', + :'projects' => :'projects' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dataset_records' => :'Array', + :'datasets' => :'Array', + :'experiment_runs' => :'Array', + :'experiments' => :'Array', + :'projects' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'dataset_records', + :'datasets', + :'experiment_runs', + :'experiments', + :'projects', + ]) + 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::LLMObsExperimentationSearchResults` 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?(:'dataset_records') + if (value = attributes[:'dataset_records']).is_a?(Array) + self.dataset_records = value + end + end + + if attributes.key?(:'datasets') + if (value = attributes[:'datasets']).is_a?(Array) + self.datasets = value + end + end + + if attributes.key?(:'experiment_runs') + if (value = attributes[:'experiment_runs']).is_a?(Array) + self.experiment_runs = value + end + end + + if attributes.key?(:'experiments') + if (value = attributes[:'experiments']).is_a?(Array) + self.experiments = value + end + end + + if attributes.key?(:'projects') + if (value = attributes[:'projects']).is_a?(Array) + self.projects = value + end + end + 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 && + dataset_records == o.dataset_records && + datasets == o.datasets && + experiment_runs == o.experiment_runs && + experiments == o.experiments && + projects == o.projects && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dataset_records, datasets, experiment_runs, experiments, projects, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_attributes_request.rb new file mode 100644 index 000000000000..319a7a5ae4f8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_attributes_request.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 + # Attributes for an experimentation simple search request. + class LLMObsExperimentationSimpleSearchDataAttributesRequest + include BaseGenericModel + + # Options to control content preview truncation. + attr_accessor :content_preview + + # Filter criteria for an experimentation search request. + attr_reader :filter + + # Additional data to include in the response. + attr_accessor :include + + # Offset-based pagination parameters for simple search. + attr_accessor :page + + # Sort order for results. + attr_accessor :sort + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'content_preview' => :'content_preview', + :'filter' => :'filter', + :'include' => :'include', + :'page' => :'page', + :'sort' => :'sort' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'content_preview' => :'LLMObsExperimentationContentPreview', + :'filter' => :'LLMObsExperimentationFilter', + :'include' => :'LLMObsExperimentationInclude', + :'page' => :'LLMObsExperimentationNumberPage', + :'sort' => :'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::LLMObsExperimentationSimpleSearchDataAttributesRequest` 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?(:'content_preview') + self.content_preview = attributes[:'content_preview'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + + if attributes.key?(:'sort') + if (value = attributes[:'sort']).is_a?(Array) + self.sort = 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 @filter.nil? + true + end + + # Custom attribute writer method with validation + # @param filter [Object] Object to be assigned + # @!visibility private + def filter=(filter) + if filter.nil? + fail ArgumentError, 'invalid value for "filter", filter cannot be nil.' + end + @filter = filter + 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 && + content_preview == o.content_preview && + filter == o.filter && + include == o.include && + page == o.page && + sort == o.sort && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [content_preview, filter, include, page, sort, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_request.rb new file mode 100644 index 000000000000..6b4b8a5ae4ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_request.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 an experimentation simple search request. + class LLMObsExperimentationSimpleSearchDataRequest + include BaseGenericModel + + # Attributes for an experimentation simple search request. + attr_reader :attributes + + # Resource type for experimentation search and analytics operations. + 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' => :'LLMObsExperimentationSimpleSearchDataAttributesRequest', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationSimpleSearchDataRequest` 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_experimentation_simple_search_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_response.rb new file mode 100644 index 000000000000..36c21387868d --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API data object for a simple search response. + class LLMObsExperimentationSimpleSearchDataResponse + include BaseGenericModel + + # The matching experimentation entities grouped by type. + attr_reader :attributes + + # Server-generated identifier for this search result. + attr_reader :id + + # Resource type for experimentation search and analytics operations. + 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' => :'LLMObsExperimentationSearchResults', + :'id' => :'String', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationSimpleSearchDataResponse` 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_experimentation_simple_search_meta.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta.rb new file mode 100644 index 000000000000..67514030a2ce --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta.rb @@ -0,0 +1,105 @@ +=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 + # Pagination metadata for a simple search response. + class LLMObsExperimentationSimpleSearchMeta + include BaseGenericModel + + # Page metadata. + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'LLMObsExperimentationSimpleSearchMetaPage' + } + 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::LLMObsExperimentationSimpleSearchMeta` 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?(:'page') + self.page = attributes[:'page'] + end + 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 && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta_page.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta_page.rb new file mode 100644 index 000000000000..e5c276b314d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta_page.rb @@ -0,0 +1,186 @@ +=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 + # Page metadata. + class LLMObsExperimentationSimpleSearchMetaPage + include BaseGenericModel + + # Current page number. + attr_reader :current + + # Page size used for this response. + attr_reader :limit + + # Total number of matching results (capped at the maximum search limit). + attr_reader :total_count + + # Total number of pages available. + attr_reader :total_pages + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'current' => :'current', + :'limit' => :'limit', + :'total_count' => :'total_count', + :'total_pages' => :'total_pages' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'current' => :'Integer', + :'limit' => :'Integer', + :'total_count' => :'Integer', + :'total_pages' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchMetaPage` 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?(:'current') + self.current = attributes[:'current'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + end + + if attributes.key?(:'total_pages') + self.total_pages = attributes[:'total_pages'] + 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 !@current.nil? && @current > 2147483647 + return false if !@limit.nil? && @limit > 2147483647 + return false if !@total_count.nil? && @total_count > 2147483647 + return false if !@total_pages.nil? && @total_pages > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param current [Object] Object to be assigned + # @!visibility private + def current=(current) + if !current.nil? && current > 2147483647 + fail ArgumentError, 'invalid value for "current", must be smaller than or equal to 2147483647.' + end + @current = current + end + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if !limit.nil? && limit > 2147483647 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 2147483647.' + end + @limit = limit + end + + # Custom attribute writer method with validation + # @param total_count [Object] Object to be assigned + # @!visibility private + def total_count=(total_count) + if !total_count.nil? && total_count > 2147483647 + fail ArgumentError, 'invalid value for "total_count", must be smaller than or equal to 2147483647.' + end + @total_count = total_count + end + + # Custom attribute writer method with validation + # @param total_pages [Object] Object to be assigned + # @!visibility private + def total_pages=(total_pages) + if !total_pages.nil? && total_pages > 2147483647 + fail ArgumentError, 'invalid value for "total_pages", must be smaller than or equal to 2147483647.' + end + @total_pages = total_pages + 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 && + current == o.current && + limit == o.limit && + total_count == o.total_count && + total_pages == o.total_pages && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [current, limit, total_count, total_pages, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_request.rb new file mode 100644 index 000000000000..cd3c849000aa --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_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 search across LLM Observability experimentation entities using offset-based pagination. + class LLMObsExperimentationSimpleSearchRequest + include BaseGenericModel + + # Data object for an experimentation simple search request. + 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' => :'LLMObsExperimentationSimpleSearchDataRequest' + } + 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::LLMObsExperimentationSimpleSearchRequest` 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_experimentation_simple_search_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_response.rb new file mode 100644 index 000000000000..f7f418ad0154 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_response.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 + # Response to an offset-based experimentation simple search. + class LLMObsExperimentationSimpleSearchResponse + include BaseGenericModel + + # JSON:API data object for a simple search response. + attr_reader :data + + # Pagination metadata for a simple search response. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'LLMObsExperimentationSimpleSearchDataResponse', + :'meta' => :'LLMObsExperimentationSimpleSearchMeta' + } + 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::LLMObsExperimentationSimpleSearchResponse` 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 + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field.rb new file mode 100644 index 000000000000..860e02c3ebfa --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field.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 + # A field and direction to sort results by. + class LLMObsExperimentationSortField + include BaseGenericModel + + # Sort direction. + attr_accessor :direction + + # The field name to sort on. + attr_reader :field + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'direction' => :'direction', + :'field' => :'field' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'direction' => :'LLMObsExperimentationSortFieldDirection', + :'field' => :'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::LLMObsExperimentationSortField` 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?(:'direction') + self.direction = attributes[:'direction'] + end + + if attributes.key?(:'field') + self.field = attributes[:'field'] + 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 @field.nil? + true + end + + # Custom attribute writer method with validation + # @param field [Object] Object to be assigned + # @!visibility private + def field=(field) + if field.nil? + fail ArgumentError, 'invalid value for "field", field cannot be nil.' + end + @field = field + 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 && + direction == o.direction && + field == o.field && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [direction, field, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field_direction.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field_direction.rb new file mode 100644 index 000000000000..fb15dbcc5edd --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field_direction.rb @@ -0,0 +1,27 @@ +=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 + # Sort direction. + class LLMObsExperimentationSortFieldDirection + include BaseEnumModel + + ASC = "asc".freeze + DESC = "desc".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_type.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_type.rb new file mode 100644 index 000000000000..3992035781f7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Resource type for experimentation search and analytics operations. + class LLMObsExperimentationType + include BaseEnumModel + + EXPERIMENTATION = "experimentation".freeze + end +end