langfuse-client-base 0.16.0

Auto-generated Langfuse API client from OpenAPI specification
Documentation
/*
 * server
 *
 * ## Authentication  Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:  - username: Langfuse Public Key - password: Langfuse Secret Key  ## Exports  - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml - Self-hosted deployments: interactive API reference at `/api/docs` and OpenAPI spec at `/api/openapi.yaml`
 *
 * The version of the OpenAPI document:
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct UnstableEvaluationRuleEvaluatorAssignment {
    #[serde(rename = "evaluator")]
    pub evaluator: Box<models::UnstableEvaluationRuleEvaluator>,
    /// Rule-specific override, or `null` to inherit the evaluator version's default mapping.
    #[serde(rename = "mapping", deserialize_with = "Option::deserialize")]
    pub mapping: Option<Vec<models::UnstablePromptVariableMappingRead>>,
}

impl UnstableEvaluationRuleEvaluatorAssignment {
    pub fn new(
        evaluator: models::UnstableEvaluationRuleEvaluator,
        mapping: Option<Vec<models::UnstablePromptVariableMappingRead>>,
    ) -> UnstableEvaluationRuleEvaluatorAssignment {
        UnstableEvaluationRuleEvaluatorAssignment {
            evaluator: Box::new(evaluator),
            mapping,
        }
    }
}