use serde::{Deserialize, Serialize};
use crate::models::paths::BundleRelativePath;
use super::serde_helpers::{required_nullable, required_nullable_schema};
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct DatasetsSpec {
pub public_dir: BundleRelativePath,
#[serde(deserialize_with = "required_nullable")]
#[schemars(
required,
schema_with = "required_nullable_schema::<BundleRelativePath>"
)]
pub private_benchmark_dir: Option<BundleRelativePath>,
pub public_policy: crate::models::evaluation::ScoreVisibility,
pub private_benchmark_policy: PrivateBenchmarkPolicy,
pub private_benchmark_enabled: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct PublicDatasetsSpec {
pub public_dir: BundleRelativePath,
pub public_policy: crate::models::evaluation::ScoreVisibility,
pub private_benchmark_policy: PrivateBenchmarkPolicy,
pub private_benchmark_enabled: bool,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, schemars::JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum PrivateBenchmarkPolicy {
ScoreOnly,
}