diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f0ec343a75e..1e1724d2f72 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -922,6 +922,58 @@ components: required: true schema: $ref: "#/components/schemas/LLMObsIntegrationName" + LLMObsPatternsConfigIDPathParameter: + description: The ID of the patterns configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + in: path + name: config_id + required: true + schema: + type: string + LLMObsPatternsConfigIDQueryParameter: + description: The ID of the patterns configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + in: query + name: config_id + required: true + schema: + type: string + LLMObsPatternsIncludeMetricsQueryParameter: + description: |- + When true, enrich each clustered point with span metrics such as status, + duration, token counts, estimated cost, and evaluations. + in: query + name: include_metrics + schema: + type: boolean + LLMObsPatternsPageSizeQueryParameter: + description: Maximum number of clustered points to return per page. + in: query + name: page_size + schema: + format: int64 + type: integer + LLMObsPatternsPageTokenQueryParameter: + description: Pagination token to retrieve the next page of clustered points. + in: query + name: page_token + schema: + type: string + LLMObsPatternsRunIDQueryParameter: + description: The ID of a specific patterns run. Defaults to the most recent completed run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + in: query + name: run_id + schema: + type: string + LLMObsPatternsTopicIDQueryParameter: + description: The ID of the topic to retrieve clustered points for. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + in: query + name: topic_id + required: true + schema: + type: string LLMObsProjectIDPathParameter: description: The ID of the LLM Observability project. example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" @@ -51676,6 +51728,1017 @@ components: - AUTO - CONCISE - DETAILED + LLMObsPatternsActivityProgress: + description: Progress information for a single step of a patterns run. + properties: + name: + description: Name of the step. + example: generate_topics + type: string + started_at: + description: Timestamp when the step started. Null if the step has not started. + example: "2024-01-15T10:30:00Z" + format: date-time + nullable: true + type: string + status: + description: Status of the step. + example: completed + type: string + required: + - name + - status + type: object + LLMObsPatternsClusteredPoint: + description: A single data point grouped into a topic. + properties: + event_id: + description: Identifier of the source event. + example: "AAAAAYabc123" + type: string + id: + description: Unique identifier of the clustered point. + example: "9b0c1d2e-3f40-5a61-b728-c9d0e1f2a3b4" + type: string + input: + description: Input text of the source span. + example: "How do I get a refund?" + type: string + is_included: + description: Whether the point is included in the patterns dataset. + example: false + type: boolean + is_suggested: + description: Whether the point is suggested for inclusion in the patterns dataset. + example: true + type: boolean + session_id: + description: Identifier of the source session. + example: "session-7c3f5a1b" + type: string + span_id: + description: Identifier of the source span. + example: "1234567890123456789" + type: string + topic_id: + description: Identifier of the topic the point belongs to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + required: + - id + - event_id + - topic_id + - span_id + - session_id + - input + - is_suggested + - is_included + type: object + LLMObsPatternsClusteredPointRef: + description: |- + A clustered point attached inline to a topic. The metric fields are populated + only when the request includes `include_metrics=true`. + properties: + duration: + description: Duration of the source span in nanoseconds. Included only when metrics are requested. + example: 1500000 + format: double + type: number + estimated_total_cost: + description: Estimated total cost of the source span. Included only when metrics are requested. + example: 0.0021 + format: double + type: number + evaluation: + additionalProperties: {} + description: |- + Evaluation results for the source span keyed by evaluation name. Included + only when metrics are requested. + type: object + input_tokens: + description: Number of input tokens of the source span. Included only when metrics are requested. + example: 128 + format: double + type: number + output_tokens: + description: Number of output tokens of the source span. Included only when metrics are requested. + example: 64 + format: double + type: number + span_id: + description: Identifier of the source span. + example: "1234567890123456789" + type: string + status: + description: Status of the source span. Included only when metrics are requested. + example: ok + type: string + total_tokens: + description: Total number of tokens of the source span. Included only when metrics are requested. + example: 192 + format: double + type: number + required: + - span_id + type: object + LLMObsPatternsClusteredPointRefsList: + description: List of clustered points attached to a topic. + items: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointRef" + type: array + LLMObsPatternsClusteredPointsList: + description: List of clustered points. + items: + $ref: "#/components/schemas/LLMObsPatternsClusteredPoint" + type: array + LLMObsPatternsClusteredPointsResponse: + description: Response containing the clustered points of an LLM Observability topic. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponseData" + required: + - data + type: object + LLMObsPatternsClusteredPointsResponseAttributes: + description: Attributes of an LLM Observability patterns clustered points response. + properties: + next_page_token: + description: Pagination token for the next page of points. Null if there are no more pages. + example: "eyJvZmZzZXQiOjUwfQ==" + nullable: true + type: string + points: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsList" + topic_id: + description: Identifier of the topic the points belong to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + required: + - topic_id + - next_page_token + - points + type: object + LLMObsPatternsClusteredPointsResponseData: + description: Data object of an LLM Observability patterns clustered points response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponseAttributes" + id: + description: Identifier of the topic the points belong to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsClusteredPointsType: + description: Resource type of an LLM Observability patterns clustered points response. + enum: + - clustered_points_response + example: clustered_points_response + type: string + x-enum-varnames: + - CLUSTERED_POINTS_RESPONSE + LLMObsPatternsConfigAttributes: + description: Attributes of an LLM Observability patterns configuration. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + nullable: true + type: string + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + nullable: true + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + nullable: true + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + nullable: true + type: string + updated_at: + description: Timestamp when the configuration was last updated. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + required: + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + - scope + - created_at + - updated_at + type: object + LLMObsPatternsConfigItem: + description: A single LLM Observability patterns configuration in a list response. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + nullable: true + type: string + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + id: + description: Unique identifier of the configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + nullable: true + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + nullable: true + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + nullable: true + type: string + updated_at: + description: Timestamp when the configuration was last updated. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + required: + - id + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + - scope + - created_at + - updated_at + type: object + LLMObsPatternsConfigItemsList: + description: List of patterns configurations. + items: + $ref: "#/components/schemas/LLMObsPatternsConfigItem" + type: array + LLMObsPatternsConfigResponse: + description: Response containing a single LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigResponseData" + required: + - data + type: object + LLMObsPatternsConfigResponseData: + description: Data object of an LLM Observability patterns configuration. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigAttributes" + id: + description: Unique identifier of the configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsConfigType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsConfigSnapshot: + description: Snapshot of the configuration used for a patterns run. + properties: + account_id: + description: Integration account ID used for a bring-your-own-model run. + example: "1000000001" + type: string + evp_query: + description: Query that selected the spans for the run. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy generated. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider used for a bring-your-own-model run. + example: openai + type: string + model_name: + description: Model name used for a bring-your-own-model run. + example: gpt-4o + type: string + num_records: + description: Maximum number of records processed for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans sampled for the run. + example: 0.1 + format: double + type: number + type: object + LLMObsPatternsConfigType: + description: Resource type of an LLM Observability patterns configuration. + enum: + - topic_discovery_configs + example: topic_discovery_configs + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_CONFIGS + LLMObsPatternsConfigUpsertRequest: + description: Request to create or update an LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequestData" + required: + - data + type: object + LLMObsPatternsConfigUpsertRequestAttributes: + description: Attributes for creating or updating an LLM Observability patterns configuration. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + type: string + config_id: + description: The ID of an existing configuration to update. If omitted, a new configuration is created. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + type: string + required: + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + type: object + LLMObsPatternsConfigUpsertRequestData: + description: Data object for creating or updating an LLM Observability patterns configuration. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequestAttributes" + type: + $ref: "#/components/schemas/LLMObsPatternsConfigType" + required: + - type + - attributes + type: object + LLMObsPatternsConfigsListType: + description: Resource type of a list of LLM Observability patterns configurations. + enum: + - list_topic_discovery_configs_response + example: list_topic_discovery_configs_response + type: string + x-enum-varnames: + - LIST_TOPIC_DISCOVERY_CONFIGS_RESPONSE + LLMObsPatternsConfigsResponse: + description: Response containing a list of LLM Observability patterns configurations. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponseData" + required: + - data + type: object + LLMObsPatternsConfigsResponseAttributes: + description: Attributes of a list of LLM Observability patterns configurations. + properties: + configs: + $ref: "#/components/schemas/LLMObsPatternsConfigItemsList" + required: + - configs + type: object + LLMObsPatternsConfigsResponseData: + description: Data object of a list of LLM Observability patterns configurations. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponseAttributes" + id: + description: Identifier of the list response. + example: "1000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsConfigsListType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsProgressList: + description: List of step-by-step progress entries for a patterns run. + items: + $ref: "#/components/schemas/LLMObsPatternsActivityProgress" + type: array + LLMObsPatternsRequestType: + description: Resource type for triggering an LLM Observability patterns run. + enum: + - topic_discovery + example: topic_discovery + type: string + x-enum-varnames: + - TOPIC_DISCOVERY + LLMObsPatternsRunStatusResponse: + description: Response containing the status of an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponseData" + required: + - data + type: object + LLMObsPatternsRunStatusResponseAttributes: + description: Attributes of an LLM Observability patterns run status. + properties: + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + progress: + $ref: "#/components/schemas/LLMObsPatternsProgressList" + status: + description: Overall status of the run. + example: running + type: string + step: + description: The current step of the run. + example: generate_topics + type: string + required: + - created_at + - status + - step + - progress + type: object + LLMObsPatternsRunStatusResponseData: + description: Data object of an LLM Observability patterns run status response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponseAttributes" + id: + description: The ID of the patterns run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsRunStatusType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsRunStatusType: + description: Resource type of an LLM Observability patterns run status. + enum: + - topic_discovery_run_status + example: topic_discovery_run_status + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_RUN_STATUS + LLMObsPatternsRunSummary: + description: Summary of an LLM Observability patterns run. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + id: + description: Unique identifier of the run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + status: + description: Status of the run. + example: completed + type: string + required: + - id + - status + - created_at + type: object + LLMObsPatternsRunsList: + description: List of patterns runs. + items: + $ref: "#/components/schemas/LLMObsPatternsRunSummary" + type: array + LLMObsPatternsRunsListType: + description: Resource type of a list of LLM Observability patterns runs. + enum: + - list_topic_discovery_runs_response + example: list_topic_discovery_runs_response + type: string + x-enum-varnames: + - LIST_TOPIC_DISCOVERY_RUNS_RESPONSE + LLMObsPatternsRunsResponse: + description: Response containing the completed runs of an LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsRunsResponseData" + required: + - data + type: object + LLMObsPatternsRunsResponseAttributes: + description: Attributes of an LLM Observability patterns runs response. + properties: + runs: + $ref: "#/components/schemas/LLMObsPatternsRunsList" + required: + - runs + type: object + LLMObsPatternsRunsResponseData: + description: Data object of an LLM Observability patterns runs response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsRunsResponseAttributes" + id: + description: Identifier of the configuration the runs belong to. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsRunsListType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopic: + description: A topic discovered by an LLM Observability patterns run. + properties: + created_at: + description: Timestamp when the topic was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + description: + description: Description of the topic. + example: "Questions about invoices, charges, and refunds." + type: string + first_seen_at: + description: Timestamp when the topic was first seen. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + hierarchy_level: + description: Level of the topic in the hierarchy. Level 0 is a leaf topic. + example: 0 + format: int64 + type: integer + id: + description: Unique identifier of the topic. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + is_validated: + description: Whether the topic has been validated. + example: true + type: boolean + name: + description: Name of the topic. + example: "Billing questions" + type: string + parent_topic_id: + description: Identifier of the parent topic. Empty for top-level topics. + example: "" + type: string + point_count: + description: Number of data points assigned to the topic. + example: 125 + format: int64 + type: integer + run_id: + description: Identifier of the run that produced the topic. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + required: + - id + - run_id + - parent_topic_id + - hierarchy_level + - name + - description + - is_validated + - created_at + - point_count + - first_seen_at + type: object + LLMObsPatternsTopicWithClusteredPoints: + description: |- + A topic discovered by an LLM Observability patterns run, including the + clustered points attached to leaf topics. + properties: + cluster_points: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointRefsList" + created_at: + description: Timestamp when the topic was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + description: + description: Description of the topic. + example: "Questions about invoices, charges, and refunds." + type: string + first_seen_at: + description: Timestamp when the topic was first seen. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + hierarchy_level: + description: Level of the topic in the hierarchy. Level 0 is a leaf topic. + example: 0 + format: int64 + type: integer + id: + description: Unique identifier of the topic. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + is_validated: + description: Whether the topic has been validated. + example: true + type: boolean + name: + description: Name of the topic. + example: "Billing questions" + type: string + parent_topic_id: + description: Identifier of the parent topic. Empty for top-level topics. + example: "" + type: string + point_count: + description: Number of data points assigned to the topic. + example: 125 + format: int64 + type: integer + run_id: + description: Identifier of the run that produced the topic. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + required: + - id + - run_id + - parent_topic_id + - hierarchy_level + - name + - description + - is_validated + - created_at + - point_count + - first_seen_at + type: object + LLMObsPatternsTopicsList: + description: List of discovered topics. + items: + $ref: "#/components/schemas/LLMObsPatternsTopic" + type: array + LLMObsPatternsTopicsResponse: + description: Response containing the topics discovered by an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponseData" + required: + - data + type: object + LLMObsPatternsTopicsResponseAttributes: + description: Attributes of an LLM Observability patterns topics response. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_id: + description: Identifier of the configuration that produced the run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + previous_run_id: + description: Identifier of the run that completed immediately before this one. Empty if none. + example: "" + type: string + run_id: + description: Identifier of the run that produced the topics. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + topics: + $ref: "#/components/schemas/LLMObsPatternsTopicsList" + required: + - run_id + - config_id + - previous_run_id + - created_at + - topics + type: object + LLMObsPatternsTopicsResponseData: + description: Data object of an LLM Observability patterns topics response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponseAttributes" + id: + description: Identifier of the run the topics belong to. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTopicsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopicsType: + description: Resource type of an LLM Observability patterns topics response. + enum: + - get_topics_response + example: get_topics_response + type: string + x-enum-varnames: + - GET_TOPICS_RESPONSE + LLMObsPatternsTopicsWithClusteredPointsList: + description: List of discovered topics with their clustered points. + items: + $ref: "#/components/schemas/LLMObsPatternsTopicWithClusteredPoints" + type: array + LLMObsPatternsTopicsWithClusteredPointsResponse: + description: |- + Response containing the topics, and the clustered points of their leaf topics, + discovered by an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponseData" + required: + - data + type: object + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes: + description: Attributes of an LLM Observability patterns topics-with-clustered-points response. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_id: + description: Identifier of the configuration that produced the run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + previous_run_id: + description: Identifier of the run that completed immediately before this one. Empty if none. + example: "" + type: string + run_id: + description: Identifier of the run that produced the topics. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + topics: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsList" + required: + - run_id + - config_id + - previous_run_id + - created_at + - topics + type: object + LLMObsPatternsTopicsWithClusteredPointsResponseData: + description: Data object of an LLM Observability patterns topics-with-clustered-points response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes" + id: + description: Identifier of the run the topics belong to. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopicsWithClusteredPointsType: + description: Resource type of an LLM Observability patterns topics-with-clustered-points response. + enum: + - get_topics_with_cluster_points_response + example: get_topics_with_cluster_points_response + type: string + x-enum-varnames: + - GET_TOPICS_WITH_CLUSTER_POINTS_RESPONSE + LLMObsPatternsTriggerRequest: + description: Request to trigger an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequestData" + required: + - data + type: object + LLMObsPatternsTriggerRequestAttributes: + description: Attributes for triggering an LLM Observability patterns run. + properties: + config_id: + description: The ID of the patterns configuration to run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + required: + - config_id + type: object + LLMObsPatternsTriggerRequestData: + description: Data object for triggering an LLM Observability patterns run. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequestAttributes" + type: + $ref: "#/components/schemas/LLMObsPatternsRequestType" + required: + - type + - attributes + type: object + LLMObsPatternsTriggerResponse: + description: Response after triggering an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseData" + required: + - data + type: object + LLMObsPatternsTriggerResponseAttributes: + description: Attributes of an LLM Observability patterns trigger response. + properties: + config_id: + description: The ID of the patterns configuration that was run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + run_id: + description: The ID of the patterns run that was started. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + status: + description: Status of the patterns run. + example: started + type: string + required: + - run_id + - config_id + - status + type: object + LLMObsPatternsTriggerResponseData: + description: Data object of an LLM Observability patterns trigger response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseAttributes" + id: + description: The ID of the patterns configuration that was run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTriggerResponseType: + description: Resource type of an LLM Observability patterns trigger response. + enum: + - topic_discovery_run + example: topic_discovery_run + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_RUN LLMObsProjectDataAttributesRequest: description: Attributes for creating an LLM Observability project. properties: @@ -141741,6 +142804,732 @@ 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/topic-discovery-clustered-points: + get: + description: |- + List the data points grouped into a topic. For a parent topic, points from all + of its leaf topics are returned. + operationId: ListLLMObsPatternsClusteredPoints + parameters: + - $ref: "#/components/parameters/LLMObsPatternsTopicIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsPageSizeQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsPageTokenQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + next_page_token: "eyJvZmZzZXQiOjUwfQ==" + points: + - event_id: AAAAAYabc123 + id: 9b0c1d2e-3f40-5a61-b728-c9d0e1f2a3b4 + input: "How do I get a refund?" + is_included: false + is_suggested: true + session_id: session-7c3f5a1b + span_id: "1234567890123456789" + topic_id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + topic_id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + type: clustered_points_response + schema: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponse" + 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 patterns clustered points + 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/topic-discovery-configs: + get: + description: List all patterns configurations for the organization. + operationId: ListLLMObsPatternsConfigs + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + configs: + - created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + id: a7c8d9e0-1234-5678-9abc-def012345678 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: "1000000001" + type: list_topic_discovery_configs_response + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponse" + 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: List patterns configurations + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Create a new patterns configuration, or update an existing one when a configuration ID is provided. + operationId: UpsertLLMObsPatternsConfig + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequest" + description: Patterns configuration payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigResponse" + 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: Create or update a patterns configuration + 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/topic-discovery-configs/latest: + get: + description: Retrieve the patterns configuration for the organization. + operationId: GetLLMObsPatternsConfig + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigResponse" + 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: Get a patterns configuration + 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/topic-discovery-configs/{config_id}: + delete: + description: Delete a patterns configuration by its ID. + operationId: DeleteLLMObsPatternsConfig + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDPathParameter" + responses: + "204": + description: No Content + "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: Delete a patterns configuration + 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/topic-discovery-runs: + get: + description: List the completed patterns runs for a configuration. + operationId: ListLLMObsPatternsRuns + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + runs: + - completed_at: "2024-01-15T10:45:00Z" + created_at: "2024-01-15T10:30:00Z" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + status: completed + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: list_topic_discovery_runs_response + schema: + $ref: "#/components/schemas/LLMObsPatternsRunsResponse" + 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 patterns runs + 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/). + post: + description: Start a patterns run for a given configuration. The run executes asynchronously. + operationId: TriggerLLMObsPatterns + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery + schema: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequest" + description: Trigger patterns payload. + required: true + responses: + "202": + content: + application/json: + examples: + default: + value: + data: + attributes: + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + status: started + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_run + schema: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponse" + description: Accepted + "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: Trigger a patterns run + 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/topic-discovery-runs/status: + get: + description: |- + Retrieve the status and step-by-step progress of the current or most recent + patterns run for a configuration. + operationId: GetLLMObsPatternsRunStatus + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + progress: + - name: query_evp + started_at: "2024-01-15T10:30:05Z" + status: completed + - name: generate_topics + started_at: "2024-01-15T10:32:00Z" + status: running + status: running + step: generate_topics + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: topic_discovery_run_status + schema: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponse" + 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: Get patterns run status + 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/topic-discovery-topics: + get: + description: |- + List the topics discovered by a patterns run. When no run is specified, + the most recent completed run is used. + operationId: ListLLMObsPatternsTopics + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsRunIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + completed_at: "2024-01-15T10:45:00Z" + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + created_at: "2024-01-15T10:30:00Z" + previous_run_id: "" + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + topics: + - created_at: "2024-01-15T10:44:00Z" + description: "Questions about invoices, charges, and refunds." + first_seen_at: "2024-01-15T10:44:00Z" + hierarchy_level: 0 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + is_validated: true + name: Billing questions + parent_topic_id: "" + point_count: 125 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: get_topics_response + schema: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponse" + 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 patterns topics + 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/topic-discovery-topics/with-cluster-points: + get: + description: |- + List the topics discovered by a patterns run, with the clustered points attached + inline to each leaf topic. When no run is specified, the most recent completed + run is used. + operationId: ListLLMObsPatternsTopicsWithClusteredPoints + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsRunIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsIncludeMetricsQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + completed_at: "2024-01-15T10:45:00Z" + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + created_at: "2024-01-15T10:30:00Z" + previous_run_id: "" + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + topics: + - cluster_points: + - duration: 1500000 + estimated_total_cost: 0.0021 + evaluation: + sentiment: positive + input_tokens: 128 + output_tokens: 64 + span_id: "1234567890123456789" + status: ok + total_tokens: 192 + created_at: "2024-01-15T10:44:00Z" + description: "Questions about invoices, charges, and refunds." + first_seen_at: "2024-01-15T10:44:00Z" + hierarchy_level: 0 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + is_validated: true + name: Billing questions + parent_topic_id: "" + point_count: 125 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: get_topics_with_cluster_points_response + schema: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponse" + 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 patterns topics with clustered points + 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/{project_id}/datasets: get: description: List all LLM Observability datasets for a project, sorted by creation date, newest first. diff --git a/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.java b/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.java new file mode 100644 index 00000000000..26d7cb6460c --- /dev/null +++ b/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.java @@ -0,0 +1,23 @@ +// Delete a patterns configuration returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteLLMObsPatternsConfig", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + apiInstance.deleteLLMObsPatternsConfig("a7c8d9e0-1234-5678-9abc-def012345678"); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#deleteLLMObsPatternsConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/GetLLMObsPatternsConfig.java b/examples/v2/llm-observability/GetLLMObsPatternsConfig.java new file mode 100644 index 00000000000..adb6d8b0312 --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsPatternsConfig.java @@ -0,0 +1,25 @@ +// Get a patterns configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getLLMObsPatternsConfig", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsConfigResponse result = apiInstance.getLLMObsPatternsConfig(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#getLLMObsPatternsConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.java b/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.java new file mode 100644 index 00000000000..8c0090a8665 --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.java @@ -0,0 +1,26 @@ +// Get patterns run status returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsRunStatusResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getLLMObsPatternsRunStatus", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsRunStatusResponse result = + apiInstance.getLLMObsPatternsRunStatus("a7c8d9e0-1234-5678-9abc-def012345678"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#getLLMObsPatternsRunStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.java b/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.java new file mode 100644 index 00000000000..59067f4e95b --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.java @@ -0,0 +1,27 @@ +// List patterns clustered points returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsClusteredPointsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPatternsClusteredPoints", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsClusteredPointsResponse result = + apiInstance.listLLMObsPatternsClusteredPoints("5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling LlmObservabilityApi#listLLMObsPatternsClusteredPoints"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsConfigs.java b/examples/v2/llm-observability/ListLLMObsPatternsConfigs.java new file mode 100644 index 00000000000..8174539d1e3 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsConfigs.java @@ -0,0 +1,25 @@ +// List patterns configurations returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPatternsConfigs", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsConfigsResponse result = apiInstance.listLLMObsPatternsConfigs(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsPatternsConfigs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsRuns.java b/examples/v2/llm-observability/ListLLMObsPatternsRuns.java new file mode 100644 index 00000000000..c956eadb34e --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsRuns.java @@ -0,0 +1,26 @@ +// List patterns runs returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsRunsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPatternsRuns", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsRunsResponse result = + apiInstance.listLLMObsPatternsRuns("a7c8d9e0-1234-5678-9abc-def012345678"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsPatternsRuns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsTopics.java b/examples/v2/llm-observability/ListLLMObsPatternsTopics.java new file mode 100644 index 00000000000..2374bcbeb6f --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsTopics.java @@ -0,0 +1,26 @@ +// List patterns topics returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsTopicsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPatternsTopics", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsTopicsResponse result = + apiInstance.listLLMObsPatternsTopics("a7c8d9e0-1234-5678-9abc-def012345678"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsPatternsTopics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.java b/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.java new file mode 100644 index 00000000000..ea9a17d5851 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.java @@ -0,0 +1,29 @@ +// List patterns topics with clustered points returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsTopicsWithClusteredPointsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled( + "v2.listLLMObsPatternsTopicsWithClusteredPoints", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsTopicsWithClusteredPointsResponse result = + apiInstance.listLLMObsPatternsTopicsWithClusteredPoints( + "a7c8d9e0-1234-5678-9abc-def012345678"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling LlmObservabilityApi#listLLMObsPatternsTopicsWithClusteredPoints"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/TriggerLLMObsPatterns.java b/examples/v2/llm-observability/TriggerLLMObsPatterns.java new file mode 100644 index 00000000000..f1fb3165a61 --- /dev/null +++ b/examples/v2/llm-observability/TriggerLLMObsPatterns.java @@ -0,0 +1,38 @@ +// Trigger a patterns run returns "Accepted" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsRequestType; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerRequest; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerRequestAttributes; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerRequestData; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.triggerLLMObsPatterns", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + LLMObsPatternsTriggerRequest body = + new LLMObsPatternsTriggerRequest() + .data( + new LLMObsPatternsTriggerRequestData() + .attributes( + new LLMObsPatternsTriggerRequestAttributes() + .configId("a7c8d9e0-1234-5678-9abc-def012345678")) + .type(LLMObsPatternsRequestType.TOPIC_DISCOVERY)); + + try { + LLMObsPatternsTriggerResponse result = apiInstance.triggerLLMObsPatterns(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#triggerLLMObsPatterns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.java b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.java new file mode 100644 index 00000000000..bba7e0b0c08 --- /dev/null +++ b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.java @@ -0,0 +1,48 @@ +// Create or update a patterns configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigType; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigUpsertRequest; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigUpsertRequestAttributes; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigUpsertRequestData; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.upsertLLMObsPatternsConfig", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + LLMObsPatternsConfigUpsertRequest body = + new LLMObsPatternsConfigUpsertRequest() + .data( + new LLMObsPatternsConfigUpsertRequestData() + .attributes( + new LLMObsPatternsConfigUpsertRequestAttributes() + .accountId("1000000001") + .configId("a7c8d9e0-1234-5678-9abc-def012345678") + .evpQuery("@ml_app:support-bot") + .hierarchyDepth(2) + .integrationProvider("openai") + .modelName("gpt-4o") + .name("Support chatbot topics") + .numRecords(1000) + .samplingRatio(0.1) + .scope("") + .template("")) + .type(LLMObsPatternsConfigType.TOPIC_DISCOVERY_CONFIGS)); + + try { + LLMObsPatternsConfigResponse result = apiInstance.upsertLLMObsPatternsConfig(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#upsertLLMObsPatternsConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 5ae18bf9edc..d3018ab7f81 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -790,6 +790,7 @@ public class ApiClient { put("v2.deleteLLMObsDatasetRecords", false); put("v2.deleteLLMObsDatasets", false); put("v2.deleteLLMObsExperiments", false); + put("v2.deleteLLMObsPatternsConfig", false); put("v2.deleteLLMObsProjects", false); put("v2.exportLLMObsDataset", false); put("v2.getLLMObsAnnotatedInteractions", false); @@ -797,6 +798,8 @@ public class ApiClient { put("v2.getLLMObsAnnotationQueueLabelSchema", false); put("v2.getLLMObsCustomEvalConfig", false); put("v2.getLLMObsDatasetDraftState", false); + put("v2.getLLMObsPatternsConfig", false); + put("v2.getLLMObsPatternsRunStatus", false); put("v2.listLLMObsAnnotationQueues", false); put("v2.listLLMObsDatasetRecords", false); put("v2.listLLMObsDatasets", false); @@ -807,6 +810,11 @@ public class ApiClient { put("v2.listLLMObsExperiments", false); put("v2.listLLMObsIntegrationAccounts", false); put("v2.listLLMObsIntegrationModels", false); + put("v2.listLLMObsPatternsClusteredPoints", false); + put("v2.listLLMObsPatternsConfigs", false); + put("v2.listLLMObsPatternsRuns", false); + put("v2.listLLMObsPatternsTopics", false); + put("v2.listLLMObsPatternsTopicsWithClusteredPoints", false); put("v2.listLLMObsProjects", false); put("v2.listLLMObsSpans", false); put("v2.lockLLMObsDatasetDraftState", false); @@ -814,6 +822,7 @@ public class ApiClient { put("v2.searchLLMObsExperimentation", false); put("v2.searchLLMObsSpans", false); put("v2.simpleSearchLLMObsExperimentation", false); + put("v2.triggerLLMObsPatterns", false); put("v2.unlockLLMObsDatasetDraftState", false); put("v2.updateLLMObsAnnotationQueue", false); put("v2.updateLLMObsAnnotationQueueLabelSchema", false); @@ -824,6 +833,7 @@ public class ApiClient { put("v2.updateLLMObsProject", false); put("v2.uploadLLMObsDatasetRecordsFile", false); put("v2.upsertLLMObsAnnotations", false); + put("v2.upsertLLMObsPatternsConfig", false); put("v2.createAnnotation", false); put("v2.deleteAnnotation", false); put("v2.getPageAnnotations", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java b/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java index 0356a1d3568..e93ab1fb788 100644 --- a/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java @@ -59,6 +59,16 @@ import com.datadog.api.client.v2.model.LLMObsIntegrationInferenceResponse; import com.datadog.api.client.v2.model.LLMObsIntegrationModel; import com.datadog.api.client.v2.model.LLMObsIntegrationName; +import com.datadog.api.client.v2.model.LLMObsPatternsClusteredPointsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigUpsertRequest; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsRunStatusResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsRunsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsTopicsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsTopicsWithClusteredPointsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerRequest; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerResponse; import com.datadog.api.client.v2.model.LLMObsProjectRequest; import com.datadog.api.client.v2.model.LLMObsProjectResponse; import com.datadog.api.client.v2.model.LLMObsProjectUpdateRequest; @@ -3478,6 +3488,161 @@ public CompletableFuture> deleteLLMObsExperimentsWithHttpInfoA null); } + /** + * Delete a patterns configuration. + * + *

See {@link #deleteLLMObsPatternsConfigWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @throws ApiException if fails to make API call + */ + public void deleteLLMObsPatternsConfig(String configId) throws ApiException { + deleteLLMObsPatternsConfigWithHttpInfo(configId); + } + + /** + * Delete a patterns configuration. + * + *

See {@link #deleteLLMObsPatternsConfigWithHttpInfoAsync}. + * + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteLLMObsPatternsConfigAsync(String configId) { + return deleteLLMObsPatternsConfigWithHttpInfoAsync(configId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a patterns configuration by its ID. + * + * @param configId The ID of the patterns configuration. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse deleteLLMObsPatternsConfigWithHttpInfo(String configId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteLLMObsPatternsConfig"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException( + 400, "Missing the required parameter 'configId' when calling deleteLLMObsPatternsConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/topic-discovery-configs/{config_id}" + .replaceAll("\\{" + "config_id" + "\\}", apiClient.escapeString(configId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.deleteLLMObsPatternsConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a patterns configuration. + * + *

See {@link #deleteLLMObsPatternsConfigWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteLLMObsPatternsConfigWithHttpInfoAsync( + String configId) { + // Check if unstable operation is enabled + String operationId = "deleteLLMObsPatternsConfig"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'configId' when calling deleteLLMObsPatternsConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/topic-discovery-configs/{config_id}" + .replaceAll("\\{" + "config_id" + "\\}", apiClient.escapeString(configId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.deleteLLMObsPatternsConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + /** * Delete LLM Observability projects. * @@ -4818,91 +4983,27 @@ public ApiResponse getLLMObsDatasetDraftStateWi new GenericType() {}); } - /** Manage optional parameters to listLLMObsAnnotationQueues. */ - public static class ListLLMObsAnnotationQueuesOptionalParameters { - private String projectId; - private List queueIds; - - /** - * Set projectId. - * - * @param projectId Filter annotation queues by project ID. Cannot be used together with - * queueIds. (optional) - * @return ListLLMObsAnnotationQueuesOptionalParameters - */ - public ListLLMObsAnnotationQueuesOptionalParameters projectId(String projectId) { - this.projectId = projectId; - return this; - } - - /** - * Set queueIds. - * - * @param queueIds Filter annotation queues by queue IDs (comma-separated). Cannot be used - * together with projectId. (optional) - * @return ListLLMObsAnnotationQueuesOptionalParameters - */ - public ListLLMObsAnnotationQueuesOptionalParameters queueIds(List queueIds) { - this.queueIds = queueIds; - return this; - } - } - - /** - * List LLM Observability annotation queues. - * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. - * - * @return LLMObsAnnotationQueuesResponse - * @throws ApiException if fails to make API call - */ - public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues() throws ApiException { - return listLLMObsAnnotationQueuesWithHttpInfo( - new ListLLMObsAnnotationQueuesOptionalParameters()) - .getData(); - } - - /** - * List LLM Observability annotation queues. - * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. - * - * @return CompletableFuture<LLMObsAnnotationQueuesResponse> - */ - public CompletableFuture listLLMObsAnnotationQueuesAsync() { - return listLLMObsAnnotationQueuesWithHttpInfoAsync( - new ListLLMObsAnnotationQueuesOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - /** - * List LLM Observability annotation queues. + * Get a patterns configuration. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. + *

See {@link #getLLMObsPatternsConfigWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return LLMObsAnnotationQueuesResponse + * @return LLMObsPatternsConfigResponse * @throws ApiException if fails to make API call */ - public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues( - ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { - return listLLMObsAnnotationQueuesWithHttpInfo(parameters).getData(); + public LLMObsPatternsConfigResponse getLLMObsPatternsConfig() throws ApiException { + return getLLMObsPatternsConfigWithHttpInfo().getData(); } /** - * List LLM Observability annotation queues. + * Get a patterns configuration. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. + *

See {@link #getLLMObsPatternsConfigWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsAnnotationQueuesResponse> + * @return CompletableFuture<LLMObsPatternsConfigResponse> */ - public CompletableFuture listLLMObsAnnotationQueuesAsync( - ListLLMObsAnnotationQueuesOptionalParameters parameters) { - return listLLMObsAnnotationQueuesWithHttpInfoAsync(parameters) + public CompletableFuture getLLMObsPatternsConfigAsync() { + return getLLMObsPatternsConfigWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -4910,11 +5011,9 @@ public CompletableFuture listLLMObsAnnotationQue } /** - * List annotation queues. Optionally filter by project ID or queue IDs. These parameters are - * mutually exclusive. If neither is provided, all queues in the organization are returned. + * Retrieve the patterns configuration for the organization. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsAnnotationQueuesResponse> + * @return ApiResponse<LLMObsPatternsConfigResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -4924,35 +5023,31 @@ public CompletableFuture listLLMObsAnnotationQue * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsAnnotationQueuesWithHttpInfo( - ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { + public ApiResponse getLLMObsPatternsConfigWithHttpInfo() + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsAnnotationQueues"; + String operationId = "getLLMObsPatternsConfig"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String projectId = parameters.projectId; - List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs/latest"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", + "v2.LlmObservabilityApi.getLLMObsPatternsConfig", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -4965,56 +5060,48 @@ public ApiResponse listLLMObsAnnotationQueuesWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability annotation queues. + * Get a patterns configuration. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. + *

See {@link #getLLMObsPatternsConfigWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueuesResponse>> + * @return CompletableFuture<ApiResponse<LLMObsPatternsConfigResponse>> */ - public CompletableFuture> - listLLMObsAnnotationQueuesWithHttpInfoAsync( - ListLLMObsAnnotationQueuesOptionalParameters parameters) { + public CompletableFuture> + getLLMObsPatternsConfigWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "listLLMObsAnnotationQueues"; + String operationId = "getLLMObsPatternsConfig"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String projectId = parameters.projectId; - List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs/latest"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", + "v2.LlmObservabilityApi.getLLMObsPatternsConfig", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5027,116 +5114,34 @@ public ApiResponse listLLMObsAnnotationQueuesWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listLLMObsDatasetRecords. */ - public static class ListLLMObsDatasetRecordsOptionalParameters { - private Long filterVersion; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterVersion. - * - * @param filterVersion Retrieve records from a specific dataset version. Defaults to the - * current version. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters filterVersion(Long filterVersion) { - this.filterVersion = filterVersion; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit Maximum number of results to return per page. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; - return this; - } - } - - /** - * List LLM Observability dataset records. - * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. - * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return LLMObsDatasetRecordsListResponse - * @throws ApiException if fails to make API call - */ - public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( - String projectId, String datasetId) throws ApiException { - return listLLMObsDatasetRecordsWithHttpInfo( - projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) - .getData(); - } - - /** - * List LLM Observability dataset records. - * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. - * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<LLMObsDatasetRecordsListResponse> - */ - public CompletableFuture listLLMObsDatasetRecordsAsync( - String projectId, String datasetId) { - return listLLMObsDatasetRecordsWithHttpInfoAsync( - projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List LLM Observability dataset records. - * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. - * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return LLMObsDatasetRecordsListResponse - * @throws ApiException if fails to make API call - */ - public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) - throws ApiException { - return listLLMObsDatasetRecordsWithHttpInfo(projectId, datasetId, parameters).getData(); - } + /** + * Get patterns run status. + * + *

See {@link #getLLMObsPatternsRunStatusWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsRunStatusResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsRunStatusResponse getLLMObsPatternsRunStatus(String configId) + throws ApiException { + return getLLMObsPatternsRunStatusWithHttpInfo(configId).getData(); + } /** - * List LLM Observability dataset records. + * Get patterns run status. * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. + *

See {@link #getLLMObsPatternsRunStatusWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsDatasetRecordsListResponse> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsRunStatusResponse> */ - public CompletableFuture listLLMObsDatasetRecordsAsync( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) { - return listLLMObsDatasetRecordsWithHttpInfoAsync(projectId, datasetId, parameters) + public CompletableFuture getLLMObsPatternsRunStatusAsync( + String configId) { + return getLLMObsPatternsRunStatusWithHttpInfoAsync(configId) .thenApply( response -> { return response.getData(); @@ -5144,12 +5149,11 @@ public CompletableFuture listLLMObsDatasetReco } /** - * List all records in an LLM Observability dataset, sorted by creation date, newest first. + * Retrieve the status and step-by-step progress of the current or most recent patterns run for a + * configuration. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsDatasetRecordsListResponse> + * @param configId The ID of the patterns configuration. (required) + * @return ApiResponse<LLMObsPatternsRunStatusResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5161,13 +5165,13 @@ public CompletableFuture listLLMObsDatasetReco * * * + * *
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsDatasetRecordsWithHttpInfo( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) - throws ApiException { + public ApiResponse getLLMObsPatternsRunStatusWithHttpInfo( + String configId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetRecords"; + String operationId = "getLLMObsPatternsRunStatus"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5175,36 +5179,22 @@ public ApiResponse listLLMObsDatasetRecordsWit } Object localVarPostBody = null; - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords"); - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( - 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords"); + 400, "Missing the required parameter 'configId' when calling getLLMObsPatternsRunStatus"); } - Long filterVersion = parameters.filterVersion; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs/status"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetRecords", + "v2.LlmObservabilityApi.getLLMObsPatternsRunStatus", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5219,30 +5209,25 @@ public ApiResponse listLLMObsDatasetRecordsWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability dataset records. + * Get patterns run status. * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. + *

See {@link #getLLMObsPatternsRunStatusWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsDatasetRecordsListResponse>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsRunStatusResponse>> */ - public CompletableFuture> - listLLMObsDatasetRecordsWithHttpInfoAsync( - String projectId, - String datasetId, - ListLLMObsDatasetRecordsOptionalParameters parameters) { + public CompletableFuture> + getLLMObsPatternsRunStatusWithHttpInfoAsync(String configId) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetRecords"; + String operationId = "getLLMObsPatternsRunStatus"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -5250,48 +5235,29 @@ public ApiResponse listLLMObsDatasetRecordsWit } Object localVarPostBody = null; - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords")); - return result; - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords")); + "Missing the required parameter 'configId' when calling getLLMObsPatternsRunStatus")); return result; } - Long filterVersion = parameters.filterVersion; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs/status"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetRecords", + "v2.LlmObservabilityApi.getLLMObsPatternsRunStatus", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5299,7 +5265,7 @@ public ApiResponse listLLMObsDatasetRecordsWit new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5312,86 +5278,63 @@ public ApiResponse listLLMObsDatasetRecordsWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listLLMObsDatasets. */ - public static class ListLLMObsDatasetsOptionalParameters { - private String filterName; - private String filterId; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterName. - * - * @param filterName Filter datasets by name. (optional) - * @return ListLLMObsDatasetsOptionalParameters - */ - public ListLLMObsDatasetsOptionalParameters filterName(String filterName) { - this.filterName = filterName; - return this; - } - - /** - * Set filterId. - * - * @param filterId Filter datasets by dataset ID. (optional) - * @return ListLLMObsDatasetsOptionalParameters - */ - public ListLLMObsDatasetsOptionalParameters filterId(String filterId) { - this.filterId = filterId; - return this; - } + /** Manage optional parameters to listLLMObsAnnotationQueues. */ + public static class ListLLMObsAnnotationQueuesOptionalParameters { + private String projectId; + private List queueIds; /** - * Set pageCursor. + * Set projectId. * - * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) - * @return ListLLMObsDatasetsOptionalParameters + * @param projectId Filter annotation queues by project ID. Cannot be used together with + * queueIds. (optional) + * @return ListLLMObsAnnotationQueuesOptionalParameters */ - public ListLLMObsDatasetsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; + public ListLLMObsAnnotationQueuesOptionalParameters projectId(String projectId) { + this.projectId = projectId; return this; } /** - * Set pageLimit. + * Set queueIds. * - * @param pageLimit Maximum number of results to return per page. (optional) - * @return ListLLMObsDatasetsOptionalParameters + * @param queueIds Filter annotation queues by queue IDs (comma-separated). Cannot be used + * together with projectId. (optional) + * @return ListLLMObsAnnotationQueuesOptionalParameters */ - public ListLLMObsDatasetsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; + public ListLLMObsAnnotationQueuesOptionalParameters queueIds(List queueIds) { + this.queueIds = queueIds; return this; } } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @return LLMObsDatasetsResponse + * @return LLMObsAnnotationQueuesResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetsResponse listLLMObsDatasets(String projectId) throws ApiException { - return listLLMObsDatasetsWithHttpInfo(projectId, new ListLLMObsDatasetsOptionalParameters()) + public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues() throws ApiException { + return listLLMObsAnnotationQueuesWithHttpInfo( + new ListLLMObsAnnotationQueuesOptionalParameters()) .getData(); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @return CompletableFuture<LLMObsDatasetsResponse> + * @return CompletableFuture<LLMObsAnnotationQueuesResponse> */ - public CompletableFuture listLLMObsDatasetsAsync(String projectId) { - return listLLMObsDatasetsWithHttpInfoAsync( - projectId, new ListLLMObsDatasetsOptionalParameters()) + public CompletableFuture listLLMObsAnnotationQueuesAsync() { + return listLLMObsAnnotationQueuesWithHttpInfoAsync( + new ListLLMObsAnnotationQueuesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5399,32 +5342,30 @@ projectId, new ListLLMObsDatasetsOptionalParameters()) } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return LLMObsDatasetsResponse + * @return LLMObsAnnotationQueuesResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetsResponse listLLMObsDatasets( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { - return listLLMObsDatasetsWithHttpInfo(projectId, parameters).getData(); + public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues( + ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { + return listLLMObsAnnotationQueuesWithHttpInfo(parameters).getData(); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsDatasetsResponse> + * @return CompletableFuture<LLMObsAnnotationQueuesResponse> */ - public CompletableFuture listLLMObsDatasetsAsync( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) { - return listLLMObsDatasetsWithHttpInfoAsync(projectId, parameters) + public CompletableFuture listLLMObsAnnotationQueuesAsync( + ListLLMObsAnnotationQueuesOptionalParameters parameters) { + return listLLMObsAnnotationQueuesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -5432,11 +5373,11 @@ public CompletableFuture listLLMObsDatasetsAsync( } /** - * List all LLM Observability datasets for a project, sorted by creation date, newest first. + * List annotation queues. Optionally filter by project ID or queue IDs. These parameters are + * mutually exclusive. If neither is provided, all queues in the organization are returned. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsDatasetsResponse> + * @return ApiResponse<LLMObsAnnotationQueuesResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5446,46 +5387,33 @@ public CompletableFuture listLLMObsDatasetsAsync( * * * - * * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listLLMObsDatasetsWithHttpInfo( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { + public ApiResponse listLLMObsAnnotationQueuesWithHttpInfo( + ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasets"; + String operationId = "listLLMObsAnnotationQueues"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets"); - } - String filterName = parameters.filterName; - String filterId = parameters.filterId; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + String projectId = parameters.projectId; + List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasets", + "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5500,62 +5428,48 @@ public ApiResponse listLLMObsDatasetsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsDatasetsResponse>> + * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueuesResponse>> */ - public CompletableFuture> listLLMObsDatasetsWithHttpInfoAsync( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsAnnotationQueuesWithHttpInfoAsync( + ListLLMObsAnnotationQueuesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasets"; + String operationId = "listLLMObsAnnotationQueues"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets")); - return result; - } - String filterName = parameters.filterName; - String filterId = parameters.filterId; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + String projectId = parameters.projectId; + List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasets", + "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5563,7 +5477,8 @@ public CompletableFuture> listLLMObsDatasets new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -5575,36 +5490,80 @@ public CompletableFuture> listLLMObsDatasets localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsDatasetRecords. */ + public static class ListLLMObsDatasetRecordsOptionalParameters { + private Long filterVersion; + private String pageCursor; + private Long pageLimit; + + /** + * Set filterVersion. + * + * @param filterVersion Retrieve records from a specific dataset version. Defaults to the + * current version. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters filterVersion(Long filterVersion) { + this.filterVersion = filterVersion; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } } /** - * List LLM Observability dataset versions. + * List LLM Observability dataset records. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return LLMObsDatasetVersionsResponse + * @return LLMObsDatasetRecordsListResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetVersionsResponse listLLMObsDatasetVersions(String projectId, String datasetId) - throws ApiException { - return listLLMObsDatasetVersionsWithHttpInfo(projectId, datasetId).getData(); + public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( + String projectId, String datasetId) throws ApiException { + return listLLMObsDatasetRecordsWithHttpInfo( + projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) + .getData(); } /** - * List LLM Observability dataset versions. + * List LLM Observability dataset records. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<LLMObsDatasetVersionsResponse> + * @return CompletableFuture<LLMObsDatasetRecordsListResponse> */ - public CompletableFuture listLLMObsDatasetVersionsAsync( + public CompletableFuture listLLMObsDatasetRecordsAsync( String projectId, String datasetId) { - return listLLMObsDatasetVersionsWithHttpInfoAsync(projectId, datasetId) + return listLLMObsDatasetRecordsWithHttpInfoAsync( + projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5612,12 +5571,48 @@ public CompletableFuture listLLMObsDatasetVersion } /** - * List the active versions of a dataset. A version is created each time a dataset is referenced - * by an experiment run. + * List LLM Observability dataset records. + * + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return ApiResponse<LLMObsDatasetVersionsResponse> + * @param parameters Optional parameters for the request. + * @return LLMObsDatasetRecordsListResponse + * @throws ApiException if fails to make API call + */ + public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) + throws ApiException { + return listLLMObsDatasetRecordsWithHttpInfo(projectId, datasetId, parameters).getData(); + } + + /** + * List LLM Observability dataset records. + * + *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsDatasetRecordsListResponse> + */ + public CompletableFuture listLLMObsDatasetRecordsAsync( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) { + return listLLMObsDatasetRecordsWithHttpInfoAsync(projectId, datasetId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all records in an LLM Observability dataset, sorted by creation date, newest first. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsDatasetRecordsListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5629,13 +5624,13 @@ public CompletableFuture listLLMObsDatasetVersion * * * - * *
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsDatasetVersionsWithHttpInfo( - String projectId, String datasetId) throws ApiException { + public ApiResponse listLLMObsDatasetRecordsWithHttpInfo( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetVersions"; + String operationId = "listLLMObsDatasetRecords"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5646,27 +5641,35 @@ public ApiResponse listLLMObsDatasetVersionsWithH // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions"); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords"); } // verify the required parameter 'datasetId' is set if (datasetId == null) { throw new ApiException( - 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions"); + 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords"); } + Long filterVersion = parameters.filterVersion; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetVersions", + "v2.LlmObservabilityApi.listLLMObsDatasetRecords", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -5679,26 +5682,30 @@ public ApiResponse listLLMObsDatasetVersionsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability dataset versions. + * List LLM Observability dataset records. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<ApiResponse<LLMObsDatasetVersionsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsDatasetRecordsListResponse>> */ - public CompletableFuture> - listLLMObsDatasetVersionsWithHttpInfoAsync(String projectId, String datasetId) { + public CompletableFuture> + listLLMObsDatasetRecordsWithHttpInfoAsync( + String projectId, + String datasetId, + ListLLMObsDatasetRecordsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetVersions"; + String operationId = "listLLMObsDatasetRecords"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -5708,46 +5715,54 @@ public ApiResponse listLLMObsDatasetVersionsWithH // verify the required parameter 'projectId' is set if (projectId == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions")); + "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords")); return result; } // verify the required parameter 'datasetId' is set if (datasetId == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions")); + "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords")); return result; } + Long filterVersion = parameters.filterVersion; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetVersions", + "v2.LlmObservabilityApi.listLLMObsDatasetRecords", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5760,67 +5775,86 @@ public ApiResponse listLLMObsDatasetVersionsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listLLMObsExperimentEvents. */ - public static class ListLLMObsExperimentEventsOptionalParameters { - private Long pageLimit; + /** Manage optional parameters to listLLMObsDatasets. */ + public static class ListLLMObsDatasetsOptionalParameters { + private String filterName; + private String filterId; private String pageCursor; + private Long pageLimit; /** - * Set pageLimit. + * Set filterName. * - * @param pageLimit Maximum number of spans to return per page. Defaults to 5000. (optional, - * default to 5000) - * @return ListLLMObsExperimentEventsOptionalParameters + * @param filterName Filter datasets by name. (optional) + * @return ListLLMObsDatasetsOptionalParameters */ - public ListLLMObsExperimentEventsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; + public ListLLMObsDatasetsOptionalParameters filterName(String filterName) { + this.filterName = filterName; + return this; + } + + /** + * Set filterId. + * + * @param filterId Filter datasets by dataset ID. (optional) + * @return ListLLMObsDatasetsOptionalParameters + */ + public ListLLMObsDatasetsOptionalParameters filterId(String filterId) { + this.filterId = filterId; return this; } /** * Set pageCursor. * - * @param pageCursor Opaque cursor from a previous response to fetch the next page of results. - * (optional) - * @return ListLLMObsExperimentEventsOptionalParameters + * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) + * @return ListLLMObsDatasetsOptionalParameters */ - public ListLLMObsExperimentEventsOptionalParameters pageCursor(String pageCursor) { + public ListLLMObsDatasetsOptionalParameters pageCursor(String pageCursor) { this.pageCursor = pageCursor; return this; } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. (optional) + * @return ListLLMObsDatasetsOptionalParameters + */ + public ListLLMObsDatasetsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsDatasetsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return LLMObsExperimentEventsV2Response + * @param projectId The ID of the LLM Observability project. (required) + * @return LLMObsDatasetsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents(String experimentId) - throws ApiException { - return listLLMObsExperimentEventsWithHttpInfo( - experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + public LLMObsDatasetsResponse listLLMObsDatasets(String projectId) throws ApiException { + return listLLMObsDatasetsWithHttpInfo(projectId, new ListLLMObsDatasetsOptionalParameters()) .getData(); } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @param projectId The ID of the LLM Observability project. (required) + * @return CompletableFuture<LLMObsDatasetsResponse> */ - public CompletableFuture listLLMObsExperimentEventsAsync( - String experimentId) { - return listLLMObsExperimentEventsWithHttpInfoAsync( - experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + public CompletableFuture listLLMObsDatasetsAsync(String projectId) { + return listLLMObsDatasetsWithHttpInfoAsync( + projectId, new ListLLMObsDatasetsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5828,33 +5862,32 @@ experimentId, new ListLLMObsExperimentEventsOptionalParameters()) } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsDatasetsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return LLMObsExperimentEventsV2Response + * @return LLMObsDatasetsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) - throws ApiException { - return listLLMObsExperimentEventsWithHttpInfo(experimentId, parameters).getData(); + public LLMObsDatasetsResponse listLLMObsDatasets( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { + return listLLMObsDatasetsWithHttpInfo(projectId, parameters).getData(); } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @return CompletableFuture<LLMObsDatasetsResponse> */ - public CompletableFuture listLLMObsExperimentEventsAsync( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { - return listLLMObsExperimentEventsWithHttpInfoAsync(experimentId, parameters) + public CompletableFuture listLLMObsDatasetsAsync( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) { + return listLLMObsDatasetsWithHttpInfoAsync(projectId, parameters) .thenApply( response -> { return response.getData(); @@ -5862,12 +5895,11 @@ public CompletableFuture listLLMObsExperimentE } /** - * Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based - * pagination. + * List all LLM Observability datasets for a project, sorted by creation date, newest first. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsExperimentEventsV2Response> + * @return ApiResponse<LLMObsDatasetsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5879,14 +5911,12 @@ public CompletableFuture listLLMObsExperimentE * * * - * *
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsExperimentEventsWithHttpInfo( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) - throws ApiException { + public ApiResponse listLLMObsDatasetsWithHttpInfo( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEvents"; + String operationId = "listLLMObsDatasets"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5894,29 +5924,31 @@ public ApiResponse listLLMObsExperimentEventsW } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - 400, - "Missing the required parameter 'experimentId' when calling listLLMObsExperimentEvents"); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets"); } - Long pageLimit = parameters.pageLimit; + String filterName = parameters.filterName; + String filterId = parameters.filterId; String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEvents", + "v2.LlmObservabilityApi.listLLMObsDatasets", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5931,64 +5963,62 @@ public ApiResponse listLLMObsExperimentEventsW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsDatasetsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> + * @return CompletableFuture<ApiResponse<LLMObsDatasetsResponse>> */ - public CompletableFuture> - listLLMObsExperimentEventsWithHttpInfoAsync( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { + public CompletableFuture> listLLMObsDatasetsWithHttpInfoAsync( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEvents"; + String operationId = "listLLMObsDatasets"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEvents")); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets")); return result; } - Long pageLimit = parameters.pageLimit; + String filterName = parameters.filterName; + String filterId = parameters.filterId; String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEvents", + "v2.LlmObservabilityApi.listLLMObsDatasets", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5996,8 +6026,7 @@ public ApiResponse listLLMObsExperimentEventsW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6009,38 +6038,36 @@ public ApiResponse listLLMObsExperimentEventsW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability experiment spans (v1). + * List LLM Observability dataset versions. * - *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return LLMObsExperimentSpansResponse + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return LLMObsDatasetVersionsResponse * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public LLMObsExperimentSpansResponse listLLMObsExperimentEventsV1(String experimentId) + public LLMObsDatasetVersionsResponse listLLMObsDatasetVersions(String projectId, String datasetId) throws ApiException { - return listLLMObsExperimentEventsV1WithHttpInfo(experimentId).getData(); + return listLLMObsDatasetVersionsWithHttpInfo(projectId, datasetId).getData(); } /** - * List LLM Observability experiment spans (v1). + * List LLM Observability dataset versions. * - *

See {@link #listLLMObsExperimentEventsV1WithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetVersionsWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return CompletableFuture<LLMObsExperimentSpansResponse> - * @deprecated + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<LLMObsDatasetVersionsResponse> */ - @Deprecated - public CompletableFuture listLLMObsExperimentEventsV1Async( - String experimentId) { - return listLLMObsExperimentEventsV1WithHttpInfoAsync(experimentId) + public CompletableFuture listLLMObsDatasetVersionsAsync( + String projectId, String datasetId) { + return listLLMObsDatasetVersionsWithHttpInfoAsync(projectId, datasetId) .thenApply( response -> { return response.getData(); @@ -6048,12 +6075,12 @@ public CompletableFuture listLLMObsExperimentEven } /** - * Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with - * no summary metrics and no pagination. Deprecated in favor of ListLLMObsExperimentEventsV3 - * . + * List the active versions of a dataset. A version is created each time a dataset is referenced + * by an experiment run. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return ApiResponse<LLMObsExperimentSpansResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return ApiResponse<LLMObsDatasetVersionsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6067,14 +6094,11 @@ public CompletableFuture listLLMObsExperimentEven * * *
429 Too many requests -
500 Internal Server Error -
- * - * @deprecated */ - @Deprecated - public ApiResponse listLLMObsExperimentEventsV1WithHttpInfo( - String experimentId) throws ApiException { + public ApiResponse listLLMObsDatasetVersionsWithHttpInfo( + String projectId, String datasetId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEventsV1"; + String operationId = "listLLMObsDatasetVersions"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6082,24 +6106,28 @@ public ApiResponse listLLMObsExperimentEventsV1Wi } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEventsV1"); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions"); + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + "v2.LlmObservabilityApi.listLLMObsDatasetVersions", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6114,27 +6142,26 @@ public ApiResponse listLLMObsExperimentEventsV1Wi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability experiment spans (v1). + * List LLM Observability dataset versions. * - *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return CompletableFuture<ApiResponse<LLMObsExperimentSpansResponse>> - * @deprecated + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<ApiResponse<LLMObsDatasetVersionsResponse>> */ - @Deprecated - public CompletableFuture> - listLLMObsExperimentEventsV1WithHttpInfoAsync(String experimentId) { + public CompletableFuture> + listLLMObsDatasetVersionsWithHttpInfoAsync(String projectId, String datasetId) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEventsV1"; + String operationId = "listLLMObsDatasetVersions"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -6142,22 +6169,32 @@ public ApiResponse listLLMObsExperimentEventsV1Wi } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { - CompletableFuture> result = + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEventsV1")); + "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -6165,7 +6202,7 @@ public ApiResponse listLLMObsExperimentEventsV1Wi try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + "v2.LlmObservabilityApi.listLLMObsDatasetVersions", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6173,7 +6210,7 @@ public ApiResponse listLLMObsExperimentEventsV1Wi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -6186,38 +6223,67 @@ public ApiResponse listLLMObsExperimentEventsV1Wi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsExperimentEvents. */ + public static class ListLLMObsExperimentEventsOptionalParameters { + private Long pageLimit; + private String pageCursor; + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of spans to return per page. Defaults to 5000. (optional, + * default to 5000) + * @return ListLLMObsExperimentEventsOptionalParameters + */ + public ListLLMObsExperimentEventsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Opaque cursor from a previous response to fetch the next page of results. + * (optional) + * @return ListLLMObsExperimentEventsOptionalParameters + */ + public ListLLMObsExperimentEventsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } } /** - * List LLM Observability experiment events (v2). + * List events for an LLM Observability experiment. * - *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. * * @param experimentId The ID of the LLM Observability experiment. (required) * @return LLMObsExperimentEventsV2Response * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public LLMObsExperimentEventsV2Response listLLMObsExperimentEventsV2(String experimentId) + public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents(String experimentId) throws ApiException { - return listLLMObsExperimentEventsV2WithHttpInfo(experimentId).getData(); + return listLLMObsExperimentEventsWithHttpInfo( + experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + .getData(); } /** - * List LLM Observability experiment events (v2). + * List events for an LLM Observability experiment. * - *

See {@link #listLLMObsExperimentEventsV2WithHttpInfoAsync}. + *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. * * @param experimentId The ID of the LLM Observability experiment. (required) * @return CompletableFuture<LLMObsExperimentEventsV2Response> - * @deprecated */ - @Deprecated - public CompletableFuture listLLMObsExperimentEventsV2Async( + public CompletableFuture listLLMObsExperimentEventsAsync( String experimentId) { - return listLLMObsExperimentEventsV2WithHttpInfoAsync(experimentId) + return listLLMObsExperimentEventsWithHttpInfoAsync( + experimentId, new ListLLMObsExperimentEventsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6225,11 +6291,45 @@ public CompletableFuture listLLMObsExperimentE } /** - * Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full - * events payload without pagination. Deprecated: use ListLLMObsExperimentEventsV3 - * instead. + * List events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsExperimentEventsV2Response + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) + throws ApiException { + return listLLMObsExperimentEventsWithHttpInfo(experimentId, parameters).getData(); + } + + /** + * List events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsExperimentEventsV2Response> + */ + public CompletableFuture listLLMObsExperimentEventsAsync( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { + return listLLMObsExperimentEventsWithHttpInfoAsync(experimentId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based + * pagination. * * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. * @return ApiResponse<LLMObsExperimentEventsV2Response> * @throws ApiException if fails to make API call * @http.response.details @@ -6244,14 +6344,12 @@ public CompletableFuture listLLMObsExperimentE * 429 Too many requests - * 500 Internal Server Error - * - * - * @deprecated */ - @Deprecated - public ApiResponse listLLMObsExperimentEventsV2WithHttpInfo( - String experimentId) throws ApiException { + public ApiResponse listLLMObsExperimentEventsWithHttpInfo( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEventsV2"; + String operationId = "listLLMObsExperimentEvents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6263,22 +6361,27 @@ public ApiResponse listLLMObsExperimentEventsV if (experimentId == null) { throw new ApiException( 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEventsV2"); + "Missing the required parameter 'experimentId' when calling listLLMObsExperimentEvents"); } + Long pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" .replaceAll( "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + "v2.LlmObservabilityApi.listLLMObsExperimentEvents", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6295,19 +6398,19 @@ public ApiResponse listLLMObsExperimentEventsV } /** - * List LLM Observability experiment events (v2). + * List events for an LLM Observability experiment. * - *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. * * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> - * @deprecated */ - @Deprecated public CompletableFuture> - listLLMObsExperimentEventsV2WithHttpInfoAsync(String experimentId) { + listLLMObsExperimentEventsWithHttpInfoAsync( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEventsV2"; + String operationId = "listLLMObsExperimentEvents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6327,24 +6430,30 @@ public ApiResponse listLLMObsExperimentEventsV new ApiException( 400, "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEventsV2")); + + " listLLMObsExperimentEvents")); return result; } + Long pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" .replaceAll( "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + "v2.LlmObservabilityApi.listLLMObsExperimentEvents", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6366,192 +6475,1374 @@ public ApiResponse listLLMObsExperimentEventsV new GenericType() {}); } - /** Manage optional parameters to listLLMObsExperiments. */ - public static class ListLLMObsExperimentsOptionalParameters { - private String filterProjectId; - private String filterDatasetId; - private String filterId; - private String filterName; - private String filterExperiment; - private String filterMetadata; - private String filterParentExperimentId; - private Boolean filterIsDeleted; - private Boolean includeUserData; - private Boolean includeDatasetNames; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterProjectId. - * - * @param filterProjectId Filter experiments by project ID. Required if filter[dataset_id] - * is not provided. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterProjectId(String filterProjectId) { + /** + * List LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return LLMObsExperimentSpansResponse + * @throws ApiException if fails to make API call + * @deprecated + */ + @Deprecated + public LLMObsExperimentSpansResponse listLLMObsExperimentEventsV1(String experimentId) + throws ApiException { + return listLLMObsExperimentEventsV1WithHttpInfo(experimentId).getData(); + } + + /** + * List LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<LLMObsExperimentSpansResponse> + * @deprecated + */ + @Deprecated + public CompletableFuture listLLMObsExperimentEventsV1Async( + String experimentId) { + return listLLMObsExperimentEventsV1WithHttpInfoAsync(experimentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with + * no summary metrics and no pagination. Deprecated in favor of ListLLMObsExperimentEventsV3 + * . + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return ApiResponse<LLMObsExperimentSpansResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse listLLMObsExperimentEventsV1WithHttpInfo( + String experimentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV1"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV1"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentSpansResponse>> + * @deprecated + */ + @Deprecated + public CompletableFuture> + listLLMObsExperimentEventsV1WithHttpInfoAsync(String experimentId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV1"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV1")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return LLMObsExperimentEventsV2Response + * @throws ApiException if fails to make API call + * @deprecated + */ + @Deprecated + public LLMObsExperimentEventsV2Response listLLMObsExperimentEventsV2(String experimentId) + throws ApiException { + return listLLMObsExperimentEventsV2WithHttpInfo(experimentId).getData(); + } + + /** + * List LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @deprecated + */ + @Deprecated + public CompletableFuture listLLMObsExperimentEventsV2Async( + String experimentId) { + return listLLMObsExperimentEventsV2WithHttpInfoAsync(experimentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full + * events payload without pagination. Deprecated: use ListLLMObsExperimentEventsV3 + * instead. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return ApiResponse<LLMObsExperimentEventsV2Response> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse listLLMObsExperimentEventsV2WithHttpInfo( + String experimentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV2"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV2"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> + * @deprecated + */ + @Deprecated + public CompletableFuture> + listLLMObsExperimentEventsV2WithHttpInfoAsync(String experimentId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV2"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV2")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsExperiments. */ + public static class ListLLMObsExperimentsOptionalParameters { + private String filterProjectId; + private String filterDatasetId; + private String filterId; + private String filterName; + private String filterExperiment; + private String filterMetadata; + private String filterParentExperimentId; + private Boolean filterIsDeleted; + private Boolean includeUserData; + private Boolean includeDatasetNames; + private String pageCursor; + private Long pageLimit; + + /** + * Set filterProjectId. + * + * @param filterProjectId Filter experiments by project ID. Required if filter[dataset_id] + * is not provided. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterProjectId(String filterProjectId) { this.filterProjectId = filterProjectId; return this; } - /** - * Set filterDatasetId. - * - * @param filterDatasetId Filter experiments by dataset ID. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterDatasetId(String filterDatasetId) { - this.filterDatasetId = filterDatasetId; - return this; + /** + * Set filterDatasetId. + * + * @param filterDatasetId Filter experiments by dataset ID. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterDatasetId(String filterDatasetId) { + this.filterDatasetId = filterDatasetId; + return this; + } + + /** + * Set filterId. + * + * @param filterId Filter experiments by experiment ID. Can be specified multiple times. + * (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterId(String filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set filterName. + * + * @param filterName Filter experiments by their exact run name. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterName(String filterName) { + this.filterName = filterName; + return this; + } + + /** + * Set filterExperiment. + * + * @param filterExperiment Filter by logical experiment name. This is the name + * field set when creating an experiment through POST /experiments. Returns all + * experiment runs that share the same name, enabling cross-commit and cross-branch + * comparisons. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterExperiment(String filterExperiment) { + this.filterExperiment = filterExperiment; + return this; + } + + /** + * Set filterMetadata. + * + * @param filterMetadata Filter by JSONB metadata containment. Provide a JSON object string + * where experiments whose metadata contains all specified key-value pairs are returned. For + * example: {"commit":"abc123","branch":"main"}. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterMetadata(String filterMetadata) { + this.filterMetadata = filterMetadata; + return this; + } + + /** + * Set filterParentExperimentId. + * + * @param filterParentExperimentId Filter experiments by the ID of their parent (baseline) + * experiment. Returns all experiments that were run against the given baseline. Can be + * specified multiple times. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterParentExperimentId( + String filterParentExperimentId) { + this.filterParentExperimentId = filterParentExperimentId; + return this; + } + + /** + * Set filterIsDeleted. + * + * @param filterIsDeleted When true, return only soft-deleted experiments. Defaults + * to false. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterIsDeleted(Boolean filterIsDeleted) { + this.filterIsDeleted = filterIsDeleted; + return this; + } + + /** + * Set includeUserData. + * + * @param includeUserData When true, enrich each experiment with its author's user + * data in the author field. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters includeUserData(Boolean includeUserData) { + this.includeUserData = includeUserData; + return this; + } + + /** + * Set includeDatasetNames. + * + * @param includeDatasetNames When true, enrich each experiment with its dataset + * name in the dataset_name field. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters includeDatasetNames( + Boolean includeDatasetNames) { + this.includeDatasetNames = includeDatasetNames; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the pagination cursor returned in meta.after to retrieve + * the next page of results. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. Values above 5000 are clamped + * to 5000. Defaults to 5000. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @return LLMObsExperimentsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentsResponse listLLMObsExperiments() throws ApiException { + return listLLMObsExperimentsWithHttpInfo(new ListLLMObsExperimentsOptionalParameters()) + .getData(); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + * + * @return CompletableFuture<LLMObsExperimentsResponse> + */ + public CompletableFuture listLLMObsExperimentsAsync() { + return listLLMObsExperimentsWithHttpInfoAsync(new ListLLMObsExperimentsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return LLMObsExperimentsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentsResponse listLLMObsExperiments( + ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + return listLLMObsExperimentsWithHttpInfo(parameters).getData(); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsExperimentsResponse> + */ + public CompletableFuture listLLMObsExperimentsAsync( + ListLLMObsExperimentsOptionalParameters parameters) { + return listLLMObsExperimentsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all LLM Observability experiments sorted by creation date, newest first. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsExperimentsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listLLMObsExperimentsWithHttpInfo( + ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperiments"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String filterProjectId = parameters.filterProjectId; + String filterDatasetId = parameters.filterDatasetId; + String filterId = parameters.filterId; + String filterName = parameters.filterName; + String filterExperiment = parameters.filterExperiment; + String filterMetadata = parameters.filterMetadata; + String filterParentExperimentId = parameters.filterParentExperimentId; + Boolean filterIsDeleted = parameters.filterIsDeleted; + Boolean includeUserData = parameters.includeUserData; + Boolean includeDatasetNames = parameters.includeDatasetNames; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/experiments"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[user_data]", includeUserData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperiments", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsExperimentsResponse>> + */ + public CompletableFuture> + listLLMObsExperimentsWithHttpInfoAsync(ListLLMObsExperimentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperiments"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String filterProjectId = parameters.filterProjectId; + String filterDatasetId = parameters.filterDatasetId; + String filterId = parameters.filterId; + String filterName = parameters.filterName; + String filterExperiment = parameters.filterExperiment; + String filterMetadata = parameters.filterMetadata; + String filterParentExperimentId = parameters.filterParentExperimentId; + Boolean filterIsDeleted = parameters.filterIsDeleted; + Boolean includeUserData = parameters.includeUserData; + Boolean includeDatasetNames = parameters.includeDatasetNames; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/experiments"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[user_data]", includeUserData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperiments", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @return List<LLMObsIntegrationAccount> + * @throws ApiException if fails to make API call + */ + public List listLLMObsIntegrationAccounts( + LLMObsIntegrationName integration) throws ApiException { + return listLLMObsIntegrationAccountsWithHttpInfo(integration).getData(); + } + + /** + * List LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfoAsync}. + * + * @param integration The name of the LLM integration. (required) + * @return CompletableFuture<List<LLMObsIntegrationAccount>> + */ + public CompletableFuture> listLLMObsIntegrationAccountsAsync( + LLMObsIntegrationName integration) { + return listLLMObsIntegrationAccountsWithHttpInfoAsync(integration) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve the list of configured accounts for the specified LLM provider integration. + * + * @param integration The name of the LLM integration. (required) + * @return ApiResponse<List<LLMObsIntegrationAccount>> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse> listLLMObsIntegrationAccountsWithHttpInfo( + LLMObsIntegrationName integration) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationAccounts"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'integration' is set + if (integration == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationAccounts"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/accounts" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType>() {}); + } + + /** + * List LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationAccount>>> + */ + public CompletableFuture>> + listLLMObsIntegrationAccountsWithHttpInfoAsync(LLMObsIntegrationName integration) { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationAccounts"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'integration' is set + if (integration == null) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationAccounts")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/accounts" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType>() {}); + } + + /** + * List LLM integration models. + * + *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return List<LLMObsIntegrationModel> + * @throws ApiException if fails to make API call + */ + public List listLLMObsIntegrationModels( + LLMObsIntegrationName integration, String accountId) throws ApiException { + return listLLMObsIntegrationModelsWithHttpInfo(integration, accountId).getData(); + } + + /** + * List LLM integration models. + * + *

See {@link #listLLMObsIntegrationModelsWithHttpInfoAsync}. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return CompletableFuture<List<LLMObsIntegrationModel>> + */ + public CompletableFuture> listLLMObsIntegrationModelsAsync( + LLMObsIntegrationName integration, String accountId) { + return listLLMObsIntegrationModelsWithHttpInfoAsync(integration, accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve the list of models available for the specified LLM provider integration and account. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return ApiResponse<List<LLMObsIntegrationModel>> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse> listLLMObsIntegrationModelsWithHttpInfo( + LLMObsIntegrationName integration, String accountId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'integration' is set + if (integration == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integration' when calling listLLMObsIntegrationModels"); + } + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling listLLMObsIntegrationModels"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType>() {}); + } + + /** + * List LLM integration models. + * + *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationModel>>> + */ + public CompletableFuture>> + listLLMObsIntegrationModelsWithHttpInfoAsync( + LLMObsIntegrationName integration, String accountId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; } + Object localVarPostBody = null; - /** - * Set filterId. - * - * @param filterId Filter experiments by experiment ID. Can be specified multiple times. - * (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterId(String filterId) { - this.filterId = filterId; - return this; + // verify the required parameter 'integration' is set + if (integration == null) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationModels")); + return result; } - /** - * Set filterName. - * - * @param filterName Filter experiments by their exact run name. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterName(String filterName) { - this.filterName = filterName; - return this; + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " listLLMObsIntegrationModels")); + return result; } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); - /** - * Set filterExperiment. - * - * @param filterExperiment Filter by logical experiment name. This is the name - * field set when creating an experiment through POST /experiments. Returns all - * experiment runs that share the same name, enabling cross-commit and cross-branch - * comparisons. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterExperiment(String filterExperiment) { - this.filterExperiment = filterExperiment; - return this; + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType>() {}); + } + + /** Manage optional parameters to listLLMObsPatternsClusteredPoints. */ + public static class ListLLMObsPatternsClusteredPointsOptionalParameters { + private Long pageSize; + private String pageToken; /** - * Set filterMetadata. + * Set pageSize. * - * @param filterMetadata Filter by JSONB metadata containment. Provide a JSON object string - * where experiments whose metadata contains all specified key-value pairs are returned. For - * example: {"commit":"abc123","branch":"main"}. (optional) - * @return ListLLMObsExperimentsOptionalParameters + * @param pageSize Maximum number of clustered points to return per page. (optional) + * @return ListLLMObsPatternsClusteredPointsOptionalParameters */ - public ListLLMObsExperimentsOptionalParameters filterMetadata(String filterMetadata) { - this.filterMetadata = filterMetadata; + public ListLLMObsPatternsClusteredPointsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; return this; } /** - * Set filterParentExperimentId. + * Set pageToken. * - * @param filterParentExperimentId Filter experiments by the ID of their parent (baseline) - * experiment. Returns all experiments that were run against the given baseline. Can be - * specified multiple times. (optional) - * @return ListLLMObsExperimentsOptionalParameters + * @param pageToken Pagination token to retrieve the next page of clustered points. (optional) + * @return ListLLMObsPatternsClusteredPointsOptionalParameters */ - public ListLLMObsExperimentsOptionalParameters filterParentExperimentId( - String filterParentExperimentId) { - this.filterParentExperimentId = filterParentExperimentId; + public ListLLMObsPatternsClusteredPointsOptionalParameters pageToken(String pageToken) { + this.pageToken = pageToken; return this; } + } - /** - * Set filterIsDeleted. - * - * @param filterIsDeleted When true, return only soft-deleted experiments. Defaults - * to false. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterIsDeleted(Boolean filterIsDeleted) { - this.filterIsDeleted = filterIsDeleted; - return this; + /** + * List patterns clustered points. + * + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. + * + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @return LLMObsPatternsClusteredPointsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints(String topicId) + throws ApiException { + return listLLMObsPatternsClusteredPointsWithHttpInfo( + topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) + .getData(); + } + + /** + * List patterns clustered points. + * + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfoAsync}. + * + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @return CompletableFuture<LLMObsPatternsClusteredPointsResponse> + */ + public CompletableFuture + listLLMObsPatternsClusteredPointsAsync(String topicId) { + return listLLMObsPatternsClusteredPointsWithHttpInfoAsync( + topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List patterns clustered points. + * + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. + * + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsPatternsClusteredPointsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) + throws ApiException { + return listLLMObsPatternsClusteredPointsWithHttpInfo(topicId, parameters).getData(); + } + + /** + * List patterns clustered points. + * + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfoAsync}. + * + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsPatternsClusteredPointsResponse> + */ + public CompletableFuture + listLLMObsPatternsClusteredPointsAsync( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) { + return listLLMObsPatternsClusteredPointsWithHttpInfoAsync(topicId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the data points grouped into a topic. For a parent topic, points from all of its leaf + * topics are returned. + * + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsPatternsClusteredPointsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse + listLLMObsPatternsClusteredPointsWithHttpInfo( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsPatternsClusteredPoints"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'topicId' is set + if (topicId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'topicId' when calling" + + " listLLMObsPatternsClusteredPoints"); } + Long pageSize = parameters.pageSize; + String pageToken = parameters.pageToken; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-clustered-points"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "topic_id", topicId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPatternsClusteredPoints", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } - /** - * Set includeUserData. - * - * @param includeUserData When true, enrich each experiment with its author's user - * data in the author field. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters includeUserData(Boolean includeUserData) { - this.includeUserData = includeUserData; - return this; + /** + * List patterns clustered points. + * + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. + * + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsPatternsClusteredPointsResponse>> + */ + public CompletableFuture> + listLLMObsPatternsClusteredPointsWithHttpInfoAsync( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listLLMObsPatternsClusteredPoints"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; } + Object localVarPostBody = null; - /** - * Set includeDatasetNames. - * - * @param includeDatasetNames When true, enrich each experiment with its dataset - * name in the dataset_name field. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters includeDatasetNames( - Boolean includeDatasetNames) { - this.includeDatasetNames = includeDatasetNames; - return this; + // verify the required parameter 'topicId' is set + if (topicId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'topicId' when calling" + + " listLLMObsPatternsClusteredPoints")); + return result; } + Long pageSize = parameters.pageSize; + String pageToken = parameters.pageToken; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-clustered-points"; - /** - * Set pageCursor. - * - * @param pageCursor Use the pagination cursor returned in meta.after to retrieve - * the next page of results. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); - /** - * Set pageLimit. - * - * @param pageLimit Maximum number of results to return per page. Values above 5000 are clamped - * to 5000. Defaults to 5000. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; - return this; + localVarQueryParams.addAll(apiClient.parameterToPairs("", "topic_id", topicId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPatternsClusteredPoints", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); } /** - * List LLM Observability experiments. + * List patterns configurations. * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. + *

See {@link #listLLMObsPatternsConfigsWithHttpInfo}. * - * @return LLMObsExperimentsResponse + * @return LLMObsPatternsConfigsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentsResponse listLLMObsExperiments() throws ApiException { - return listLLMObsExperimentsWithHttpInfo(new ListLLMObsExperimentsOptionalParameters()) - .getData(); + public LLMObsPatternsConfigsResponse listLLMObsPatternsConfigs() throws ApiException { + return listLLMObsPatternsConfigsWithHttpInfo().getData(); } /** - * List LLM Observability experiments. + * List patterns configurations. * - *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsConfigsWithHttpInfoAsync}. * - * @return CompletableFuture<LLMObsExperimentsResponse> + * @return CompletableFuture<LLMObsPatternsConfigsResponse> */ - public CompletableFuture listLLMObsExperimentsAsync() { - return listLLMObsExperimentsWithHttpInfoAsync(new ListLLMObsExperimentsOptionalParameters()) + public CompletableFuture listLLMObsPatternsConfigsAsync() { + return listLLMObsPatternsConfigsWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -6559,30 +7850,135 @@ public CompletableFuture listLLMObsExperimentsAsync() } /** - * List LLM Observability experiments. + * List all patterns configurations for the organization. * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * @return ApiResponse<LLMObsPatternsConfigsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse listLLMObsPatternsConfigsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsPatternsConfigs"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPatternsConfigs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List patterns configurations. * - * @param parameters Optional parameters for the request. - * @return LLMObsExperimentsResponse + *

See {@link #listLLMObsPatternsConfigsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<LLMObsPatternsConfigsResponse>> + */ + public CompletableFuture> + listLLMObsPatternsConfigsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listLLMObsPatternsConfigs"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPatternsConfigs", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List patterns runs. + * + *

See {@link #listLLMObsPatternsRunsWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsRunsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentsResponse listLLMObsExperiments( - ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { - return listLLMObsExperimentsWithHttpInfo(parameters).getData(); + public LLMObsPatternsRunsResponse listLLMObsPatternsRuns(String configId) throws ApiException { + return listLLMObsPatternsRunsWithHttpInfo(configId).getData(); } /** - * List LLM Observability experiments. + * List patterns runs. * - *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsRunsWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsExperimentsResponse> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsRunsResponse> */ - public CompletableFuture listLLMObsExperimentsAsync( - ListLLMObsExperimentsOptionalParameters parameters) { - return listLLMObsExperimentsWithHttpInfoAsync(parameters) + public CompletableFuture listLLMObsPatternsRunsAsync( + String configId) { + return listLLMObsPatternsRunsWithHttpInfoAsync(configId) .thenApply( response -> { return response.getData(); @@ -6590,10 +7986,10 @@ public CompletableFuture listLLMObsExperimentsAsync( } /** - * List all LLM Observability experiments sorted by creation date, newest first. + * List the completed patterns runs for a configuration. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsExperimentsResponse> + * @param configId The ID of the patterns configuration. (required) + * @return ApiResponse<LLMObsPatternsRunsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6603,60 +7999,38 @@ public CompletableFuture listLLMObsExperimentsAsync( * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsExperimentsWithHttpInfo( - ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + public ApiResponse listLLMObsPatternsRunsWithHttpInfo(String configId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperiments"; + String operationId = "listLLMObsPatternsRuns"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String filterProjectId = parameters.filterProjectId; - String filterDatasetId = parameters.filterDatasetId; - String filterId = parameters.filterId; - String filterName = parameters.filterName; - String filterExperiment = parameters.filterExperiment; - String filterMetadata = parameters.filterMetadata; - String filterParentExperimentId = parameters.filterParentExperimentId; - Boolean filterIsDeleted = parameters.filterIsDeleted; - Boolean includeUserData = parameters.includeUserData; - Boolean includeDatasetNames = parameters.includeDatasetNames; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; - // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experiments"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include[user_data]", includeUserData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException( + 400, "Missing the required parameter 'configId' when calling listLLMObsPatternsRuns"); + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperiments", + "v2.LlmObservabilityApi.listLLMObsPatternsRuns", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -6671,73 +8045,53 @@ public ApiResponse listLLMObsExperimentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability experiments. + * List patterns runs. * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. + *

See {@link #listLLMObsPatternsRunsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsExperimentsResponse>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsRunsResponse>> */ - public CompletableFuture> - listLLMObsExperimentsWithHttpInfoAsync(ListLLMObsExperimentsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsPatternsRunsWithHttpInfoAsync(String configId) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperiments"; + String operationId = "listLLMObsPatternsRuns"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String filterProjectId = parameters.filterProjectId; - String filterDatasetId = parameters.filterDatasetId; - String filterId = parameters.filterId; - String filterName = parameters.filterName; - String filterExperiment = parameters.filterExperiment; - String filterMetadata = parameters.filterMetadata; - String filterParentExperimentId = parameters.filterParentExperimentId; - Boolean filterIsDeleted = parameters.filterIsDeleted; - Boolean includeUserData = parameters.includeUserData; - Boolean includeDatasetNames = parameters.includeDatasetNames; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'configId' when calling listLLMObsPatternsRuns")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experiments"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include[user_data]", includeUserData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperiments", + "v2.LlmObservabilityApi.listLLMObsPatternsRuns", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -6745,7 +8099,7 @@ public ApiResponse listLLMObsExperimentsWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6757,34 +8111,54 @@ public ApiResponse listLLMObsExperimentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsPatternsTopics. */ + public static class ListLLMObsPatternsTopicsOptionalParameters { + private String runId; + + /** + * Set runId. + * + * @param runId The ID of a specific patterns run. Defaults to the most recent completed run. + * (optional) + * @return ListLLMObsPatternsTopicsOptionalParameters + */ + public ListLLMObsPatternsTopicsOptionalParameters runId(String runId) { + this.runId = runId; + return this; + } } /** - * List LLM integration accounts. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @return List<LLMObsIntegrationAccount> + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsTopicsResponse * @throws ApiException if fails to make API call */ - public List listLLMObsIntegrationAccounts( - LLMObsIntegrationName integration) throws ApiException { - return listLLMObsIntegrationAccountsWithHttpInfo(integration).getData(); + public LLMObsPatternsTopicsResponse listLLMObsPatternsTopics(String configId) + throws ApiException { + return listLLMObsPatternsTopicsWithHttpInfo( + configId, new ListLLMObsPatternsTopicsOptionalParameters()) + .getData(); } /** - * List LLM integration accounts. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfoAsync}. * - * @param integration The name of the LLM integration. (required) - * @return CompletableFuture<List<LLMObsIntegrationAccount>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsTopicsResponse> */ - public CompletableFuture> listLLMObsIntegrationAccountsAsync( - LLMObsIntegrationName integration) { - return listLLMObsIntegrationAccountsWithHttpInfoAsync(integration) + public CompletableFuture listLLMObsPatternsTopicsAsync( + String configId) { + return listLLMObsPatternsTopicsWithHttpInfoAsync( + configId, new ListLLMObsPatternsTopicsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6792,10 +8166,45 @@ public CompletableFuture> listLLMObsIntegrationAc } /** - * Retrieve the list of configured accounts for the specified LLM provider integration. + * List patterns topics. * - * @param integration The name of the LLM integration. (required) - * @return ApiResponse<List<LLMObsIntegrationAccount>> + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsPatternsTopicsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsTopicsResponse listLLMObsPatternsTopics( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) throws ApiException { + return listLLMObsPatternsTopicsWithHttpInfo(configId, parameters).getData(); + } + + /** + * List patterns topics. + * + *

See {@link #listLLMObsPatternsTopicsWithHttpInfoAsync}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsPatternsTopicsResponse> + */ + public CompletableFuture listLLMObsPatternsTopicsAsync( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) { + return listLLMObsPatternsTopicsWithHttpInfoAsync(configId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the topics discovered by a patterns run. When no run is specified, the most recent + * completed run is used. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsPatternsTopicsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6805,13 +8214,15 @@ public CompletableFuture> listLLMObsIntegrationAc * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse> listLLMObsIntegrationAccountsWithHttpInfo( - LLMObsIntegrationName integration) throws ApiException { + public ApiResponse listLLMObsPatternsTopicsWithHttpInfo( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationAccounts"; + String operationId = "listLLMObsPatternsTopics"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6819,26 +8230,26 @@ public ApiResponse> listLLMObsIntegrationAccounts } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( - 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationAccounts"); + 400, "Missing the required parameter 'configId' when calling listLLMObsPatternsTopics"); } + String runId = parameters.runId; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/accounts" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + "v2.LlmObservabilityApi.listLLMObsPatternsTopics", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6851,25 +8262,27 @@ public ApiResponse> listLLMObsIntegrationAccounts localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } /** - * List LLM integration accounts. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationAccount>>> + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsPatternsTopicsResponse>> */ - public CompletableFuture>> - listLLMObsIntegrationAccountsWithHttpInfoAsync(LLMObsIntegrationName integration) { + public CompletableFuture> + listLLMObsPatternsTopicsWithHttpInfoAsync( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationAccounts"; + String operationId = "listLLMObsPatternsTopics"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -6877,38 +8290,39 @@ public ApiResponse> listLLMObsIntegrationAccounts } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { - CompletableFuture>> result = + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationAccounts")); + "Missing the required parameter 'configId' when calling listLLMObsPatternsTopics")); return result; } + String runId = parameters.runId; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/accounts" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + "v2.LlmObservabilityApi.listLLMObsPatternsTopics", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -6921,36 +8335,68 @@ public ApiResponse> listLLMObsIntegrationAccounts localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsPatternsTopicsWithClusteredPoints. */ + public static class ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters { + private String runId; + private Boolean includeMetrics; + + /** + * Set runId. + * + * @param runId The ID of a specific patterns run. Defaults to the most recent completed run. + * (optional) + * @return ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters + */ + public ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Set includeMetrics. + * + * @param includeMetrics When true, enrich each clustered point with span metrics such as + * status, duration, token counts, estimated cost, and evaluations. (optional) + * @return ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters + */ + public ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters includeMetrics( + Boolean includeMetrics) { + this.includeMetrics = includeMetrics; + return this; + } } /** - * List LLM integration models. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return List<LLMObsIntegrationModel> + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsTopicsWithClusteredPointsResponse * @throws ApiException if fails to make API call */ - public List listLLMObsIntegrationModels( - LLMObsIntegrationName integration, String accountId) throws ApiException { - return listLLMObsIntegrationModelsWithHttpInfo(integration, accountId).getData(); + public LLMObsPatternsTopicsWithClusteredPointsResponse + listLLMObsPatternsTopicsWithClusteredPoints(String configId) throws ApiException { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo( + configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) + .getData(); } /** - * List LLM integration models. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return CompletableFuture<List<LLMObsIntegrationModel>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsTopicsWithClusteredPointsResponse> */ - public CompletableFuture> listLLMObsIntegrationModelsAsync( - LLMObsIntegrationName integration, String accountId) { - return listLLMObsIntegrationModelsWithHttpInfoAsync(integration, accountId) + public CompletableFuture + listLLMObsPatternsTopicsWithClusteredPointsAsync(String configId) { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync( + configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6958,11 +8404,49 @@ public CompletableFuture> listLLMObsIntegrationMode } /** - * Retrieve the list of models available for the specified LLM provider integration and account. + * List patterns topics with clustered points. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return ApiResponse<List<LLMObsIntegrationModel>> + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsPatternsTopicsWithClusteredPointsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsTopicsWithClusteredPointsResponse + listLLMObsPatternsTopicsWithClusteredPoints( + String configId, ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) + throws ApiException { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo(configId, parameters).getData(); + } + + /** + * List patterns topics with clustered points. + * + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsPatternsTopicsWithClusteredPointsResponse> + */ + public CompletableFuture + listLLMObsPatternsTopicsWithClusteredPointsAsync( + String configId, + ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync(configId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the topics discovered by a patterns run, with the clustered points attached inline to each + * leaf topic. When no run is specified, the most recent completed run is used. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsPatternsTopicsWithClusteredPointsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6972,13 +8456,17 @@ public CompletableFuture> listLLMObsIntegrationMode * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse> listLLMObsIntegrationModelsWithHttpInfo( - LLMObsIntegrationName integration, String accountId) throws ApiException { + public ApiResponse + listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo( + String configId, ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationModels"; + String operationId = "listLLMObsPatternsTopicsWithClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6986,33 +8474,30 @@ public ApiResponse> listLLMObsIntegrationModelsWith } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { - throw new ApiException( - 400, - "Missing the required parameter 'integration' when calling listLLMObsIntegrationModels"); - } - - // verify the required parameter 'accountId' is set - if (accountId == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( 400, - "Missing the required parameter 'accountId' when calling listLLMObsIntegrationModels"); + "Missing the required parameter 'configId' when calling" + + " listLLMObsPatternsTopicsWithClusteredPoints"); } + String runId = parameters.runId; + Boolean includeMetrics = parameters.includeMetrics; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_metrics", includeMetrics)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + "v2.LlmObservabilityApi.listLLMObsPatternsTopicsWithClusteredPoints", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -7025,79 +8510,72 @@ public ApiResponse> listLLMObsIntegrationModelsWith localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } /** - * List LLM integration models. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationModel>>> + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return + * CompletableFuture<ApiResponse<LLMObsPatternsTopicsWithClusteredPointsResponse>> */ - public CompletableFuture>> - listLLMObsIntegrationModelsWithHttpInfoAsync( - LLMObsIntegrationName integration, String accountId) { + public CompletableFuture> + listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync( + String configId, + ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationModels"; + String operationId = "listLLMObsPatternsTopicsWithClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; - - // verify the required parameter 'integration' is set - if (integration == null) { - CompletableFuture>> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationModels")); - return result; - } + Object localVarPostBody = null; - // verify the required parameter 'accountId' is set - if (accountId == null) { - CompletableFuture>> result = + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'accountId' when calling" - + " listLLMObsIntegrationModels")); + "Missing the required parameter 'configId' when calling" + + " listLLMObsPatternsTopicsWithClusteredPoints")); return result; } + String runId = parameters.runId; + Boolean includeMetrics = parameters.includeMetrics; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_metrics", includeMetrics)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + "v2.LlmObservabilityApi.listLLMObsPatternsTopicsWithClusteredPoints", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -7110,7 +8588,7 @@ public ApiResponse> listLLMObsIntegrationModelsWith localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } /** Manage optional parameters to listLLMObsProjects. */ @@ -8595,6 +10073,162 @@ public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentati new GenericType() {}); } + /** + * Trigger a patterns run. + * + *

See {@link #triggerLLMObsPatternsWithHttpInfo}. + * + * @param body Trigger patterns payload. (required) + * @return LLMObsPatternsTriggerResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsTriggerResponse triggerLLMObsPatterns(LLMObsPatternsTriggerRequest body) + throws ApiException { + return triggerLLMObsPatternsWithHttpInfo(body).getData(); + } + + /** + * Trigger a patterns run. + * + *

See {@link #triggerLLMObsPatternsWithHttpInfoAsync}. + * + * @param body Trigger patterns payload. (required) + * @return CompletableFuture<LLMObsPatternsTriggerResponse> + */ + public CompletableFuture triggerLLMObsPatternsAsync( + LLMObsPatternsTriggerRequest body) { + return triggerLLMObsPatternsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Start a patterns run for a given configuration. The run executes asynchronously. + * + * @param body Trigger patterns payload. (required) + * @return ApiResponse<LLMObsPatternsTriggerResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse triggerLLMObsPatternsWithHttpInfo( + LLMObsPatternsTriggerRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "triggerLLMObsPatterns"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling triggerLLMObsPatterns"); + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.triggerLLMObsPatterns", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Trigger a patterns run. + * + *

See {@link #triggerLLMObsPatternsWithHttpInfo}. + * + * @param body Trigger patterns payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsTriggerResponse>> + */ + public CompletableFuture> + triggerLLMObsPatternsWithHttpInfoAsync(LLMObsPatternsTriggerRequest body) { + // Check if unstable operation is enabled + String operationId = "triggerLLMObsPatterns"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling triggerLLMObsPatterns")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.triggerLLMObsPatterns", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Unlock LLM Observability dataset draft state. * @@ -10617,4 +12251,162 @@ public ApiResponse upsertLLMObsAnnotationsWithHttpInf false, new GenericType() {}); } + + /** + * Create or update a patterns configuration. + * + *

See {@link #upsertLLMObsPatternsConfigWithHttpInfo}. + * + * @param body Patterns configuration payload. (required) + * @return LLMObsPatternsConfigResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsConfigResponse upsertLLMObsPatternsConfig( + LLMObsPatternsConfigUpsertRequest body) throws ApiException { + return upsertLLMObsPatternsConfigWithHttpInfo(body).getData(); + } + + /** + * Create or update a patterns configuration. + * + *

See {@link #upsertLLMObsPatternsConfigWithHttpInfoAsync}. + * + * @param body Patterns configuration payload. (required) + * @return CompletableFuture<LLMObsPatternsConfigResponse> + */ + public CompletableFuture upsertLLMObsPatternsConfigAsync( + LLMObsPatternsConfigUpsertRequest body) { + return upsertLLMObsPatternsConfigWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new patterns configuration, or update an existing one when a configuration ID is + * provided. + * + * @param body Patterns configuration payload. (required) + * @return ApiResponse<LLMObsPatternsConfigResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse upsertLLMObsPatternsConfigWithHttpInfo( + LLMObsPatternsConfigUpsertRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "upsertLLMObsPatternsConfig"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling upsertLLMObsPatternsConfig"); + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.upsertLLMObsPatternsConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create or update a patterns configuration. + * + *

See {@link #upsertLLMObsPatternsConfigWithHttpInfo}. + * + * @param body Patterns configuration payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsConfigResponse>> + */ + public CompletableFuture> + upsertLLMObsPatternsConfigWithHttpInfoAsync(LLMObsPatternsConfigUpsertRequest body) { + // Check if unstable operation is enabled + String operationId = "upsertLLMObsPatternsConfig"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling upsertLLMObsPatternsConfig")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.upsertLLMObsPatternsConfig", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsActivityProgress.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsActivityProgress.java new file mode 100644 index 00000000000..83c903ebbf2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsActivityProgress.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Progress information for a single step of a patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsActivityProgress.JSON_PROPERTY_NAME, + LLMObsPatternsActivityProgress.JSON_PROPERTY_STARTED_AT, + LLMObsPatternsActivityProgress.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsActivityProgress { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private JsonNullable startedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public LLMObsPatternsActivityProgress() {} + + @JsonCreator + public LLMObsPatternsActivityProgress( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.name = name; + this.status = status; + } + + public LLMObsPatternsActivityProgress name(String name) { + this.name = name; + return this; + } + + /** + * Name of the step. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LLMObsPatternsActivityProgress startedAt(OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + return this; + } + + /** + * Timestamp when the step started. Null if the step has not started. + * + * @return startedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getStartedAt() { + return startedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getStartedAt_JsonNullable() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + public void setStartedAt_JsonNullable(JsonNullable startedAt) { + this.startedAt = startedAt; + } + + public void setStartedAt(OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + } + + public LLMObsPatternsActivityProgress status(String status) { + this.status = status; + return this; + } + + /** + * Status of the step. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsActivityProgress + */ + @JsonAnySetter + public LLMObsPatternsActivityProgress putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsActivityProgress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsActivityProgress llmObsPatternsActivityProgress = + (LLMObsPatternsActivityProgress) o; + return Objects.equals(this.name, llmObsPatternsActivityProgress.name) + && Objects.equals(this.startedAt, llmObsPatternsActivityProgress.startedAt) + && Objects.equals(this.status, llmObsPatternsActivityProgress.status) + && Objects.equals( + this.additionalProperties, llmObsPatternsActivityProgress.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, startedAt, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsActivityProgress {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPoint.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPoint.java new file mode 100644 index 00000000000..8eea30c9d86 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPoint.java @@ -0,0 +1,351 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single data point grouped into a topic. */ +@JsonPropertyOrder({ + LLMObsPatternsClusteredPoint.JSON_PROPERTY_EVENT_ID, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_ID, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_INPUT, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_IS_INCLUDED, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_IS_SUGGESTED, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_SESSION_ID, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_SPAN_ID, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_TOPIC_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPoint { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENT_ID = "event_id"; + private String eventId; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INPUT = "input"; + private String input; + + public static final String JSON_PROPERTY_IS_INCLUDED = "is_included"; + private Boolean isIncluded; + + public static final String JSON_PROPERTY_IS_SUGGESTED = "is_suggested"; + private Boolean isSuggested; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private String sessionId; + + public static final String JSON_PROPERTY_SPAN_ID = "span_id"; + private String spanId; + + public static final String JSON_PROPERTY_TOPIC_ID = "topic_id"; + private String topicId; + + public LLMObsPatternsClusteredPoint() {} + + @JsonCreator + public LLMObsPatternsClusteredPoint( + @JsonProperty(required = true, value = JSON_PROPERTY_EVENT_ID) String eventId, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT) String input, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_INCLUDED) Boolean isIncluded, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_SUGGESTED) Boolean isSuggested, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_ID) String sessionId, + @JsonProperty(required = true, value = JSON_PROPERTY_SPAN_ID) String spanId, + @JsonProperty(required = true, value = JSON_PROPERTY_TOPIC_ID) String topicId) { + this.eventId = eventId; + this.id = id; + this.input = input; + this.isIncluded = isIncluded; + this.isSuggested = isSuggested; + this.sessionId = sessionId; + this.spanId = spanId; + this.topicId = topicId; + } + + public LLMObsPatternsClusteredPoint eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * Identifier of the source event. + * + * @return eventId + */ + @JsonProperty(JSON_PROPERTY_EVENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public LLMObsPatternsClusteredPoint id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the clustered point. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsClusteredPoint input(String input) { + this.input = input; + return this; + } + + /** + * Input text of the source span. + * + * @return input + */ + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInput() { + return input; + } + + public void setInput(String input) { + this.input = input; + } + + public LLMObsPatternsClusteredPoint isIncluded(Boolean isIncluded) { + this.isIncluded = isIncluded; + return this; + } + + /** + * Whether the point is included in the patterns dataset. + * + * @return isIncluded + */ + @JsonProperty(JSON_PROPERTY_IS_INCLUDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsIncluded() { + return isIncluded; + } + + public void setIsIncluded(Boolean isIncluded) { + this.isIncluded = isIncluded; + } + + public LLMObsPatternsClusteredPoint isSuggested(Boolean isSuggested) { + this.isSuggested = isSuggested; + return this; + } + + /** + * Whether the point is suggested for inclusion in the patterns dataset. + * + * @return isSuggested + */ + @JsonProperty(JSON_PROPERTY_IS_SUGGESTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsSuggested() { + return isSuggested; + } + + public void setIsSuggested(Boolean isSuggested) { + this.isSuggested = isSuggested; + } + + public LLMObsPatternsClusteredPoint sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Identifier of the source session. + * + * @return sessionId + */ + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public LLMObsPatternsClusteredPoint spanId(String spanId) { + this.spanId = spanId; + return this; + } + + /** + * Identifier of the source span. + * + * @return spanId + */ + @JsonProperty(JSON_PROPERTY_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpanId() { + return spanId; + } + + public void setSpanId(String spanId) { + this.spanId = spanId; + } + + public LLMObsPatternsClusteredPoint topicId(String topicId) { + this.topicId = topicId; + return this; + } + + /** + * Identifier of the topic the point belongs to. + * + * @return topicId + */ + @JsonProperty(JSON_PROPERTY_TOPIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTopicId() { + return topicId; + } + + public void setTopicId(String topicId) { + this.topicId = topicId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPoint + */ + @JsonAnySetter + public LLMObsPatternsClusteredPoint putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPoint object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPoint llmObsPatternsClusteredPoint = (LLMObsPatternsClusteredPoint) o; + return Objects.equals(this.eventId, llmObsPatternsClusteredPoint.eventId) + && Objects.equals(this.id, llmObsPatternsClusteredPoint.id) + && Objects.equals(this.input, llmObsPatternsClusteredPoint.input) + && Objects.equals(this.isIncluded, llmObsPatternsClusteredPoint.isIncluded) + && Objects.equals(this.isSuggested, llmObsPatternsClusteredPoint.isSuggested) + && Objects.equals(this.sessionId, llmObsPatternsClusteredPoint.sessionId) + && Objects.equals(this.spanId, llmObsPatternsClusteredPoint.spanId) + && Objects.equals(this.topicId, llmObsPatternsClusteredPoint.topicId) + && Objects.equals( + this.additionalProperties, llmObsPatternsClusteredPoint.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + eventId, + id, + input, + isIncluded, + isSuggested, + sessionId, + spanId, + topicId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPoint {\n"); + sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" isIncluded: ").append(toIndentedString(isIncluded)).append("\n"); + sb.append(" isSuggested: ").append(toIndentedString(isSuggested)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" spanId: ").append(toIndentedString(spanId)).append("\n"); + sb.append(" topicId: ").append(toIndentedString(topicId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointRef.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointRef.java new file mode 100644 index 00000000000..a1d9075bc5a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointRef.java @@ -0,0 +1,358 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * A clustered point attached inline to a topic. The metric fields are populated only when the + * request includes include_metrics=true. + */ +@JsonPropertyOrder({ + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_DURATION, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_ESTIMATED_TOTAL_COST, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_EVALUATION, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_INPUT_TOKENS, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_OUTPUT_TOKENS, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_SPAN_ID, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_STATUS, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_TOTAL_TOKENS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPointRef { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DURATION = "duration"; + private Double duration; + + public static final String JSON_PROPERTY_ESTIMATED_TOTAL_COST = "estimated_total_cost"; + private Double estimatedTotalCost; + + public static final String JSON_PROPERTY_EVALUATION = "evaluation"; + private Map evaluation = null; + + public static final String JSON_PROPERTY_INPUT_TOKENS = "input_tokens"; + private Double inputTokens; + + public static final String JSON_PROPERTY_OUTPUT_TOKENS = "output_tokens"; + private Double outputTokens; + + public static final String JSON_PROPERTY_SPAN_ID = "span_id"; + private String spanId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_TOTAL_TOKENS = "total_tokens"; + private Double totalTokens; + + public LLMObsPatternsClusteredPointRef() {} + + @JsonCreator + public LLMObsPatternsClusteredPointRef( + @JsonProperty(required = true, value = JSON_PROPERTY_SPAN_ID) String spanId) { + this.spanId = spanId; + } + + public LLMObsPatternsClusteredPointRef duration(Double duration) { + this.duration = duration; + return this; + } + + /** + * Duration of the source span in nanoseconds. Included only when metrics are requested. + * + * @return duration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getDuration() { + return duration; + } + + public void setDuration(Double duration) { + this.duration = duration; + } + + public LLMObsPatternsClusteredPointRef estimatedTotalCost(Double estimatedTotalCost) { + this.estimatedTotalCost = estimatedTotalCost; + return this; + } + + /** + * Estimated total cost of the source span. Included only when metrics are requested. + * + * @return estimatedTotalCost + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_TOTAL_COST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedTotalCost() { + return estimatedTotalCost; + } + + public void setEstimatedTotalCost(Double estimatedTotalCost) { + this.estimatedTotalCost = estimatedTotalCost; + } + + public LLMObsPatternsClusteredPointRef evaluation(Map evaluation) { + this.evaluation = evaluation; + return this; + } + + public LLMObsPatternsClusteredPointRef putEvaluationItem(String key, Object evaluationItem) { + if (this.evaluation == null) { + this.evaluation = new HashMap<>(); + } + this.evaluation.put(key, evaluationItem); + return this; + } + + /** + * Evaluation results for the source span keyed by evaluation name. Included only when metrics are + * requested. + * + * @return evaluation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvaluation() { + return evaluation; + } + + public void setEvaluation(Map evaluation) { + this.evaluation = evaluation; + } + + public LLMObsPatternsClusteredPointRef inputTokens(Double inputTokens) { + this.inputTokens = inputTokens; + return this; + } + + /** + * Number of input tokens of the source span. Included only when metrics are requested. + * + * @return inputTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getInputTokens() { + return inputTokens; + } + + public void setInputTokens(Double inputTokens) { + this.inputTokens = inputTokens; + } + + public LLMObsPatternsClusteredPointRef outputTokens(Double outputTokens) { + this.outputTokens = outputTokens; + return this; + } + + /** + * Number of output tokens of the source span. Included only when metrics are requested. + * + * @return outputTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getOutputTokens() { + return outputTokens; + } + + public void setOutputTokens(Double outputTokens) { + this.outputTokens = outputTokens; + } + + public LLMObsPatternsClusteredPointRef spanId(String spanId) { + this.spanId = spanId; + return this; + } + + /** + * Identifier of the source span. + * + * @return spanId + */ + @JsonProperty(JSON_PROPERTY_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpanId() { + return spanId; + } + + public void setSpanId(String spanId) { + this.spanId = spanId; + } + + public LLMObsPatternsClusteredPointRef status(String status) { + this.status = status; + return this; + } + + /** + * Status of the source span. Included only when metrics are requested. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public LLMObsPatternsClusteredPointRef totalTokens(Double totalTokens) { + this.totalTokens = totalTokens; + return this; + } + + /** + * Total number of tokens of the source span. Included only when metrics are requested. + * + * @return totalTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getTotalTokens() { + return totalTokens; + } + + public void setTotalTokens(Double totalTokens) { + this.totalTokens = totalTokens; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPointRef + */ + @JsonAnySetter + public LLMObsPatternsClusteredPointRef putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPointRef object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPointRef llmObsPatternsClusteredPointRef = + (LLMObsPatternsClusteredPointRef) o; + return Objects.equals(this.duration, llmObsPatternsClusteredPointRef.duration) + && Objects.equals( + this.estimatedTotalCost, llmObsPatternsClusteredPointRef.estimatedTotalCost) + && Objects.equals(this.evaluation, llmObsPatternsClusteredPointRef.evaluation) + && Objects.equals(this.inputTokens, llmObsPatternsClusteredPointRef.inputTokens) + && Objects.equals(this.outputTokens, llmObsPatternsClusteredPointRef.outputTokens) + && Objects.equals(this.spanId, llmObsPatternsClusteredPointRef.spanId) + && Objects.equals(this.status, llmObsPatternsClusteredPointRef.status) + && Objects.equals(this.totalTokens, llmObsPatternsClusteredPointRef.totalTokens) + && Objects.equals( + this.additionalProperties, llmObsPatternsClusteredPointRef.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + duration, + estimatedTotalCost, + evaluation, + inputTokens, + outputTokens, + spanId, + status, + totalTokens, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPointRef {\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" estimatedTotalCost: ").append(toIndentedString(estimatedTotalCost)).append("\n"); + sb.append(" evaluation: ").append(toIndentedString(evaluation)).append("\n"); + sb.append(" inputTokens: ").append(toIndentedString(inputTokens)).append("\n"); + sb.append(" outputTokens: ").append(toIndentedString(outputTokens)).append("\n"); + sb.append(" spanId: ").append(toIndentedString(spanId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalTokens: ").append(toIndentedString(totalTokens)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponse.java new file mode 100644 index 00000000000..15f7beeecf5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the clustered points of an LLM Observability topic. */ +@JsonPropertyOrder({LLMObsPatternsClusteredPointsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPointsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsClusteredPointsResponseData data; + + public LLMObsPatternsClusteredPointsResponse() {} + + @JsonCreator + public LLMObsPatternsClusteredPointsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsClusteredPointsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsClusteredPointsResponse data( + LLMObsPatternsClusteredPointsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns clustered points response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsClusteredPointsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsClusteredPointsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPointsResponse + */ + @JsonAnySetter + public LLMObsPatternsClusteredPointsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPointsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPointsResponse llmObsPatternsClusteredPointsResponse = + (LLMObsPatternsClusteredPointsResponse) o; + return Objects.equals(this.data, llmObsPatternsClusteredPointsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsClusteredPointsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPointsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseAttributes.java new file mode 100644 index 00000000000..520b4227fdb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseAttributes.java @@ -0,0 +1,224 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability patterns clustered points response. */ +@JsonPropertyOrder({ + LLMObsPatternsClusteredPointsResponseAttributes.JSON_PROPERTY_NEXT_PAGE_TOKEN, + LLMObsPatternsClusteredPointsResponseAttributes.JSON_PROPERTY_POINTS, + LLMObsPatternsClusteredPointsResponseAttributes.JSON_PROPERTY_TOPIC_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPointsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NEXT_PAGE_TOKEN = "next_page_token"; + private String nextPageToken; + + public static final String JSON_PROPERTY_POINTS = "points"; + private List points = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOPIC_ID = "topic_id"; + private String topicId; + + public LLMObsPatternsClusteredPointsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsClusteredPointsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NEXT_PAGE_TOKEN) String nextPageToken, + @JsonProperty(required = true, value = JSON_PROPERTY_POINTS) + List points, + @JsonProperty(required = true, value = JSON_PROPERTY_TOPIC_ID) String topicId) { + this.nextPageToken = nextPageToken; + if (nextPageToken != null) {} + this.points = points; + this.topicId = topicId; + } + + public LLMObsPatternsClusteredPointsResponseAttributes nextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + if (nextPageToken != null) {} + return this; + } + + /** + * Pagination token for the next page of points. Null if there are no more pages. + * + * @return nextPageToken + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_PAGE_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNextPageToken() { + return nextPageToken; + } + + public void setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + } + + public LLMObsPatternsClusteredPointsResponseAttributes points( + List points) { + this.points = points; + for (LLMObsPatternsClusteredPoint item : points) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsClusteredPointsResponseAttributes addPointsItem( + LLMObsPatternsClusteredPoint pointsItem) { + this.points.add(pointsItem); + this.unparsed |= pointsItem.unparsed; + return this; + } + + /** + * List of clustered points. + * + * @return points + */ + @JsonProperty(JSON_PROPERTY_POINTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + } + + public LLMObsPatternsClusteredPointsResponseAttributes topicId(String topicId) { + this.topicId = topicId; + return this; + } + + /** + * Identifier of the topic the points belong to. + * + * @return topicId + */ + @JsonProperty(JSON_PROPERTY_TOPIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTopicId() { + return topicId; + } + + public void setTopicId(String topicId) { + this.topicId = topicId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPointsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsClusteredPointsResponseAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPointsResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPointsResponseAttributes + llmObsPatternsClusteredPointsResponseAttributes = + (LLMObsPatternsClusteredPointsResponseAttributes) o; + return Objects.equals( + this.nextPageToken, llmObsPatternsClusteredPointsResponseAttributes.nextPageToken) + && Objects.equals(this.points, llmObsPatternsClusteredPointsResponseAttributes.points) + && Objects.equals(this.topicId, llmObsPatternsClusteredPointsResponseAttributes.topicId) + && Objects.equals( + this.additionalProperties, + llmObsPatternsClusteredPointsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, points, topicId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPointsResponseAttributes {\n"); + sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); + sb.append(" points: ").append(toIndentedString(points)).append("\n"); + sb.append(" topicId: ").append(toIndentedString(topicId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseData.java new file mode 100644 index 00000000000..ae0c5f6af53 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseData.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns clustered points response. */ +@JsonPropertyOrder({ + LLMObsPatternsClusteredPointsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsClusteredPointsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsClusteredPointsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPointsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsClusteredPointsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsClusteredPointsType type; + + public LLMObsPatternsClusteredPointsResponseData() {} + + @JsonCreator + public LLMObsPatternsClusteredPointsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsClusteredPointsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPatternsClusteredPointsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsClusteredPointsResponseData attributes( + LLMObsPatternsClusteredPointsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns clustered points response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsClusteredPointsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsClusteredPointsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsClusteredPointsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the topic the points belong to. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsClusteredPointsResponseData type(LLMObsPatternsClusteredPointsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns clustered points response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsClusteredPointsType getType() { + return type; + } + + public void setType(LLMObsPatternsClusteredPointsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPointsResponseData + */ + @JsonAnySetter + public LLMObsPatternsClusteredPointsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPointsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPointsResponseData llmObsPatternsClusteredPointsResponseData = + (LLMObsPatternsClusteredPointsResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsClusteredPointsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsClusteredPointsResponseData.id) + && Objects.equals(this.type, llmObsPatternsClusteredPointsResponseData.type) + && Objects.equals( + this.additionalProperties, + llmObsPatternsClusteredPointsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPointsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsType.java new file mode 100644 index 00000000000..fcaebbe4f73 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns clustered points response. */ +@JsonSerialize( + using = LLMObsPatternsClusteredPointsType.LLMObsPatternsClusteredPointsTypeSerializer.class) +public class LLMObsPatternsClusteredPointsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("clustered_points_response")); + + public static final LLMObsPatternsClusteredPointsType CLUSTERED_POINTS_RESPONSE = + new LLMObsPatternsClusteredPointsType("clustered_points_response"); + + LLMObsPatternsClusteredPointsType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsClusteredPointsTypeSerializer + extends StdSerializer { + public LLMObsPatternsClusteredPointsTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsClusteredPointsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsClusteredPointsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsClusteredPointsType fromValue(String value) { + return new LLMObsPatternsClusteredPointsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigAttributes.java new file mode 100644 index 00000000000..e56b765008c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigAttributes.java @@ -0,0 +1,509 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an LLM Observability patterns configuration. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigAttributes.JSON_PROPERTY_ACCOUNT_ID, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_EVP_QUERY, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_HIERARCHY_DEPTH, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_INTEGRATION_PROVIDER, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_MODEL_NAME, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_NAME, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_NUM_RECORDS, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_SAMPLING_RATIO, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_SCOPE, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_TEMPLATE, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private JsonNullable accountId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EVP_QUERY = "evp_query"; + private String evpQuery; + + public static final String JSON_PROPERTY_HIERARCHY_DEPTH = "hierarchy_depth"; + private Integer hierarchyDepth; + + public static final String JSON_PROPERTY_INTEGRATION_PROVIDER = "integration_provider"; + private JsonNullable integrationProvider = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private JsonNullable modelName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_NUM_RECORDS = "num_records"; + private Integer numRecords; + + public static final String JSON_PROPERTY_SAMPLING_RATIO = "sampling_ratio"; + private Double samplingRatio; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private JsonNullable template = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public LLMObsPatternsConfigAttributes() {} + + @JsonCreator + public LLMObsPatternsConfigAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EVP_QUERY) String evpQuery, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_DEPTH) Integer hierarchyDepth, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_NUM_RECORDS) Integer numRecords, + @JsonProperty(required = true, value = JSON_PROPERTY_SAMPLING_RATIO) Double samplingRatio, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) String scope, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.evpQuery = evpQuery; + this.hierarchyDepth = hierarchyDepth; + this.name = name; + this.numRecords = numRecords; + this.samplingRatio = samplingRatio; + this.scope = scope; + this.updatedAt = updatedAt; + } + + public LLMObsPatternsConfigAttributes accountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + return this; + } + + /** + * Integration account ID for a bring-your-own-model configuration. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAccountId() { + return accountId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAccountId_JsonNullable() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + public void setAccountId_JsonNullable(JsonNullable accountId) { + this.accountId = accountId; + } + + public void setAccountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + } + + public LLMObsPatternsConfigAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the configuration was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsConfigAttributes evpQuery(String evpQuery) { + this.evpQuery = evpQuery; + return this; + } + + /** + * Query that selects the spans the patterns run analyzes. + * + * @return evpQuery + */ + @JsonProperty(JSON_PROPERTY_EVP_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvpQuery() { + return evpQuery; + } + + public void setEvpQuery(String evpQuery) { + this.evpQuery = evpQuery; + } + + public LLMObsPatternsConfigAttributes hierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + return this; + } + + /** + * Depth of the topic hierarchy to generate. maximum: 2147483647 + * + * @return hierarchyDepth + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_DEPTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getHierarchyDepth() { + return hierarchyDepth; + } + + public void setHierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + } + + public LLMObsPatternsConfigAttributes integrationProvider(String integrationProvider) { + this.integrationProvider = JsonNullable.of(integrationProvider); + return this; + } + + /** + * Integration provider for a bring-your-own-model configuration. + * + * @return integrationProvider + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getIntegrationProvider() { + return integrationProvider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIntegrationProvider_JsonNullable() { + return integrationProvider; + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + public void setIntegrationProvider_JsonNullable(JsonNullable integrationProvider) { + this.integrationProvider = integrationProvider; + } + + public void setIntegrationProvider(String integrationProvider) { + this.integrationProvider = JsonNullable.of(integrationProvider); + } + + public LLMObsPatternsConfigAttributes modelName(String modelName) { + this.modelName = JsonNullable.of(modelName); + return this; + } + + /** + * Model name for a bring-your-own-model configuration. + * + * @return modelName + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getModelName() { + return modelName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getModelName_JsonNullable() { + return modelName; + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + public void setModelName_JsonNullable(JsonNullable modelName) { + this.modelName = modelName; + } + + public void setModelName(String modelName) { + this.modelName = JsonNullable.of(modelName); + } + + public LLMObsPatternsConfigAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Name of the configuration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LLMObsPatternsConfigAttributes numRecords(Integer numRecords) { + this.numRecords = numRecords; + return this; + } + + /** + * Maximum number of records to process for the run. maximum: 2147483647 + * + * @return numRecords + */ + @JsonProperty(JSON_PROPERTY_NUM_RECORDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRecords() { + return numRecords; + } + + public void setNumRecords(Integer numRecords) { + this.numRecords = numRecords; + } + + public LLMObsPatternsConfigAttributes samplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Fraction of matching spans to sample for the run. + * + * @return samplingRatio + */ + @JsonProperty(JSON_PROPERTY_SAMPLING_RATIO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + } + + public LLMObsPatternsConfigAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * Scope of the configuration. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public LLMObsPatternsConfigAttributes template(String template) { + this.template = JsonNullable.of(template); + return this; + } + + /** + * Template used to guide topic generation. + * + * @return template + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTemplate() { + return template.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTemplate_JsonNullable() { + return template; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE) + public void setTemplate_JsonNullable(JsonNullable template) { + this.template = template; + } + + public void setTemplate(String template) { + this.template = JsonNullable.of(template); + } + + public LLMObsPatternsConfigAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Timestamp when the configuration was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigAttributes + */ + @JsonAnySetter + public LLMObsPatternsConfigAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigAttributes llmObsPatternsConfigAttributes = + (LLMObsPatternsConfigAttributes) o; + return Objects.equals(this.accountId, llmObsPatternsConfigAttributes.accountId) + && Objects.equals(this.createdAt, llmObsPatternsConfigAttributes.createdAt) + && Objects.equals(this.evpQuery, llmObsPatternsConfigAttributes.evpQuery) + && Objects.equals(this.hierarchyDepth, llmObsPatternsConfigAttributes.hierarchyDepth) + && Objects.equals( + this.integrationProvider, llmObsPatternsConfigAttributes.integrationProvider) + && Objects.equals(this.modelName, llmObsPatternsConfigAttributes.modelName) + && Objects.equals(this.name, llmObsPatternsConfigAttributes.name) + && Objects.equals(this.numRecords, llmObsPatternsConfigAttributes.numRecords) + && Objects.equals(this.samplingRatio, llmObsPatternsConfigAttributes.samplingRatio) + && Objects.equals(this.scope, llmObsPatternsConfigAttributes.scope) + && Objects.equals(this.template, llmObsPatternsConfigAttributes.template) + && Objects.equals(this.updatedAt, llmObsPatternsConfigAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + createdAt, + evpQuery, + hierarchyDepth, + integrationProvider, + modelName, + name, + numRecords, + samplingRatio, + scope, + template, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" evpQuery: ").append(toIndentedString(evpQuery)).append("\n"); + sb.append(" hierarchyDepth: ").append(toIndentedString(hierarchyDepth)).append("\n"); + sb.append(" integrationProvider: ") + .append(toIndentedString(integrationProvider)) + .append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" numRecords: ").append(toIndentedString(numRecords)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigItem.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigItem.java new file mode 100644 index 00000000000..fa353971976 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigItem.java @@ -0,0 +1,535 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A single LLM Observability patterns configuration in a list response. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigItem.JSON_PROPERTY_ACCOUNT_ID, + LLMObsPatternsConfigItem.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsConfigItem.JSON_PROPERTY_EVP_QUERY, + LLMObsPatternsConfigItem.JSON_PROPERTY_HIERARCHY_DEPTH, + LLMObsPatternsConfigItem.JSON_PROPERTY_ID, + LLMObsPatternsConfigItem.JSON_PROPERTY_INTEGRATION_PROVIDER, + LLMObsPatternsConfigItem.JSON_PROPERTY_MODEL_NAME, + LLMObsPatternsConfigItem.JSON_PROPERTY_NAME, + LLMObsPatternsConfigItem.JSON_PROPERTY_NUM_RECORDS, + LLMObsPatternsConfigItem.JSON_PROPERTY_SAMPLING_RATIO, + LLMObsPatternsConfigItem.JSON_PROPERTY_SCOPE, + LLMObsPatternsConfigItem.JSON_PROPERTY_TEMPLATE, + LLMObsPatternsConfigItem.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigItem { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private JsonNullable accountId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EVP_QUERY = "evp_query"; + private String evpQuery; + + public static final String JSON_PROPERTY_HIERARCHY_DEPTH = "hierarchy_depth"; + private Integer hierarchyDepth; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INTEGRATION_PROVIDER = "integration_provider"; + private JsonNullable integrationProvider = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private JsonNullable modelName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_NUM_RECORDS = "num_records"; + private Integer numRecords; + + public static final String JSON_PROPERTY_SAMPLING_RATIO = "sampling_ratio"; + private Double samplingRatio; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private JsonNullable template = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public LLMObsPatternsConfigItem() {} + + @JsonCreator + public LLMObsPatternsConfigItem( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EVP_QUERY) String evpQuery, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_DEPTH) Integer hierarchyDepth, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_NUM_RECORDS) Integer numRecords, + @JsonProperty(required = true, value = JSON_PROPERTY_SAMPLING_RATIO) Double samplingRatio, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) String scope, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.evpQuery = evpQuery; + this.hierarchyDepth = hierarchyDepth; + this.id = id; + this.name = name; + this.numRecords = numRecords; + this.samplingRatio = samplingRatio; + this.scope = scope; + this.updatedAt = updatedAt; + } + + public LLMObsPatternsConfigItem accountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + return this; + } + + /** + * Integration account ID for a bring-your-own-model configuration. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAccountId() { + return accountId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAccountId_JsonNullable() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + public void setAccountId_JsonNullable(JsonNullable accountId) { + this.accountId = accountId; + } + + public void setAccountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + } + + public LLMObsPatternsConfigItem createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the configuration was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsConfigItem evpQuery(String evpQuery) { + this.evpQuery = evpQuery; + return this; + } + + /** + * Query that selects the spans the patterns run analyzes. + * + * @return evpQuery + */ + @JsonProperty(JSON_PROPERTY_EVP_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvpQuery() { + return evpQuery; + } + + public void setEvpQuery(String evpQuery) { + this.evpQuery = evpQuery; + } + + public LLMObsPatternsConfigItem hierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + return this; + } + + /** + * Depth of the topic hierarchy to generate. maximum: 2147483647 + * + * @return hierarchyDepth + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_DEPTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getHierarchyDepth() { + return hierarchyDepth; + } + + public void setHierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + } + + public LLMObsPatternsConfigItem id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the configuration. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsConfigItem integrationProvider(String integrationProvider) { + this.integrationProvider = JsonNullable.of(integrationProvider); + return this; + } + + /** + * Integration provider for a bring-your-own-model configuration. + * + * @return integrationProvider + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getIntegrationProvider() { + return integrationProvider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIntegrationProvider_JsonNullable() { + return integrationProvider; + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + public void setIntegrationProvider_JsonNullable(JsonNullable integrationProvider) { + this.integrationProvider = integrationProvider; + } + + public void setIntegrationProvider(String integrationProvider) { + this.integrationProvider = JsonNullable.of(integrationProvider); + } + + public LLMObsPatternsConfigItem modelName(String modelName) { + this.modelName = JsonNullable.of(modelName); + return this; + } + + /** + * Model name for a bring-your-own-model configuration. + * + * @return modelName + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getModelName() { + return modelName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getModelName_JsonNullable() { + return modelName; + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + public void setModelName_JsonNullable(JsonNullable modelName) { + this.modelName = modelName; + } + + public void setModelName(String modelName) { + this.modelName = JsonNullable.of(modelName); + } + + public LLMObsPatternsConfigItem name(String name) { + this.name = name; + return this; + } + + /** + * Name of the configuration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LLMObsPatternsConfigItem numRecords(Integer numRecords) { + this.numRecords = numRecords; + return this; + } + + /** + * Maximum number of records to process for the run. maximum: 2147483647 + * + * @return numRecords + */ + @JsonProperty(JSON_PROPERTY_NUM_RECORDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRecords() { + return numRecords; + } + + public void setNumRecords(Integer numRecords) { + this.numRecords = numRecords; + } + + public LLMObsPatternsConfigItem samplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Fraction of matching spans to sample for the run. + * + * @return samplingRatio + */ + @JsonProperty(JSON_PROPERTY_SAMPLING_RATIO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + } + + public LLMObsPatternsConfigItem scope(String scope) { + this.scope = scope; + return this; + } + + /** + * Scope of the configuration. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public LLMObsPatternsConfigItem template(String template) { + this.template = JsonNullable.of(template); + return this; + } + + /** + * Template used to guide topic generation. + * + * @return template + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTemplate() { + return template.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTemplate_JsonNullable() { + return template; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE) + public void setTemplate_JsonNullable(JsonNullable template) { + this.template = template; + } + + public void setTemplate(String template) { + this.template = JsonNullable.of(template); + } + + public LLMObsPatternsConfigItem updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Timestamp when the configuration was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigItem + */ + @JsonAnySetter + public LLMObsPatternsConfigItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigItem object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigItem llmObsPatternsConfigItem = (LLMObsPatternsConfigItem) o; + return Objects.equals(this.accountId, llmObsPatternsConfigItem.accountId) + && Objects.equals(this.createdAt, llmObsPatternsConfigItem.createdAt) + && Objects.equals(this.evpQuery, llmObsPatternsConfigItem.evpQuery) + && Objects.equals(this.hierarchyDepth, llmObsPatternsConfigItem.hierarchyDepth) + && Objects.equals(this.id, llmObsPatternsConfigItem.id) + && Objects.equals(this.integrationProvider, llmObsPatternsConfigItem.integrationProvider) + && Objects.equals(this.modelName, llmObsPatternsConfigItem.modelName) + && Objects.equals(this.name, llmObsPatternsConfigItem.name) + && Objects.equals(this.numRecords, llmObsPatternsConfigItem.numRecords) + && Objects.equals(this.samplingRatio, llmObsPatternsConfigItem.samplingRatio) + && Objects.equals(this.scope, llmObsPatternsConfigItem.scope) + && Objects.equals(this.template, llmObsPatternsConfigItem.template) + && Objects.equals(this.updatedAt, llmObsPatternsConfigItem.updatedAt) + && Objects.equals(this.additionalProperties, llmObsPatternsConfigItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + createdAt, + evpQuery, + hierarchyDepth, + id, + integrationProvider, + modelName, + name, + numRecords, + samplingRatio, + scope, + template, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigItem {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" evpQuery: ").append(toIndentedString(evpQuery)).append("\n"); + sb.append(" hierarchyDepth: ").append(toIndentedString(hierarchyDepth)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" integrationProvider: ") + .append(toIndentedString(integrationProvider)) + .append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" numRecords: ").append(toIndentedString(numRecords)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponse.java new file mode 100644 index 00000000000..b91d75ff007 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a single LLM Observability patterns configuration. */ +@JsonPropertyOrder({LLMObsPatternsConfigResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsConfigResponseData data; + + public LLMObsPatternsConfigResponse() {} + + @JsonCreator + public LLMObsPatternsConfigResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsConfigResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsConfigResponse data(LLMObsPatternsConfigResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns configuration. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsConfigResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigResponse + */ + @JsonAnySetter + public LLMObsPatternsConfigResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigResponse llmObsPatternsConfigResponse = (LLMObsPatternsConfigResponse) o; + return Objects.equals(this.data, llmObsPatternsConfigResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponseData.java new file mode 100644 index 00000000000..52c77222f3b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponseData.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns configuration. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsConfigResponseData.JSON_PROPERTY_ID, + LLMObsPatternsConfigResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsConfigAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsConfigType type; + + public LLMObsPatternsConfigResponseData() {} + + @JsonCreator + public LLMObsPatternsConfigResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsConfigAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsConfigType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsConfigResponseData attributes(LLMObsPatternsConfigAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsConfigAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsConfigResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the configuration. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsConfigResponseData type(LLMObsPatternsConfigType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns configuration. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigType getType() { + return type; + } + + public void setType(LLMObsPatternsConfigType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigResponseData + */ + @JsonAnySetter + public LLMObsPatternsConfigResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigResponseData llmObsPatternsConfigResponseData = + (LLMObsPatternsConfigResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsConfigResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsConfigResponseData.id) + && Objects.equals(this.type, llmObsPatternsConfigResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigSnapshot.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigSnapshot.java new file mode 100644 index 00000000000..66289ff5e9f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigSnapshot.java @@ -0,0 +1,311 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Snapshot of the configuration used for a patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_ACCOUNT_ID, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_EVP_QUERY, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_HIERARCHY_DEPTH, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_INTEGRATION_PROVIDER, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_MODEL_NAME, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_NUM_RECORDS, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_SAMPLING_RATIO +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigSnapshot { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_EVP_QUERY = "evp_query"; + private String evpQuery; + + public static final String JSON_PROPERTY_HIERARCHY_DEPTH = "hierarchy_depth"; + private Integer hierarchyDepth; + + public static final String JSON_PROPERTY_INTEGRATION_PROVIDER = "integration_provider"; + private String integrationProvider; + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private String modelName; + + public static final String JSON_PROPERTY_NUM_RECORDS = "num_records"; + private Integer numRecords; + + public static final String JSON_PROPERTY_SAMPLING_RATIO = "sampling_ratio"; + private Double samplingRatio; + + public LLMObsPatternsConfigSnapshot accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Integration account ID used for a bring-your-own-model run. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public LLMObsPatternsConfigSnapshot evpQuery(String evpQuery) { + this.evpQuery = evpQuery; + return this; + } + + /** + * Query that selected the spans for the run. + * + * @return evpQuery + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVP_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvpQuery() { + return evpQuery; + } + + public void setEvpQuery(String evpQuery) { + this.evpQuery = evpQuery; + } + + public LLMObsPatternsConfigSnapshot hierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + return this; + } + + /** + * Depth of the topic hierarchy generated. maximum: 2147483647 + * + * @return hierarchyDepth + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIERARCHY_DEPTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getHierarchyDepth() { + return hierarchyDepth; + } + + public void setHierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + } + + public LLMObsPatternsConfigSnapshot integrationProvider(String integrationProvider) { + this.integrationProvider = integrationProvider; + return this; + } + + /** + * Integration provider used for a bring-your-own-model run. + * + * @return integrationProvider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegrationProvider() { + return integrationProvider; + } + + public void setIntegrationProvider(String integrationProvider) { + this.integrationProvider = integrationProvider; + } + + public LLMObsPatternsConfigSnapshot modelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Model name used for a bring-your-own-model run. + * + * @return modelName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelName() { + return modelName; + } + + public void setModelName(String modelName) { + this.modelName = modelName; + } + + public LLMObsPatternsConfigSnapshot numRecords(Integer numRecords) { + this.numRecords = numRecords; + return this; + } + + /** + * Maximum number of records processed for the run. maximum: 2147483647 + * + * @return numRecords + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_RECORDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumRecords() { + return numRecords; + } + + public void setNumRecords(Integer numRecords) { + this.numRecords = numRecords; + } + + public LLMObsPatternsConfigSnapshot samplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Fraction of matching spans sampled for the run. + * + * @return samplingRatio + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAMPLING_RATIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigSnapshot + */ + @JsonAnySetter + public LLMObsPatternsConfigSnapshot putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigSnapshot object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigSnapshot llmObsPatternsConfigSnapshot = (LLMObsPatternsConfigSnapshot) o; + return Objects.equals(this.accountId, llmObsPatternsConfigSnapshot.accountId) + && Objects.equals(this.evpQuery, llmObsPatternsConfigSnapshot.evpQuery) + && Objects.equals(this.hierarchyDepth, llmObsPatternsConfigSnapshot.hierarchyDepth) + && Objects.equals( + this.integrationProvider, llmObsPatternsConfigSnapshot.integrationProvider) + && Objects.equals(this.modelName, llmObsPatternsConfigSnapshot.modelName) + && Objects.equals(this.numRecords, llmObsPatternsConfigSnapshot.numRecords) + && Objects.equals(this.samplingRatio, llmObsPatternsConfigSnapshot.samplingRatio) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigSnapshot.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + evpQuery, + hierarchyDepth, + integrationProvider, + modelName, + numRecords, + samplingRatio, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigSnapshot {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" evpQuery: ").append(toIndentedString(evpQuery)).append("\n"); + sb.append(" hierarchyDepth: ").append(toIndentedString(hierarchyDepth)).append("\n"); + sb.append(" integrationProvider: ") + .append(toIndentedString(integrationProvider)) + .append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" numRecords: ").append(toIndentedString(numRecords)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigType.java new file mode 100644 index 00000000000..2f909fe74eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns configuration. */ +@JsonSerialize(using = LLMObsPatternsConfigType.LLMObsPatternsConfigTypeSerializer.class) +public class LLMObsPatternsConfigType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("topic_discovery_configs")); + + public static final LLMObsPatternsConfigType TOPIC_DISCOVERY_CONFIGS = + new LLMObsPatternsConfigType("topic_discovery_configs"); + + LLMObsPatternsConfigType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsConfigTypeSerializer + extends StdSerializer { + public LLMObsPatternsConfigTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsConfigTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsConfigType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsConfigType fromValue(String value) { + return new LLMObsPatternsConfigType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequest.java new file mode 100644 index 00000000000..2b2384f2352 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequest.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create or update an LLM Observability patterns configuration. */ +@JsonPropertyOrder({LLMObsPatternsConfigUpsertRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigUpsertRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsConfigUpsertRequestData data; + + public LLMObsPatternsConfigUpsertRequest() {} + + @JsonCreator + public LLMObsPatternsConfigUpsertRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsConfigUpsertRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsConfigUpsertRequest data(LLMObsPatternsConfigUpsertRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for creating or updating an LLM Observability patterns configuration. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigUpsertRequestData getData() { + return data; + } + + public void setData(LLMObsPatternsConfigUpsertRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigUpsertRequest + */ + @JsonAnySetter + public LLMObsPatternsConfigUpsertRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigUpsertRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigUpsertRequest llmObsPatternsConfigUpsertRequest = + (LLMObsPatternsConfigUpsertRequest) o; + return Objects.equals(this.data, llmObsPatternsConfigUpsertRequest.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigUpsertRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigUpsertRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestAttributes.java new file mode 100644 index 00000000000..31ad52a1e4c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestAttributes.java @@ -0,0 +1,442 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating or updating an LLM Observability patterns configuration. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_ACCOUNT_ID, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_CONFIG_ID, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_EVP_QUERY, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_HIERARCHY_DEPTH, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_INTEGRATION_PROVIDER, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_MODEL_NAME, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_NAME, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_NUM_RECORDS, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_SAMPLING_RATIO, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_SCOPE, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_TEMPLATE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigUpsertRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public static final String JSON_PROPERTY_EVP_QUERY = "evp_query"; + private String evpQuery; + + public static final String JSON_PROPERTY_HIERARCHY_DEPTH = "hierarchy_depth"; + private Integer hierarchyDepth; + + public static final String JSON_PROPERTY_INTEGRATION_PROVIDER = "integration_provider"; + private String integrationProvider; + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private String modelName; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_NUM_RECORDS = "num_records"; + private Integer numRecords; + + public static final String JSON_PROPERTY_SAMPLING_RATIO = "sampling_ratio"; + private Double samplingRatio; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private String template; + + public LLMObsPatternsConfigUpsertRequestAttributes() {} + + @JsonCreator + public LLMObsPatternsConfigUpsertRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_EVP_QUERY) String evpQuery, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_DEPTH) Integer hierarchyDepth, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_NUM_RECORDS) Integer numRecords, + @JsonProperty(required = true, value = JSON_PROPERTY_SAMPLING_RATIO) Double samplingRatio) { + this.evpQuery = evpQuery; + this.hierarchyDepth = hierarchyDepth; + this.name = name; + this.numRecords = numRecords; + this.samplingRatio = samplingRatio; + } + + public LLMObsPatternsConfigUpsertRequestAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Integration account ID for a bring-your-own-model configuration. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public LLMObsPatternsConfigUpsertRequestAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * The ID of an existing configuration to update. If omitted, a new configuration is created. + * + * @return configId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + public LLMObsPatternsConfigUpsertRequestAttributes evpQuery(String evpQuery) { + this.evpQuery = evpQuery; + return this; + } + + /** + * Query that selects the spans the patterns run analyzes. + * + * @return evpQuery + */ + @JsonProperty(JSON_PROPERTY_EVP_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvpQuery() { + return evpQuery; + } + + public void setEvpQuery(String evpQuery) { + this.evpQuery = evpQuery; + } + + public LLMObsPatternsConfigUpsertRequestAttributes hierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + return this; + } + + /** + * Depth of the topic hierarchy to generate. maximum: 2147483647 + * + * @return hierarchyDepth + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_DEPTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getHierarchyDepth() { + return hierarchyDepth; + } + + public void setHierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + } + + public LLMObsPatternsConfigUpsertRequestAttributes integrationProvider( + String integrationProvider) { + this.integrationProvider = integrationProvider; + return this; + } + + /** + * Integration provider for a bring-your-own-model configuration. + * + * @return integrationProvider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegrationProvider() { + return integrationProvider; + } + + public void setIntegrationProvider(String integrationProvider) { + this.integrationProvider = integrationProvider; + } + + public LLMObsPatternsConfigUpsertRequestAttributes modelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Model name for a bring-your-own-model configuration. + * + * @return modelName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelName() { + return modelName; + } + + public void setModelName(String modelName) { + this.modelName = modelName; + } + + public LLMObsPatternsConfigUpsertRequestAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Name of the configuration. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LLMObsPatternsConfigUpsertRequestAttributes numRecords(Integer numRecords) { + this.numRecords = numRecords; + return this; + } + + /** + * Maximum number of records to process for the run. maximum: 2147483647 + * + * @return numRecords + */ + @JsonProperty(JSON_PROPERTY_NUM_RECORDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRecords() { + return numRecords; + } + + public void setNumRecords(Integer numRecords) { + this.numRecords = numRecords; + } + + public LLMObsPatternsConfigUpsertRequestAttributes samplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Fraction of matching spans to sample for the run. + * + * @return samplingRatio + */ + @JsonProperty(JSON_PROPERTY_SAMPLING_RATIO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + } + + public LLMObsPatternsConfigUpsertRequestAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * Scope of the configuration. + * + * @return scope + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public LLMObsPatternsConfigUpsertRequestAttributes template(String template) { + this.template = template; + return this; + } + + /** + * Template used to guide topic generation. + * + * @return template + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplate() { + return template; + } + + public void setTemplate(String template) { + this.template = template; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigUpsertRequestAttributes + */ + @JsonAnySetter + public LLMObsPatternsConfigUpsertRequestAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigUpsertRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigUpsertRequestAttributes llmObsPatternsConfigUpsertRequestAttributes = + (LLMObsPatternsConfigUpsertRequestAttributes) o; + return Objects.equals(this.accountId, llmObsPatternsConfigUpsertRequestAttributes.accountId) + && Objects.equals(this.configId, llmObsPatternsConfigUpsertRequestAttributes.configId) + && Objects.equals(this.evpQuery, llmObsPatternsConfigUpsertRequestAttributes.evpQuery) + && Objects.equals( + this.hierarchyDepth, llmObsPatternsConfigUpsertRequestAttributes.hierarchyDepth) + && Objects.equals( + this.integrationProvider, + llmObsPatternsConfigUpsertRequestAttributes.integrationProvider) + && Objects.equals(this.modelName, llmObsPatternsConfigUpsertRequestAttributes.modelName) + && Objects.equals(this.name, llmObsPatternsConfigUpsertRequestAttributes.name) + && Objects.equals(this.numRecords, llmObsPatternsConfigUpsertRequestAttributes.numRecords) + && Objects.equals( + this.samplingRatio, llmObsPatternsConfigUpsertRequestAttributes.samplingRatio) + && Objects.equals(this.scope, llmObsPatternsConfigUpsertRequestAttributes.scope) + && Objects.equals(this.template, llmObsPatternsConfigUpsertRequestAttributes.template) + && Objects.equals( + this.additionalProperties, + llmObsPatternsConfigUpsertRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + configId, + evpQuery, + hierarchyDepth, + integrationProvider, + modelName, + name, + numRecords, + samplingRatio, + scope, + template, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigUpsertRequestAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" evpQuery: ").append(toIndentedString(evpQuery)).append("\n"); + sb.append(" hierarchyDepth: ").append(toIndentedString(hierarchyDepth)).append("\n"); + sb.append(" integrationProvider: ") + .append(toIndentedString(integrationProvider)) + .append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" numRecords: ").append(toIndentedString(numRecords)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestData.java new file mode 100644 index 00000000000..b6127d0a0c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for creating or updating an LLM Observability patterns configuration. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigUpsertRequestData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsConfigUpsertRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigUpsertRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsConfigUpsertRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsConfigType type; + + public LLMObsPatternsConfigUpsertRequestData() {} + + @JsonCreator + public LLMObsPatternsConfigUpsertRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsConfigUpsertRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsConfigType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsConfigUpsertRequestData attributes( + LLMObsPatternsConfigUpsertRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating an LLM Observability patterns configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigUpsertRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsConfigUpsertRequestAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsConfigUpsertRequestData type(LLMObsPatternsConfigType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns configuration. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigType getType() { + return type; + } + + public void setType(LLMObsPatternsConfigType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigUpsertRequestData + */ + @JsonAnySetter + public LLMObsPatternsConfigUpsertRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigUpsertRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigUpsertRequestData llmObsPatternsConfigUpsertRequestData = + (LLMObsPatternsConfigUpsertRequestData) o; + return Objects.equals(this.attributes, llmObsPatternsConfigUpsertRequestData.attributes) + && Objects.equals(this.type, llmObsPatternsConfigUpsertRequestData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigUpsertRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigUpsertRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsListType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsListType.java new file mode 100644 index 00000000000..0d74e5959b8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsListType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of a list of LLM Observability patterns configurations. */ +@JsonSerialize(using = LLMObsPatternsConfigsListType.LLMObsPatternsConfigsListTypeSerializer.class) +public class LLMObsPatternsConfigsListType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("list_topic_discovery_configs_response")); + + public static final LLMObsPatternsConfigsListType LIST_TOPIC_DISCOVERY_CONFIGS_RESPONSE = + new LLMObsPatternsConfigsListType("list_topic_discovery_configs_response"); + + LLMObsPatternsConfigsListType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsConfigsListTypeSerializer + extends StdSerializer { + public LLMObsPatternsConfigsListTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsConfigsListTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsConfigsListType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsConfigsListType fromValue(String value) { + return new LLMObsPatternsConfigsListType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponse.java new file mode 100644 index 00000000000..9df9c57da01 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a list of LLM Observability patterns configurations. */ +@JsonPropertyOrder({LLMObsPatternsConfigsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsConfigsResponseData data; + + public LLMObsPatternsConfigsResponse() {} + + @JsonCreator + public LLMObsPatternsConfigsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsConfigsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsConfigsResponse data(LLMObsPatternsConfigsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of a list of LLM Observability patterns configurations. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsConfigsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigsResponse + */ + @JsonAnySetter + public LLMObsPatternsConfigsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigsResponse llmObsPatternsConfigsResponse = (LLMObsPatternsConfigsResponse) o; + return Objects.equals(this.data, llmObsPatternsConfigsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseAttributes.java new file mode 100644 index 00000000000..2fe74211f0b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseAttributes.java @@ -0,0 +1,159 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a list of LLM Observability patterns configurations. */ +@JsonPropertyOrder({LLMObsPatternsConfigsResponseAttributes.JSON_PROPERTY_CONFIGS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIGS = "configs"; + private List configs = new ArrayList<>(); + + public LLMObsPatternsConfigsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsConfigsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIGS) + List configs) { + this.configs = configs; + } + + public LLMObsPatternsConfigsResponseAttributes configs(List configs) { + this.configs = configs; + for (LLMObsPatternsConfigItem item : configs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsConfigsResponseAttributes addConfigsItem( + LLMObsPatternsConfigItem configsItem) { + this.configs.add(configsItem); + this.unparsed |= configsItem.unparsed; + return this; + } + + /** + * List of patterns configurations. + * + * @return configs + */ + @JsonProperty(JSON_PROPERTY_CONFIGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getConfigs() { + return configs; + } + + public void setConfigs(List configs) { + this.configs = configs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsConfigsResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigsResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigsResponseAttributes llmObsPatternsConfigsResponseAttributes = + (LLMObsPatternsConfigsResponseAttributes) o; + return Objects.equals(this.configs, llmObsPatternsConfigsResponseAttributes.configs) + && Objects.equals( + this.additionalProperties, + llmObsPatternsConfigsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(configs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigsResponseAttributes {\n"); + sb.append(" configs: ").append(toIndentedString(configs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseData.java new file mode 100644 index 00000000000..837ab67ab3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of a list of LLM Observability patterns configurations. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsConfigsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsConfigsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsConfigsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsConfigsListType type; + + public LLMObsPatternsConfigsResponseData() {} + + @JsonCreator + public LLMObsPatternsConfigsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsConfigsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPatternsConfigsListType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsConfigsResponseData attributes( + LLMObsPatternsConfigsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a list of LLM Observability patterns configurations. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsConfigsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsConfigsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the list response. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsConfigsResponseData type(LLMObsPatternsConfigsListType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of a list of LLM Observability patterns configurations. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigsListType getType() { + return type; + } + + public void setType(LLMObsPatternsConfigsListType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigsResponseData + */ + @JsonAnySetter + public LLMObsPatternsConfigsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigsResponseData llmObsPatternsConfigsResponseData = + (LLMObsPatternsConfigsResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsConfigsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsConfigsResponseData.id) + && Objects.equals(this.type, llmObsPatternsConfigsResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRequestType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRequestType.java new file mode 100644 index 00000000000..f361c8267a0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRequestType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type for triggering an LLM Observability patterns run. */ +@JsonSerialize(using = LLMObsPatternsRequestType.LLMObsPatternsRequestTypeSerializer.class) +public class LLMObsPatternsRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("topic_discovery")); + + public static final LLMObsPatternsRequestType TOPIC_DISCOVERY = + new LLMObsPatternsRequestType("topic_discovery"); + + LLMObsPatternsRequestType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsRequestTypeSerializer + extends StdSerializer { + public LLMObsPatternsRequestTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsRequestType fromValue(String value) { + return new LLMObsPatternsRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponse.java new file mode 100644 index 00000000000..91bde7550c2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponse.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the status of an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsRunStatusResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunStatusResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsRunStatusResponseData data; + + public LLMObsPatternsRunStatusResponse() {} + + @JsonCreator + public LLMObsPatternsRunStatusResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsRunStatusResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsRunStatusResponse data(LLMObsPatternsRunStatusResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns run status response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunStatusResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsRunStatusResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunStatusResponse + */ + @JsonAnySetter + public LLMObsPatternsRunStatusResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunStatusResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunStatusResponse llmObsPatternsRunStatusResponse = + (LLMObsPatternsRunStatusResponse) o; + return Objects.equals(this.data, llmObsPatternsRunStatusResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunStatusResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunStatusResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseAttributes.java new file mode 100644 index 00000000000..ce2e0a9b799 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseAttributes.java @@ -0,0 +1,247 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability patterns run status. */ +@JsonPropertyOrder({ + LLMObsPatternsRunStatusResponseAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsRunStatusResponseAttributes.JSON_PROPERTY_PROGRESS, + LLMObsPatternsRunStatusResponseAttributes.JSON_PROPERTY_STATUS, + LLMObsPatternsRunStatusResponseAttributes.JSON_PROPERTY_STEP +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunStatusResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_PROGRESS = "progress"; + private List progress = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_STEP = "step"; + private String step; + + public LLMObsPatternsRunStatusResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsRunStatusResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_PROGRESS) + List progress, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status, + @JsonProperty(required = true, value = JSON_PROPERTY_STEP) String step) { + this.createdAt = createdAt; + this.progress = progress; + this.status = status; + this.step = step; + } + + public LLMObsPatternsRunStatusResponseAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the run was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsRunStatusResponseAttributes progress( + List progress) { + this.progress = progress; + for (LLMObsPatternsActivityProgress item : progress) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsRunStatusResponseAttributes addProgressItem( + LLMObsPatternsActivityProgress progressItem) { + this.progress.add(progressItem); + this.unparsed |= progressItem.unparsed; + return this; + } + + /** + * List of step-by-step progress entries for a patterns run. + * + * @return progress + */ + @JsonProperty(JSON_PROPERTY_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getProgress() { + return progress; + } + + public void setProgress(List progress) { + this.progress = progress; + } + + public LLMObsPatternsRunStatusResponseAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Overall status of the run. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public LLMObsPatternsRunStatusResponseAttributes step(String step) { + this.step = step; + return this; + } + + /** + * The current step of the run. + * + * @return step + */ + @JsonProperty(JSON_PROPERTY_STEP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStep() { + return step; + } + + public void setStep(String step) { + this.step = step; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunStatusResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsRunStatusResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunStatusResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunStatusResponseAttributes llmObsPatternsRunStatusResponseAttributes = + (LLMObsPatternsRunStatusResponseAttributes) o; + return Objects.equals(this.createdAt, llmObsPatternsRunStatusResponseAttributes.createdAt) + && Objects.equals(this.progress, llmObsPatternsRunStatusResponseAttributes.progress) + && Objects.equals(this.status, llmObsPatternsRunStatusResponseAttributes.status) + && Objects.equals(this.step, llmObsPatternsRunStatusResponseAttributes.step) + && Objects.equals( + this.additionalProperties, + llmObsPatternsRunStatusResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, progress, status, step, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunStatusResponseAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" progress: ").append(toIndentedString(progress)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" step: ").append(toIndentedString(step)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseData.java new file mode 100644 index 00000000000..0716221bd54 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns run status response. */ +@JsonPropertyOrder({ + LLMObsPatternsRunStatusResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsRunStatusResponseData.JSON_PROPERTY_ID, + LLMObsPatternsRunStatusResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunStatusResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsRunStatusResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsRunStatusType type; + + public LLMObsPatternsRunStatusResponseData() {} + + @JsonCreator + public LLMObsPatternsRunStatusResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsRunStatusResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsRunStatusType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsRunStatusResponseData attributes( + LLMObsPatternsRunStatusResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns run status. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunStatusResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsRunStatusResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsRunStatusResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the patterns run. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsRunStatusResponseData type(LLMObsPatternsRunStatusType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns run status. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunStatusType getType() { + return type; + } + + public void setType(LLMObsPatternsRunStatusType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunStatusResponseData + */ + @JsonAnySetter + public LLMObsPatternsRunStatusResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunStatusResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunStatusResponseData llmObsPatternsRunStatusResponseData = + (LLMObsPatternsRunStatusResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsRunStatusResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsRunStatusResponseData.id) + && Objects.equals(this.type, llmObsPatternsRunStatusResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunStatusResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunStatusResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusType.java new file mode 100644 index 00000000000..8af3ac53e2d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns run status. */ +@JsonSerialize(using = LLMObsPatternsRunStatusType.LLMObsPatternsRunStatusTypeSerializer.class) +public class LLMObsPatternsRunStatusType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("topic_discovery_run_status")); + + public static final LLMObsPatternsRunStatusType TOPIC_DISCOVERY_RUN_STATUS = + new LLMObsPatternsRunStatusType("topic_discovery_run_status"); + + LLMObsPatternsRunStatusType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsRunStatusTypeSerializer + extends StdSerializer { + public LLMObsPatternsRunStatusTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsRunStatusTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsRunStatusType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsRunStatusType fromValue(String value) { + return new LLMObsPatternsRunStatusType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunSummary.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunSummary.java new file mode 100644 index 00000000000..fde0e5be271 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunSummary.java @@ -0,0 +1,268 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Summary of an LLM Observability patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsRunSummary.JSON_PROPERTY_COMPLETED_AT, + LLMObsPatternsRunSummary.JSON_PROPERTY_CONFIG_SNAPSHOT, + LLMObsPatternsRunSummary.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsRunSummary.JSON_PROPERTY_ID, + LLMObsPatternsRunSummary.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunSummary { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG_SNAPSHOT = "config_snapshot"; + private LLMObsPatternsConfigSnapshot configSnapshot; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public LLMObsPatternsRunSummary() {} + + @JsonCreator + public LLMObsPatternsRunSummary( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.createdAt = createdAt; + this.id = id; + this.status = status; + } + + public LLMObsPatternsRunSummary completedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Timestamp when the run completed. Null if the run has not completed. + * + * @return completedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + public LLMObsPatternsRunSummary configSnapshot(LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + this.unparsed |= configSnapshot.unparsed; + return this; + } + + /** + * Snapshot of the configuration used for a patterns run. + * + * @return configSnapshot + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsPatternsConfigSnapshot getConfigSnapshot() { + return configSnapshot; + } + + public void setConfigSnapshot(LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + } + + public LLMObsPatternsRunSummary createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the run was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsRunSummary id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the run. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsRunSummary status(String status) { + this.status = status; + return this; + } + + /** + * Status of the run. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunSummary + */ + @JsonAnySetter + public LLMObsPatternsRunSummary putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunSummary object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunSummary llmObsPatternsRunSummary = (LLMObsPatternsRunSummary) o; + return Objects.equals(this.completedAt, llmObsPatternsRunSummary.completedAt) + && Objects.equals(this.configSnapshot, llmObsPatternsRunSummary.configSnapshot) + && Objects.equals(this.createdAt, llmObsPatternsRunSummary.createdAt) + && Objects.equals(this.id, llmObsPatternsRunSummary.id) + && Objects.equals(this.status, llmObsPatternsRunSummary.status) + && Objects.equals(this.additionalProperties, llmObsPatternsRunSummary.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(completedAt, configSnapshot, createdAt, id, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunSummary {\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" configSnapshot: ").append(toIndentedString(configSnapshot)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsListType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsListType.java new file mode 100644 index 00000000000..08c01183e22 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsListType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of a list of LLM Observability patterns runs. */ +@JsonSerialize(using = LLMObsPatternsRunsListType.LLMObsPatternsRunsListTypeSerializer.class) +public class LLMObsPatternsRunsListType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("list_topic_discovery_runs_response")); + + public static final LLMObsPatternsRunsListType LIST_TOPIC_DISCOVERY_RUNS_RESPONSE = + new LLMObsPatternsRunsListType("list_topic_discovery_runs_response"); + + LLMObsPatternsRunsListType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsRunsListTypeSerializer + extends StdSerializer { + public LLMObsPatternsRunsListTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsRunsListTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsRunsListType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsRunsListType fromValue(String value) { + return new LLMObsPatternsRunsListType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponse.java new file mode 100644 index 00000000000..786b41790f8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the completed runs of an LLM Observability patterns configuration. */ +@JsonPropertyOrder({LLMObsPatternsRunsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsRunsResponseData data; + + public LLMObsPatternsRunsResponse() {} + + @JsonCreator + public LLMObsPatternsRunsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsRunsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsRunsResponse data(LLMObsPatternsRunsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns runs response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsRunsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunsResponse + */ + @JsonAnySetter + public LLMObsPatternsRunsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunsResponse llmObsPatternsRunsResponse = (LLMObsPatternsRunsResponse) o; + return Objects.equals(this.data, llmObsPatternsRunsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseAttributes.java new file mode 100644 index 00000000000..8ee24bf881f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseAttributes.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability patterns runs response. */ +@JsonPropertyOrder({LLMObsPatternsRunsResponseAttributes.JSON_PROPERTY_RUNS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RUNS = "runs"; + private List runs = new ArrayList<>(); + + public LLMObsPatternsRunsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsRunsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RUNS) + List runs) { + this.runs = runs; + } + + public LLMObsPatternsRunsResponseAttributes runs(List runs) { + this.runs = runs; + for (LLMObsPatternsRunSummary item : runs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsRunsResponseAttributes addRunsItem(LLMObsPatternsRunSummary runsItem) { + this.runs.add(runsItem); + this.unparsed |= runsItem.unparsed; + return this; + } + + /** + * List of patterns runs. + * + * @return runs + */ + @JsonProperty(JSON_PROPERTY_RUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRuns() { + return runs; + } + + public void setRuns(List runs) { + this.runs = runs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsRunsResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunsResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunsResponseAttributes llmObsPatternsRunsResponseAttributes = + (LLMObsPatternsRunsResponseAttributes) o; + return Objects.equals(this.runs, llmObsPatternsRunsResponseAttributes.runs) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(runs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunsResponseAttributes {\n"); + sb.append(" runs: ").append(toIndentedString(runs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseData.java new file mode 100644 index 00000000000..377a8274864 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns runs response. */ +@JsonPropertyOrder({ + LLMObsPatternsRunsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsRunsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsRunsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsRunsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsRunsListType type; + + public LLMObsPatternsRunsResponseData() {} + + @JsonCreator + public LLMObsPatternsRunsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsRunsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsRunsListType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsRunsResponseData attributes( + LLMObsPatternsRunsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns runs response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsRunsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsRunsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the configuration the runs belong to. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsRunsResponseData type(LLMObsPatternsRunsListType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of a list of LLM Observability patterns runs. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunsListType getType() { + return type; + } + + public void setType(LLMObsPatternsRunsListType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunsResponseData + */ + @JsonAnySetter + public LLMObsPatternsRunsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunsResponseData llmObsPatternsRunsResponseData = + (LLMObsPatternsRunsResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsRunsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsRunsResponseData.id) + && Objects.equals(this.type, llmObsPatternsRunsResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopic.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopic.java new file mode 100644 index 00000000000..268905ab340 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopic.java @@ -0,0 +1,410 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A topic discovered by an LLM Observability patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsTopic.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsTopic.JSON_PROPERTY_DESCRIPTION, + LLMObsPatternsTopic.JSON_PROPERTY_FIRST_SEEN_AT, + LLMObsPatternsTopic.JSON_PROPERTY_HIERARCHY_LEVEL, + LLMObsPatternsTopic.JSON_PROPERTY_ID, + LLMObsPatternsTopic.JSON_PROPERTY_IS_VALIDATED, + LLMObsPatternsTopic.JSON_PROPERTY_NAME, + LLMObsPatternsTopic.JSON_PROPERTY_PARENT_TOPIC_ID, + LLMObsPatternsTopic.JSON_PROPERTY_POINT_COUNT, + LLMObsPatternsTopic.JSON_PROPERTY_RUN_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopic { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_FIRST_SEEN_AT = "first_seen_at"; + private OffsetDateTime firstSeenAt; + + public static final String JSON_PROPERTY_HIERARCHY_LEVEL = "hierarchy_level"; + private Long hierarchyLevel; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_IS_VALIDATED = "is_validated"; + private Boolean isValidated; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PARENT_TOPIC_ID = "parent_topic_id"; + private String parentTopicId; + + public static final String JSON_PROPERTY_POINT_COUNT = "point_count"; + private Long pointCount; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public LLMObsPatternsTopic() {} + + @JsonCreator + public LLMObsPatternsTopic( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_FIRST_SEEN_AT) + OffsetDateTime firstSeenAt, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_LEVEL) Long hierarchyLevel, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_VALIDATED) Boolean isValidated, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PARENT_TOPIC_ID) String parentTopicId, + @JsonProperty(required = true, value = JSON_PROPERTY_POINT_COUNT) Long pointCount, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId) { + this.createdAt = createdAt; + this.description = description; + this.firstSeenAt = firstSeenAt; + this.hierarchyLevel = hierarchyLevel; + this.id = id; + this.isValidated = isValidated; + this.name = name; + this.parentTopicId = parentTopicId; + this.pointCount = pointCount; + this.runId = runId; + } + + public LLMObsPatternsTopic createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the topic was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsTopic description(String description) { + this.description = description; + return this; + } + + /** + * Description of the topic. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsPatternsTopic firstSeenAt(OffsetDateTime firstSeenAt) { + this.firstSeenAt = firstSeenAt; + return this; + } + + /** + * Timestamp when the topic was first seen. + * + * @return firstSeenAt + */ + @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getFirstSeenAt() { + return firstSeenAt; + } + + public void setFirstSeenAt(OffsetDateTime firstSeenAt) { + this.firstSeenAt = firstSeenAt; + } + + public LLMObsPatternsTopic hierarchyLevel(Long hierarchyLevel) { + this.hierarchyLevel = hierarchyLevel; + return this; + } + + /** + * Level of the topic in the hierarchy. Level 0 is a leaf topic. + * + * @return hierarchyLevel + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getHierarchyLevel() { + return hierarchyLevel; + } + + public void setHierarchyLevel(Long hierarchyLevel) { + this.hierarchyLevel = hierarchyLevel; + } + + public LLMObsPatternsTopic id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the topic. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsTopic isValidated(Boolean isValidated) { + this.isValidated = isValidated; + return this; + } + + /** + * Whether the topic has been validated. + * + * @return isValidated + */ + @JsonProperty(JSON_PROPERTY_IS_VALIDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsValidated() { + return isValidated; + } + + public void setIsValidated(Boolean isValidated) { + this.isValidated = isValidated; + } + + public LLMObsPatternsTopic name(String name) { + this.name = name; + return this; + } + + /** + * Name of the topic. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LLMObsPatternsTopic parentTopicId(String parentTopicId) { + this.parentTopicId = parentTopicId; + return this; + } + + /** + * Identifier of the parent topic. Empty for top-level topics. + * + * @return parentTopicId + */ + @JsonProperty(JSON_PROPERTY_PARENT_TOPIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getParentTopicId() { + return parentTopicId; + } + + public void setParentTopicId(String parentTopicId) { + this.parentTopicId = parentTopicId; + } + + public LLMObsPatternsTopic pointCount(Long pointCount) { + this.pointCount = pointCount; + return this; + } + + /** + * Number of data points assigned to the topic. + * + * @return pointCount + */ + @JsonProperty(JSON_PROPERTY_POINT_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPointCount() { + return pointCount; + } + + public void setPointCount(Long pointCount) { + this.pointCount = pointCount; + } + + public LLMObsPatternsTopic runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Identifier of the run that produced the topic. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopic + */ + @JsonAnySetter + public LLMObsPatternsTopic putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopic object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopic llmObsPatternsTopic = (LLMObsPatternsTopic) o; + return Objects.equals(this.createdAt, llmObsPatternsTopic.createdAt) + && Objects.equals(this.description, llmObsPatternsTopic.description) + && Objects.equals(this.firstSeenAt, llmObsPatternsTopic.firstSeenAt) + && Objects.equals(this.hierarchyLevel, llmObsPatternsTopic.hierarchyLevel) + && Objects.equals(this.id, llmObsPatternsTopic.id) + && Objects.equals(this.isValidated, llmObsPatternsTopic.isValidated) + && Objects.equals(this.name, llmObsPatternsTopic.name) + && Objects.equals(this.parentTopicId, llmObsPatternsTopic.parentTopicId) + && Objects.equals(this.pointCount, llmObsPatternsTopic.pointCount) + && Objects.equals(this.runId, llmObsPatternsTopic.runId) + && Objects.equals(this.additionalProperties, llmObsPatternsTopic.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + firstSeenAt, + hierarchyLevel, + id, + isValidated, + name, + parentTopicId, + pointCount, + runId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopic {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); + sb.append(" hierarchyLevel: ").append(toIndentedString(hierarchyLevel)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isValidated: ").append(toIndentedString(isValidated)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" parentTopicId: ").append(toIndentedString(parentTopicId)).append("\n"); + sb.append(" pointCount: ").append(toIndentedString(pointCount)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicWithClusteredPoints.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicWithClusteredPoints.java new file mode 100644 index 00000000000..a178d40536d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicWithClusteredPoints.java @@ -0,0 +1,460 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A topic discovered by an LLM Observability patterns run, including the clustered points attached + * to leaf topics. + */ +@JsonPropertyOrder({ + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_CLUSTER_POINTS, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_DESCRIPTION, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_FIRST_SEEN_AT, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_HIERARCHY_LEVEL, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_ID, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_IS_VALIDATED, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_NAME, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_PARENT_TOPIC_ID, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_POINT_COUNT, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_RUN_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicWithClusteredPoints { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CLUSTER_POINTS = "cluster_points"; + private List clusterPoints = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_FIRST_SEEN_AT = "first_seen_at"; + private OffsetDateTime firstSeenAt; + + public static final String JSON_PROPERTY_HIERARCHY_LEVEL = "hierarchy_level"; + private Long hierarchyLevel; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_IS_VALIDATED = "is_validated"; + private Boolean isValidated; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PARENT_TOPIC_ID = "parent_topic_id"; + private String parentTopicId; + + public static final String JSON_PROPERTY_POINT_COUNT = "point_count"; + private Long pointCount; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public LLMObsPatternsTopicWithClusteredPoints() {} + + @JsonCreator + public LLMObsPatternsTopicWithClusteredPoints( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_FIRST_SEEN_AT) + OffsetDateTime firstSeenAt, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_LEVEL) Long hierarchyLevel, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_VALIDATED) Boolean isValidated, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PARENT_TOPIC_ID) String parentTopicId, + @JsonProperty(required = true, value = JSON_PROPERTY_POINT_COUNT) Long pointCount, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId) { + this.createdAt = createdAt; + this.description = description; + this.firstSeenAt = firstSeenAt; + this.hierarchyLevel = hierarchyLevel; + this.id = id; + this.isValidated = isValidated; + this.name = name; + this.parentTopicId = parentTopicId; + this.pointCount = pointCount; + this.runId = runId; + } + + public LLMObsPatternsTopicWithClusteredPoints clusterPoints( + List clusterPoints) { + this.clusterPoints = clusterPoints; + for (LLMObsPatternsClusteredPointRef item : clusterPoints) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsTopicWithClusteredPoints addClusterPointsItem( + LLMObsPatternsClusteredPointRef clusterPointsItem) { + if (this.clusterPoints == null) { + this.clusterPoints = new ArrayList<>(); + } + this.clusterPoints.add(clusterPointsItem); + this.unparsed |= clusterPointsItem.unparsed; + return this; + } + + /** + * List of clustered points attached to a topic. + * + * @return clusterPoints + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLUSTER_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getClusterPoints() { + return clusterPoints; + } + + public void setClusterPoints(List clusterPoints) { + this.clusterPoints = clusterPoints; + } + + public LLMObsPatternsTopicWithClusteredPoints createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the topic was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsTopicWithClusteredPoints description(String description) { + this.description = description; + return this; + } + + /** + * Description of the topic. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsPatternsTopicWithClusteredPoints firstSeenAt(OffsetDateTime firstSeenAt) { + this.firstSeenAt = firstSeenAt; + return this; + } + + /** + * Timestamp when the topic was first seen. + * + * @return firstSeenAt + */ + @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getFirstSeenAt() { + return firstSeenAt; + } + + public void setFirstSeenAt(OffsetDateTime firstSeenAt) { + this.firstSeenAt = firstSeenAt; + } + + public LLMObsPatternsTopicWithClusteredPoints hierarchyLevel(Long hierarchyLevel) { + this.hierarchyLevel = hierarchyLevel; + return this; + } + + /** + * Level of the topic in the hierarchy. Level 0 is a leaf topic. + * + * @return hierarchyLevel + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getHierarchyLevel() { + return hierarchyLevel; + } + + public void setHierarchyLevel(Long hierarchyLevel) { + this.hierarchyLevel = hierarchyLevel; + } + + public LLMObsPatternsTopicWithClusteredPoints id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the topic. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsTopicWithClusteredPoints isValidated(Boolean isValidated) { + this.isValidated = isValidated; + return this; + } + + /** + * Whether the topic has been validated. + * + * @return isValidated + */ + @JsonProperty(JSON_PROPERTY_IS_VALIDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsValidated() { + return isValidated; + } + + public void setIsValidated(Boolean isValidated) { + this.isValidated = isValidated; + } + + public LLMObsPatternsTopicWithClusteredPoints name(String name) { + this.name = name; + return this; + } + + /** + * Name of the topic. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LLMObsPatternsTopicWithClusteredPoints parentTopicId(String parentTopicId) { + this.parentTopicId = parentTopicId; + return this; + } + + /** + * Identifier of the parent topic. Empty for top-level topics. + * + * @return parentTopicId + */ + @JsonProperty(JSON_PROPERTY_PARENT_TOPIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getParentTopicId() { + return parentTopicId; + } + + public void setParentTopicId(String parentTopicId) { + this.parentTopicId = parentTopicId; + } + + public LLMObsPatternsTopicWithClusteredPoints pointCount(Long pointCount) { + this.pointCount = pointCount; + return this; + } + + /** + * Number of data points assigned to the topic. + * + * @return pointCount + */ + @JsonProperty(JSON_PROPERTY_POINT_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPointCount() { + return pointCount; + } + + public void setPointCount(Long pointCount) { + this.pointCount = pointCount; + } + + public LLMObsPatternsTopicWithClusteredPoints runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Identifier of the run that produced the topic. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicWithClusteredPoints + */ + @JsonAnySetter + public LLMObsPatternsTopicWithClusteredPoints putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicWithClusteredPoints object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicWithClusteredPoints llmObsPatternsTopicWithClusteredPoints = + (LLMObsPatternsTopicWithClusteredPoints) o; + return Objects.equals(this.clusterPoints, llmObsPatternsTopicWithClusteredPoints.clusterPoints) + && Objects.equals(this.createdAt, llmObsPatternsTopicWithClusteredPoints.createdAt) + && Objects.equals(this.description, llmObsPatternsTopicWithClusteredPoints.description) + && Objects.equals(this.firstSeenAt, llmObsPatternsTopicWithClusteredPoints.firstSeenAt) + && Objects.equals( + this.hierarchyLevel, llmObsPatternsTopicWithClusteredPoints.hierarchyLevel) + && Objects.equals(this.id, llmObsPatternsTopicWithClusteredPoints.id) + && Objects.equals(this.isValidated, llmObsPatternsTopicWithClusteredPoints.isValidated) + && Objects.equals(this.name, llmObsPatternsTopicWithClusteredPoints.name) + && Objects.equals(this.parentTopicId, llmObsPatternsTopicWithClusteredPoints.parentTopicId) + && Objects.equals(this.pointCount, llmObsPatternsTopicWithClusteredPoints.pointCount) + && Objects.equals(this.runId, llmObsPatternsTopicWithClusteredPoints.runId) + && Objects.equals( + this.additionalProperties, llmObsPatternsTopicWithClusteredPoints.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + clusterPoints, + createdAt, + description, + firstSeenAt, + hierarchyLevel, + id, + isValidated, + name, + parentTopicId, + pointCount, + runId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicWithClusteredPoints {\n"); + sb.append(" clusterPoints: ").append(toIndentedString(clusterPoints)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); + sb.append(" hierarchyLevel: ").append(toIndentedString(hierarchyLevel)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isValidated: ").append(toIndentedString(isValidated)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" parentTopicId: ").append(toIndentedString(parentTopicId)).append("\n"); + sb.append(" pointCount: ").append(toIndentedString(pointCount)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponse.java new file mode 100644 index 00000000000..1df9501aaec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the topics discovered by an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsTopicsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsTopicsResponseData data; + + public LLMObsPatternsTopicsResponse() {} + + @JsonCreator + public LLMObsPatternsTopicsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsTopicsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsTopicsResponse data(LLMObsPatternsTopicsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns topics response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsTopicsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsResponse + */ + @JsonAnySetter + public LLMObsPatternsTopicsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsResponse llmObsPatternsTopicsResponse = (LLMObsPatternsTopicsResponse) o; + return Objects.equals(this.data, llmObsPatternsTopicsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsTopicsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseAttributes.java new file mode 100644 index 00000000000..44d056ce970 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseAttributes.java @@ -0,0 +1,348 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an LLM Observability patterns topics response. */ +@JsonPropertyOrder({ + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_COMPLETED_AT, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_CONFIG_ID, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_CONFIG_SNAPSHOT, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_PREVIOUS_RUN_ID, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_RUN_ID, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_TOPICS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public static final String JSON_PROPERTY_CONFIG_SNAPSHOT = "config_snapshot"; + private LLMObsPatternsConfigSnapshot configSnapshot; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_PREVIOUS_RUN_ID = "previous_run_id"; + private String previousRunId; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public static final String JSON_PROPERTY_TOPICS = "topics"; + private List topics = new ArrayList<>(); + + public LLMObsPatternsTopicsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsTopicsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG_ID) String configId, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_PREVIOUS_RUN_ID) String previousRunId, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId, + @JsonProperty(required = true, value = JSON_PROPERTY_TOPICS) + List topics) { + this.configId = configId; + this.createdAt = createdAt; + this.previousRunId = previousRunId; + this.runId = runId; + this.topics = topics; + } + + public LLMObsPatternsTopicsResponseAttributes completedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Timestamp when the run completed. Null if the run has not completed. + * + * @return completedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + public LLMObsPatternsTopicsResponseAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * Identifier of the configuration that produced the run. + * + * @return configId + */ + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + public LLMObsPatternsTopicsResponseAttributes configSnapshot( + LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + this.unparsed |= configSnapshot.unparsed; + return this; + } + + /** + * Snapshot of the configuration used for a patterns run. + * + * @return configSnapshot + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsPatternsConfigSnapshot getConfigSnapshot() { + return configSnapshot; + } + + public void setConfigSnapshot(LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + } + + public LLMObsPatternsTopicsResponseAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the run was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsTopicsResponseAttributes previousRunId(String previousRunId) { + this.previousRunId = previousRunId; + return this; + } + + /** + * Identifier of the run that completed immediately before this one. Empty if none. + * + * @return previousRunId + */ + @JsonProperty(JSON_PROPERTY_PREVIOUS_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPreviousRunId() { + return previousRunId; + } + + public void setPreviousRunId(String previousRunId) { + this.previousRunId = previousRunId; + } + + public LLMObsPatternsTopicsResponseAttributes runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Identifier of the run that produced the topics. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + public LLMObsPatternsTopicsResponseAttributes topics(List topics) { + this.topics = topics; + for (LLMObsPatternsTopic item : topics) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsTopicsResponseAttributes addTopicsItem(LLMObsPatternsTopic topicsItem) { + this.topics.add(topicsItem); + this.unparsed |= topicsItem.unparsed; + return this; + } + + /** + * List of discovered topics. + * + * @return topics + */ + @JsonProperty(JSON_PROPERTY_TOPICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTopics() { + return topics; + } + + public void setTopics(List topics) { + this.topics = topics; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsTopicsResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicsResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsResponseAttributes llmObsPatternsTopicsResponseAttributes = + (LLMObsPatternsTopicsResponseAttributes) o; + return Objects.equals(this.completedAt, llmObsPatternsTopicsResponseAttributes.completedAt) + && Objects.equals(this.configId, llmObsPatternsTopicsResponseAttributes.configId) + && Objects.equals( + this.configSnapshot, llmObsPatternsTopicsResponseAttributes.configSnapshot) + && Objects.equals(this.createdAt, llmObsPatternsTopicsResponseAttributes.createdAt) + && Objects.equals(this.previousRunId, llmObsPatternsTopicsResponseAttributes.previousRunId) + && Objects.equals(this.runId, llmObsPatternsTopicsResponseAttributes.runId) + && Objects.equals(this.topics, llmObsPatternsTopicsResponseAttributes.topics) + && Objects.equals( + this.additionalProperties, llmObsPatternsTopicsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + completedAt, + configId, + configSnapshot, + createdAt, + previousRunId, + runId, + topics, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsResponseAttributes {\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" configSnapshot: ").append(toIndentedString(configSnapshot)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" previousRunId: ").append(toIndentedString(previousRunId)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" topics: ").append(toIndentedString(topics)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseData.java new file mode 100644 index 00000000000..31d2ab686b1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns topics response. */ +@JsonPropertyOrder({ + LLMObsPatternsTopicsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsTopicsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsTopicsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsTopicsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsTopicsType type; + + public LLMObsPatternsTopicsResponseData() {} + + @JsonCreator + public LLMObsPatternsTopicsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsTopicsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsTopicsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsTopicsResponseData attributes( + LLMObsPatternsTopicsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns topics response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsTopicsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsTopicsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the run the topics belong to. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsTopicsResponseData type(LLMObsPatternsTopicsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns topics response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsType getType() { + return type; + } + + public void setType(LLMObsPatternsTopicsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsResponseData + */ + @JsonAnySetter + public LLMObsPatternsTopicsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsResponseData llmObsPatternsTopicsResponseData = + (LLMObsPatternsTopicsResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsTopicsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsTopicsResponseData.id) + && Objects.equals(this.type, llmObsPatternsTopicsResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsTopicsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsType.java new file mode 100644 index 00000000000..bf95c9b917a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns topics response. */ +@JsonSerialize(using = LLMObsPatternsTopicsType.LLMObsPatternsTopicsTypeSerializer.class) +public class LLMObsPatternsTopicsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("get_topics_response")); + + public static final LLMObsPatternsTopicsType GET_TOPICS_RESPONSE = + new LLMObsPatternsTopicsType("get_topics_response"); + + LLMObsPatternsTopicsType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsTopicsTypeSerializer + extends StdSerializer { + public LLMObsPatternsTopicsTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsTopicsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsTopicsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsTopicsType fromValue(String value) { + return new LLMObsPatternsTopicsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponse.java new file mode 100644 index 00000000000..388c27d65c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponse.java @@ -0,0 +1,155 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Response containing the topics, and the clustered points of their leaf topics, discovered by an + * LLM Observability patterns run. + */ +@JsonPropertyOrder({LLMObsPatternsTopicsWithClusteredPointsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsWithClusteredPointsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsTopicsWithClusteredPointsResponseData data; + + public LLMObsPatternsTopicsWithClusteredPointsResponse() {} + + @JsonCreator + public LLMObsPatternsTopicsWithClusteredPointsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsTopicsWithClusteredPointsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponse data( + LLMObsPatternsTopicsWithClusteredPointsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns topics-with-clustered-points response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsWithClusteredPointsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsTopicsWithClusteredPointsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsWithClusteredPointsResponse + */ + @JsonAnySetter + public LLMObsPatternsTopicsWithClusteredPointsResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicsWithClusteredPointsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsWithClusteredPointsResponse + llmObsPatternsTopicsWithClusteredPointsResponse = + (LLMObsPatternsTopicsWithClusteredPointsResponse) o; + return Objects.equals(this.data, llmObsPatternsTopicsWithClusteredPointsResponse.data) + && Objects.equals( + this.additionalProperties, + llmObsPatternsTopicsWithClusteredPointsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsWithClusteredPointsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.java new file mode 100644 index 00000000000..8b5d3a3d0e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.java @@ -0,0 +1,367 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an LLM Observability patterns topics-with-clustered-points response. */ +@JsonPropertyOrder({ + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_COMPLETED_AT, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_CONFIG_ID, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_CONFIG_SNAPSHOT, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_PREVIOUS_RUN_ID, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_RUN_ID, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_TOPICS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsWithClusteredPointsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public static final String JSON_PROPERTY_CONFIG_SNAPSHOT = "config_snapshot"; + private LLMObsPatternsConfigSnapshot configSnapshot; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_PREVIOUS_RUN_ID = "previous_run_id"; + private String previousRunId; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public static final String JSON_PROPERTY_TOPICS = "topics"; + private List topics = new ArrayList<>(); + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG_ID) String configId, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_PREVIOUS_RUN_ID) String previousRunId, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId, + @JsonProperty(required = true, value = JSON_PROPERTY_TOPICS) + List topics) { + this.configId = configId; + this.createdAt = createdAt; + this.previousRunId = previousRunId; + this.runId = runId; + this.topics = topics; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes completedAt( + OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Timestamp when the run completed. Null if the run has not completed. + * + * @return completedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * Identifier of the configuration that produced the run. + * + * @return configId + */ + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes configSnapshot( + LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + this.unparsed |= configSnapshot.unparsed; + return this; + } + + /** + * Snapshot of the configuration used for a patterns run. + * + * @return configSnapshot + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsPatternsConfigSnapshot getConfigSnapshot() { + return configSnapshot; + } + + public void setConfigSnapshot(LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes createdAt( + OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the run was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes previousRunId( + String previousRunId) { + this.previousRunId = previousRunId; + return this; + } + + /** + * Identifier of the run that completed immediately before this one. Empty if none. + * + * @return previousRunId + */ + @JsonProperty(JSON_PROPERTY_PREVIOUS_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPreviousRunId() { + return previousRunId; + } + + public void setPreviousRunId(String previousRunId) { + this.previousRunId = previousRunId; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Identifier of the run that produced the topics. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes topics( + List topics) { + this.topics = topics; + for (LLMObsPatternsTopicWithClusteredPoints item : topics) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes addTopicsItem( + LLMObsPatternsTopicWithClusteredPoints topicsItem) { + this.topics.add(topicsItem); + this.unparsed |= topicsItem.unparsed; + return this; + } + + /** + * List of discovered topics with their clustered points. + * + * @return topics + */ + @JsonProperty(JSON_PROPERTY_TOPICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTopics() { + return topics; + } + + public void setTopics(List topics) { + this.topics = topics; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsWithClusteredPointsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this LLMObsPatternsTopicsWithClusteredPointsResponseAttributes object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes + llmObsPatternsTopicsWithClusteredPointsResponseAttributes = + (LLMObsPatternsTopicsWithClusteredPointsResponseAttributes) o; + return Objects.equals( + this.completedAt, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.completedAt) + && Objects.equals( + this.configId, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.configId) + && Objects.equals( + this.configSnapshot, + llmObsPatternsTopicsWithClusteredPointsResponseAttributes.configSnapshot) + && Objects.equals( + this.createdAt, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.createdAt) + && Objects.equals( + this.previousRunId, + llmObsPatternsTopicsWithClusteredPointsResponseAttributes.previousRunId) + && Objects.equals( + this.runId, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.runId) + && Objects.equals( + this.topics, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.topics) + && Objects.equals( + this.additionalProperties, + llmObsPatternsTopicsWithClusteredPointsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + completedAt, + configId, + configSnapshot, + createdAt, + previousRunId, + runId, + topics, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsWithClusteredPointsResponseAttributes {\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" configSnapshot: ").append(toIndentedString(configSnapshot)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" previousRunId: ").append(toIndentedString(previousRunId)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" topics: ").append(toIndentedString(topics)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseData.java new file mode 100644 index 00000000000..66189fc4f85 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseData.java @@ -0,0 +1,220 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns topics-with-clustered-points response. */ +@JsonPropertyOrder({ + LLMObsPatternsTopicsWithClusteredPointsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsTopicsWithClusteredPointsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsTopicsWithClusteredPointsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsWithClusteredPointsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsTopicsWithClusteredPointsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsTopicsWithClusteredPointsType type; + + public LLMObsPatternsTopicsWithClusteredPointsResponseData() {} + + @JsonCreator + public LLMObsPatternsTopicsWithClusteredPointsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPatternsTopicsWithClusteredPointsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseData attributes( + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns topics-with-clustered-points response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsTopicsWithClusteredPointsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the run the topics belong to. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseData type( + LLMObsPatternsTopicsWithClusteredPointsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns topics-with-clustered-points response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsWithClusteredPointsType getType() { + return type; + } + + public void setType(LLMObsPatternsTopicsWithClusteredPointsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsWithClusteredPointsResponseData + */ + @JsonAnySetter + public LLMObsPatternsTopicsWithClusteredPointsResponseData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this LLMObsPatternsTopicsWithClusteredPointsResponseData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsWithClusteredPointsResponseData + llmObsPatternsTopicsWithClusteredPointsResponseData = + (LLMObsPatternsTopicsWithClusteredPointsResponseData) o; + return Objects.equals( + this.attributes, llmObsPatternsTopicsWithClusteredPointsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsTopicsWithClusteredPointsResponseData.id) + && Objects.equals(this.type, llmObsPatternsTopicsWithClusteredPointsResponseData.type) + && Objects.equals( + this.additionalProperties, + llmObsPatternsTopicsWithClusteredPointsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsWithClusteredPointsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsType.java new file mode 100644 index 00000000000..7e533ed5701 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsType.java @@ -0,0 +1,65 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns topics-with-clustered-points response. */ +@JsonSerialize( + using = + LLMObsPatternsTopicsWithClusteredPointsType + .LLMObsPatternsTopicsWithClusteredPointsTypeSerializer.class) +public class LLMObsPatternsTopicsWithClusteredPointsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("get_topics_with_cluster_points_response")); + + public static final LLMObsPatternsTopicsWithClusteredPointsType + GET_TOPICS_WITH_CLUSTER_POINTS_RESPONSE = + new LLMObsPatternsTopicsWithClusteredPointsType( + "get_topics_with_cluster_points_response"); + + LLMObsPatternsTopicsWithClusteredPointsType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsTopicsWithClusteredPointsTypeSerializer + extends StdSerializer { + public LLMObsPatternsTopicsWithClusteredPointsTypeSerializer( + Class t) { + super(t); + } + + public LLMObsPatternsTopicsWithClusteredPointsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsTopicsWithClusteredPointsType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsTopicsWithClusteredPointsType fromValue(String value) { + return new LLMObsPatternsTopicsWithClusteredPointsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequest.java new file mode 100644 index 00000000000..1573e1b14cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to trigger an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsTriggerRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsTriggerRequestData data; + + public LLMObsPatternsTriggerRequest() {} + + @JsonCreator + public LLMObsPatternsTriggerRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsTriggerRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsTriggerRequest data(LLMObsPatternsTriggerRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for triggering an LLM Observability patterns run. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerRequestData getData() { + return data; + } + + public void setData(LLMObsPatternsTriggerRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerRequest + */ + @JsonAnySetter + public LLMObsPatternsTriggerRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerRequest llmObsPatternsTriggerRequest = (LLMObsPatternsTriggerRequest) o; + return Objects.equals(this.data, llmObsPatternsTriggerRequest.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestAttributes.java new file mode 100644 index 00000000000..1ea5200a4d2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestAttributes.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for triggering an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsTriggerRequestAttributes.JSON_PROPERTY_CONFIG_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public LLMObsPatternsTriggerRequestAttributes() {} + + @JsonCreator + public LLMObsPatternsTriggerRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG_ID) String configId) { + this.configId = configId; + } + + public LLMObsPatternsTriggerRequestAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * The ID of the patterns configuration to run. + * + * @return configId + */ + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerRequestAttributes + */ + @JsonAnySetter + public LLMObsPatternsTriggerRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerRequestAttributes llmObsPatternsTriggerRequestAttributes = + (LLMObsPatternsTriggerRequestAttributes) o; + return Objects.equals(this.configId, llmObsPatternsTriggerRequestAttributes.configId) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(configId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerRequestAttributes {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestData.java new file mode 100644 index 00000000000..0d5a7b401cb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for triggering an LLM Observability patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsTriggerRequestData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsTriggerRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsTriggerRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsRequestType type; + + public LLMObsPatternsTriggerRequestData() {} + + @JsonCreator + public LLMObsPatternsTriggerRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsTriggerRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsTriggerRequestData attributes( + LLMObsPatternsTriggerRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for triggering an LLM Observability patterns run. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsTriggerRequestAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsTriggerRequestData type(LLMObsPatternsRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for triggering an LLM Observability patterns run. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRequestType getType() { + return type; + } + + public void setType(LLMObsPatternsRequestType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerRequestData + */ + @JsonAnySetter + public LLMObsPatternsTriggerRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerRequestData llmObsPatternsTriggerRequestData = + (LLMObsPatternsTriggerRequestData) o; + return Objects.equals(this.attributes, llmObsPatternsTriggerRequestData.attributes) + && Objects.equals(this.type, llmObsPatternsTriggerRequestData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponse.java new file mode 100644 index 00000000000..dda77e8a286 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response after triggering an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsTriggerResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsTriggerResponseData data; + + public LLMObsPatternsTriggerResponse() {} + + @JsonCreator + public LLMObsPatternsTriggerResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsTriggerResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsTriggerResponse data(LLMObsPatternsTriggerResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns trigger response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsTriggerResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerResponse + */ + @JsonAnySetter + public LLMObsPatternsTriggerResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerResponse llmObsPatternsTriggerResponse = (LLMObsPatternsTriggerResponse) o; + return Objects.equals(this.data, llmObsPatternsTriggerResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseAttributes.java new file mode 100644 index 00000000000..71ddabd68e4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseAttributes.java @@ -0,0 +1,204 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability patterns trigger response. */ +@JsonPropertyOrder({ + LLMObsPatternsTriggerResponseAttributes.JSON_PROPERTY_CONFIG_ID, + LLMObsPatternsTriggerResponseAttributes.JSON_PROPERTY_RUN_ID, + LLMObsPatternsTriggerResponseAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public LLMObsPatternsTriggerResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsTriggerResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG_ID) String configId, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.configId = configId; + this.runId = runId; + this.status = status; + } + + public LLMObsPatternsTriggerResponseAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * The ID of the patterns configuration that was run. + * + * @return configId + */ + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + public LLMObsPatternsTriggerResponseAttributes runId(String runId) { + this.runId = runId; + return this; + } + + /** + * The ID of the patterns run that was started. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + public LLMObsPatternsTriggerResponseAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Status of the patterns run. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsTriggerResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerResponseAttributes llmObsPatternsTriggerResponseAttributes = + (LLMObsPatternsTriggerResponseAttributes) o; + return Objects.equals(this.configId, llmObsPatternsTriggerResponseAttributes.configId) + && Objects.equals(this.runId, llmObsPatternsTriggerResponseAttributes.runId) + && Objects.equals(this.status, llmObsPatternsTriggerResponseAttributes.status) + && Objects.equals( + this.additionalProperties, + llmObsPatternsTriggerResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(configId, runId, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerResponseAttributes {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseData.java new file mode 100644 index 00000000000..e79befb15b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns trigger response. */ +@JsonPropertyOrder({ + LLMObsPatternsTriggerResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsTriggerResponseData.JSON_PROPERTY_ID, + LLMObsPatternsTriggerResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsTriggerResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsTriggerResponseType type; + + public LLMObsPatternsTriggerResponseData() {} + + @JsonCreator + public LLMObsPatternsTriggerResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsTriggerResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPatternsTriggerResponseType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsTriggerResponseData attributes( + LLMObsPatternsTriggerResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns trigger response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsTriggerResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsTriggerResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the patterns configuration that was run. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPatternsTriggerResponseData type(LLMObsPatternsTriggerResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns trigger response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerResponseType getType() { + return type; + } + + public void setType(LLMObsPatternsTriggerResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerResponseData + */ + @JsonAnySetter + public LLMObsPatternsTriggerResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerResponseData llmObsPatternsTriggerResponseData = + (LLMObsPatternsTriggerResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsTriggerResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsTriggerResponseData.id) + && Objects.equals(this.type, llmObsPatternsTriggerResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseType.java new file mode 100644 index 00000000000..63f7c52d6d0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns trigger response. */ +@JsonSerialize( + using = LLMObsPatternsTriggerResponseType.LLMObsPatternsTriggerResponseTypeSerializer.class) +public class LLMObsPatternsTriggerResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("topic_discovery_run")); + + public static final LLMObsPatternsTriggerResponseType TOPIC_DISCOVERY_RUN = + new LLMObsPatternsTriggerResponseType("topic_discovery_run"); + + LLMObsPatternsTriggerResponseType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsTriggerResponseTypeSerializer + extends StdSerializer { + public LLMObsPatternsTriggerResponseTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsTriggerResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsTriggerResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsTriggerResponseType fromValue(String value) { + return new LLMObsPatternsTriggerResponseType(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature b/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature index 842377375ae..35e9592fa0a 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature @@ -315,6 +315,30 @@ Feature: LLM Observability When the request is sent Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "Bad Request" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "Not Found" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "OK" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Create or update annotations returns "Bad Request" response Given operation "UpsertLLMObsAnnotations" enabled @@ -471,6 +495,30 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a patterns configuration returns "Bad Request" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_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: Delete a patterns configuration returns "No Content" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a patterns configuration returns "Not Found" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_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: Delete an LLM Observability annotation queue returns "No Content" response Given operation "DeleteLLMObsAnnotationQueue" enabled @@ -619,6 +667,27 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "Bad Request" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "Not Found" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "OK" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Get annotated interactions by content IDs returns "Bad Request" response Given operation "GetLLMObsAnnotatedInteractionsByTraceIDs" enabled @@ -675,6 +744,30 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "Bad Request" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "Not Found" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "OK" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: List LLM Observability annotation queues returns "Bad Request" response Given operation "ListLLMObsAnnotationQueues" enabled @@ -915,6 +1008,116 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns clustered points returns "Bad Request" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_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 patterns clustered points returns "Not Found" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_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 patterns clustered points returns "OK" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns configurations returns "Bad Request" response + Given operation "ListLLMObsPatternsConfigs" enabled + And new "ListLLMObsPatternsConfigs" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns configurations returns "OK" response + Given operation "ListLLMObsPatternsConfigs" enabled + And new "ListLLMObsPatternsConfigs" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns runs returns "Bad Request" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_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 patterns runs returns "Not Found" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_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 patterns runs returns "OK" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics returns "Bad Request" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_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 patterns topics returns "Not Found" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_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 patterns topics returns "OK" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics with clustered points returns "Bad Request" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_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 patterns topics with clustered points returns "Not Found" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_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 patterns topics with clustered points returns "OK" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Lock LLM Observability dataset draft state returns "Bad Request" response Given operation "LockLLMObsDatasetDraftState" enabled @@ -1075,6 +1278,30 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Accepted" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Bad Request" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Not Found" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability Scenario: Unlock LLM Observability dataset draft state returns "Bad Request" response Given operation "UnlockLLMObsDatasetDraftState" enabled diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 9815532a5b7..8cd923c97fd 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -4427,6 +4427,68 @@ "type": "safe" } }, + "ListLLMObsPatternsClusteredPoints": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsConfigs": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "UpsertLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "GetLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "DeleteLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "ListLLMObsPatternsRuns": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "TriggerLLMObsPatterns": { + "tag": "LLM Observability", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "GetLLMObsPatternsRunStatus": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsTopics": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsTopicsWithClusteredPoints": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "ListLLMObsDatasets": { "tag": "LLM Observability", "undo": {